[ABD]RSS News Ticker 0.1.1

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
t27duck
Registered User
Posts: 131
Joined: Sun May 20, 2007 11:43 pm

[ABD]RSS News Ticker 0.1.1

Post by t27duck »

I made a custom RSS ticker for my college's gaming club's forum. I compiled it into a proper MOD in case anyone else might have a use for it. If all goes well, I'll just send it to phpBB for validation. Let me know if my installation instructions are not working.

MOD Title: RSS News Ticker
MOD Description: Adds a scrolling news ticker on the forum index displaying the latest headlines from a given RSS feed.
MOD Version: 0.1.1
phpBB Version: 3.0 RC7 or later (as the base code does not rely on phpBB's functions)

Supported styles: prosilver and subsilver2 (Styles based off of prosilver and subsilver2 *should* work but don't quote me on that)

Languages: English
(Note: This Mod only has 3 language strings. Because of this, I just set the strings as variables in newscenter/rss.php for quick access and easy translation without having to deal with extra files)

MOD Download: Here
Please read through the Author's note and DIY Instruction sections (at the bottom of the install.xml page) before posting problems.

USERS UPDATING FROM 0.1.0: Just override the files. No editing is needed...but you'll have to reset your settings in newscenter/rss.php

MOD Screen Shot:
Image


MOD NOTES:
  • This Mod uses a modified version of lastRSS.php with some of its features disabled for faster loading and less memory use. You can download the full version at http://lastrss.oslab.net/ and use it in place of the provided file. This Mod also uses the Pausing up-down scroller by Dynamic Drive. Both files are freeware under GNU.
  • To modify this MOD's settings, open newsceneter/rss.php in a text editor to change the values
  • The default feed for this MOD is Slashdot's feed
  • If you are using the RSS caching feature on lastRSS (turned on by default on this MOD), chmod the newscenter/tmp folder to 777.

MOD History:
0.1.0
- First release

0.1.1
- Added switch to choose if clicking on links opens in a new window
- Set default re-encoding of RSS data to UTF-8
Last edited by t27duck on Sat Nov 24, 2007 9:34 pm, edited 2 times in total.
Always have a back up plan for your back up plan.

.:: Chico ::.
Registered User
Posts: 463
Joined: Fri Aug 03, 2007 6:35 am
Location: Rio de Janeiro
Contact:

Re: [BETA]RSS News Center 0.1.0

Post by .:: Chico ::. »

wow,
really great for sites that wanna integrate some information like last news from tv, from fotolog sites, frmo PHPBB.com too, really great!

contragulations!

saaiberke
Registered User
Posts: 1126
Joined: Wed Jul 20, 2005 8:13 am
Location: Gent/Belgium
Contact:

Re: [BETA]RSS News Center 0.1.0

Post by saaiberke »

Great mod :) Can I adapt the font dimensions?

And I get these notices in my errorlog:

Code: Select all

[09-Nov-2007  10:09:08] [phpBB Debug] [client XXX.X.XXX.XXX] [File index.php] PHP Notice: in file /beforum/newscenter/rss.php on line 57 : Use of undefined constant items - assumed 'items'
Grtz,

Nic

t27duck
Registered User
Posts: 131
Joined: Sun May 20, 2007 11:43 pm

Re: [BETA]RSS News Center 0.1.0

Post by t27duck »

saaiberke:
Opps, :oops: forgot some quotes.

In rss.php...
FIND (or just go to line 57)

Code: Select all

foreach ($rs[items] as $value)
REPLACE WITH

Code: Select all

foreach ($rs['items'] as $value)
Also, the CSS that you add to the .css files in the [style]/theme/ file controls how the news box looks. Just edit or at to those values and it'll update the look on your site.
Always have a back up plan for your back up plan.

saaiberke
Registered User
Posts: 1126
Joined: Wed Jul 20, 2005 8:13 am
Location: Gent/Belgium
Contact:

Re: [BETA]RSS News Center 0.1.0

Post by saaiberke »

Thanks for the info. I can indeed change the css but I can't manage to get the titles bigger. How can I do that?

And would it be possible to change the links so that they open in a new tab so you don't go away from the board's index page?

Grtz,

Nic

t27duck
Registered User
Posts: 131
Joined: Sun May 20, 2007 11:43 pm

Re: [BETA]RSS News Center 0.1.0

Post by t27duck »

I can add a switch that'll open up links in a new window in a future version.


As far as the CSS goes...

Code: Select all

#pscroller1{
width: 100%; /* 200px; */
height: 30px;
padding: 0px;
margin: 0px;
}
Under the 'margin: 0px;' you can add the line, 'font-size: XXpx;' where XX is the font size for the titles in pixels.
Always have a back up plan for your back up plan.

sotis
Registered User
Posts: 294
Joined: Tue Oct 17, 2006 4:56 pm
Location: Bulgaria
Contact:

Re: [BETA]RSS News Center 0.1.0

Post by sotis »

I have a problem with the charset

The news are in windows-1251 charset and they appear on the forum like "?????????????"

saaiberke
Registered User
Posts: 1126
Joined: Wed Jul 20, 2005 8:13 am
Location: Gent/Belgium
Contact:

Re: [BETA]RSS News Center 0.1.0

Post by saaiberke »

Thank you very much for the info, it worked :)

Grtz,

Nic

t27duck
Registered User
Posts: 131
Joined: Sun May 20, 2007 11:43 pm

Re: [BETA]RSS News Center 0.1.0

Post by t27duck »

sotis wrote:I have a problem with the charset

The news are in windows-1251 charset and they appear on the forum like "?????????????"
You can try this and see if it works.

Open rss.php

FIND

Code: Select all

$rss->items_limit = 0;
AFTER ADD

Code: Select all

$rss->cp = 'UTF-8';
I think that'll convert the char set for the RSS file into UTF-8 which should display correctly on your forum.
Always have a back up plan for your back up plan.

sotis
Registered User
Posts: 294
Joined: Tue Oct 17, 2006 4:56 pm
Location: Bulgaria
Contact:

Re: [BETA]RSS News Center 0.1.0

Post by sotis »

WOW

It works :D

Thanks a lot

How the news can be open in new window

t27duck
Registered User
Posts: 131
Joined: Sun May 20, 2007 11:43 pm

Re: [BETA]RSS News Center 0.1.0

Post by t27duck »

sotis wrote:How the news can be open in new window
Will add that in a future release.

If you want to force it to open in a new window yourself, in rss.php...

FIND

Code: Select all

$rss_js_data .= "pausecontent[c++]='<a href=\"".$value['link']."\">".str_replace("'","\'",$value['title'])."</a>';\n";
REPLACE WITH

Code: Select all

$rss_js_data .= "pausecontent[c++]='<a href=\"#\" onClick=\"window.open(\\'".$value['link']."\\'); return false;\">".str_replace("'","\'",$value['title'])."</a>';\n";
Always have a back up plan for your back up plan.

yaw_pakhtoon
Registered User
Posts: 107
Joined: Wed Sep 12, 2007 12:18 am

Re: [BETA]RSS News Center 0.1.0

Post by yaw_pakhtoon »

thanks alot.. good mod.
Image

johnfosteruk
Registered User
Posts: 59
Joined: Mon Sep 03, 2007 1:48 am

Re: [BETA]RSS News Center 0.1.0

Post by johnfosteruk »

This is a fantastic mod - thanks.

Have you looked at extending the features so that it'll grab the content of each item in a feed and post it in a given forum as a new topic?

comuter
Registered User
Posts: 158
Joined: Mon Jan 16, 2006 2:08 pm

Re: [BETA]RSS News Center 0.1.0

Post by comuter »

Installed it myself good mod

is there any options to display more than one article? I want to have 2 articles names

like this

News Article One
News Article Two

t27duck
Registered User
Posts: 131
Joined: Sun May 20, 2007 11:43 pm

Re: [BETA]RSS News Center 0.1.1

Post by t27duck »

Ok, 0.1.1 is up. I added a switch in rss.php that'll let you choose if clicking on links opens in a new window (default is set to false) and the RSS data will auto re-encode to UTF-8 if the feed is not UTF-8.

Let me know if I botched up this package as I sort of threw my changed files into a zip and threw it up on my server.

People updating from 0.1.0, just override the files on the sever and you're good to go.


johnfosteruk:
Possibly. It may not be "throw news entries in a thread or threads" but does having a page that'll list all entries in the feed work? I'm trying to keep this MOD as simple and as "idiot-proof" as possible.


comuter:
Don't take this the wrong way, but I have absolutely no idea what you are talking about. :D
Always have a back up plan for your back up plan.

Locked

Return to “[3.0.x] Abandoned MODs”