Most of the plugins here are made by B3 users and the authors may not visit frequently. If you need support for plugins or if questions remain unanswered, you will have to contact the author directly. Read the full Support Disclaimer here
NOTE: Do not attach plugins to your forumtopics! Attachements are periodically removed by maintenance tasks. Upload your plugins to our Downloads section instead!

You are here: Big Brother Bot ForumAdd-OnsPlugins Discussion (Moderator: MordyT)plugin_adv - Is it possible to retrieve data from HTTP?
Pages: [1]   Go Down
  Print  
Author Topic: plugin_adv - Is it possible to retrieve data from HTTP?  (Read 270 times) Bookmark and Share
Newbie
*
OS: Linux
Type: Owner dedicated server(s)
Gameservers: CoD4, CoD6
Posts: 1
Offline Offline
« on: January 08, 2012, 02:33:57 PM »

Hello,

To start, let me thank you all for the wonderful work you have done on B3. My servers would not be as great as they are today if it weren't for your tedious work.

This isn't really a problem, but I'd like to find a better way to retrieve text for plugin_adv to "spam." Right now I have it grabbing it from a txt file, but since I am hosting from multiple boxes this presents the problem of having to update it on each one. I don't have RDP access to all of them, either, so I was wondering if there was a better way to do it.

1) Setup some sort of RSS feed. I don't have experience with this.

2) I noticed that in this block of plugin_adv.xml, the default uses CDATA to retrieve the latest news here from the RSS feed on the B3 website. What is the actual format that it is listed in? I could place a similar file on a webserver and just edit it to my needs, but I don't know the syntax.

Code:
<settings name="newsfeed">
<!--
you can include newsitems in your adds by setting the section below
you can add feeditems in the adds like this:
@feed   (will pick the next newsitem each time it is included in the rotation,
               rotating until 'items' is reached and then start over.)
@feed 0 (will pick the latest newsitem available from the feed and add it in the rotation)
@feed 1 (will pick the second latest item in line)
etc.
-->
<set name="url"><![CDATA[http://forum.bigbrotherbot.net/news-2/?type=rss;action=.xml]]></set>
<set name="items">5</set>
<set name="pretext">News: </set>

If anyone knows the format, it would be awesome.

3) Using HTTP directly in this field:

Code:
<!--
you can either set here a text file that will contain one ad per line
or fill the <ads> section below
-->
<set name="ads">C:/BigBrotherBot/spam.txt</set> -->

What do you guys think?

Any input is appreciated. Thanks for reading.

-Tom
Logged

Senior Dev.
*
OS: Linux
Type: Home user
Posts: 3484
Offline Offline
WWW
Support Specialty: B3-Core, UrT/SmG/BFBC2 parsers, Plugin development
« Reply #1 on: January 08, 2012, 04:33:30 PM »

Hi Tom,

1) Setup some sort of RSS feed. I don't have experience with this.
There are PHP libraries to create RSS feeds. Have a look at Zend_Feed_Writer from the Zend framework or this one that I discovered just now

Quote
2) I noticed that in this block of plugin_adv.xml, the default uses CDATA to retrieve the latest news here from the RSS feed on the B3 website. What is the actual format that it is listed in? I could place a similar file on a webserver and just edit it to my needs, but I don't know the syntax.
...
If anyone knows the format, it would be awesome.
The format is quite simple is you are used to XML. The wikipedia article gives a good overview of it.


Quote
3) Using HTTP directly in this field:
I documented your suggestion so we won't forget about it the day someone does not know what to do Smiley

Logged

Tags: plugin_adv http rss 
Pages: [1]   Go Up
  Print  
 
Jump to:  


Rate this page +1 at Google Search


SimplePortal 2.3.1 © 2008-2009, SimplePortal