Page 2 of 5 FirstFirst 12345 LastLast
Results 21 to 40 of 87

Thread: vBa CMPS: Customizable RSS feed module

  1. #21

    Default Re: vBa CMPS: Customizable RSS feed module

    Quote Originally Posted by SomeName
    My module works beautifully for some feeds, but none of the ones from this sites selections seem to work although I can pull them up in a browser or add them to my.yahoo
    I did a bit of research and came up empty. I'm by far no expert when it comes to rss feeds

    Have you tried using the url with one of the rss feed readers to see if you get a similar error? It seems like the site is refusing the connection based on referr or some such.
    Tom Morris
    Porsche Boxster discussion forum.
    Today's Conservative discussion forum.

  2. #22

    Default Re: vBa CMPS: Customizable RSS feed module

    That's pretty much what I suspected. Perhaps I'll contact them.

    I only tried it with my.yahoo and it said invalid feed the first time, then added it after I inserted the (same) url a second time.

    I did try several validator services, some said it was a valid feed others said it was invalid. I'm sorry I can't provide more useful info for you but it was about 4:30 am so my memory of specific details is kinda foggy.

    Thanks for taking the time to look for me. I do appreciate it and I'm still going to use it, only with different feeds.

    If I find out anything from them that might be useful for you in the future, I'll post it here.

  3. #23

    Default Re: vBa CMPS: Customizable RSS feed module

    Yea I have all the proper template references in both places.. still just spins its wheels (never loads the page)

    Does that RDF feed work okay for you?

  4. #24

    Default Re: vBa CMPS: Customizable RSS feed module

    I just tried it and it works for me.

    News From the Shacknews
    Supreme Commander Preview
    Codename: Panzers Phase Two Demo
    Black & White 2 Preview
    Game Jobs Going to India
    Brian Reynolds Q&A



  5. #25

    Default Re: vBa CMPS: Customizable RSS feed module

    frunk

    can you paste your module contents here?

    btw im using cmps 2.0 not 1.0

  6. #26

    Default Re: vBa CMPS: Customizable RSS feed module

    I'm using 1x here, I copied the 3 templates just as they were in the txt file:
    adv_portal_rss
    adv_portal_rssbits
    adv_portal_rennbits

    There's one line in the rssfeed.php that I edited (line 25)
    PHP Code:
    // define the location of the rss cache directory (must be chmod 777)
    $rss_cache_path '/home/babbler/cache/'
    I'm a novice, but I wonder if you have that set correctly?

    my rssmain.php looks like this:
    PHP Code:
    <?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         => 'http://www.shacknews.com/headlines.rdf',
            
    cache_age    => 60,
            
    maxitems     => 7,
            
    randomize    => false,
            
    template     => 'adv_portal_rss',
            
    templatebits => 'adv_portal_rssbits',
            
    callback     => ''
        
    );

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

    unset(
    $rss_feed_array);

    ?>
    I hope it's ok for me to post this. I assumed since it's the same as the op that it would be ok.

  7. #27

    Default Re: vBa CMPS: Customizable RSS feed module

    gotta be something in 2.0 freaking it out

    cache is ok... I can use the default rssmain.php file in a php module just fine which makes it frustrating

  8. #28

    Default Re: vBa CMPS: Customizable RSS feed module

    I'll try to install it on my local intall of cmps 2x and see if I can make it work there.

    It'll be later cuz I have housework to do and I'm just a novice so I'm not making any promises.

    and you're abosultely sure you didn't miss a ',; or something? ' is the one that gets me every time!

  9. #29

    Smile Re: vBa CMPS: Customizable RSS feed module

    I got it working with that feed on my local 2x install...

    Nothing different in the templates or the files though.
    Perhaps your selections when you created the module?

    I did add the module as: php file

    File to Include: rssmain.php (or whatever you named it to)

    Templates to include: adv_portal_rss, adv_portal_rssbits, adv_portal_rennbits

    Use Module Shell Template No


  10. #30

    Default Re: vBa CMPS: Customizable RSS feed module

    Just a note... there's no need to include the adv_portal_rennbits template unless you are actually using it. I included it in the samples as just that - a sample to see how a modified version looked.
    Tom Morris
    Porsche Boxster discussion forum.
    Today's Conservative discussion forum.

  11. #31

    Default Re: vBa CMPS: Customizable RSS feed module

    Thanks for pointing that out Tom! I wasn't sure so I figured better safe than sorry.

    I'm still bound and determined to get that other feed working. I should hear back from their web team on Monday. The gal who answered couldn't tell for sure if the feed was only allowed to certain hosts or aggregators/services. She didn't think so but wasn't sure.

    This is gonna take a lot of reading but it'll be worth it in the long run. Thanks for getting me started!

  12. #32

    Default Re: vBa CMPS: Customizable RSS feed module

    I found out why the other feed (and I suspect this could affect other feeds somewhere along the way) wasn't working.

    The hosts are using the "ModSecurity" Apache Web server module which is going to block (for security reasons) any web requests that use PHP's "fopen" command.

    Instead we should use PHP's "libcurl" extension which is safer: http://us2.php.net/curl and http://us2.php.net/manual/en/function.curl-setopt.php

    I tested pulling the feed, just in a single php file with no formatting, and it was able to access it using this method.


    Hope this is useful to the discussion...

  13. #33

    Default Re: vBa CMPS: Customizable RSS feed module

    Interesting... yet shacknews worked for you?

    Tom can you implement the curl change?

  14. #34

    Default Re: vBa CMPS: Customizable RSS feed module

    Hey x[sliver], yes Shacknews did work for me with the original rssfeed.php. It should work for you assuming that you implemented it correctly and assuming that there's not something else going on on their end.

    I was hoping that you got it working when you didn't come back soon.

    On another note, I'm attaching the new rssfeed_with_curl.php file. That works for the feed that I wanted to get. I just added the necessary changes to the original posting and remarked out the relevant fopen calls. So you'd use it, just like you would the rssfeed.php in the original post.

    Tom, I hope this is ok, otherwise, I'll delete my post.

    I also added target="_blank" to the anchor in the adv_portal_rssbits template cuz it bugs me for it to open in the same browser window.
    Attached Files Attached Files
    Last edited by SomeName; 07-12-2005 at 04:43 AM.

  15. #35

    Default Re: vBa CMPS: Customizable RSS feed module

    I'll give it a shot tonight and report back.. thanks guys!

  16. #36

    Default Re: vBa CMPS: Customizable RSS feed module

    I'm succesfully using your curl edited module.. thank you very much!

    Now only for that news hack for 2.0..ugh

  17. #37

    Default Re: vBa CMPS: Customizable RSS feed module

    Yay!
    Thanks for the update!


  18. #38

    Default Clearer Install

    1. Create the templates as they are listed in the install file.

    2. rename rssmain.php to something descriptive for the particular feed you are pulling in my case I renamed it to espn.php. This is useful if you will be pulling multiple feeds. The file just needs to be copied, renamed and add the new url within it.

    Edit the file to include the URL of your feed. Set the TTL if your feed does not have it. TTL is specified in minutes. The longer you can go between refreshing the cache, the better your performance.

    3. Edit rssfeed.php to include your absolute path to a cache directory (you will have to create that DIR and chmod it to 777).

    4. FTP your renamed rssmain.php and rssfeed.php to your modules folder.

    4. add the module in CMPS admin as php, include the templates and select your php file from the dropdown.

    5. Use module shell template should be set to "NO"

    6. Enjoy.

    Thanks to the author, this mod absolutely kicks butt.
    Last edited by roscoe36; 07-30-2005 at 03:24 PM.

  19. #39
    Junior Member
    Join Date
    Apr 2005
    Posts
    21

    Default Re: vBa CMPS: Customizable RSS feed module

    Got this error when trying to install it to a CMPS2 forum, any clue?

    Parse error: parse error, unexpected T_STRING, expecting ')' in /home/public_html/forum/modules/rss-kcstar.php on line 33

  20. #40

    Default Re: vBa CMPS: Customizable RSS feed module

    Probably a code error. Care to post the contents?

Page 2 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
  •