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
  #21  
Old 07-08-2005, 12:51 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 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.
  #22  
Old 07-08-2005, 01:29 PM
SomeName's Avatar
SomeName SomeName is offline
Member
 
Join Date: Apr 2004
Posts: 86
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.
  #23  
Old 07-08-2005, 02:33 PM
x[sliver] x[sliver] is offline
Member
 
Join Date: Sep 2004
Posts: 32
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?
  #24  
Old 07-08-2005, 03:07 PM
SomeName's Avatar
SomeName SomeName is offline
Member
 
Join Date: Apr 2004
Posts: 86
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


  #25  
Old 07-08-2005, 03:21 PM
x[sliver] x[sliver] is offline
Member
 
Join Date: Sep 2004
Posts: 32
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
  #26  
Old 07-08-2005, 03:33 PM
SomeName's Avatar
SomeName SomeName is offline
Member
 
Join Date: Apr 2004
Posts: 86
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.
  #27  
Old 07-08-2005, 03:40 PM
x[sliver] x[sliver] is offline
Member
 
Join Date: Sep 2004
Posts: 32
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
  #28  
Old 07-08-2005, 03:48 PM
SomeName's Avatar
SomeName SomeName is offline
Member
 
Join Date: Apr 2004
Posts: 86
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!
  #29  
Old 07-08-2005, 05:23 PM
SomeName's Avatar
SomeName SomeName is offline
Member
 
Join Date: Apr 2004
Posts: 86
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

  #30  
Old 07-09-2005, 12:24 AM
Tom M Tom M is offline
Senior Member
 
Join Date: Jan 2004
Posts: 1,867
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.
  #31  
Old 07-09-2005, 01:10 AM
SomeName's Avatar
SomeName SomeName is offline
Member
 
Join Date: Apr 2004
Posts: 86
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!
  #32  
Old 07-10-2005, 08:58 PM
SomeName's Avatar
SomeName SomeName is offline
Member
 
Join Date: Apr 2004
Posts: 86
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...
  #33  
Old 07-11-2005, 06:48 PM
x[sliver] x[sliver] is offline
Member
 
Join Date: Sep 2004
Posts: 32
Default Re: vBa CMPS: Customizable RSS feed module

Interesting... yet shacknews worked for you?

Tom can you implement the curl change?
  #34  
Old 07-12-2005, 04:39 AM
SomeName's Avatar
SomeName SomeName is offline
Member
 
Join Date: Apr 2004
Posts: 86
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
File Type: txt rssfeed_with_curl_changes.php.txt (8.6 KB, 36 views)

Last edited by SomeName; 07-12-2005 at 04:43 AM.
  #35  
Old 07-12-2005, 06:01 PM
x[sliver] x[sliver] is offline
Member
 
Join Date: Sep 2004
Posts: 32
Default Re: vBa CMPS: Customizable RSS feed module

I'll give it a shot tonight and report back.. thanks guys!
  #36  
Old 07-14-2005, 11:32 PM
x[sliver] x[sliver] is offline
Member
 
Join Date: Sep 2004
Posts: 32
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
  #37  
Old 07-15-2005, 12:54 AM
SomeName's Avatar
SomeName SomeName is offline
Member
 
Join Date: Apr 2004
Posts: 86
Default Re: vBa CMPS: Customizable RSS feed module

Yay!
Thanks for the update!

  #38  
Old 07-30-2005, 02:58 PM
roscoe36 roscoe36 is offline
Member
 
Join Date: Jul 2005
Posts: 33
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.
  #39  
Old 08-24-2005, 09:58 PM
alyster4k alyster4k is offline
Junior Member
 
Join Date: Apr 2005
Posts: 19
Default Re: vBa CMPS: Customizable RSS feed module

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

Quote:
Parse error: parse error, unexpected T_STRING, expecting ')' in /home/public_html/forum/modules/rss-kcstar.php on line 33
  #40  
Old 08-24-2005, 10:19 PM
roscoe36 roscoe36 is offline
Member
 
Join Date: Jul 2005
Posts: 33
Default Re: vBa CMPS: Customizable RSS feed module

Probably a code error. Care to post the contents?
 


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 03:34 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.