| View previous topic :: View next topic |
| Author |
Message |
frold

Joined: 18 Jul 2006 Posts: 5 Country: 
|
Posted: Tue Jul 18, 2006 2:58 pm Post subject: Howto make the blocks like on this page? |
|
|
| Howto make the RSS blocks with the comments feature like you have here on this great site? |
|
| Back to top |
|
 |
pierre

Joined: 23 May 2004 Posts: 412 Country:  Location: Seattle (Eastside) & France
|
Posted: Tue Jul 18, 2006 3:58 pm Post subject: |
|
|
it's fairly simple thanks to magpierss ( http://magpierss.sourceforge.net/ )
you need to modify a phpbb php file and its corresponding template
Example for the "Pages web Favorites du Forum" (rss block at the right top) :
in the phbpbb file "page_header.php" , before "$template->pparse('overall_header');"
add :
| Code: |
$favoritesText='';
$itemcount=1;
require_once('magpierss/rss_fetch.inc');
$rss=fetch_rss("http://feeds.feedburner.com/seattlefrancophoneHackingCommentedWeb");
foreach ( $rss->items as $item ) {
$favoritesText=$favoritesText."<tr><td class="gensmall\"><a href=".$item['phpbblink']." class="gensmall\"><big><b>".$item['phpbbtopicreplies']."</b></big><img alt="discuss here\" src="discuss.gif\"> <a href=".$item['link']." title="">".substr($item['title'], 0, 44)."</a></td></tr>";
$itemcount=$itemcount+1;
if ($itemcount > 8)
break;
}
$template->assign_vars(array(
'FAVORITES' => $favoritesText,
));
|
in the phpbb template file "overall_header.tpl" where you want the rss block, add something like :
| Code: |
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<br>
<td class="row1">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<td class="row1"><span class="genmed"><b><a href="viewtopic.php?p=740"><span>Pages web Favorites du Forum</span></a></b>
<td>
<a href="http://feeds.feedburner.com/seattlefrancophoneCommentedWebOrderedBy1StComment"><img alt="rss" src="icon_rss.jpg"></a>
<span class="gensmall"> </span>
<a href="http://feeds.feedburner.com/seattlefrancophoneCommentedWeb"><img alt="rss" src="rssdiscuss.GIF"></a>
</td></td></table>
</td></tr>
{FAVORITES}
</table>
</td>
</td>
</table>
|
Last edited by pierre on Tue Jul 18, 2006 7:08 pm; edited 2 times in total |
|
| Back to top |
|
 |
frold

Joined: 18 Jul 2006 Posts: 5 Country: 
|
Posted: Tue Jul 18, 2006 5:34 pm Post subject: |
|
|
Im not sure if I understand - but I have send you an email....  |
|
| Back to top |
|
 |
pierre

Joined: 23 May 2004 Posts: 412 Country:  Location: Seattle (Eastside) & France
|
|
| Back to top |
|
 |
frold

Joined: 18 Jul 2006 Posts: 5 Country: 
|
Posted: Thu Jul 20, 2006 6:24 am Post subject: |
|
|
[quote="pierre"]
| Code: |
$favoritesText=$favoritesText."<tr><td class="gensmall\"><a href=".$item['phpbblink']." class="gensmall\"><big><b>".$item['phpbbtopicreplies']."</b></big><img alt="discuss here\" src="discuss.gif\"> <a href=".$item['link']." title="">".substr($item['title'], 0, 44)."</a></td></tr>";
| [/quote]
the correct is:
| Code: | | $favoritesText=$favoritesText."<tr><td class="gensmall\"><a href=".$item['phpbblink']." class="gensmall\"><big><b>".$item['phpbbtopicreplies']."</b></big><img alt="discuss here\" src="discuss.gif\"> <a href=".$item['link']." title="\">".substr($item['title'], 0, 44)."</a></td></tr>"; |
There some missing \
Last edited by frold on Thu Jul 20, 2006 6:24 am; edited 1 time in total |
|
| Back to top |
|
 |
|