Page 1 of 33 123411 ... LastLast
Results 1 to 20 of 646

Thread: [Module] Customizable RSS feed module

  1. #1

    Default [Module] Customizable RSS feed module

    This is the generic RSS feed module for CMPS 3.0 and vBulletin 3.6.x and is a simple update from the prior version.

    This has been tested with CMPS 3.1 and vBulletin 3.8.1 and still works correctly.


    What's New

    Two things changed from the prior CMPS 2.0 and vb 3.5.x version; 1) the compatibility with vBa 3.x, 2) now uses Curl for the external connection. Note: This version will work with Process PHP File Modules Within A Function set to 'Yes' or 'No'.


    Installation

    Installing the module is as simple as using the vBa CMPS -> Download/Upload Module dialog. This will create everything that's needed to get started including 2 templates; adv_portal_rss and adv_portal_rssbits, and the rss_cmps_curl.php module.

    Once the module has been uploaded use the vBa CMPS -> Edit Modules screen to customize the settings using the RSS Feed Options section. As a minimum it is necessary to specify the RSS Feed URL and the RSS Cache Directory. As noted in the help text the RSS Cache Directory must be world-writable (chmod 777) for things to work properly.

    To create additional RSS feeds simply copy the existing module, rename it to something relevant and fill in the information about that feed. All the RSS feed modules may use the same cache directory, though you may have multiple directories if desired.


    Upgrading

    Upgrade using the vBa CMPS -> Download/Upload Module dialog but allow for overwriting. When completed check all your existing RSS Feed modules and make sure they are using the new rss_cmps_curl.php as the File to Include

    Alternatively, delete all your existing feed modules and install this version from scratch.


    Getting fancy

    The adv_portal_rssbits template makes use of css to format the title, category and description. By default these classes don't exist so the text will be displayed using whatever the defaults are. Below are some sample css definitions that may be added to the Additional CSS Definitions (located in ACP -> Style Manager -> (style) Main CSS) for your style.

    Code:
    .rsstitle { font: bold 10pt verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; color: #003366; }
    .rsstitle a:link, .rsstitle a:visited, .rsstitle a:active { text-decoration: none; color: #003366; }
    .rsstitle a:hover { text-decoration: none; color: #3964A8; }
    .rssdesc {font: normal 10pt verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; }
    .rsscat {font: bold 8pt verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; }

    Advanced Usage

    The Data qualification code may be used to filter out individual feed items if desired. Use the text box to enter the appropriate php code to evaluate the $rss_item data and return a 'true' or 'false' value according to whether the item should be displayed. To display all feed items leave this blank.

    The Data modification code may be used to manipulate the $rss_item data however desired. For example, since the publication date for the item isn't normally shown by the template this information could be added to the beginning of the description if a publication date is part of the available information by using the following.

    PHP Code:
    if ($rss_item['PUBDATE']) $rss_item['DESCRIPTION'] = vbdate($vbulletin->options['dateformat'], strtotime($rss_item['PUBDATE']), $vbulletin->options['yestoday']) . ' <span class="time">' vbdate($vbulletin->options['timeformat'], strtotime($rss_item['PUBDATE'])) . '</span><br />' $rss_item['DESCRIPTION']; 
    Likewise, if the descriptions are too long you might add code to trim the length and display a "... [more]" where the "[more]" has the link used in the title.

    Enjoy!


    Revisions

    2/8/2009
    1. Fixed bug where a parser could be freed w/o having been created if the feed needed to be retried.

    2/7/2009
    1. Updated the rss_cmps_curl.php file to automatically do the 'proper' conversion based on the page settings used by vbulletin.

    To upgrade an existing installation replace the version of the rss_cmps_curl.php file in the module with the separate version here.

    A new installation should install the module and then replace the file as directed above.


    9/16/2007
    1. Updated to work with vBa 3.0.
    2. Now uses Curl to open external connection.




    PS - If you like this module and would like to make a donation you may do so via PayPal.
    Last edited by Tom M; 02-08-2009 at 05:04 PM.

  2. #2
    Join Date
    Jun 2005
    Posts
    27

    Default Re: [Module] Customizable RSS feed module

    is there any way of making this one so that it scrolls like the old one did and is there also anyway to customise how the rss feed looks once its been brought into the module?

    I am trying to get it work with my EVE alliance killboard and its feeding the data no problem its just that it looks gawd awful. http://www.eve-daisho.com if you wanna have a look.

  3. #3

    Default Re: [Module] Customizable RSS feed module

    As far as scrolling goes, it looks like I inadvertently dropped it out of this version. I really didn't like to support it though as it was just too flaky between all the different browsers.

    The appearance can be addressed to a significant degree by turning on the Fancy mode. Once this mode is enabled you can use the CSS example in the first post and place it in your Additional CSS Definitions for the style being used. Doing this will allow you to control things like the font size/color of titles and text, etc.

    NOTE: Scrolling was only a template edit so if you want scrolling you can download the 3.5 version and use a text editor to extract the adv_portal_rss template from that .module file. Once extracted just modify it so the scrolling is always active instead of being based on the module settings.
    Last edited by Tom M; 09-20-2007 at 12:03 AM. Reason: Added note.
    Tom Morris
    Porsche Boxster discussion forum.
    Today's Conservative discussion forum.

  4. #4
    Join Date
    Jun 2005
    Posts
    27

    Default Re: [Module] Customizable RSS feed module

    I still cant edit the way this looks.

    I can change the link color etc but I am unable to modify the main body data.

    Any help you can give with this would be appreciated.

  5. #5

    Default Re: [Module] Customizable RSS feed module

    Quote Originally Posted by jmfemedia View Post
    I still cant edit the way this looks.

    I can change the link color etc but I am unable to modify the main body data.

    Any help you can give with this would be appreciated.
    How are you trying to modify the body data? You *should* be able to tweak the .rssdesc CSS entry to make it appear however you like. If you want different formatting though then that's a different issue.
    Tom Morris
    Porsche Boxster discussion forum.
    Today's Conservative discussion forum.

  6. #6
    Join Date
    Jun 2005
    Posts
    27

    Default Re: [Module] Customizable RSS feed module

    Hi Tom, I am altering the way the stylesheet calls for the rss to be displayed and that ONLY thing I have been able to do successfully is change the color of the link text.

    the CSS Calls from my admin panel:
    Code:
    .rsstitle { font: bold 10px verdana; color: #cccccc; }
    .rsstitle a:link, .rsstitle a:visited, .rsstitle a:active { text-decoration: none; color: #33cc99; }
    .rsstitle a:hover { text-decoration: none; color: #cccccc; }
    .rssdesc {font: 8pt verdana; }
    .rsscat {font: 8pt verdana; }
    if you look at the front page of www.eve-daisho.com you will see what I mean (u might need to refresh for it to become visible)

  7. #7

    Default Re: [Module] Customizable RSS feed module

    Quote Originally Posted by jmfemedia View Post
    Hi Tom, I am altering the way the stylesheet calls for the rss to be displayed and that ONLY thing I have been able to do successfully is change the color of the link text.

    if you look at the front page of www.eve-daisho.com you will see what I mean (u might need to refresh for it to become visible)
    The problem is that your content is also wrapped in a <p> tag inside the <span class="rssdesc"> and so that is overriding the rssdesc definition.

    All I can suggest is that you strip out the <p> tags either at the source if you can or by using the Data modification code section for the module. One way to do that is by adding
    Code:
    $rss_item['DESCRIPTION'] = str_replace(array('<p>','</p>'), array('',''), $rss_item['DESCRIPTION']);
    Tom Morris
    Porsche Boxster discussion forum.
    Today's Conservative discussion forum.

  8. #8
    Join Date
    Jun 2005
    Posts
    27

    Default Re: [Module] Customizable RSS feed module

    Quote Originally Posted by Tom M View Post
    The problem is that your content is also wrapped in a <p> tag inside the <span class="rssdesc"> and so that is overriding the rssdesc definition.

    All I can suggest is that you strip out the <p> tags either at the source if you can or by using the Data modification code section for the module. One way to do that is by adding
    Code:
    $rss_item['DESCRIPTION'] = str_replace(array('<p>','</p>'), array('',''), $rss_item['DESCRIPTION']);
    woot, u are a genious..

    now is there anyway for me to get it so they are showing 2 per line?

  9. #9
    Join Date
    Jun 2005
    Posts
    27

    Default Re: [Module] Customizable RSS feed module

    Quote Originally Posted by Tom M
    Likewise, if the descriptions are too long you might add code to trim the length and display a "... [more]" where the "[more]" has the link used in the title.
    How do I do that?

  10. #10

    Default Re: [Module] Customizable RSS feed module

    I'm having some trouble on this one. I have it installed, all options set up, cache folder is 777 etc.. but when I put it on a page I get this:

    Fatal error: file_put_contents cannot write in file. in /modules/rss_cmps_curl.php on line 125
    Any Ideas?

  11. #11

    Default Re: [Module] Customizable RSS feed module

    Quote Originally Posted by Silent Knight View Post
    I'm having some trouble on this one. I have it installed, all options set up, cache folder is 777 etc.. but when I put it on a page I get this:

    Any Ideas?
    It says that you don't have write permissions. You may need to check with your host as if you did give the cache directory permissions and they actually did change then it's a problem on the hosting side.
    Tom Morris
    Porsche Boxster discussion forum.
    Today's Conservative discussion forum.

  12. #12

    Default Re: [Module] Customizable RSS feed module

    Quote Originally Posted by jmfemedia View Post
    How do I do that?
    PHP Code:
    $rss_item['DESCRIPTION'] = substr($rss_item['DESCRIPTION'], 0strrpos(substr($rss_item['DESCRIPTION'], 0200), ' ')) . '... <span class="smallfont">[<a href="' $rss_item['LINK'] . '" target="_blank">Read More</a>]</span>'
    Change the value of 200 to however many characters you want it to be.
    Tom Morris
    Porsche Boxster discussion forum.
    Today's Conservative discussion forum.

  13. #13

    Default Re: [Module] Customizable RSS feed module

    Ok, I got my host to actually set it 777 (they say it was a bug) Thanks.

    However, one more problem. It's not actually showing on the page. The Cache went where it's supposed to be, there are lots of news feeds there, but the page where the module is supposed to be doesn't display the module.

    I've just done the basic stuff, everything is still at default except the name of the module, the location of the cache, and the rss feed.

  14. #14

    Default Re: [Module] Customizable RSS feed module

    Quote Originally Posted by Silent Knight View Post
    Ok, I got my host to actually set it 777 (they say it was a bug) Thanks.

    However, one more problem. It's not actually showing on the page. The Cache went where it's supposed to be, there are lots of news feeds there, but the page where the module is supposed to be doesn't display the module.

    I've just done the basic stuff, everything is still at default except the name of the module, the location of the cache, and the rss feed.
    If it's not showing then make sure the templates are in the style you are using - especially if it's a custom style. Other than that about all it can be is that the module hasn't been set to appear on the page (which doesn't seem likely if the cache file gets created.)

    PS - A link would be helpful. You can always PM me if it's not public.
    Tom Morris
    Porsche Boxster discussion forum.
    Today's Conservative discussion forum.

  15. #15

    Default Re: [Module] Customizable RSS feed module

    That was it, the templates didn't make it into the style. Fixed, Thanks alot.

    http://www.lonestarclan.com/vBulleti...?pageid=gwpage

  16. #16

    Default Re: [Module] Customizable RSS feed module

    I am getting this error.

    why?

    Fatal error: Call to undefined function: curl_init() in /home/a2512406/public_html/forum/modules/rss_cmps_curl.php on line 145

  17. #17

    Default Re: [Module] Customizable RSS feed module

    Quote Originally Posted by jay-mob View Post
    I am getting this error.

    why?

    Fatal error: Call to undefined function: curl_init() in /home/a2512406/public_html/forum/modules/rss_cmps_curl.php on line 145
    Most likely curl support is not enabled.

    You can check by going to ACP -> Maintenance -> View PHP Info. If support is enabled, there will be a listing for it similar to this.

    Code:
    curl
    CURL support enabled CURL Information libcurl/7.15.3 OpenSSL/0.9.7a zlib/1.2.1.2 libidn/0.5.6
    If this is with a hosting company, you will need to have them install/enable it.

    If this is a Windows based system, CURL can be enabled by uncommenting the curl extension line in the php.ini file - extension=php_curl.dll and restarting the web server.

    If this is Unix/Linux, PHP must be compiled with CURL support and the libcurl library must be installed.
    Tom Morris
    Porsche Boxster discussion forum.
    Today's Conservative discussion forum.

  18. #18

    Default Re: [Module] Customizable RSS feed module

    can i install it myself or do they necessarily need to do it, but I do think it is linux, rather than windows.

  19. #19

    Default Re: [Module] Customizable RSS feed module

    Quote Originally Posted by jay-mob View Post
    can i install it myself or do they necessarily need to do it, but I do think it is linux, rather than windows.
    If you have a hosting company then they will need to install it. What did the phpinfo report indicate?
    Tom Morris
    Porsche Boxster discussion forum.
    Today's Conservative discussion forum.

  20. #20

    Default Re: [Module] Customizable RSS feed module

    It's fine now, I set up carp with the tabbed windows, and it gave me a even more powerful hybrid. I can now have as many different rss feeds, in one tabbed window.

Page 1 of 33 123411 ... LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [Module] Customizable RSS feed module
    By Tom M in forum Add-On Modules (version 3.x & 2.x)
    Replies: 615
    Last Post: 02-13-2014, 09:05 AM
  2. vBa CMPS: Customizable RSS feed module
    By Tom M in forum Add-On Modules & Modifications
    Replies: 86
    Last Post: 05-30-2006, 01:31 AM
  3. RSS feed module for VBA 2 and VB3.5
    By rsailors in forum Modifications (version 3.x & 2.x)
    Replies: 6
    Last Post: 03-25-2006, 11:18 PM
  4. [REQ] RSS feed module
    By rgourley in forum Module & Modification Discussion & Requests
    Replies: 15
    Last Post: 10-22-2005, 12:55 AM
  5. User customizable CMPS page
    By ogetbilo in forum Feedback & Suggestions
    Replies: 1
    Last Post: 05-20-2004, 01: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
  •