vBadvanced Forums  
Go Back   vBadvanced Forums > vBadvanced Products > vBadvanced CMPS > vBa CMPS v1.x (Archive - Closed for Posting) > Add-On Modules & Modifications

 
 
Thread Tools Display Modes
  #41  
Old 08-24-2005, 10:21 PM
alyster4k alyster4k is offline
Junior Member
 
Join Date: Apr 2005
Posts: 19
Default Re: vBa CMPS: Customizable RSS feed module

Sure thing. Thanks for the quick reply. Nothing stood at me though with minimal changes made...

Quote:
<?php

// optional function to modify each item as needed (must be a unique name)
function rss_modify_rssdata($item_number, &$rss_item)
{
global $vboptions;

// do any data modifications needed at this point.
$rss_item['DESCRIPTION'] = vbdate($vboptions['dateformat'], strtotime($rss_item['PUBDATE']), $vboptions['yestoday']);
$rss_item['DESCRIPTION'] .= ' <span class="time">';
$rss_item['DESCRIPTION'] .= vbdate($vboptions['timeformat'], strtotime($rss_item['PUBDATE']));
$rss_item['DESCRIPTION'] .= '</span>';
}

// All the information about each feed is defined here
// 'feed' => location of the rss live feed
// 'cache_age' => default value for cache refresh if not specified in feed
// 'maxitems' => maximum # of items to display regardless of how many are in the feed
// 'randomize' => if 'true' then 'maxitems' items will be 'randomized' if fewer than total item count
// 'template' => the 'master' template to be used
// 'templatebits' => the template used for each record of the file
// 'callback' => an optional function to use to process each item

$rss_feed_array = array (
feed => '<?php

// optional function to modify each item as needed (must be a unique name)
function rss_modify_renntech($item_number, &$rss_item)
{
global $vboptions;

// do any data modifications needed at this point.
$rss_item['DESCRIPTION'] = vbdate($vboptions['dateformat'], strtotime($rss_item['PUBDATE']), $vboptions['yestoday']);
$rss_item['DESCRIPTION'] .= ' <span class="time">';
$rss_item['DESCRIPTION'] .= vbdate($vboptions['timeformat'], strtotime($rss_item['PUBDATE']));
$rss_item['DESCRIPTION'] .= '</span>';
}

// All the information about each feed is defined here
// 'feed' => location of the rss live feed
// 'maxitems' => maximum # of items to display regardless of how many are in the feed
// 'randomize' => if 'true' then 'maxitems' items will be 'randomized' if fewer than total item count
// 'template' => the 'master' template to be used
// 'templatebits' => the template used for each record of the file
// 'callback' => an optional function to use to process each item

$rss_feed_array = array (
feed => 'http://www.kansascity.com/mld/kansascity/news/local/rss.xml',
maxitems => 7,
randomize => false,
template => 'adv_portal_rss',
templatebits => 'adv_portal_rennbits',
callback => ''
);

require ('./modules/rssfeed.php');

unset($rss_feed_array);

?>
',
cache_age => 60,
maxitems => 7,
randomize => false,
template => 'adv_portal_rss',
templatebits => 'adv_portal_rssbits',
callback => 'rss_modify_rssdata'
);

require ('./modules/rssfeed.php');

unset($rss_feed_array);

?>
  #42  
Old 08-24-2005, 10:30 PM
roscoe36 roscoe36 is offline
Member
 
Join Date: Jul 2005
Posts: 33
Default Re: vBa CMPS: Customizable RSS feed module

Is that just a bad copy and paste job by you or does your file really start to repeat itself halfway through? Your posted code wraps at line 25.

PHP Code:
// 'templatebits' => the template used for each record of the file
// 'callback' => an optional function to use to process each item

$rss_feed_array = array (
feed => '<?php

// optional function to modify each item as needed (must be a unique name)
function rss_modify_renntech($item_number, &$rss_item)
It's wrapping here

PHP Code:
$rss_feed_array = array ( 
feed => '<?php
My suggestion is to download the files in the first post and open it in a pure text editor. Make only the changes to the feed location and TTL.

See if that will work.
  #43  
Old 08-24-2005, 10:46 PM
alyster4k alyster4k is offline
Junior Member
 
Join Date: Apr 2005
Posts: 19
Default Re: vBa CMPS: Customizable RSS feed module

You're right on the ball, roscoe. I must've had some crazy cut-n-paste episode because all I use is notepad usually. That did the trick. Thank you! It looks pretty bare there in the center. I'm pondering moving it to the side or adding more material like the description to fill up some room. Any hints on this?
  #44  
Old 08-24-2005, 10:51 PM
roscoe36 roscoe36 is offline
Member
 
Join Date: Jul 2005
Posts: 33
Default Re: vBa CMPS: Customizable RSS feed module

Depends on what content is in your feed. I'm using 760 fixed with only a left and center column on my CMPS. I actually have 4 feeds right now, each with 3 headlines and then a CMPS custom page that displays 10 articles from each feed (my NEWS page).

Best of luck!
  #45  
Old 08-24-2005, 10:58 PM
alyster4k alyster4k is offline
Junior Member
 
Join Date: Apr 2005
Posts: 19
Default Re: vBa CMPS: Customizable RSS feed module

The feed (http://www.kansascity.com/mld/kansas.../local/rss.xml) shows decent article descriptions ("More people are dying violently in Kansas City this year, and not just because of the spike in homicides.") under the titles. Can I add these in the module? What's the link to your site if I may ask?
  #46  
Old 08-24-2005, 11:14 PM
disco4me disco4me is offline
Senior Member
 
Join Date: Feb 2005
Posts: 154
Default Re: vBa CMPS: Customizable RSS feed module

Roscoe,

I'd like to see your site if you would post your URL.

Thanks

Quote:
Originally Posted by roscoe36
Depends on what content is in your feed. I'm using 760 fixed with only a left and center column on my CMPS. I actually have 4 feeds right now, each with 3 headlines and then a CMPS custom page that displays 10 articles from each feed (my NEWS page).

Best of luck!
  #47  
Old 08-26-2005, 08:08 PM
alyster4k alyster4k is offline
Junior Member
 
Join Date: Apr 2005
Posts: 19
Default Re: vBa CMPS: Customizable RSS feed module

Anyone have a hint for me on the descriptions?
  #48  
Old 08-26-2005, 08:38 PM
Tom M Tom M is offline
Senior Member
 
Join Date: Jan 2004
Posts: 1,867
Default Re: vBa CMPS: Customizable RSS feed module

The adv_portal_rssbits template already includes the $rss_item[DESCRIPTION] field. If the template hasn't been modified then the description should be showing for you.
  #49  
Old 08-26-2005, 11:42 PM
alyster4k alyster4k is offline
Junior Member
 
Join Date: Apr 2005
Posts: 19
Default Re: vBa CMPS: Customizable RSS feed module

That's where I need to look then and modify it then. Thanks, Tom!
  #50  
Old 08-27-2005, 06:59 PM
alyster4k alyster4k is offline
Junior Member
 
Join Date: Apr 2005
Posts: 19
Default Re: vBa CMPS: Customizable RSS feed module

Anyone else manage to put this in a collapsible and/or scrolling block yet? I can do it after some toying but I'd rather not reinvent the wheel here.

Tom, I added a "target="_blank"" reference for the HREF's in the templates to have the news open up in new windows too.
  #51  
Old 08-28-2005, 03:25 PM
diceman diceman is offline
Junior Member
 
Join Date: Aug 2005
Posts: 15
Default Re: vBa CMPS: Customizable RSS feed module

i can't get the feed to work. nothing at all apears ???

bestdamngamblingforum.com
  #52  
Old 08-28-2005, 03:29 PM
roscoe36 roscoe36 is offline
Member
 
Join Date: Jul 2005
Posts: 33
Default Re: vBa CMPS: Customizable RSS feed module

Did you follow the instructions exactly?

create the cache dir? chmod it to writeable?

What version of VB and CMPS are you running?
  #53  
Old 08-28-2005, 04:16 PM
diceman diceman is offline
Junior Member
 
Join Date: Aug 2005
Posts: 15
Default Re: vBa CMPS: Customizable RSS feed module

yeah i created the cache directory.

what would the absolute path look like?
  #54  
Old 08-28-2005, 04:24 PM
roscoe36 roscoe36 is offline
Member
 
Join Date: Jul 2005
Posts: 33
Default Re: vBa CMPS: Customizable RSS feed module

Depends on your server OS. Ask you host, or server admin. They should be able to sort you out.

Or maybe it is in your vB config file too. I don't remember.
  #55  
Old 08-28-2005, 04:35 PM
diceman diceman is offline
Junior Member
 
Join Date: Aug 2005
Posts: 15
Default Re: vBa CMPS: Customizable RSS feed module

thanks.....
  #56  
Old 09-03-2005, 10:58 PM
dstephan dstephan is offline
Junior Member
 
Join Date: Aug 2005
Posts: 27
Default Re: vBa CMPS: Customizable RSS feed module

Hi, I'm trying to get this work too. I get this error. Any ideas?

Warning: main(.modules/rssfeed.php): failed to open stream: No such file or directory in /modules/SSC.php on line 34

Warning: main(.modules/rssfeed.php): failed to open stream: No such file or directory in /modules/SSC.php on line 34

Fatal error: main(): Failed opening required '.modules/rssfeed.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/dstephan/public_html/forums/modules/SSC.php on line 34
  #57  
Old 09-24-2005, 08:28 PM
ryuuchida ryuuchida is offline
Junior Member
 
Join Date: Dec 2004
Posts: 9
Default Re: vBa CMPS: Customizable RSS feed module

This is a nice hack! One question though: if I want multiple feeds, is this just a matter of renaming the rssmain.php and editing the rss feed url?
  #58  
Old 09-24-2005, 09:05 PM
Tom M Tom M is offline
Senior Member
 
Join Date: Jan 2004
Posts: 1,867
Default Re: vBa CMPS: Customizable RSS feed module

Quote:
Originally Posted by ryuuchida
This is a nice hack! One question though: if I want multiple feeds, is this just a matter of renaming the rssmain.php and editing the rss feed url?
Pretty much. If you have a callback that modifies the data then you'll need to rename that as well. If you will be using the same templates then copy the rssmain.php to a new file and create the CMPS module that makes use of that file. The whole process only takes a couple of minutes after getting things set up the first time.
__________________
Tom Morris
Porsche Boxster discussion forum.
Today's Conservative discussion forum.
  #59  
Old 09-25-2005, 05:14 AM
ryuuchida ryuuchida is offline
Junior Member
 
Join Date: Dec 2004
Posts: 9
Default Re: vBa CMPS: Customizable RSS feed module

That's a very quick response, thanks! I'll try it and see how it goes.
  #60  
Old 09-25-2005, 05:49 AM
ryuuchida ryuuchida is offline
Junior Member
 
Join Date: Dec 2004
Posts: 9
Default Re: vBa CMPS: Customizable RSS feed module

Okay, I put two rss modules on the same page, each with different php input file but with the same templates and the page won't load. (I tried it with different templates and it didn't work either.) I am doing something wrong or is this just not possible?
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Webcam Feed Module SVTOA Add-On Modules & Modifications 11 06-11-2006 01:14 PM
Making an RSS Feed Glenn Sand Troubleshooting / "How do I..." Questions 1 05-02-2005 01:08 PM
Want to add a News Feed C_P Troubleshooting / "How do I..." Questions 2 10-09-2004 05:39 PM
User customizable CMPS page ogetbilo Feedback & Suggestions 1 05-20-2004 12:04 PM


All times are GMT -4. The time now is 07:23 AM.

Forums Powered by vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.
Please note that vBadvanced is in no way affiliated with Jelsoft Enterprises Ltd, nor will Jelsoft be able to provide any support for our products.