Advertisement:

Author Topic: RSS Feed Icon for boards  (Read 146993 times)

Offline TrueSatan

  • SMF Hero
  • ******
  • Posts: 1,783
Re: RSS Feed Icon for boards
« Reply #120 on: November 28, 2007, 08:25:45 AM »
Difficulty depends on level of experience and ability...you can answer this for yourself better than I can

Offline mariolone

  • Semi-Newbie
  • *
  • Posts: 67
Re: RSS Feed Icon for boards
« Reply #121 on: December 30, 2007, 10:24:03 AM »
Hello,

I have installed this mod but I noted a problem.

I use SMF 1.1.4. and Mozilla Firefox as browser. First I made the login process and then tried to subscribe to a board feed in my forum. All ok (Mozilla asked me to add this feed to bookmarks) and after I made logout.

After few minutes, I came back to my forum and, after the login, Mozilla asked me if I would like to subscribe to a feed of my forum (that I have not selected before!) and, if I accepted, the page remained blank.
I noted that this happens only at the first login AFTER the one in which I subscribed to a feed in my forum. In fact, after the first login, all became ok and the forum works as usual.

Is it an error of the Mod? How to solve it? I am very interested in this feed and it should be usuful for me, but with this error is useless.

Thanks

Roberto

Offline blackstar

  • Semi-Newbie
  • *
  • Posts: 22
  • Gender: Male
Re: RSS Feed Icon for boards
« Reply #122 on: January 10, 2008, 06:02:17 PM »
Code: [Select]
Warning: set_time_limit(): Cannot set time limit in safe mode in /var/www/vhosts/web.com/httpdocs/oyunlar.php on line 73
?

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,660
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: RSS Feed Icon for boards
« Reply #123 on: January 10, 2008, 09:58:22 PM »
Code: [Select]
Warning: set_time_limit(): Cannot set time limit in safe mode in /var/www/vhosts/web.com/httpdocs/oyunlar.php on line 73
?

That's not coming fromt his mod.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline blackstar

  • Semi-Newbie
  • *
  • Posts: 22
  • Gender: Male
Re: RSS Feed Icon for boards
« Reply #124 on: January 11, 2008, 04:28:34 PM »
Code: [Select]
<?php 
 
/* PHP RSS Reader v1.1 
 
By Richard James Kendall  
 
Bugs to richard@richardjameskendall.com  
 
Free to use, please acknowledge me  
 
 
 
Place the URL of an RSS feed in the $file variable. 
 
 
 
The $rss_channel array will be filled with data from the feed, 
 
every RSS feed is different by by and large it should contain: 
 
 
 
Array { 
 
[TITLE] = feed title 
 
[DESCRIPTION] = feed description 
 
[LINK] = link to their website 
 
 
 
[IMAGE] = Array { 
 
[URL] = url of image 
 
[DESCRIPTION] = alt text of image 
 

 
 
 
[ITEMS] = Array { 
 
[0] = Array { 
 
[TITLE] = item title 
 
[DESCRIPTION] = item description 
 
[LINK = a link to the story 
 

 

 

 

 

 

 
 
 
By default it retrives the Reuters Oddly Enough RSS feed. The data is put into the array 
 
structure so you can format the information as you see fit. 
 
*/ 
 
set_time_limit(30); 
 
$file "http://www.sitem.com/form/index.php?action=.xml;type=rss;limit=30"
 
$rss_channel = array(); 
$currently_writing ""
 
$main ""
 
$item_counter 0
 
function 
startElement($parser$name$attrs) { 
 
global 
$rss_channel$currently_writing$main
 
switch(
$name) { 
 
case 
"RSS"
 
case 
"RDF:RDF"
 
case 
"ITEMS"
 
$currently_writing ""
 
break; 
 
case 
"CHANNEL"
 
$main "CHANNEL"
 
break; 
 
case 
"IMAGE"
 
$main "IMAGE"
 
$rss_channel["IMAGE"] = array(); 
 
break; 
 
case 
"ITEM"
 
$main "ITEMS"
 
break; 
 
default: 
 
$currently_writing $name
 
break; 
 

 

 
function 
endElement($parser$name) { 
 
global 
$rss_channel$currently_writing$item_counter
 
$currently_writing ""
 
if (
$name == "ITEM") { 
 
$item_counter++; 
 

 

 
function 
characterData($parser$data) { 
 
global 
$rss_channel$currently_writing$main$item_counter
 
if (
$currently_writing != "") { 
 
switch(
$main) { 
 
case 
"CHANNEL"
 
if (isset(
$rss_channel[$currently_writing])) { 
 
$rss_channel[$currently_writing] .= $data
 
} else { 
 
$rss_channel[$currently_writing] = $data
 

 
break; 
 
case 
"IMAGE"
 
if (isset(
$rss_channel[$main][$currently_writing])) { 
 
$rss_channel[$main][$currently_writing] .= $data
 
} else { 
 
$rss_channel[$main][$currently_writing] = $data
 

 
break; 
 
case 
"ITEMS"
 
if (isset(
$rss_channel[$main][$item_counter][$currently_writing])) { 
 
$rss_channel[$main][$item_counter][$currently_writing] .= $data
 
} else { 
 
//print ("rss_channel[$main][$item_counter][$currently_writing] = $data<br>"); 
 
$rss_channel[$main][$item_counter][$currently_writing] = $data
 

 
break; 
 

 

 

 
$xml_parser xml_parser_create(); 
 
xml_set_element_handler($xml_parser"startElement""endElement"); 
 
xml_set_character_data_handler($xml_parser"characterData"); 
 
if (!(
$fp fopen($file"r"))) { 
 
die(
"could not open XML input"); 
 

 
while (
$data fread($fp4096)) { 
 
if (!
xml_parse($xml_parser$datafeof($fp))) { 
 
die(
sprintf("XML error: %s at line %d"
 
xml_error_string(xml_get_error_code($xml_parser)),   
 
xml_get_current_line_number($xml_parser))); 
 

 

 
xml_parser_free($xml_parser); 
 
// output as HTML 
 
print ("<html><head><title>PHP RSS Reader</title></head><body>"); 
 
if (isset(
$rss_channel["IMAGE"])) { 
 
print (
"<a href=\"" $rss_channel["LINK"] . "\" target=\"_blank\"><img border=\"0\" src=\"" $rss_channel["IMAGE"]["URL"] . "\" align=\"middle\" alt=\"" $rss_channel["IMAGE"]["TITLE"] . "\"></a>  <font size=\"5\">" $rss_channel["TITLE"] . "</font><br><br>"); 
 
} else { 
 
print (
"<font size=\"5\">" $rss_channel["TITLE"] . "</font><br><br>"); 
 

 
print (
"<i>" $rss_channel["DESCRIPTION"] . "</i><br><br>"); 
 
if (isset(
$rss_channel["ITEMS"])) { 
 
if (
count($rss_channel["ITEMS"]) > 0) { 
 
for(
$i 0;$i count($rss_channel["ITEMS"]);$i++) { 
 
print (
"\n<table width=\"100%\" border=\"1\"><tr><td width=\"100%\"><a href=\"" $rss_channel["ITEMS"][$i]["LINK"] . "\" target=\"_blank\"><h2>" $rss_channel["ITEMS"][$i]["TITLE"] . "</h2></a></b>"); 
 
print (
"<i>" html_entity_decode($rss_channel["ITEMS"][$i]["DESCRIPTION"]) . "</i>"); 
 
print (
"</td></tr></table><br>"); 
 

 
} else { 
 
print (
"<b>There are no articles in this feed.</b>"); 
 

 

 
print (
"</body></html>"); 
 
?>


problem

Code: [Select]
Warning: set_time_limit(): Cannot set time limit in safe mode in /var/www/vhosts/sitem.com/httpdocs/oyunlar.php on line 73

RSS Feed mod

help pls..

Offline TrueSatan

  • SMF Hero
  • ******
  • Posts: 1,783
Re: RSS Feed Icon for boards
« Reply #125 on: January 11, 2008, 04:57:31 PM »
The code you have quoted has absolutely nothing to do with this mod!

Offline mwmconsulting

  • Semi-Newbie
  • *
  • Posts: 80
  • MWM Consulting, Inc.
    • MWM Consulting, Inc.
Re: RSS Feed Icon for boards
« Reply #126 on: January 12, 2008, 04:09:58 PM »
Hey vbgamer45,

Love this mod.  Thanks heaps!

I thought you might make one edition.  There needs to be an icon for the overall Recent Posts of the forum.  I added one myself manually as follows:

On line 265 of the /Themes/default/BoardIndex.template.php file:

Change this:

Code: [Select]
<td class="titlebg" colspan="2">', $txt[214], '</td>
To this:

Code: [Select]
<td class="titlebg" colspan="2">', $txt[214], '&nbsp;<a href="http://<SITEURL>/index.php?type=rss;action=.xml" target="_blank"><img src="' . $settings['images_url'] . '/rss.png" alt="rss" /></a></td>

Where <SITEURL> is the URL of your particular SMF website (i.e. www.myforum.com).

Just my thoughts...

Cheers!

- MWM
========================
MWM Consulting, Inc.
InSiteful Business Solutions
http://www.mwmconsulting.biz
========================

Offline mariolone

  • Semi-Newbie
  • *
  • Posts: 67
Re: RSS Feed Icon for boards
« Reply #127 on: January 13, 2008, 03:52:51 PM »
Hello,

I installed your great Mod and it works great.

I copied and pasted an RSS link to one website of mines to see how the Mod works.

I would like to control which part of the content visible on the website where I attached the RSS code. At this moment, 6-7 rows of the RSS link are visible on the website with my RSS feed: how to control them (for example to display on one website only the board title)?

Which file or code have I to modify? How?

Thank you

Offline videoed

  • Jr. Member
  • **
  • Posts: 174
  • Gender: Male
  • Ramón Cutanda
    • videoedicion.org
Re: RSS Feed Icon for boards
« Reply #128 on: February 12, 2008, 06:47:35 PM »
Simple, but effective. Thanks! :D

Offline ACE844

  • Newbie
  • *
  • Posts: 7
Re: RSS Feed Icon for boards
« Reply #129 on: February 18, 2008, 07:54:17 PM »
Hello, I have a board with SMF114, TP.09X and using the 'classic' theme installed. I added the following mod : http://custom.simplemachines.org/mods/index.php?mod=376

to the board, and the install went without any displayed errors. I t seems though  that the 'child boards' aren't being updated  on the individual boards RSS feed but posts in them do appear in the 'MAIN-Forum' RSS-XML feed.

Could someone please help me to get this functionality enabled for the'child boards' so that it both updates, and allows an individual to subscribe to that 'child board' much like the mod allows for the main ones?

I'm not sure if it will help but here is the XML code from the mod

Code: [Select]
<?xml version="1.0"?>
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">
<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">
<id>vbgamer45:FeedIcon</id>
<version>1.1</version>


<file name="$themedir/BoardIndex.template.php">
    <operation>
        <search position="before"><![CDATA[', $board['name'], '[/url]]]></search>
        <add><![CDATA[&nbsp;<a href="' . $scripturl . '?action=.xml;board=' . $board['id'] . ';type=rss"><img src="' . $settings['images_url'] . '/rss.png" alt="rss" />[/url]]]></add>

    </operation>
</file>
<file name="$themedir/MessageIndex.template.php">
    <operation>
        <search position="before"><![CDATA[', $board['name'], '[/url]]]></search>
        <add><![CDATA[&nbsp;<a href="' . $scripturl . '?action=.xml;board=' . $board['id'] . ';type=rss"><img src="' . $settings['images_url'] . '/rss.png" alt="rss" />[/url]]]></add>

    </operation>
</file>

</modification>

Thanks in advance for your help,
ACE844

Offline No.Body

  • Semi-Newbie
  • *
  • Posts: 76
  • Gender: Male
Re: RSS Feed Icon for boards
« Reply #130 on: February 18, 2008, 08:39:33 PM »
THis one this great. Sad though that it shows only when im using the default theme.

Anyone knows how to put it in theme " Black22 " ?

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,660
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: RSS Feed Icon for boards
« Reply #131 on: February 18, 2008, 08:44:42 PM »
For the last two posts you have to do a manual install
http://www.smfhacks.com/smf-package-parser.html
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline ACE844

  • Newbie
  • *
  • Posts: 7
Re: RSS Feed Icon for boards
« Reply #132 on: February 18, 2008, 08:54:06 PM »
I actually did install it manually, but it doesn't seem to show the feed for the child board on it's associated 'parent board feed'. It does however show up on the 'global-Forum feed'. I tried to add the code to the 'child board' in the same manner and it caused all sorts of errors. That is why I'm asking as this is outside of my expertise.
« Last Edit: February 18, 2008, 08:56:55 PM by ACE844 »

Offline No.Body

  • Semi-Newbie
  • *
  • Posts: 76
  • Gender: Male
Re: RSS Feed Icon for boards
« Reply #133 on: February 18, 2008, 09:11:00 PM »
For the last two posts you have to do a manual install
http://www.smfhacks.com/smf-package-parser.html

Works perfectly! Thank you very much!

Offline ACE844

  • Newbie
  • *
  • Posts: 7
Re: RSS Feed Icon for boards
« Reply #134 on: February 18, 2008, 11:13:38 PM »
VBGamer,

Do you have any suggestions on how to solve this issue?
Thanks,
ACE844

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,660
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: RSS Feed Icon for boards
« Reply #135 on: February 18, 2008, 11:22:13 PM »
I would need to see the templates file for the custom them you are editing to look at the child boards code
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline ACE844

  • Newbie
  • *
  • Posts: 7
Re: RSS Feed Icon for boards
« Reply #136 on: February 19, 2008, 09:25:41 AM »
alright, just let me know which ones you need, just the board and message indicies, or are there others?.

Offline Kender

  • Jr. Member
  • **
  • Posts: 294
  • Gender: Male
  • I am Kender
Re: RSS Feed Icon for boards
« Reply #137 on: February 19, 2008, 11:16:09 AM »
i installed this mod, works great from the go...

the only change i made was in the 2 edited files i moved the rss feed to the front of the forum name, instead of following the forum name.. to me more pleasing to look at that way
http://chucknorris2012.com  Avoid a roundhouse kick to the head!  Sign the petition

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,660
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: RSS Feed Icon for boards
« Reply #138 on: February 19, 2008, 09:04:50 PM »
alright, just let me know which ones you need, just the board and message indicies, or are there others?.
I belive just boardindex.template.php and messageindex.template.php
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline ACE844

  • Newbie
  • *
  • Posts: 7
Re: RSS Feed Icon for boards
« Reply #139 on: February 20, 2008, 10:18:20 AM »
"VBgamer,"

Here they are as requested the message index template .php and board index template.php
Thanks for your help and assistance with this,
ACE844