Prosilver / subsilver2 code changes

phpBB SEO Premod for phpBB3 support forum.
This premodded version of phpBB3 includes the three different type of URL rewriting for phpBB3 by phpBB SEO. It comes with several other Search Engine Optimization mods installed.

Moderator: Moderators

Prosilver / subsilver2 code changes

Postby dcz » Sat Dec 22, 2007 1:41 pm

Support for custom style implementation in the phpBB SEO premod :

You will find the complete code changes for prosilver and subsilver2 in the contrib/prosilver _subsilver2_code_changes.txt file of the full SEO premod Package.
These may be useful in case you want to install a new style to your phpBB SEO premod installation.
Don't forget to clear phpBB's cache after you mod your templates.

Code: Select all
#
#-----[ DIY INSTRUCTIONS ]--------------------------------------------------
#

Once you will have updated, you will have to refresh your theme's cache as well as phpBB's cache (ACP => STYLE, Themes => Refresh).

Code change for prosilver and subsilver templates with the phpBB SEO premod 3.0.10 :
[url=http://www.phpbb-seo.com/en/phpbb-seo-premod/seo-url-premod-t1549.html]phpBB SEO Premod V 3.0.9[/url] (en)
http://www.phpbb-seo.com/fr/premod-phpbb-seo/premod-referencement-phpbb-t1951.html (fr)

#
#-----[ OPEN ]------------------------------------------
## MOD Title:       phpBB SEO Ultimate SEO URL
#

styles/prosilver/template/attachment.html

#
#-----[ FIND ]------------------------------------------
#

         <dt><a href="{_file.U_DOWNLOAD_LINK}"><img src="{_file.THUMB_IMAGE}" alt="{_file.DOWNLOAD_NAME}" title="{_file.DOWNLOAD_NAME} ({_file.FILESIZE} {_file.SIZE_LANG}) {_file.L_DOWNLOAD_COUNT}" /></a></dt>

#
#-----[ REPLACE WITH ]------------------------------------------
#

         <dt><a href="{_file.U_DOWNLOAD_LINK}"><img src="{_file.THUMB_IMAGE}" alt="{_file.DOWNLOAD_NAME}" title="<!-- IF _file.COMMENT_CLEAN -->{_file.COMMENT_CLEAN} / {_file.DOWNLOAD_NAME}<!-- ELSE -->{_file.DOWNLOAD_NAME} ({_file.FILESIZE} {_file.SIZE_LANG}) {_file.L_DOWNLOAD_COUNT}<!-- ENDIF -->" /></a></dt>

#
#-----[ FIND ]------------------------------------------
#

         <dt class="attach-image"><img src="{_file.U_INLINE_LINK}" alt="{_file.DOWNLOAD_NAME}" onclick="viewableArea(this);" /></dt>

#
#-----[ REPLACE WITH ]------------------------------------------
#

         <dt class="attach-image"><img src="{_file.U_INLINE_LINK}" alt="{_file.DOWNLOAD_NAME}" title="<!-- IF _file.COMMENT_CLEAN -->{_file.COMMENT_CLEAN} / <!-- ENDIF -->{_file.DOWNLOAD_NAME}" onclick="viewableArea(this);" /></dt>

#
#-----[ FIND ]------------------------------------------
#

         <dt><!-- IF _file.UPLOAD_ICON -->{_file.UPLOAD_ICON} <!-- ENDIF --><a class="postlink" href="{_file.U_DOWNLOAD_LINK}">{_file.DOWNLOAD_NAME}</a></dt>

#
#-----[ REPLACE WITH ]------------------------------------------
#

         <dt><!-- IF _file.UPLOAD_ICON -->{_file.UPLOAD_ICON} <!-- ENDIF --><a class="postlink" href="{_file.U_DOWNLOAD_LINK}" title="<!-- IF _file.COMMENT_CLEAN -->{_file.COMMENT_CLEAN} / <!-- ENDIF -->{_file.DOWNLOAD_NAME}">{_file.DOWNLOAD_NAME}</a></dt>

#
#-----[ OPEN ]------------------------------------------
## MOD Title:       phpBB SEO Ultimate SEO URL
#

styles/prosilver/template/forum_fn.js

#
#-----[ FIND ]------------------------------------------
#

function jumpto()
{
   var page = prompt(jump_page, on_page);

   if (page !== null && !isNaN(page) && page == Math.floor(page) && page > 0)
   {
      if (base_url.indexOf('?') == -1)
      {
         document.location.href = base_url + '?start=' + ((page - 1) * per_page);
      }
      else
      {
         document.location.href = base_url.replace(/&amp;/g, '&') + '&start=' + ((page - 1) * per_page);
      }
   }
}

#
#-----[ REPLACE WITH ]------------------------------------------
#

// www.phpBB-SEO.com SEO TOOLKIT BEGIN
function jumpto() {
   var page = prompt(jump_page, on_page);

   if (page !== null && !isNaN(page) && page == Math.floor(page) && page > 0) {
      var seo_page = (page - 1) * per_page;
      var anchor = '';
      var anchor_parts = base_url.split('#');
      if ( anchor_parts[1] ) {
         base_url = anchor_parts[0];
         anchor = '#' + anchor_parts[1];
      }
      if ( seo_page > 0 ) {
         var phpEXtest = false;
         if ( base_url.indexOf('?') >= 0 || ( phpEXtest = base_url.match(/\.php$/i))) {
            document.location.href = base_url.replace(/&amp;/g, '&') + (phpEXtest ? '?' : '&') + 'start=' + seo_page + anchor;
         } else {
            var ext = base_url.match(/\.[a-z0-9]+$/i);
            if (ext) {
               // location.ext => location-xx.ext
               document.location.href = base_url.replace(/\.[a-z0-9]+$/i, '') + seo_delim_start + seo_page + ext + anchor;
            } else {
               // location and location/ to location/pagexx.html
               var slash = base_url.match(/\/$/) ? '' : '/';
               document.location.href = base_url + slash + seo_static_pagination + seo_page + seo_ext_pagination + anchor;
            }
         }
      } else {
         document.location.href = base_url + anchor;
      }
   }
}
// Open external links in new window in a XHTML 1.x compliant way.
/**
*  phpbb_seo_href()
*  Fixes href="#something" links with virtual directories
*  Optionally open external or marked with a css class links in a new window
*  in a XHTML 1.x compliant way.
*/
function phpbb_seo_href() {
   var current_domain = document.domain.toLowerCase();
   if (!current_domain || !document.getElementsByTagName) return;
   if (seo_external_sub && current_domain.indexOf('.') >= 0) {
      current_domain = current_domain.replace(new RegExp(/^[a-z0-9_-]+\.([a-z0-9_-]+\.([a-z]{2,6}|[a-z]{2,3}\.[a-z]{2,3}))$/i), '$1');
   }
   if (seo_ext_classes) {
      var extclass = new RegExp("(^|\s)(" + seo_ext_classes + ")(\s|$)");
   }
   if (seo_hashfix) {
      var basehref = document.getElementsByTagName('base')[0];
      if (basehref) {
         basehref = basehref.href;
         var hashtest = new RegExp("^(" + basehref + "|)#[a-z0-9_-]+$");
         var current_href = document.location.href.replace(/#[a-z0-9_-]+$/i, "");
      } else {
         seo_hashfix = false;
      }
   }
   var hrefels = document.getElementsByTagName("a");
   var hrefelslen = hrefels.length;
   for (var i = 0; i < hrefelslen; i++) {
      var el = hrefels[i];
      var hrefinner = el.innerHTML.toLowerCase();
      if (el.onclick || (el.href == '') || (el.href.indexOf('javascript') >=0 ) || (el.href.indexOf('mailto') >=0 ) || (hrefinner.indexOf('<a') >= 0) ) {
         continue;
      }
      if (seo_hashfix && el.hash && hashtest.test(el.href)) {
         el.href = current_href + el.hash;
      }
      if (seo_external) {
         if ((el.href.indexOf(current_domain) >= 0) && !(seo_ext_classes && extclass.test(el.className))) {
            continue;
         }
         el.onclick = function () { window.open(this.href); return false; };
      }
   }
}
if (seo_external || seo_hashfix) {
   onload_functions.push('phpbb_seo_href()');
}
// www.phpBB-SEO.com SEO TOOLKIT END

#
#-----[ OPEN ]------------------------------------------
## MOD Title:       phpBB3 SEO No Duplicate
#

styles/prosilver/template/forumlist_body.html

#
#-----[ FIND ]------------------------------------------
#

                  <!-- IF forumrow.LAST_POST_TIME --><dfn>{L_LAST_POST}</dfn>

#
#-----[ AFTER, ADD ]------------------------------------------
#

                  <!-- IF forumrow.LAST_POST_LINK --><i>{forumrow.LAST_POST_LINK}</i><br/><!-- ENDIF -->

#
#-----[ OPEN ]------------------------------------------
## MOD Title:       phpBB SEO Ultimate SEO URL
## MOD Title:       phpBB3 SEO Dynamic Meta tags
## MOD Title:       phpBB3 SEO Optimal titles
## MOD Title:       GYM Sitempas & RSS
#

styles/prosilver/template/overall_header.html

#
#-----[ FIND ]------------------------------------------
#

<head>

<meta http-equiv="content-type" content="text/html; charset={S_CONTENT_ENCODING}" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="content-language" content="{S_USER_LANG}" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="resource-type" content="document" />
<meta name="distribution" content="global" />
<meta name="keywords" content="" />
<meta name="description" content="" />
{META}
<title>{SITENAME} &bull; <!-- IF S_IN_MCP -->{L_MCP} &bull; <!-- ELSEIF S_IN_UCP -->{L_UCP} &bull; <!-- ENDIF -->{PAGE_TITLE}</title>

#
#-----[ REPLACE WITH ]------------------------------------------
#

<head>
{SEO_BASE_HREF}
<!-- IF SEO_CANONICAL_URL --><link rel="canonical" href="{SEO_CANONICAL_URL}" /><!-- ENDIF -->
<meta http-equiv="content-type" content="text/html; charset={S_CONTENT_ENCODING}" />
<title>{PAGE_TITLE}<!-- IF S_IN_MCP --> &bull; {L_MCP}<!-- ELSEIF S_IN_UCP --> &bull; {L_UCP}<!-- ENDIF --></title>
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="content-language" content="{S_USER_LANG}" />
<meta http-equiv="imagetoolbar" content="no" />
{META_TAG}
{META}
<!-- BEGIN gym_rsslinks -->
<link rel="alternate" type="application/rss+xml" title="{gym_rsslinks.TITLE}" href="{gym_rsslinks.URL}" />
<!-- END gym_rsslinks -->

#
#-----[ FIND ]------------------------------------------
## MOD Title:       phpBB SEO Ultimate SEO URL
#

   var onload_functions = new Array();
   var onunload_functions = new Array();

#
#-----[ AFTER, ADD]------------------------------------------
#

   // www.phpBB-SEO.com SEO TOOLKIT BEGIN
   var seo_delim_start = '{SEO_START_DELIM}';
   var seo_static_pagination = '{SEO_SATIC_PAGE}';
   var seo_ext_pagination = '{SEO_EXT_PAGE}';
   var seo_external = {SEO_EXTERNAL};
   var seo_external_sub = {SEO_EXTERNAL_SUB};
   var seo_ext_classes = {SEO_EXT_CLASSES};
   var seo_hashfix = {SEO_HASHFIX};
   // www.phpBB-SEO.com SEO TOOLKIT END

#
#-----[ OPEN ]------------------------------------------
## MOD Title:       GYM Sitempas & RSS
#

styles/prosilver/template/overall_footer.html

#
#-----[ FIND ]------------------------------------------
#

      <ul class="linklist">

#
#-----[ REPLACE WITH ]------------------------------------------
#

      <ul class="linklist<!-- IF GYM_LINKS --> navlinks<!-- ENDIF -->">

#
#-----[ FIND ]------------------------------------------
#

      </ul>

#
#-----[ AFTER, ADD ]------------------------------------------
#
#
      <!-- IF GYM_LINKS -->
      <ul class="linklist">
         <!-- IF GYM_HTML_NEWS_LINK --><li class="leftside">{GYM_HTML_NEWS_LINK}</li><!-- ENDIF -->
         <!-- IF GYM_HTML_MAP_LINK --><li class="leftside">{GYM_HTML_MAP_LINK}</li><!-- ENDIF -->
         <!-- IF GYM_GOOGLE_LINK --><li class="leftside">{GYM_GOOGLE_LINK}</li><!-- ENDIF -->
         <!-- IF GYM_RSS_LINK --><li class="leftside">{GYM_RSS_LINK}</li><!-- ENDIF -->
         <!-- IF GYM_RSS_CHAN_LINK --><li class="leftside">{GYM_RSS_CHAN_LINK}</li><!-- ENDIF -->
      </ul>
      <!-- ENDIF -->
#
#-----[ OPEN ]------------------------------------------
## MOD Title:       phpBB SEO Ultimate SEO URL
#

styles/prosilver/template/posting_editor.html

#
#-----[ FIND ]------------------------------------------
#

   <dl style="clear: left;">
      <dt><label for="subject">{L_SUBJECT}:</label></dt>
      <dd><input type="text" name="subject" id="subject" size="45" maxlength="<!-- IF S_NEW_MESSAGE -->60<!-- ELSE -->64<!-- ENDIF -->" tabindex="2" value="{SUBJECT}{DRAFT_SUBJECT}" class="inputbox autowidth" /></dd>
   </dl>

#
#-----[ AFTER, ADD ]------------------------------------------
#

   <!-- IF S_URL -->
   <dl style="clear: left;">
      <dt><label for="url">URL:</label></dt>
         <dd><input type="text" name="url" id="url" size="45" maxlength="250" tabindex="2" value="{TOPIC_URL}" class="inputbox autowidth" /></dd>
   </dl>
   <!-- ENDIF -->

#
#-----[ OPEN ]------------------------------------------
## MOD Title:       phpBB SEO Ultimate SEO URL
#

styles/prosilver/template/simple_header.html

#
#-----[ FIND ]------------------------------------------
#

<head>

#
#-----[ AFTER, ADD]------------------------------------------
#

{SEO_BASE_HREF}

#
#-----[ FIND ]------------------------------------------
#

   var onload_functions = new Array();
   var onunload_functions = new Array();
   var style_cookie_settings = '{A_COOKIE_SETTINGS}';

#
#-----[ AFTER, ADD]------------------------------------------
#

   // www.phpBB-SEO.com SEO TOOLKIT BEGIN
   var seo_delim_start = '{SEO_START_DELIM}';
   var seo_static_pagination = '{SEO_SATIC_PAGE}';
   var seo_ext_pagination = '{SEO_EXT_PAGE}';
   var seo_external = {SEO_EXTERNAL};
   var seo_external_sub = {SEO_EXTERNAL_SUB};
   var seo_ext_classes = {SEO_EXT_CLASSES};
   var seo_hashfix = {SEO_HASHFIX};
   // www.phpBB-SEO.com SEO TOOLKIT END
      
#
#-----[ OPEN ]------------------------------------------
## MOD Title:       GYM Sitempas & RSS
#

styles/prosilver/template/viewforum_body.html

#
#-----[ FIND ]------------------------------------------
#

<h2><a href="{U_VIEW_FORUM}">{FORUM_NAME}</a></h2>

#
#-----[ AFTER, ADD ]------------------------------------------
#

<!-- IF GYM_LINKS_CAT --><h3>{GYM_HTML_FORUM_NEWS_LINK} {GYM_HTML_FORUM_MAP_LINK} {GYM_RSS_FORUM_LINK} {GYM_GOOGLE_FORUM_LINK}</h3><!-- ENDIF -->

#
#-----[ OPEN ]------------------------------------------
## MOD Title:       phpBB SEO Related Topics
## MOD Title:       phpBB SEO Ultimate SEO URL
#

styles/prosilver/template/viewtopic_body.html

#
#-----[ FIND ]------------------------------------------
#

<a href="#p{postrow.POST_ID}">

#
#-----[ REPLACE WITH ]------------------------------------------
#

<a href="{U_VIEW_TOPIC}#p{postrow.POST_ID}">

#
#-----[ FIND ]------------------------------------------
#

<a href="#wrap" class="top" title="{L_BACK_TO_TOP}">

#
#-----[REPLACE WITH ]------------------------------------------
#

<a href="{U_VIEW_TOPIC}#wrap" class="top" title="{L_BACK_TO_TOP}">

#
#-----[ FIND ]------------------------------------------
#

<!-- IF S_TOPIC_MOD -->
   <form method="post" action="{S_MOD_ACTION}">
   <fieldset class="quickmod">
      <label for="quick-mod-select">{L_QUICK_MOD}:</label> {S_TOPIC_MOD} <input type="submit" value="{L_GO}" class="button2" />
      {S_FORM_TOKEN}
   </fieldset>
   </form>
<!-- ENDIF -->

#
#-----[ AFTER, ADD ]------------------------------------------
#

<!-- IF S_RELATED_RESULTS --><div class="clear">&nbsp;</div><br /><br />
<div class="forumbg">
   <div class="inner"><span class="corners-top"><span></span></span>
      <ul class="topiclist">
         <li class="header">
            <dl class="icon">
               <dt>{L_RELATED_TOPICS}</dt>
               <dd class="posts">{L_REPLIES}</dd>
               <dd class="views">{L_VIEWS}</dd>
               <dd class="lastpost"><span>{L_LAST_POST}</span></dd>
            </dl>
         </li>
      </ul>

   <ul class="topiclist forums">
   <!-- BEGIN related -->
   <li class="row bg1<!-- IF related.S_POST_ANNOUNCE --> announce<!-- ENDIF --><!-- IF related.S_POST_STICKY --> sticky<!-- ENDIF --><!-- IF related.S_TOPIC_REPORTED --> reported<!-- ENDIF -->">
      <dl class="icon" style="background-image: url({related.TOPIC_FOLDER_IMG_SRC}); background-repeat: no-repeat;">
         <dt <!-- IF related.TOPIC_ICON_IMG and S_TOPIC_ICONS --> style="background-image: url({T_ICONS_PATH}{related.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF -->><!-- IF related.S_UNREAD_TOPIC --><a href="{related.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a class="topictitle" href="{related.U_TOPIC}" title="{related.TOPIC_TITLE} : {related.FORUM}">{related.TOPIC_TITLE}</a>
         <!-- IF related.S_TOPIC_UNAPPROVED --><a href="{related.U_MCP_QUEUE}">{UNAPPROVED_IMG}</a> <!-- ENDIF -->
         <!-- IF related.S_TOPIC_REPORTED --><a href="{related.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><br />
         <!-- IF related.PAGINATION --><strong class="pagination"><span>{related.PAGINATION}</span></strong><!-- ENDIF -->
         <!-- IF related.ATTACH_ICON_IMG -->{related.ATTACH_ICON_IMG} <!-- ENDIF -->{L_POST_BY_AUTHOR} {related.TOPIC_AUTHOR_FULL} &raquo; {related.FIRST_POST_TIME}
         </dt>
         <dd class="posts">{related.REPLIES} <dfn>{L_REPLIES}</dfn></dd>
         <dd class="views">{related.VIEWS} <dfn>{L_VIEWS}</dfn></dd>
         <dd class="lastpost"><span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} {related.LAST_POST_AUTHOR_FULL}
            <a href="{related.U_LAST_POST}">{LAST_POST_IMG}</a><br />{related.LAST_POST_TIME}
            <!-- IF related.U_FORUM and not related.S_POST_GLOBAL --><br /><a class="topictitle" href="{related.U_FORUM}" title="{related.FORUM}">{related.FORUM}</a><!-- ENDIF --></span></dd>
      </dl>
   </li>
   <!-- END related -->
   </ul>
   <span class="corners-bottom"><span></span></span></div>
</div>
<!-- ENDIF -->

#
#-----[ OPEN ]------------------------------------------
## MOD Title:       GYM Sitempas & RSS
#

styles/prosilver/theme/common.css

#
#-----[ FIND ]------------------------------------------
#

.clear {
   display: block;
   clear: both;
   font-size: 1px;
   line-height: 1px;
   background: transparent;
}

#
#-----[ AFTER, ADD ]------------------------------------------
#

/* GYM Sitemaps & RSS - www.phpbb-seo.com */
div.gymsublist {
   display:block;
   position:relative;
   padding-left:10px;
   padding-top:5px;
   padding-bottom:10px;
   padding-right:0;
   margin:0;
}
div.gymsublist ul {
   display:block;
   position:relative;
   height:1%;
   padding-left:30px;
}
div.gymsublist ul li {
   display:block;
   position:relative;
   line-height:18px;
   font-size:11px;
}
/* GYM Sitemaps & RSS - www.phpbb-seo.com */

#
#-----[ OPEN ]------------------------------------------
## MOD Title:       phpBB SEO Ultimate SEO URL
#

styles/subsilver2/template/attachment.html

#
#-----[ FIND ]------------------------------------------
#

         <a href="{_file.U_DOWNLOAD_LINK}"><img src="{_file.THUMB_IMAGE}" alt="{_file.DOWNLOAD_NAME}" /></a><br />

#
#-----[ REPLACE WITH ]------------------------------------------
#

         <a href="{_file.U_DOWNLOAD_LINK}"><img src="{_file.THUMB_IMAGE}" alt="{_file.DOWNLOAD_NAME}" title="<!-- IF _file.COMMENT_CLEAN -->{_file.COMMENT_CLEAN} / {_file.DOWNLOAD_NAME}<!-- ELSE -->{_file.DOWNLOAD_NAME} ({_file.FILESIZE} {_file.SIZE_LANG}) {_file.L_DOWNLOAD_COUNT}<!-- ENDIF -->"/></a><br />

#
#-----[ FIND ]------------------------------------------
#

         <img src="{_file.U_INLINE_LINK}" alt="{_file.DOWNLOAD_NAME}" /><br />

#
#-----[ REPLACE WITH ]------------------------------------------
#

         <img src="{_file.U_INLINE_LINK}" alt="{_file.DOWNLOAD_NAME}" title="<!-- IF _file.COMMENT_CLEAN -->{_file.COMMENT_CLEAN} / <!-- ENDIF -->{_file.DOWNLOAD_NAME}"/><br />

#
#-----[ FIND ]------------------------------------------
#

            <a href="{_file.U_DOWNLOAD_LINK}">{_file.DOWNLOAD_NAME}</a> [{_file.FILESIZE} {_file.SIZE_LANG}]

#
#-----[ REPLACE WITH ]------------------------------------------
#

            <a href="{_file.U_DOWNLOAD_LINK}" title="<!-- IF _file.COMMENT_CLEAN -->{_file.COMMENT_CLEAN} / <!-- ENDIF -->{_file.DOWNLOAD_NAME}">{_file.DOWNLOAD_NAME}</a> [{_file.FILESIZE} {_file.SIZE_LANG}]

#
#-----[ OPEN ]------------------------------------------
## MOD Title:       phpBB3 SEO No Duplicate
#

styles/subsilver2/template/forumlist_body.html

#
#-----[ FIND ]------------------------------------------
#

            <!-- IF forumrow.LAST_POST_TIME -->

#
#-----[ AFTER, ADD ]------------------------------------------
#

               <!-- IF forumrow.LAST_POST_LINK -->
               <p class="topicdetails"><i>{forumrow.LAST_POST_LINK}</i></p>
               <!-- ENDIF -->
               
#
#-----[ OPEN ]------------------------------------------
## MOD Title:       phpBB SEO Ultimate SEO URL
## MOD Title:       phpBB3 SEO Dynamic Meta tags
## MOD Title:       phpBB3 SEO Optimal titles
## MOD Title:       GYM Sitempas & RSS
#

styles/subsilver2/template/overall_header.html

#
#-----[ FIND ]------------------------------------------
#

<head>

<meta http-equiv="content-type" content="text/html; charset={S_CONTENT_ENCODING}" />
<meta http-equiv="content-language" content="{S_USER_LANG}" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="resource-type" content="document" />
<meta name="distribution" content="global" />
<meta name="keywords" content="" />
<meta name="description" content="" />
{META}
<title>{SITENAME} &bull; <!-- IF S_IN_MCP -->{L_MCP} &bull; <!-- ELSEIF S_IN_UCP -->{L_UCP} &bull; <!-- ENDIF -->{PAGE_TITLE}</title>

#
#-----[REPLACE WITH ]------------------------------------------
#

<head>
{SEO_BASE_HREF}
<!-- IF SEO_CANONICAL_URL --><link rel="canonical" href="{SEO_CANONICAL_URL}" /><!-- ENDIF -->
<meta http-equiv="content-type" content="text/html; charset={S_CONTENT_ENCODING}" />
<title>{PAGE_TITLE}<!-- IF S_IN_MCP --> &bull; {L_MCP}<!-- ELSEIF S_IN_UCP --> &bull; {L_UCP}<!-- ENDIF --></title>
<meta http-equiv="content-language" content="{S_USER_LANG}" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="imagetoolbar" content="no" />
{META_TAG}
{META}
<!-- BEGIN gym_rsslinks -->
<link rel="alternate" type="application/rss+xml" title="{gym_rsslinks.TITLE}" href="{gym_rsslinks.URL}" />
<!-- END gym_rsslinks -->

#
#-----[ FIND ]------------------------------------------
## MOD Title:       phpBB SEO Ultimate SEO URL
#

function jumpto()
{
   var page = prompt('{LA_JUMP_PAGE}:', '{ON_PAGE}');
   var per_page = '{PER_PAGE}';
   var base_url = '{A_BASE_URL}';

   if (page !== null && !isNaN(page) && page == Math.floor(page) && page > 0)
   {
      if (base_url.indexOf('?') == -1)
      {
         document.location.href = base_url + '?start=' + ((page - 1) * per_page);
      }
      else
      {
         document.location.href = base_url.replace(/&amp;/g, '&') + '&start=' + ((page - 1) * per_page);
      }
   }
}

#
#-----[ REPLACE WITH ]------------------------------------------
#

// www.phpBB-SEO.com SEO TOOLKIT BEGIN
function jumpto() {
   var page = prompt('{LA_JUMP_PAGE}:', '{ON_PAGE}');
   var perpage = '{PER_PAGE}';
   var base_url = '{A_BASE_URL}';
   var seo_delim_start = '{SEO_START_DELIM}';
   var seo_static_pagination = '{SEO_SATIC_PAGE}';
   var seo_ext_pagination = '{SEO_EXT_PAGE}';
   if (page !== null && !isNaN(page) && page == Math.floor(page) && page > 0) {
      var seo_page = (page - 1) * perpage;
      var anchor = '';
      var anchor_parts = base_url.split('#');
      if ( anchor_parts[1] ) {
         base_url = anchor_parts[0];
         anchor = '#' + anchor_parts[1];
      }
      if ( seo_page > 0 ) {
         var phpEXtest = false;
         if ( base_url.indexOf('?') >= 0 || ( phpEXtest = base_url.match(/\.php$/i))) {
            document.location.href = base_url.replace(/&amp;/g, '&') + (phpEXtest ? '?' : '&') + 'start=' + seo_page + anchor;
         } else {
            var ext = base_url.match(/\.[a-z0-9]+$/i);
            if (ext) {
               // location.ext => location-xx.ext
               document.location.href = base_url.replace(/\.[a-z0-9]+$/i, '') + seo_delim_start + seo_page + ext + anchor;
            } else {
               // location and location/ to location/pagexx.html
               var slash = base_url.match(/\/$/) ? '' : '/';
               document.location.href = base_url + slash + seo_static_pagination + seo_page + seo_ext_pagination + anchor;
            }
         }
      } else {
         document.location.href = base_url + anchor;
      }
   }
}
var seo_external = {SEO_EXTERNAL};
var seo_external_sub = {SEO_EXTERNAL_SUB};
var seo_ext_classes = {SEO_EXT_CLASSES};
var seo_hashfix = {SEO_HASHFIX};
/**
*  phpbb_seo_href()
*  Fixes href="#something" links with virtual directories
*  Optionally open external or marked with a css class links in a new window
*  in a XHTML 1.x compliant way.
*/
function phpbb_seo_href() {
   var current_domain = document.domain.toLowerCase();
   if (!current_domain || !document.getElementsByTagName) return;
   if (seo_external_sub && current_domain.indexOf('.') >= 0) {
      current_domain = current_domain.replace(new RegExp(/^[a-z0-9_-]+\.([a-z0-9_-]+\.([a-z]{2,6}|[a-z]{2,3}\.[a-z]{2,3}))$/i), '$1');
   }
   if (seo_ext_classes) {
      var extclass = new RegExp("(^|\s)(" + seo_ext_classes + ")(\s|$)");
   }
   if (seo_hashfix) {
      var basehref = document.getElementsByTagName('base')[0];
      if (basehref) {
         basehref = basehref.href;
         var hashtest = new RegExp("^(" + basehref + "|)#[a-z0-9_-]+$");
         var current_href = document.location.href.replace(/#[a-z0-9_-]+$/i, "");
      } else {
         seo_hashfix = false;
      }
   }
   var hrefels = document.getElementsByTagName("a");
   var hrefelslen = hrefels.length;
   for (var i = 0; i < hrefelslen; i++) {
      var el = hrefels[i];
      var hrefinner = el.innerHTML.toLowerCase();
      if (el.onclick || (el.href == '') || (el.href.indexOf('javascript') >=0 ) || (el.href.indexOf('mailto') >=0 ) || (hrefinner.indexOf('<a') >= 0) ) {
         continue;
      }
      if (seo_hashfix && el.hash && hashtest.test(el.href)) {
         el.href = current_href + el.hash;
      }
      if (seo_external) {
         if ((el.href.indexOf(current_domain) >= 0) && !(seo_ext_classes && extclass.test(el.className))) {
            continue;
         }
         el.onclick = function () { window.open(this.href); return false; };
      }
   }
}
window.onload = function() {
   if (seo_external || seo_hashfix) {
      phpbb_seo_href();
   }
   // here you can add other window.onload events
}
// www.phpBB-SEO.com SEO TOOLKIT END

#
#-----[ OPEN ]------------------------------------------
## MOD Title:       GYM Sitempas & RSS
#

styles/subsilver2/template/overall_footer.html

#
#-----[ FIND ]------------------------------------------
#

<div id="wrapfooter">

#
#-----[ AFTER, ADD ]------------------------------------------
#

   <!-- IF GYM_LINKS --><span>{GYM_HTML_NEWS_LINK} {GYM_HTML_MAP_LINK} {GYM_GOOGLE_LINK} {GYM_RSS_LINK} {GYM_RSS_CHAN_LINK}</span><br /><!-- ENDIF -->

#
#-----[ OPEN ]------------------------------------------
## MOD Title:       phpBB SEO Ultimate SEO URL
#

styles/subsilver2/template/posting_body.html

#
#-----[ FIND ]------------------------------------------
#

<tr>
   <td class="row1" width="22%"><b class="genmed">{L_SUBJECT}:</b></td>
   <td class="row2" width="78%"><input class="post" style="width:450px" type="text" name="subject" size="45" maxlength="<!-- IF S_NEW_MESSAGE -->60<!-- ELSE -->64<!-- ENDIF -->" tabindex="2" value="{SUBJECT}" /></td>
</tr>

#
#-----[ AFTER, ADD ]------------------------------------------
#

<!-- IF S_URL -->
<tr>
   <td class="row1" width="22%"><b class="genmed">URL:</b></td>
   <td class="row2" width="78%"><input class="post" style="width:450px" type="text" name="url" size="45" maxlength="250" tabindex="2" value="{TOPIC_URL}" /></td>
</tr>
<!-- ENDIF -->

#
#-----[ OPEN ]------------------------------------------
## MOD Title:       phpBB SEO Ultimate SEO URL
#

styles/subsilver2/template/simple_header.html

#
#-----[ FIND ]------------------------------------------
#

<head>

#
#-----[ AFTER, ADD ]------------------------------------------
#

{SEO_BASE_HREF}

#
#-----[ OPEN ]------------------------------------------
## MOD Title:       GYM Sitempas & RSS
#

styles/subsilver2/template/viewforum_body.html

#
#-----[ FIND ]------------------------------------------
#

      <h2><a class="titles" href="{U_VIEW_FORUM}">{FORUM_NAME}</a></h2>

#
#-----[ AFTER, ADD ]------------------------------------------
#

      <!-- IF GYM_LINKS_CAT --><h3>{GYM_HTML_FORUM_NEWS_LINK} {GYM_HTML_FORUM_MAP_LINK} {GYM_RSS_FORUM_LINK} {GYM_GOOGLE_FORUM_LINK}</h3><!-- ENDIF -->

#
#-----[ OPEN ]------------------------------------------
## MOD Title:       phpBB SEO Related Topics
## MOD Title:       phpBB SEO Ultimate SEO URL
#

styles/subsilver2/template/viewtopic_body.html

#
#-----[ FIND ]------------------------------------------
#

<a href="#p{postrow.POST_ID}">

#
#-----[ REPLACE WITH ]------------------------------------------
#

<a href="{U_VIEW_TOPIC}#p{postrow.POST_ID}">

#
#-----[ FIND ]------------------------------------------
#

<a href="#wrapheader">

#
#-----[ REPLACE WITH ]------------------------------------------
#

<a href="{U_VIEW_TOPIC}#wrapheader">

#
#-----[ FIND ]------------------------------------------
#

<!-- INCLUDE breadcrumbs.html -->

#
#-----[ AFTER, ADD ]------------------------------------------
#

<!-- IF S_RELATED_RESULTS --><br clear="all" />
   <table class="tablebg" width="100%" cellspacing="1">
   <tr>
      <td class="cat" colspan="<!-- IF S_TOPIC_ICONS -->7<!-- ELSE -->6<!-- ENDIF -->"><span class="nav">{L_RELATED_TOPICS}</span></td>
   </tr>
   <tr>
      <!-- IF S_TOPIC_ICONS -->
         <th colspan="3">&nbsp;{L_TOPICS}&nbsp;</th>
      <!-- ELSE -->
         <th colspan="2">&nbsp;{L_TOPICS}&nbsp;</th>
      <!-- ENDIF -->
      <th>&nbsp;{L_AUTHOR}&nbsp;</th>
      <th>&nbsp;{L_REPLIES}&nbsp;</th>
      <th>&nbsp;{L_VIEWS}&nbsp;</th>
      <th>&nbsp;{L_LAST_POST}&nbsp;</th>
   </tr>
   <!-- BEGIN related -->
      <tr>
         <td class="row1" width="25" align="center">{related.TOPIC_FOLDER_IMG}</td>
         <!-- IF S_TOPIC_ICONS -->
            <td class="row1" width="25" align="center"><!-- IF related.TOPIC_ICON_IMG --><img src="{T_ICONS_PATH}{related.TOPIC_ICON_IMG}" width="{related.TOPIC_ICON_IMG_WIDTH}" height="{related.TOPIC_ICON_IMG_HEIGHT}" alt="" title="" /><!-- ENDIF --></td>
         <!-- ENDIF -->
         <td class="row1">
            <!-- IF related.S_UNREAD_TOPIC --><a href="{related.U_NEWEST_POST}">{NEWEST_POST_IMG}</a><!-- ENDIF -->
            {related.ATTACH_ICON_IMG} <a title="{L_POSTED}: {related.FIRST_POST_TIME}" href="{related.U_TOPIC}"class="topictitle">{related.TOPIC_TITLE}</a>
            <!-- IF related.S_TOPIC_UNAPPROVED -->
               <a href="{related.U_MCP_QUEUE}">{UNAPPROVED_IMG}</a>&nbsp;
            <!-- ENDIF -->
            <!-- IF related.S_TOPIC_REPORTED -->
               <a href="{related.U_MCP_REPORT}">{REPORTED_IMG}</a>&nbsp;
            <!-- ENDIF -->
            <!-- IF related.PAGINATION -->
               <p class="gensmall"> [ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: {related.PAGINATION} ] </p>
            <!-- ENDIF -->
         </td>
         <td class="row2" width="130" align="center"><p class="topicauthor">{related.TOPIC_AUTHOR_FULL}</p></td>
         <td class="row1" width="50" align="center"><p class="topicdetails">{related.REPLIES}</p></td>
         <td class="row2" width="50" align="center"><p class="topicdetails">{related.VIEWS}</p></td>
         <td class="row1" width="140" align="center">
            <p class="topicdetails" style="white-space: nowrap;">{related.LAST_POST_TIME}</p>
            <p class="topicdetails">{related.LAST_POST_AUTHOR_FULL}
               <a href="{related.U_LAST_POST}">{LAST_POST_IMG}</a>
            </p>
         </td>
      </tr>
   <!-- END related -->
   <tr align="center">
      <td class="cat" colspan="<!-- IF S_TOPIC_ICONS -->7<!-- ELSE -->6<!-- ENDIF -->">&nbsp;</td>
   </tr>
   </table>
   <br clear="all" />
<!-- ENDIF -->

#
#-----[ OPEN ]------------------------------------------
## MOD Title:       GYM Sitempas & RSS
#

styles/subsilver2/theme/stylesheet.css

#
#-----[ FIND ]------------------------------------------
#

.username-coloured {
   font-weight: bold;
}

#
#-----[ AFTER, ADD ]------------------------------------------
#

/* GYM Sitemaps & RSS - www.phpbb-seo.com */
div.gymsublist {
   display:block;
   position:relative;
   padding-left:10px;
   padding-top:5px;
   padding-bottom:10px;
   padding-right:0;
   margin:0;
}
div.gymsublist ul {
   display:block;
   position:relative;
   height:1%;
   padding-left:30px;
}
div.gymsublist ul li {
   display:block;
   position:relative;
   line-height:18px;
   font-size:11px;
}
/* GYM Sitemaps & RSS - www.phpbb-seo.com */

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM

prosilver_subsilver2_code_changes.zip
Prosilver / subsilver2 code changes
(5.23 KiB) Downloaded 1184 times


French speaking support.

Update : 3.0.10
Nos change in our mods style modifications.

Update : 3.0.9

prosilver_subsilver2_3.0.8_to_3.0.9.zip
Style Update 3.0.8 to 3.0.9
Only contains the changes for the phpBB SEO mods, not phpBB's
(1.05 KiB) Downloaded 872 times


Update : 3.0.8
No code change in phpBB SEO mods from 3.0.7(-PL1), the code is only updated to match new code to find in overall_header.html

Update : 3.0.7
prosilver_subsilver2_3.0.6_to_3.0.7.zip
Style Update 3.0.6 to 3.0.7
Only contains the changes for the phpBB SEO mods, not phpBB's
(713 Bytes) Downloaded 1011 times


Update : 3.0.6
prosilver_subsilver2_3.0.5_to_3.0.6.zip
Style Update 3.0.5 to 3.0.6
Only contains the changes for the phpBB SEO mods, not phpBB's
(3.55 KiB) Downloaded 893 times
Last edited by dcz on Sat Jan 10, 2009 9:53 am, edited 1 time in total.
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21383
Joined: Fri Apr 28, 2006 9:03 pm

Advertisement

Postby dcz » Sat Jul 19, 2008 8:00 am

Updated to SEO premod 3.0.2. Only adds the required code for GYM sitemaps, no other changes.
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21383
Joined: Fri Apr 28, 2006 9:03 pm

Other style?

Postby sovanndy » Sat Jul 19, 2008 9:56 am

If I will installe other style beside prosilver or subsilver2, will it work when I used it with premod rewrite 3.01?

if not and I will use it with premod rewrite 3.02 and GYM, what steps I have to do?

Could you explain me?
sovanndy
PR0
PR0
 
Posts: 85
Joined: Tue Jun 10, 2008 8:11 am

Postby dcz » Sat Jul 19, 2008 10:10 am

The idea is to check from which one of the two default style (prosilver and subsilver2) your theme is the closest, and then apply the code change to it.

Usually, the closest code change do match pretty well, if you have trouble with some part, please report about it and we'll find the solution.
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21383
Joined: Fri Apr 28, 2006 9:03 pm

invalide all url?

Postby sovanndy » Sat Jul 19, 2008 10:16 am

My style called Hestia, it's defferent far from prosilver or subsilver2 style. it's a new styles for phpbb3. It worked before I add your premod rewrite. But after I added premod rewrite, it doesn't work for all urls of images, stylesheet, other links to other pages.

My style have no forum_fn.js file in template folder but it work before I add premod rewrite.

In any category topic pages or other pages that is sublink pages, it always linked to invalid page url of images and styles. for instance, as I right-clicked on all invalid link items, it shown the path like this -http://vanndy-billing/phpbb/vpn/styles/hestia/imageset/site_logo.gif and other -http://vanndy-billing/phpbb/vpn/styles/hestia/imageset/newtopic_button.gif

but the real urls is not that. that is -http://vanndy-billing/phpbb/styles/hestia/imageset/site_logo.gif and other -http://vanndy-billing/phpbb/styles/hestia/imageset/newtopic_button.gif etc....

it mean that it always embeded category name or topic name in the next domain name. for example -http://vanndy-billing/phpbb/vpn/styles/hestia/imageset/site_logo.gif or -http://vanndy-billing/phpbb/network/styles/hestia/imageset/site_logo.gif. it make my topic page show only text.

Note : VPN or Netowrk is topic name and category name.

Could you help me correct it?
sovanndy
PR0
PR0
 
Posts: 85
Joined: Tue Jun 10, 2008 8:11 am

Postby dcz » Sat Jul 19, 2008 12:28 pm

Well, there is nothing more I can tell, if you have no forum_fn.js file, then try the subsilver2 code change on your theme, at least for overall_header.html.
The first code change matches all styles and is the one that will fix the problem you describe (after you'll have refreshed your theme and template in style acp).
Without a link to where your theme is officially released, I cannot go further in details.
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21383
Joined: Fri Apr 28, 2006 9:03 pm

Glacier_Lite problems

Postby 2klix » Thu Aug 14, 2008 8:15 am

I am using the Glacier_Lite template and have tried using the closest code but it doesn't seem to work on a local instal. The problem I have is that the links on some of the menu show up as -http://localhost/ whatever when really they should show up as -http://localhost:8888/whatever does anyone else have a fix for this?
Thanks
Matt
2klix
 
Posts: 9
Joined: Fri Aug 01, 2008 9:21 am

Postby dcz » Mon Aug 18, 2008 8:37 am

The server port in url is not really related to the templates.
The phpbb_seo class does not use the server port since SEO goes with no port displayed (80) in links, but it's quite easy to add it back, in phpbb_seo_class.php, you can replace :
Code: Select all
      $this->seo_path['root_url'] =  $server_protocol . $server_name;

with :
Code: Select all
      $this->seo_path['root_url'] =  $server_protocol . $server_name . $server_port;


++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21383
Joined: Fri Apr 28, 2006 9:03 pm

A little confused. Help needed.

Postby microtekblue » Fri Sep 12, 2008 5:49 am

Hello.

Sorry but I am kind of confused.

Do we apply this mod onto our new Style or on one of the prosilver/subsilver styles?

Any suggestions would be greatly appreciated. The style in question is in my signature link.

Thanks. :D
microtekblue
 
Posts: 42
Joined: Mon Jul 28, 2008 4:20 pm

Postby dcz » Sat Sep 13, 2008 4:09 pm

This is only a compilation of the code changes performed in the style files by all the installed mods in the premod. You do not need to implement them in the provided subsilver2 and prosilver packages, it's only useful for other styles.

Just find which one of the two your theme is based on, and apply the corresponding code change, usually, it works, in case you have problems, please post a link to where your custom style is released ;)

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21383
Joined: Fri Apr 28, 2006 9:03 pm

Postby teokolo » Mon Oct 13, 2008 11:30 pm

Hello,
I am running phpbb-seo premod 3.02 .
I was using the default template and everything worked fine, then I switched to another theme (proformell), I edited it as described in this post and the login to the acp doesn't work anymore.
I can make the first login, the second too, but after that i get logged out (if I proceed to the acp and if I go to the board index).
Now I cannot go to ACP and switch back to prosilver...
Any help?
teokolo
 
Posts: 6
Joined: Sun Sep 07, 2008 9:49 am

Postby teokolo » Tue Oct 14, 2008 10:50 am

The problem is solved. I think it was a cache issue.
teokolo
 
Posts: 6
Joined: Sun Sep 07, 2008 9:49 am

Postby microtekblue » Wed Oct 29, 2008 2:09 am

Hello,

I installed my new style..and I was going to do the code changes, but I noticed that my new style does NOT have the file forum_fn.js ?

What do I do if my new style is missing the forum_fn.js? What is that file for anyways?

Thanks for the help in advance.
microtekblue
 
Posts: 42
Joined: Mon Jul 28, 2008 4:20 pm

Postby Professional » Wed Oct 29, 2008 5:40 am

microtekblue wrote:Hello,

I installed my new style..and I was going to do the code changes, but I noticed that my new style does NOT have the file forum_fn.js ?

What do I do if my new style is missing the forum_fn.js? What is that file for anyways?

Thanks for the help in advance.


hi so your style is subsilver2 base,u shoud do that codes :wink:
انجمن تخصصی نسل جدید موبایل ها-Apple Portal
My Handwritings: Professional Dreams
Every Thing That U Feel,Is Every Thing That I Feel.
User avatar
Professional
PR5
PR5
 
Posts: 550
Joined: Mon Apr 07, 2008 5:41 am
Location: 1/2 of the World

Postby microtekblue » Wed Oct 29, 2008 7:30 am

Professional wrote:
hi so your style is subsilver2 base,u shoud do that codes :wink:


Hi, sorry I am confused now.

Where is the subsliver2 code changes located?
microtekblue
 
Posts: 42
Joined: Mon Jul 28, 2008 4:20 pm

Next

Return to phpBB SEO Premod

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 4 guests


 
cron