L* R*
HOME FORUM DOWNLOADS
Content
  Links
     Browse SVN
     SVN Commit log
     Documentation (Wiki)
  Developers
     Taskmanager
User
Welcome, Guest. Please login or register.
Did you miss your activation email?
October 12, 2008, 11:30:48 PM

Login with username, password and session length
Search



Advanced search
Support GoPHP5.org
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Modules > Official modules > Topic: Modified News.php
Pages: 1 [2]   Go Down
« previous next »
Print
Author Topic: Modified News.php  (Read 2438 times)
0 Members and 1 Guest are viewing this topic.
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1061


Re: Modified News.php
« Reply #15 on: February 02, 2006, 08:03:41 AM »

Quote from: Khalem on February 02, 2006, 07:23:49 AM
- Find a better way to pull a single result without doing the foreach loop.
I guess you are talking about code like
Code:
$result = $this -> bot -> db -> select("SELECT id, time  FROM news WHERE type = '2' OR type = '1' ORDER BY id DESC LIMIT 0, 1");
if (!empty($result))
foreach ($result as $val)
{
$newsdate = gmdate("dS M, H:i", $val[1]);
}

Just try
Code:
$result = $this -> bot -> db -> select("SELECT id, time  FROM news WHERE type = '2' OR type = '1' ORDER BY id DESC LIMIT 0, 1");
if (!empty($result))
$newsdate = gmdate("dS M, H:i", $result[0][1]);
$result is an array, $result[0] is the first entry - which has to exist, otherwise it would be empty. And you know that there won't be a second entry anyways.
Logged
Aesgaard
Rookie
**
Offline Offline

Gender: Male
Posts: 73


.:.Alpha.:.


Re: Modified News.php
« Reply #16 on: February 27, 2007, 08:32:20 PM »

Is it just me or is all the host servers down ?
Logged

-*tinkers*-
jjones666
BeBot Contributor
Champion
*******
Offline Offline

Posts: 353


Re: Modified News.php
« Reply #17 on: February 28, 2007, 02:21:09 AM »

The latest version of !news should be in Bebot 0.2.11.  For a good alternative search for NewNews on the forum (by Glarawyn).

-jj-
Logged
Aesgaard
Rookie
**
Offline Offline

Gender: Male
Posts: 73


.:.Alpha.:.


Re: Modified News.php
« Reply #18 on: September 02, 2007, 07:07:10 AM »

News for version 0.4 would be nice *sigh* Tongue
Logged

-*tinkers*-
Joulette
Freshman
*
Offline Offline

Posts: 2


Re: Modified News.php
« Reply #19 on: November 25, 2007, 12:01:02 PM »

In the news module, there's unfortunately no way to delete a headline item if it breaks the gui, which is what happened to our new today. I added a headline item that broke the gui. Now I don't have a way to delete it, and we can't view the news either.

Any suggestions?

thanks
Logged
Blueeagle
Omnipotent
BeBot Developer
Expert
********
Offline Offline

Gender: Male
Posts: 313



Re: Modified News.php
« Reply #20 on: November 26, 2007, 01:52:46 AM »

Best way would be to not use html-ish tags in the items. Those should ofcourse have been converted to < and > before being inserted.

For now deleting them from the database manually using either the command line or some administrator tool would be best.
Logged

The only problem that can't be solved by adding another wrapper is having too many wrappers.
Pages: 1 [2]   Go Up
Print
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Modules > Official modules > Topic: Modified News.php
« previous next »
 
Jump to:  

Recent
Bossloot for 5.2
by Brac
[Today at 04:45:17 PM]

!security Levels
by Nytridr
[Today at 02:00:16 PM]

Ported Modules
by Jiheld
[Today at 09:00:13 AM]

raid/point system suggest...
by Temar
[October 11, 2008, 11:45:40 PM]

!timers suggestions: alts...
by Alreadythere
[October 11, 2008, 03:19:46 PM]

!server does not work
by Alreadythere
[October 11, 2008, 06:54:38 AM]

TWC
by clashbot
[October 10, 2008, 08:52:57 AM]

Using Bebot in AoC Raid c...
by IKShadow
[October 09, 2008, 02:38:50 PM]

!items database
by cthulhu
[October 09, 2008, 08:00:27 AM]

File upload issue
by GBH
[October 08, 2008, 10:33:40 AM]
Stats
Members
Total Members: 988
Latest: Talmahera
Stats
Total Posts: 10808
Total Topics: 1458
Online Today: 15
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 1
Guests: 22
Total: 23
Zeephonz

Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC
TinyPortal v0.9.8 © Bloc | NewDef design by Bloc
Page created in 0.356 seconds with 28 queries. (Pretty URLs adds 0.028s, 4q)
Loading...