[MODDB] simple syndication

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Suggested Hosts
Xplorer4x4
Registered User
Posts: 81
Joined: Tue May 02, 2006 11:12 pm

Re: [BETA] simple syndication

Post by Xplorer4x4 »

You dont. You unzip it with WinRar(google it). Then folloe the instructions in the XML file.
User avatar
mrTablet
Registered User
Posts: 34
Joined: Fri Jun 22, 2007 6:59 am

Re: [BETA] simple syndication

Post by mrTablet »

Tanks!
littlebigfan
Registered User
Posts: 36
Joined: Wed Jul 18, 2007 9:10 pm

Re: [BETA] simple syndication

Post by littlebigfan »

Is there any way to get this to work with a hidden forum?
Drakkim
Registered User
Posts: 176
Joined: Thu Feb 05, 2004 5:48 am
Contact:

Re: [BETA] simple syndication

Post by Drakkim »

littlebigfan wrote:Is there any way to get this to work with a hidden forum?
I believe (don't quote me on this... it's been a bit) that it uses the normal session stuff... if the user has an active session then it will get whatever he/she has access to.
littlebigfan
Registered User
Posts: 36
Joined: Wed Jul 18, 2007 9:10 pm

Re: [BETA] simple syndication

Post by littlebigfan »

Drakkim wrote:
littlebigfan wrote:Is there any way to get this to work with a hidden forum?
I believe (don't quote me on this... it's been a bit) that it uses the normal session stuff... if the user has an active session then it will get whatever he/she has access to.
I see, thanks. Is there a way to do this with a forum that is locked and can be viewed, but only admins can post?
Drakkim
Registered User
Posts: 176
Joined: Thu Feb 05, 2004 5:48 am
Contact:

Re: [BETA] simple syndication

Post by Drakkim »

The only thing that matters is view and read permissions. If a guest can do both, then it'll be available for everyone... if an admin can do both, but not a guest, then it should work if the admin has a valid session (or uses the autologin)

Again, I'm working off memory on the session part... I took this one and modified it into a much more robust version :-)

-Drakkim
.:: Chico ::.
Registered User
Posts: 463
Joined: Fri Aug 03, 2007 6:35 am
Location: Rio de Janeiro
Contact:

Re: [BETA] simple syndication

Post by .:: Chico ::. »

Hello Angel,

This mod is all that i need, and worked fine in prosilver, but...

...i don't use prosilver, i'm using a template prosilver based, this: http://www.phpbb.com/community/viewtopi ... 4&t=568729

all mods to prosilver, worked fine in this style, but with yours did not! sad :cry:

Could you do something about???

Thanks anyway!

Excellent MOd, i use a lot RSS feed to world news, very usefull...
Drakkim
Registered User
Posts: 176
Joined: Thu Feb 05, 2004 5:48 am
Contact:

Re: [BETA] simple syndication

Post by Drakkim »

Did you copy the template file to your other templates? That should be the only difference between templates....?

Drakkim
.:: Chico ::.
Registered User
Posts: 463
Joined: Fri Aug 03, 2007 6:35 am
Location: Rio de Janeiro
Contact:

Re: [BETA] simple syndication

Post by .:: Chico ::. »

Drakkim wrote:Did you copy the template file to your other templates? That should be the only difference between templates....?

Drakkim
i don't understand your point.

I inserted the files at template past of my active style (SFCentar in this case)

i did it too to prosilver folder and change the forum style and the syndication worked fine, the only problem is with my active style SFCentar.

Some code diferences, maybe.
Drakkim
Registered User
Posts: 176
Joined: Thu Feb 05, 2004 5:48 am
Contact:

Re: [BETA] simple syndication

Post by Drakkim »

Did you copy syndication_atom.xml and syndication_rss2.xml to the new template directory? They have to be in the template directory (/styles/*/template) for every style your users might have active.

The edit (to overall_header, I believe) is to add the feed icon and is not technically necessary (in fact.... I left it out on my site :-) ). But... if you don't copy those files.... nothing will work.

-Drakkim
.:: Chico ::.
Registered User
Posts: 463
Joined: Fri Aug 03, 2007 6:35 am
Location: Rio de Janeiro
Contact:

Re: [BETA] simple syndication

Post by .:: Chico ::. »

Drakkim wrote:Did you copy syndication_atom.xml and syndication_rss2.xml to the new template directory? They have to be in the template directory (/styles/*/template) for every style your users might have active.

The edit (to overall_header, I believe) is to add the feed icon and is not technically necessary (in fact.... I left it out on my site :-) ). But... if you don't copy those files.... nothing will work.

-Drakkim
Yeah Yeah, of course.

Everything made correctly!!
dreamer2007
Registered User
Posts: 42
Joined: Sat Jul 21, 2007 10:52 am

Re: [BETA] simple syndication

Post by dreamer2007 »

Hi,

please need some help : i have installed this mod : work very good :D

Now, i need to display the last topics in my home page.

so i use magpierss, and make a page called feedparser.php with :

Code: Select all

<?php
// inclusion de la classe magpierss
require_once("magpierss/rss_fetch.inc");

function FeedParser($url_feed, $nb_items_affiches=10)
{
  // lecture du fichier distant (flux XML)
  $rss = fetch_rss($url_feed);

  // si la lecture s'est bien passee,
  // on lit les elements
  if (is_array($rss->items))
  {
   // on ne recupere que les elements les + recents
   $items = array_slice($rss->items,
    0, $nb_items_affiches);

   // debut de la liste
   // (vous pouvez indiquer un style CSS
   // pour la formater)
   $html = "<ul>\n";

   // boucle sur tous les elements
   foreach ($items as $item)
   {
    $html .= "<li>";
    $html .= "<a href=\"".$item['link']."\">";
    $html .= $item['title']."</a></li>\n";
   }
   $html .= "</ul>\n";
 }

 // retourne le code HTML a inclure dans la page
 return $html;
}
?>
and put this code in my home page :

Code: Select all

<?php
require_once("feedparser.php");
echo
 FeedParser("http://www.mywebsite.com/forums/syndication.php?count=15");
?>
ok it display the 15 last posts.

well, i need to display only 15 last topics (but not last posts) :!:

(excuse my bad english :oops: )
Last edited by dreamer2007 on Sun Sep 02, 2007 8:33 am, edited 1 time in total.
User avatar
pussaya
Registered User
Posts: 7
Joined: Sat Sep 01, 2007 9:05 pm
Contact:

Re: [BETA] simple syndication

Post by pussaya »

Well, I've installed the MOD and it works fine for me if I add

Code: Select all

&count=15
to this code:

Code: Select all

<link rel="alternate" type="application/rss+xml" title="{SITENAME}" href="syndication.php?type=rss" />
<link rel="alternate" type="application/atom+xml" title="{SITENAME}" href="syndication.php?type=atom" />  
If I don't add the &count=15 I won't get anything shown in the feed. The basic frame is there because my Firefox knows what a kind of site it is but there is now text in the feed. :?

So finally I'll get the output:

Code: Select all

<link rel="alternate" type="application/rss+xml" title="{SITENAME}" href="syndication.php?type=rss&count=15" />
<link rel="alternate" type="application/atom+xml" title="{SITENAME}" href="syndication.php?type=atom&count=15" />  
I've testet the RSS-feed with my Firefox 2.0 but if I try to open the atom OR the RSS-feed in my IE 7.0 the IE says that it couldn't show the feed due to included mistakes. :( There is no more detailed message.

Do you know what it could be?

P.S.: I downloaded the MOD today of the first post. :)
polle
Registered User
Posts: 104
Joined: Fri Mar 31, 2006 10:18 am

Re: [BETA] simple syndication

Post by polle »

Hi, can someone point me in how to call it to make it display just the posts that have a new reply and not always the last X number ?

Thanks.
User avatar
pussaya
Registered User
Posts: 7
Joined: Sat Sep 01, 2007 9:05 pm
Contact:

Re: [BETA] simple syndication

Post by pussaya »

Well, I solved the thing with the link in the RSS-feed or atom-feed to the post:

Open the syndicator.php and surch for

Code: Select all

// SQL posts table
$sql = 'SELECT p.poster_id, p.post_subject, p.post_text, p.bbcode_uid, p.bbcode_bitfield, p.topic_id, p.forum_id, p.post_time, f.forum_name, f.forum_desc_options, u.username
In line surch:

Code: Select all

$sql = 'SELECT
After add:

Code: Select all

 p.post_id,      
Surch for

Code: Select all

'LINK'            => append_sid("$board_url/viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']),      
In-line surch:

Code: Select all

. $row['topic_id']      
After add:

Code: Select all

 . '&p=' .  $row['post_id'] . '#p' . $row['post_id']     
(Please use the "SELECT ALL"-option due to the spaces you need to add to the text!)

You need to do this if you want that the link in the feeds goes directly to the post you see IN the feeds.

EDIT: I just found a error description for my problem about I wrote in the topic here:
Das Zeichen '<' kann in einem Attributwert nicht verwendet werden.
Zeile: 78 Zeichen: 551

<description>New BBCode: Spoiler<br /><br /><div style="padding: 3px; background-color: #BBBBBB; border: 1px solid #d8d8d8; font-size: 1em;"><div style="text-transform: uppercase; border-bottom: 1px solid #CCCCCC; margin-bottom: 3px; font-size: 0.8em; font-weight: bold; display: block;"><span onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerHTML = '<b>Spoiler: </b><a href=\'#\' onClick=\'return false;\'>Hide</a>'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerHTML = '<b>Spoiler: </b><a href=\'#\' onClick=\'return false;\'>Show</a>'; }" /><b>Spoiler: </b><a href="#" onClick="return false;">Show</a></span></div><div class="quotecontent"><div style="display: none;">A text that is placed between the spoilerbbcodetags will be shown like this text!</div></div></div></description>
That means that the '<' tag is not allowed in line 78... :(
Locked

Return to “[3.0.x] MODs in Development”