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  
 
   
May you please help me with this rss file

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB3 mod Rewrite  » Advanced SEO URL
::  
Author Message
foxxy81



Joined: 03 Apr 2008
Posts: 7
Location: Egypt

May you please help me with this rss filePosted: Fri Aug 29, 2008 5:02 am    Post subject: May you please help me with this rss file

Hi Very Happy ,
since i installed you amazing mod in my forum , google start indexing it like crazy Laughing
i've now over 4000 links in just 2 months Shocked
Really very good job guys , and the best part you have a very nice supporting here Wink
which take us to my point Razz

this is rss.php file which work good for me
may you please make it compatible with adv seo mod
so i have seo links on it

here's the file
Code:
<?php
/*
*
* @name rss.php
* @package phpBB3
* @version $Id: rss.php,v 1.0 2006/11/27 22:29:16 angelside Exp $
* @copyright (c) Canver Software
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
*/
define('IN_PHPBB', true);
$phpbb_root_path = './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();

// Begin Configuration Section
$CFG['exclude_forums'] = '';
$CFG['max_topics'] = '20';
// End Configuration Section


// If not set, set the output count to max_topics
$count = request_var('count', 0);
$count = ( $count == 0 ) ? $CFG['max_topics'] : $count;

$forumid = request_var('fid', '');

// Zeichen
$chars = request_var('chars', 200);
//if($chars<0 || $chars>500) $chars=500; //Maximum
//$type = request_var('type', 'latest');

// [+] define path
// Create main board url (some code borrowed from functions_post.php)
// We have to generate a full HTTP/1.1 header here since we can't guarantee to have any of the information
$script_name = (!empty($_SERVER['PHP_SELF'])) ? $_SERVER['PHP_SELF'] : getenv('PHP_SELF');
if (!$script_name)
{
   $script_name = (!empty($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] : getenv('REQUEST_URI');
}
$script_path = trim(dirname($script_name));
$script_path = preg_replace('#[\\\\/]{2,}#', '/', $script_path);

$server_name = trim($config['server_name']);
$server_protocol = ( $config['cookie_secure'] ) ? 'https://' : 'http://';
$server_port = ( $config['server_port'] <> 80 ) ? ':' . trim($config['server_port']) . '' : '';

$url = $server_protocol . $server_name . $server_port;
$url .= ( $script_path != '' ) ? $script_path . '' : '';

$viewtopic = ( $script_path != '' ) ? $script_path . '/viewtopic.' . $phpEx : 'viewtopic.'. $phpEx;
$index = ( $script_path != '' ) ? $script_path . '/index.' . $phpEx : 'index.'. $phpEx;

$index_url = $server_protocol . $server_name . $server_port . $index;
$viewtopic_url = $server_protocol . $server_name . $server_port . $viewtopic;
// [-] define path


//
// Strip all BBCodes and Smileys from the post
//
function strip_post($text, $uid)
{
   $text = preg_replace("#\[\/?[a-z0-9\*\+\-]+(?:=.*?)?(?::[a-z])?(\:?$uid)\]#", '', $text); // for BBCode
   $text = preg_replace('#<!\-\- s(.*?) \-\-><img src="\{SMILIES_PATH\}\/.*? \/><!\-\- s(.*?) \-\->#', '', $text); // for smileys
   $text = str_replace('&amp;#', '&#', htmlspecialchars($text, ENT_QUOTES)); // html format

   return $text;
}

// Exclude forums
$sql_where = '';
if ($CFG['exclude_forums'])
{
   $exclude_forums = explode(',', $CFG['exclude_forums']);
   foreach ($exclude_forums as $i => $id)
   {
      if ($id > 0)
      {
         $sql_where .= ' AND p.forum_id != ' . trim($id);
      }
   }
}

if ($forumid != '')
{
   $select_forums = explode(',', $forumid);
   $sql_where .= ( sizeof($select_forums)>0 ) ? ' AND f.forum_id IN (' . $forumid . ')' : '';
}

$output = '<' . '?xml version="1.0" encoding="UTF-8"?' . '>' . "\n";
$output .= '<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:annotate="http://purl.org/rss/1.0/modules/annotate/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">' . "\n";
$output .= '<channel>' . "\n";
$output .= '<title>' . strip_tags($config['sitename']) . '</title>' . "\n";
$output .= '<link>' . $index_url . '</link>' . "\n";
//$output .= '<copyright>Copyright ? 2007-present, yourdomain.com</copyright>' . "\n";
$output .= '<generator>phpBB3 RSS Builder</generator>' . "\n";
$output .= '<description>' . strip_tags($config['site_desc']) . '</description>' . "\n";
//$output .= '<language>de</language>' . "\n";
/*
$output .= '<image>' . "\n";
$output .= '<title>infoMantis Logo</title>' . "\n";
$output .= '<url>http://www.infomantis.de/download/logo.gif</url>' . "\n";
$output .= '<link>http://www.infomantis.de/</link>' . "\n";
$output .= '<width>200</width>' . "\n";
$output .= '<height>55</height>' . "\n";
$output .= '<description>infoMantis GmbH</description>' . "\n";
$output .= '</image>' . "\n";
*/

// 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, u.username
      FROM ' . POSTS_TABLE . ' as p, ' . FORUMS_TABLE . ' as f, ' . USERS_TABLE . ' as u
      WHERE (u.user_id = p.poster_id)
      AND p.post_approved = 1
      AND (f.forum_id = p.forum_id)
      ' . $sql_where . '
      ORDER BY post_time DESC';
$result = $db->sql_query_limit($sql, $count);

while( ($row = $db->sql_fetchrow($result)) )
{
   if (!$auth->acl_get('f_list', $row['forum_id']))
   {
      // if the user does not have permissions to list this forum, skip everything until next branch
      continue;
   }

   // [+] user_id to username
   $poster_u = append_sid("$url/memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['poster_id']);
   $poster = '&lt;a href='. $poster_u .'&gt;' . $row['username'] . '&lt;/a&gt;';
   // [-] user_id to username

   // [+] forum title
   $forum_title_u = append_sid("$url/viewforum.$phpEx", 'f=' . $row['forum_id']);
   $forum_title = '&lt;a href='. $forum_title_u .'&gt;' . $row['forum_name'] . '&lt;/a&gt;';
   // [-] forum title

   $topic_id = $row['topic_id'];
   $forum_id = $row['forum_id'];
   $topic_title = $row['post_subject'];
   $post_time = date('Y-m-d', $row['post_time']);
   $viewtopic = append_sid("$url/viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&amp;t=' . $row['topic_id']);

   $output .= "<item>\n";
   $output .= "\t<title>$topic_title</title>\n";

   $post_text = $row['post_text'];
   $post_text = censor_text($post_text);
   $post_text = str_replace("\n", '<br />', $post_text);
   $post_text = strip_post($post_text, $row['bbcode_uid']);

   $output .= "\t<description>
   Author: " . $poster . "&lt;br /&gt;
   Forum: " . $forum_title . " &lt;br /&gt;
   Date: " . $post_time . " &lt;br /&gt;&lt;br /&gt;" . $post_text . "</description>\n";

   $output .= "\t<link>$viewtopic</link>\n";
   $output .= "</item>\n\n";
}
$output .= "</channel>\n</rss>";

header('Content-Type: text/xml; charset=utf-8');
echo $output;

?>


Thanks in advance
and sorry for my poor english Crying or Very sad
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15242

May you please help me with this rss filePosted: Mon Sep 01, 2008 8:11 am    Post subject: Re: May you please help me with this rss file

Well, we did not dev GYM sitemaps & RSS for nothing, why not using it ?

_________________
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
foxxy81



Joined: 03 Apr 2008
Posts: 7
Location: Egypt

May you please help me with this rss filePosted: Mon Sep 01, 2008 3:28 pm    Post subject: Re: May you please help me with this rss file

i tried to use it
but i end with a headache
it have many many acp options , i failed configure it
that's why i need something simple
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15242

May you please help me with this rss filePosted: Sat Sep 06, 2008 8:15 am    Post subject: Re: May you please help me with this rss file

Well, given the huge amount of options, GYM sitemaps & RSS is pretty simple to use.
Default values are working for most cases in the end, most people only need to activate url rewriting in the main tab and voilà.

_________________
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
foxxy81



Joined: 03 Apr 2008
Posts: 7
Location: Egypt

May you please help me with this rss filePosted: Mon Sep 08, 2008 11:10 pm    Post subject: Re: May you please help me with this rss file

Thanks dcz
i'll give it another try
Very Happy
Back to top
hazardpro



Joined: 17 Sep 2008
Posts: 3

May you please help me with this rss filePosted: Wed Sep 17, 2008 4:31 pm    Post subject: Re: May you please help me with this rss file

Hi, just installed you mod but Im now getting an error and the whole forum is down.

Error:

Fatal error: Call to undefined function: set_cond() in /home/sites/mydomain.co.uk/public_html/my-forum/index.php on line 37

Which looking at the code is:

} else {
$phpbb_seo->set_cond( (boolean) (utf8_strpos($phpbb_seo->seo_path['uri'], "index.$phpEx") !== false), 'do_redir', (empty($_GET) || (!empty($seo_mark) && !$keep_mark)));
}

Any ideas? I followed all the steps in the read me and only manually edited the header and footer template files, the rest I uploaded from the already modifies files supplied in the pack. I also ensure I change the root in the sitemap.php page (which is in the main dir of the site (but I didnt edit the gymrss.php as I placed that in the forum dir (should I?)

Hopeing you can help.....
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15242

May you please help me with this rss filePosted: Sat Sep 20, 2008 9:20 am    Post subject: Re: May you please help me with this rss file

Well this does not looks like related to this topic.
Anyway, the set_cond method is added in phpbb_seo/phpbb_seo_class.php by the zero duplicate mod, make sure you have all the required code added there for the zero duplicate, should be enough to fix the issue.

++

_________________
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  » phpBB3 mod Rewrite  » Advanced SEO URL
Page 1 of 1

Navigation Similar Topics

Jump to: