collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18366
  • stats Total Topics: 2501
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: Standard BeBot News Module + My MOTD module = NewNews!  (Read 23673 times)

0 Members and 2 Guests are viewing this topic.

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Standard BeBot News Module + My MOTD module = NewNews!
« on: September 26, 2006, 09:22:26 am »
In an attempt to undo some of the wrongs of my MOTD (http://bebot.link/index.php/topic,336.0.html) module, I've put together a brand new module that I've dubbed NewNews!

NewNews combines the features of News.php with the feature of MOTD.php, and adds some new stuff.

Features
  • Admins can delete messages
  • News items can be set to expire and will be automatically removed
  • News items expire time can be set by the user.
  • News items can be set to never expire.
  • Automatically behaves properly for guildbots and raidbots. (I hope!!!)
  • If your bot is a guildbot, news is sent when a buddy logs on.
  • If your bot is not a guildbot, news is sent when a player joins the channel.
  • Only most resent news item is displayed in chat.
  • Other news items are displayed as a click link/text window
  • News link displays the time of the most recent News update
  • Automatic news display can be enabled and disabled
  • Automatic news display can be set to simple and full mode (simple = news.php style, full = motd.php style)
  • News link prefix can be customized!
  • Use !news or !motd
  • If you're already using News.php, your news items will be automatiaclly imported into this module!
  • I included a helpfile!

Yeah, that's alot. I haven't really cleaned up my code yet, and I think I've found most of the bugs, but there could still be some issues in this code. As such,  I haven't dubbed this a 1.0 yet. Please hammer away and find bugs.

Improtant: This module depends on my New Module Settings (http://bebot.link/index.php/topic,607.0.html) Module. Install Module Settings before installing NewNews!!!

Also Important: Disable MOTD.php and News.php before using NewNews!

Last Improtant Note: I've only tested this on 0.2.8. No clue how it works in the 0.3 branch or earlier 0.2 versions.

I think that's all the gotchas...

Download: NewNews-0.9.5.zip
« Last Edit: December 29, 2006, 05:37:47 pm by Glarawyn »

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Re: Standard BeBot News Module + My MOTD module = NewNews!
« Reply #1 on: October 19, 2006, 07:36:38 pm »
Updated to 0.9.1:

Changes
  • Can now import MOTD items. /tell yourbot !motd import
  • Added wordwrap() to clean up the motd output.
  • Automatically adds campalot behavior without code edits (this is for my sanity and doesn't serve any purpose other than I don't have to maintain two different versions of the mdoule).

Offline eracet1

  • BeBot User
  • **
  • Posts: 20
  • Karma: +0/-0
Re: Standard BeBot News Module + My MOTD module = NewNews!
« Reply #2 on: October 30, 2006, 01:35:57 am »
looks like a great module. but not sure where I made a mistake.
I get an error when trying to run bebot of

Fatal error: Call to a member function save <> on a non-object in C:\BeBot\modules\NewNews.php on line 51

I set up bebot settings as you posted to change.
not sure what I did wrong. any help will be greatly appreciated.

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Re: Standard BeBot News Module + My MOTD module = NewNews!
« Reply #3 on: October 30, 2006, 04:53:38 am »
Looks like you missed a setup step in the settings module. You have to add a var $settings; to Bot.php for the settings module to work. Full instructions should be in the readme.

Offline eracet1

  • BeBot User
  • **
  • Posts: 20
  • Karma: +0/-0
Re: Standard BeBot News Module + My MOTD module = NewNews!
« Reply #4 on: October 30, 2006, 05:48:30 am »
looks like I forgot to actually install the php files. Thanks for the help
got it going now

Offline Landcast

  • BeBot Rookie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: Standard BeBot News Module + My MOTD module = NewNews!
« Reply #5 on: November 02, 2006, 01:34:26 am »
I was wondering about something.

was looking over the newnews.php and i see that at the bottom you have added some stuff for campalot. Any chance that can be used for other bots ? if so how would i go about doing it.. Tried to copy this code but as i guessed that didnt work.
Code: [Select]
$output .= $this -> colorize($this -> colors['infoheadline'], "Account Information:\n");
Trying to learn this but it takes time and im not that good at beeing patient.. hehe

/LC

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Re: Standard BeBot News Module + My MOTD module = NewNews!
« Reply #6 on: November 02, 2006, 04:37:41 am »
Any chance that can be used for other bots ? if so how would i go about doing it..

It is, but you would have to edit Bot.php and every other module that we've modified to get it to work. It's fairly obvious what you would need to do, but it's a lot of edits that I'm not going to track down, document, and produce a step by step guide for doing so. :)

Offline neongen

  • BeBot User
  • **
  • Posts: 64
  • Karma: +0/-0
Re: Standard BeBot News Module + My MOTD module = NewNews!
« Reply #7 on: November 23, 2006, 04:34:33 pm »
Glara did you modify your apf and beast modules? because when i try to get it to show that info it comes with a error that it's calling to a member function
« Last Edit: November 23, 2006, 07:21:44 pm by neongen »

Offline Naturalistic

  • Contributor
  • *******
  • Posts: 221
  • Karma: +0/-0
Re: Standard BeBot News Module + My MOTD module = NewNews!
« Reply #8 on: November 23, 2006, 08:26:10 pm »
Glara does a lot of things but he forgets later what he modded :P
220/25 Eternalist Doctor
-----------------------------
Campalot Coding Co-ordinator and Super Admin
http://www.campalot.info/index.php

Offline neongen

  • BeBot User
  • **
  • Posts: 64
  • Karma: +0/-0
Re: Standard BeBot News Module + My MOTD module = NewNews!
« Reply #9 on: November 23, 2006, 09:09:05 pm »
hehe oki  :)

but when i set in $output .= $this -> bot -> BeastDay -> beast_day1();
(called it 1 so i still have the blob on gc and pmsg)

then it comes with a call for a member function in c:\blahblah\newnews.php

and i looked at my whois it use it for alts but there is no problems. anyone know what the problem is?

Offline jjones666

  • Contributor
  • *******
  • Posts: 353
  • Karma: +0/-0
Re: Standard BeBot News Module + My MOTD module = NewNews!
« Reply #10 on: November 23, 2006, 09:39:13 pm »
what are you trying to do? give beastday stuff on logon?

-jj-

Offline neongen

  • BeBot User
  • **
  • Posts: 64
  • Karma: +0/-0
Re: Standard BeBot News Module + My MOTD module = NewNews!
« Reply #11 on: November 23, 2006, 10:08:15 pm »
i'm trying to get it 2 display like on campalot when you click on the news link. because the org i'm in now is talking so much about beast.

but i get
Fatal error: Call to a member function beast_day1() on a non-object in C:\sidecom\modules\NewNews.php
« Last Edit: November 23, 2006, 10:55:49 pm by neongen »

Offline jjones666

  • Contributor
  • *******
  • Posts: 353
  • Karma: +0/-0
Re: Standard BeBot News Module + My MOTD module = NewNews!
« Reply #12 on: November 23, 2006, 11:26:23 pm »
so u do !news and it shows beastday?

Offline neongen

  • BeBot User
  • **
  • Posts: 64
  • Karma: +0/-0
Re: Standard BeBot News Module + My MOTD module = NewNews!
« Reply #13 on: November 23, 2006, 11:38:24 pm »
no the news get send out on logon. and it makes a blob for the news. where people can click to see the news it's in there i wan't it to show (like admin status in online) but no matter what i do i get the none-object error...
« Last Edit: November 23, 2006, 11:42:26 pm by neongen »

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Re: Standard BeBot News Module + My MOTD module = NewNews!
« Reply #14 on: November 24, 2006, 05:03:12 am »
Glara did you modify your apf and beast modules?

Yes, that's why the Campalot function is only called on bot's running Campalot's code. You shouldn't modify your bot to use the campalot function, cause it's not going to work without other modifications. As I've stated before, the campalot function is there so I don't have to maintain multiple versions of the module. You have to add the code to make BeastDay, APF, etc. "core" modules.
« Last Edit: November 24, 2006, 05:05:25 am by Glarawyn »

 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]

* Who's Online
  • Dot Guests: 352
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal