jump to page function on viewtopic goes to 404 error

phpBB3 SEO Advanced mod Rewrite support forum.
This mods performs URL rewriting for phpBB, injecting forums and topic titles in their URLs.

Moderator: Moderators

Postby SeO » Wed Jan 21, 2009 1:55 pm

But the portal must be using a theme, and it's this them that must be modded. Usually theme are either based on prosilver or subsilver2, so most likely the code change from one or the other will fit into your eventual extra theme.
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Advertisement

Postby Elephantspike » Sat Jan 24, 2009 3:23 am

Well, the portal I'm using doesn't add any extra style of its own, but it does add modifications to prosilver and subsilver2, as well as adding some extra template files to each style. I'm sure you are correct that it is something I must change in those files.

I suspect that some of your edits to overall_header in each style needs to be added to the portal_header that this portal adds as well in each style .

I'll get it figured out exactly what eventually and post back when I do. Just in case someone else is having trouble with integrating Stargate with Adv Mod Rewrite.

Thanks.
Elephantspike
 
Posts: 41
Joined: Mon Mar 26, 2007 3:39 pm

Postby SeO » Sat Jan 24, 2009 10:03 am

Have you tried to implement the very first code change for overall_header.html in the portal's header ?
Do you see any base href tag in the <header> section of the generated code among your page (forum and portal) ?

URL to the site (can be PMed) ?
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Postby Elephantspike » Sat Jan 24, 2009 1:37 pm

The portal_header.html file does not have any <head> tags. It only has some javascript and a bunch of links to external javascript and css files. Like this:

Code: Select all
<!-- IF S_IS_PORTAL and S_ARRANGE -->
<script type="text/javascript" src="{ROOT_PATH}styles/js/scriptaculous.js"></script>
<script type="text/javascript" src="{ROOT_PATH}styles/js/builder.js"></script>
<script type="text/javascript" src="{ROOT_PATH}styles/js/effects.js"></script>
<script type="text/javascript" src="{ROOT_PATH}styles/js/dragdrop.js"></script>
<script type="text/javascript" src="{ROOT_PATH}styles/js/controls.js"></script>
<script type="text/javascript" src="{ROOT_PATH}styles/js/slider.js"></script>
<script type="text/javascript" src="{ROOT_PATH}styles/js/unittest.js"></script>
<!-- ENDIF -->
Elephantspike
 
Posts: 41
Joined: Mon Mar 26, 2007 3:39 pm

Postby Elephantspike » Sat Jan 24, 2009 2:20 pm

I think I just discovered a clue. One of those javascript link tags in portal_header.html is this one:

Code: Select all
<script type="text/javascript" src="{ROOT_PATH}styles/js/forum_fn.js"></script>


This would be the exact same file I edited before to make prosilver work.

Also, this edit:

Code: Select all
#
#-----[ FIND ]------------------------------------------
#

<head>

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

{SEO_BASE_HREF}


Is done in the overall_header.html source code, but it is not showing in the generated html output on either forum or portal (I don't think it is anyway, but come to think of it, what would that tag look like on the html output code?)
Last edited by Elephantspike on Sat Jan 24, 2009 3:21 pm, edited 3 times in total.
Elephantspike
 
Posts: 41
Joined: Mon Mar 26, 2007 3:39 pm

Postby SeO » Mon Jan 26, 2009 8:46 am

Looks like working now, or am I missing something ?
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Postby Elephantspike » Mon Jan 26, 2009 8:54 pm

Yes, I got it working in prosilver and my board's default prosilver_se, but not in subsilver.
Elephantspike
 
Posts: 41
Joined: Mon Mar 26, 2007 3:39 pm

Postby SeO » Tue Jan 27, 2009 2:55 pm

What part of the install is causing you trouble with subsilver2 ?
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Postby Elephantspike » Tue Jan 27, 2009 6:41 pm

OK, sorry, this thread has got kind of rambling on my part. To summarize:

- All of the edits for adv mod rewrite seo urls have been made for all styles.

- Due to changes made for Stargate portal, the "jump to page x out of x" links on multiple page threads were not working with the seo url edits in place.

- I discovered that because Stargate puts a JS folder inside the top Styles folder that has a forum_fn.js script in addition to the one that is inside the prosilver/template folder, your seo url edits needed to be added to that forum_fn.js file as well in order to make these links work in prosilver.

-These links are still not working in subsilver2. I have discovered that there is a javascript tag in Stargate's subsilver2/portal_header that calls the very same file (styles/js/forum_fn.js) that I had edited to make the links work in prosilver
Elephantspike
 
Posts: 41
Joined: Mon Mar 26, 2007 3:39 pm

Postby SeO » Tue Jan 27, 2009 8:06 pm

Have you tried to apply prosilver code change in the styles/js/forum_fn.js called by your subsilver2/portal_header ?

The trick should work the same.
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Postby Elephantspike » Thu Jan 29, 2009 11:38 am

SeO wrote:Have you tried to apply prosilver code change in the styles/js/forum_fn.js called by your subsilver2/portal_header ?


Yes. That's what I did to get it working on prosilver. It is that same styles/js/forum_fn.js file that is called by the portal_header in each style.

SeO wrote:The trick should work the same.


Yes, one would think that it would, but unfortunately, it doesn't. That is the problem.

Not really a big problem, as it is just a minor feature in a secondary style, but more of a mystery.

BTW- Thanks for this MOD. I'm doing great in search engines because of this.
Elephantspike
 
Posts: 41
Joined: Mon Mar 26, 2007 3:39 pm

Postby SeO » Thu Jan 29, 2009 1:09 pm

Elephantspike wrote:BTW- Thanks for this MOD. I'm doing great in search engines because of this.


You're welcome ;)

A possible explaination (I did not look deeply into it yet) could be related to the fact that subsilver2 uses
Code: Select all
var perpage = '{PER_PAGE}';


in its overall_header.html and prosilver uses
Code: Select all
var per_page = '{PER_PAGE}';

in the same file.

So putting both in the portal's overall_header.html could help.
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Postby Elephantspike » Sat Jan 31, 2009 1:33 am

SeO wrote:A possible explaination (I did not look deeply into it yet) could be related to the fact that subsilver2 uses
Code: Select all
var perpage = '{PER_PAGE}';



Ok, that put me on the right path. I've got it working now. The find and replace instruction for the javascript edit in overall_header.html needed to be adjusted slightly and applied to the portal_header.html in subsilver2. This part:

Code: Select all
#
#-----[ FIND ]------------------------------------------
#

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

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

#


Does not exist in portal_header.html. So you just need to enclose the "replace with" code in its own javascript tags and put it at the end of the file, so:

Open subsilver2/portal_header.html and find:

Code: Select all
});
   });
});
</script>


After add:

Code: Select all
<script type="text/javascript">
   // 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 > 0) {
      var seo_page = (page - 1) * perpage;
      if ( base_url.indexOf('?') >= 0 ) {
         document.location.href = base_url.replace(/&amp;/g, '&') + '&start=' + seo_page;
      } else if ( seo_page > 0 ) {
         var seo_type1 = base_url.match(/\.[a-z0-9]+$/i);
         if (seo_type1 !== null) {
            document.location.href = base_url.replace(/\.[a-z0-9]+$/i, '') + seo_delim_start + seo_page + seo_type1;
         }
         var seo_type2 = base_url.match(/\/$/);
         if (seo_type2 !== null) {
            document.location.href = base_url + seo_static_pagination + seo_page + seo_ext_pagination;
         }
      } else {
         document.location.href = base_url;
      }
   }
}
// www.phpBB-SEO.com SEO TOOLKIT END
</script>


I didn't bother changing this in prosilver, as it was already working in that style.
Elephantspike
 
Posts: 41
Joined: Mon Mar 26, 2007 3:39 pm

Postby SeO » Sun Feb 01, 2009 9:15 am

Ok great :D
The prosilver one is handled by the portal's forum_fn.js so everything looks normal now ;)
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Previous

Return to Advanced SEO URL

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 4 guests