Page 3 of 5 FirstFirst 12345 LastLast
Results 41 to 60 of 87

Thread: vBa CMPS: Customizable RSS feed module

  1. #41
    Junior Member
    Join Date
    Apr 2005
    Posts
    21

    Default Re: vBa CMPS: Customizable RSS feed module

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

    <?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);

    ?>

  2. #42

    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.

  3. #43
    Junior Member
    Join Date
    Apr 2005
    Posts
    21

    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?

  4. #44

    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!

  5. #45
    Junior Member
    Join Date
    Apr 2005
    Posts
    21

    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?

  6. #46
    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!

  7. #47
    Junior Member
    Join Date
    Apr 2005
    Posts
    21

    Default Re: vBa CMPS: Customizable RSS feed module

    Anyone have a hint for me on the descriptions?

  8. #48

    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.

  9. #49
    Junior Member
    Join Date
    Apr 2005
    Posts
    21

    Default Re: vBa CMPS: Customizable RSS feed module

    That's where I need to look then and modify it then. Thanks, Tom!

  10. #50
    Junior Member
    Join Date
    Apr 2005
    Posts
    21

    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.

  11. #51

    Default Re: vBa CMPS: Customizable RSS feed module

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

    bestdamngamblingforum.com

  12. #52

    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?

  13. #53

    Default Re: vBa CMPS: Customizable RSS feed module

    yeah i created the cache directory.

    what would the absolute path look like?

  14. #54

    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.

  15. #55

    Default Re: vBa CMPS: Customizable RSS feed module

    thanks.....

  16. #56
    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

  17. #57
    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?

  18. #58

    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.

  19. #59
    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.

  20. #60
    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?

Page 3 of 5 FirstFirst 12345 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •