PDA

View Full Version : vBadvanced magpieRSS integration


Protoman
10-22-2005, 10:00 PM
This mod is unsupported, so it's by my choice that I help anybody
/*================================
CMPS 2.0 magpieRSS integration
by Protoman
Hack Ver 1.02
================================*/

Description:
This adds a very basic CMPS 2.0 module to your homepage that is generated with the help of magpieRSS. You can specify the number of links to display as well as how often the RSS feed will update. magpie is included in this zip file unmodified as allowed by the GPL license.

Stats
1 directory upload
1 module file upload
1 module addition
1 template addition


If you like this mod:
Please click Install!
I always accept donations too (PM) :p

FleaBag
10-23-2005, 07:33 PM
Nice work Protoman! I don't think the limiting will be a problem provided the feeds are trusted and it remains a centre module. :)

Odysseus
10-23-2005, 08:15 PM
Nice work, thanks for sharing!
This is exactly what I've been looking for today. :)

Limitations:
As far as I know magpie is not capable of limiting the length of the text displayed per line.

You can modify the output directly in rss.php. Below this line:

$title = $item['title'];

add the following line:

if(strlen($title) > 30) $title = substr($title, 0, 27) . "...";


This will break any too long titles to a maximum of 30 characters. You can of course modify this value according to you needs.

Rhoads
10-23-2005, 09:17 PM
This is exactly where I look up to were, great add-on Protoman
I have 1 question, can I centre the text, because I have now at the right-side a very empty blank flat, I use the standaard wide for mij portal, and my centerblock are to big for the text.

Protoman
10-23-2005, 10:34 PM
thanks for the addition odysseus, I think I'll leave it up to the pros to add that code since I'm not familiar with everybody's skill level.


drl2005, you should be able to center the text by changing the 'vba_portal_rss' template to:
<tr><td class="alt1"><div style="text-align:center;"><div style="text-align:left;margin:0 auto 0 auto; width: 400px;">$rssbits</div></div></td></tr>
you can thank Chroder for that bit of code :nervous:
change the 400px to the width you want the text to be.

Rhoads
10-24-2005, 07:12 AM
thanks for the addition odysseus, I think I'll leave it up to the pros to add that code since I'm not familiar with everybody's skill level.


drl2005, you should be able to center the text by changing the 'vba_portal_rss' template to:
<tr><td class="alt1"><div style="text-align:center;"><div style="text-align:left;margin:0 auto 0 auto; width: 400px;">$rssbits</div></div></td></tr>
you can thank Chroder for that bit of code :nervous:
change the 400px to the width you want the text to be.
Thnx, works great :)

glorify
10-25-2005, 09:02 PM
Nice work. Two questions.

1) Any way if you are viewing the rss that you can get like the first 30 chracters of the article?

2) Any way to add mutiple feeds? Doesn't have to be in one module. I can do different modules from various sources.

Odysseus
10-27-2005, 08:55 PM
I found a mistake in the documentation concerning the cache directory.
The doc says, you have to create a "cache" folder in the modules folder and set it to chmod 777.
The modules folder is the wrong location -- the cache folder must be created in the vbulletin root folder.

E.g., if you have vB installed on www.yourdomain.com/vbulletin/ (http://www.yourdomain.com/vbulletin/) --> create a folder /vbulletin/cache/ and set it to chmod 777. The cache folder is NOT supposed to be at /vbulletin/modules/cache!

I found this when checking my error logs, where I found some entries like that:

[Thu Oct 27 23:37:18 2005] [error] [client xxx.179.143.64] Cache unable to open file for writing: ./cache/755bf6967b6a39e9323c34014011492c
[Thu Oct 27 23:37:35 2005] [error] [client xxx.136.115.204] Cache couldn't make dir './cache'.
[Thu Oct 27 23:37:35 2005] [error] [client xxx.136.115.204] Cache unable to open file for writing: ./cache/755bf6967b6a39e9323c34014011492c
[Thu Oct 27 23:37:38 2005] [error] [client xxx.140.120.30] Cache couldn't make dir './cache'.
[Thu Oct 27 23:37:38 2005] [error] [client xxx.140.120.30] Cache unable to open file for writing: ./cache/755bf6967b6a39e9323c34014011492c
[Thu Oct 27 23:38:20 2005] [error] [client xxx.178.22.138] Cache couldn't make dir './cache'.
[Thu Oct 27 23:38:20 2005] [error] [client xxx.178.22.138] Cache unable to open file for writing: ./cache/755bf6967b6a39e9323c34014011492c

glorify
10-28-2005, 09:58 PM
Nice work. Two questions.

1) Any way if you are viewing the rss that you can get like the first 30 chracters of the article?

2) Any way to add mutiple feeds? Doesn't have to be in one module. I can do different modules from various sources.

Anything?