phpBB SEO
Boards
Directory  
SEO  
Downloads
  phpBB SEO : Search Engine Optimization, Directory, Forums  
Index
Forums
Annuaire
Référencement
Télécharger
 
  Search Rechercher
    Register
Username :  Password :  Log me on automatically each visit  
S'enregistrer  
 
   
RSS Feed Question
Goto page 1, 2  Next
 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB SEO TooLKit  » GYM Sitemaps
::  
Author Message
Gamerz7



Joined: 24 Sep 2007
Posts: 7

RSS Feed QuestionPosted: Thu Sep 27, 2007 12:34 am    Post subject: RSS Feed Question

Ok, I know there has to be some way to do this.

What I want to do is make it so that when your on a specific forum, or a page inside that forum it will show that forums feed as well as the main feed.

If you have IE7 theres that RSS button that shows the RSS feeds on found on the page.

So when I go to the forum it will show just the main feed (rss.xml) but say I went into the "Announcements" forum in the feeds list it would show:

-Main Feed (rss.xml)
-Forum Feed (announcements-rf1.xml)

And even if you were like in a thread inside of that forum it would still show that forums feed.

Is there anyway of doing this?

Thanks Very Happy
Back to top
HB
phpBB SEO Team
phpBB SEO Team


Joined: 16 Oct 2006
Posts: 795

RSS Feed QuestionPosted: Thu Sep 27, 2007 1:58 am    Post subject: Re: RSS Feed Question

If you add tags like these to the generated header, IE and Firefox will pick up the RSS feeds.

Code:
<link rel="alternate" type="application/rss+xml" title="YourForum Forums [RSS]" href="http://www.yourforum.com/forums/rss.xml">
<link rel="alternate" type="application/rss+xml" title="YourForum.com - AAA Forum [RSS]" href="http://www.yourforum.com/forums/aaa-rf42.xml"><title>YourForum.com - AAA</title>

_________________
Dan Kehn
Back to top
Visit poster's website
Gamerz7



Joined: 24 Sep 2007
Posts: 7

RSS Feed QuestionPosted: Thu Sep 27, 2007 2:42 am    Post subject: Re: RSS Feed Question

HB wrote:
If you add tags like these to the generated header, IE and Firefox will pick up the RSS feeds.

Code:
<link rel="alternate" type="application/rss+xml" title="YourForum Forums [RSS]" href="http://www.yourforum.com/forums/rss.xml">
<link rel="alternate" type="application/rss+xml" title="YourForum.com - AAA Forum [RSS]" href="http://www.yourforum.com/forums/aaa-rf42.xml"><title>YourForum.com - AAA</title>


Ya, I have already did that for the main feed, but I was wondering if there was a code to automate it to do what I said in the first post
Back to top
HB
phpBB SEO Team
phpBB SEO Team


Joined: 16 Oct 2006
Posts: 795

RSS Feed QuestionPosted: Thu Sep 27, 2007 3:11 am    Post subject: Re: RSS Feed Question

Open overall_header.tpl, find:

Code:
<meta http-equiv="Content-Style-Type" content="text/css">


Insert after:

Code:
{FORUM_RSS}


Open viewforum.php, find:

Code:
//
// Dump out the page header and load viewforum template
//


Insert before:
Code:
$template->assign_vars(array(
   'FORUM_RSS' => '<link rel="alternate" type="application/rss+xml" title="' . $board_config['sitename'] . ' - ' . $forum_row['forum_name'] . ' Forum [RSS]" href="' . $phpbb_seo->seo_path['phpbb_url'] . $phpbb_seo->format_url($forum_row['forum_name'], '') . '-rf' . $forum_id . '.xml">')     
);


The '-rf' should probably be $phpbb_seo->seo_delim['forum_rss'] but I was in a rush when I wrote it. You could make a similar change to viewtopic.php to have the forum RSS available, but I didn't bother.

_________________
Dan Kehn
Back to top
Visit poster's website
Gamerz7



Joined: 24 Sep 2007
Posts: 7

RSS Feed QuestionPosted: Thu Sep 27, 2007 3:35 am    Post subject: Re: RSS Feed Question

OMG! That worked like a charm, that you so much! Very Happy Very Happy

You wouldnt happen to know exactly what to put for the viewtopic would you Embarassed I have no clue what to change Confused
Back to top
HB
phpBB SEO Team
phpBB SEO Team


Joined: 16 Oct 2006
Posts: 795

RSS Feed QuestionPosted: Thu Sep 27, 2007 3:56 am    Post subject: Re: RSS Feed Question

Nearly the same code. Open viewtopic.php, find:

Code:
//
// Output page header
//


Insert after:

Code:
$template->assign_vars(array(
   'FORUM_RSS' => '<link rel="alternate" type="application/rss+xml" title="' . $board_config['sitename'] . ' - ' . $forum_name . ' Forum [RSS]" href="' . $phpbb_seo->seo_path['phpbb_url'] . $phpbb_seo->format_url($forum_name, '') . '-rf' . $forum_id . '.xml">')     
);


Why this isn't part of the RSS MOD is a mystery only dcz understands. Wink

_________________
Dan Kehn
Back to top
Visit poster's website
Gamerz7



Joined: 24 Sep 2007
Posts: 7

RSS Feed QuestionPosted: Thu Sep 27, 2007 4:09 am    Post subject: Re: RSS Feed Question

HB wrote:
Nearly the same code. Open viewtopic.php, find:

Code:
//
// Output page header
//


Insert after:

Code:
$template->assign_vars(array(
   'FORUM_RSS' => '<link rel="alternate" type="application/rss+xml" title="' . $board_config['sitename'] . ' - ' . $forum_name . ' Forum [RSS]" href="' . $phpbb_seo->seo_path['phpbb_url'] . $phpbb_seo->format_url($forum_name, '') . '-rf' . $forum_id . '.xml">')     
);


Why this isn't part of the RSS MOD is a mystery only dcz understands. Wink


Thank you so much Very Happy This site is awsome.

lol ya, mabey their should be something about this feature, or sticky this thread or something. Im sure lots of other people would love this Smile
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 13354

RSS Feed QuestionPosted: Thu Sep 27, 2007 9:42 am    Post subject: Re: RSS Feed Question

HB wrote:

Why this isn't part of the RSS MOD is a mystery only dcz understands. Wink


Laughing

Please put together an add on Wink


Anyway, I'm currently working on the next version of gym sitemaps, and it will come with an auto link mod this time, it's only I never had time to work on a working for all cases solution (it's not this obvious with the several type of rewriting available, and I as well wanted to make a general solution for Google sitemaps, rss and html sitemaps).

++

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
coyote
phpBB SEO Team
phpBB SEO Team


Joined: 11 May 2007
Posts: 72

RSS Feed QuestionPosted: Fri Sep 28, 2007 6:09 am    Post subject: Re: RSS Feed Question

This is way better than the way I did it. I just typed in the HTML to the feed in the forum's description. But I had to do it for each one, and it was a pain.
Back to top
Visit poster's website
volf



Joined: 29 May 2007
Posts: 3

RSS Feed QuestionPosted: Mon Jan 21, 2008 9:29 am    Post subject: Re: RSS Feed Question

Nice work!
Wondering will search engines pick up this link?
Back to top
SeO
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 15 Mar 2006
Posts: 3137

RSS Feed QuestionPosted: Tue Jan 22, 2008 8:27 am    Post subject: Re: RSS Feed Question

yes Wink

_________________
Back to top
StL_Stadtroller



Joined: 07 Feb 2008
Posts: 4
Location: St. Louis, MO

RSS Feed QuestionPosted: Thu Feb 07, 2008 4:45 am    Post subject: Re: RSS Feed Question

Hello,
I attempted to add the code given above to add the RSS feed notification to my viewforum.php and viewtopic.php files as quoted, but I would winf up with an error in each like the one here:

Code:
Fatal error: Call to a member function format_url() on a non-object in /home/.rugrat/stlscooterforum/stlscooterforum.com/forum/viewtopic.php on line 582


I did try replacing the '-rf- as suggested, and also got an error.

I know really nothing about PHP programming, so am I making a rookie mistake here or something?

my site is:
www.stlscooterforum.com

phpBB is installed in:
www.stlscooterforum.com/forum/

rss.php/sitemap.php/urllist.php are installed in the root.

I think everything is working OK, I just want the RSS "indicator" in IE7, etc to be live.

Thanks!
Back to top
SeO
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 15 Mar 2006
Posts: 3137

RSS Feed QuestionPosted: Thu Feb 07, 2008 9:09 am    Post subject: Re: RSS Feed Question

Looks like you are not using the phpBB SEO mod rewrite, correct ?

_________________
Back to top
StL_Stadtroller



Joined: 07 Feb 2008
Posts: 4
Location: St. Louis, MO

RSS Feed QuestionPosted: Thu Feb 07, 2008 1:02 pm    Post subject: Re: RSS Feed Question

yes, that is correct.
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 13354

RSS Feed QuestionPosted: Mon Feb 25, 2008 8:42 am    Post subject: Re: RSS Feed Question

So, you should proceed as follow.

First, use :
Quote:
$template->assign_vars(array(
'FORUM_RSS' => '<link rel="alternate" type="application/rss+xml" title="' . $board_config['sitename'] . ' - ' . $forum_name . ' Forum [RSS]" href="http://www.example.com/phpbb/' . format_url($forum_name, 'forum') . '-rf' . $forum_id . '.xml">')
);


Instead of the above code. You'll need to hard code your real forum url (I know it's not the prettiest way, but it's simple) and then, add :
Code:
   /**
   * Prepare Titles for URL injection
   */
   function format_url( $url, $type = 'topic' ) {
      $url = preg_replace("`\[.*\]`U","",$url);
      $url = preg_replace('`&(amp;)?#?[a-z0-9]+;`i','-',$url);
      $url = htmlentities($url, ENT_COMPAT);
      $url = preg_replace( "`&([a-z])(acute|uml|circ|grave|ring|cedil|slash|tilde|caron|lig);`i","\\1", $url );
      $url = preg_replace( array("`[^a-z0-9]`i","`[-]+`") , "-", $url);
      $url = ( $url == "" ) ? $type : strtolower(trim($url, '-'));
      return $url;
   }


At the end of your includes/functions.php file and ti should be ok.

++

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB SEO TooLKit  » GYM Sitemaps
Page 1 of 2 Goto page 1, 2  Next

Navigation Similar Topics

Jump to: