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?
December 02, 2008, 02:09:00 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 2553 times)
0 Members and 1 Guest are viewing this topic.
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1085


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
Log playtime from buddys ...
by IKShadow
[Today at 06:48:12 AM]

[request] Raid timers
by Elesar1
[December 01, 2008, 04:41:09 PM]

Shared DB online list
by Temar
[December 01, 2008, 01:55:47 AM]

relay colors
by Temar
[December 01, 2008, 01:54:56 AM]

BeBot v0.6.0 released
by Alreadythere
[November 30, 2008, 05:32:00 PM]

Change to Bid.php
by Temar
[November 30, 2008, 11:41:44 AM]

OnlineOrg
by Jiheld
[November 29, 2008, 12:44:27 PM]

Silly Newbie Question.
by Temar
[November 29, 2008, 12:00:02 PM]

massive_pvp_time_table 1
by gerborg
[November 29, 2008, 06:55:35 AM]

Bot not see Guild Chat
by Delvar
[November 28, 2008, 08:30:34 AM]
Stats
Members
Total Members: 1244
Latest: Armonkens
Stats
Total Posts: 11145
Total Topics: 1505
Online Today: 25
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 2
Guests: 20
Total: 22
Temar
Kentarii

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