943,669 Members | Top Members by Rank

Ad:
You are currently viewing page 4 of this multi-page discussion thread; Jump to the first page
May 3rd, 2005
0

Re: vBulletin mod_rewrite for vB 3.0.7

Excellent! Thank you Dani Great Tutorial
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Polo is offline Offline
6 posts
since Sep 2004
May 3rd, 2005
0

Re: vBulletin mod_rewrite for vB 3.0.7

Quote originally posted by projectpilot ...
I tried these 2 line modification to my archive file. The index page would not even load. Is there anything need to be added in the .htaccess file also?
I finally got that to work. The code for archive works fine. I just had to upload the "global.php" file again. I dont know what happened -- must have been an older version or something.

One more question Dani:

You said to use <h1> or <h2> tag for the titles. Can you elaborate a little. Do I just do the title of the page with h1 or h2? What did you mean by placing this code in the navbar:

<h1>$foruminfo[title]</h1>


Thanks for the answers to my earlier posts. Waiting for your answer before I make any changes.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
projectpilot is offline Offline
3 posts
since May 2005
May 3rd, 2005
0

Re: vBulletin mod_rewrite for vB 3.0.7

It's an SEO technique to wrap important text or keywords that you wish to emphasize in H1 and H2 header tags. Therefore, in the SHOWTHREAD template, it's a good idea to put <h1>$foruminfo[title]</h1> and then use CSS to customize the look of the H1 tag. For more information, check out our Web Design forum
Administrator
Staff Writer
Reputation Points: 1422
Solved Threads: 162
The Queen of DaniWeb
cscgal is offline Offline
13,645 posts
since Feb 2002
May 3rd, 2005
0

Re: vBulletin mod_rewrite for vB 3.0.7

Quote originally posted by cscgal ...
By default, the hack only fixes the generic forum and thread URLs in Who's Online. It doesn't handle multiple pages or when search queries are used, etc. For a completely mod_rewritten Who's Online, make the following changes to the includes/functions_online.php file. In each instance, replace the commented out line (the line with the //) with the non-commented line that appears below it. The lines will appear in the same order within the file as noted below.
Tks for your help. It's better but I still get this just for this kind of pages :

/threadnav32724-2-18.html
/threadnav33609-3-18.html

Another question : do you know where I can change properties of the navbar for this :

DaniWeb IT Community > Site Management and Internet Marketing > Web Hosting > Web Hosting Tutorials > vBulletin mod_rewrite for vB 3.0.7

I'd like to add a title attribute for forums links.

Tks.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
yakusasci is offline Offline
16 posts
since Apr 2005
May 4th, 2005
0

Re: vBulletin mod_rewrite for vB 3.0.7

Sorry for postining in the wrong place. I'll try here.

Hullo I'm new here and must say that I'm very impressed with this mod_rewwrite.

However, I have been looking at the most updated version and am a trying to incorporate this but am confussed by the following.

I have noted this:- Below are the PHP files that need to be edited. You will notice two lines at a time. The first line represents what to search for, and the second line represents what to replace it with.

So without further ado ...



$highlightwords = '&amp;highlight=' . urlencode(implode(' ', $display['highlight']));
$highlightwords = '-' . urlencode(implode(' ', $display['highlight']));

$display['forums']["$key"] = "<a href=\"forumdisplay.php?$session[sessionurl]f=$forumid\"><b><u>" . $forumcache["$forumid"]['title'] . '</u></b></a>';
$display['forums']["$key"] = "<a href=\"forum$forumid.html\"><b><u>" . $forumcache["$forumid"]['title'] . '</u></b></a>';
[/html]

showthread.php

[html]$highlightwords = iif($goto, '&', '&amp;') . 'highlight=' . urlencode($_GET['highlight']);
$highlightwords = '-' . urlencode($_GET['highlight']);

exec_header_redirect("showthread.php?$session[sessionurl_js]p=$getlastpost[postid]$highlightwords#post$getlastpost[postid]");
exec_header_redirect("threadedpost$getlastpost[postid]$highlightwords.html#post$getlastpost[postid]");

exec_header_redirect("showthread.php?$session[sessionurl_js]p=$posts[postid]$highlightwords#post$posts[postid]");
exec_header_redirect("threadedpost$posts[postid]$highlightwords.html#post$posts[postid]");

exec_header_redirect("showthread.php?$session[sessionurl_js]t=$threadinfo[threadid]&goto=lastpost$highlightwords");
exec_header_redirect("lastpostinthread$threadinfo[threadid]$highlightwords.html");

exec_header_redirect("showthread.php?$session[sessionurl_js]t=$thread[pollid]");
exec_header_redirect("thread$thread[pollid].html");

$pagenav = construct_page_nav($totalposts, "showthread.php?$session[sessionurl]t=$threadid", "&amp;pp=$perpage$highlightwords");
$pagenav = construct_page_nav($totalposts, "threadnav$threadid", "-$perpage$highlightwords.html");

$firstunread = 'showthread.php?' . $session['sessionurl'] . 't=' . $threadid . '&goto=newpost';
$firstunread = 'newpostinthread' . $threadid . '.html';

$pagenav = construct_page_nav($numhybrids, "showthread.php?$session[sessionurl]p=$_REQUEST[postid]", "&amp;pp=$perpage$highlightwords");
$pagenav = construct_page_nav($numhybrids, "post$_REQUEST[postid]", "-$perpage$highlightwords.html");

$navbits["forumdisplay.php?$session[sessionurl]f=$forumID"] = $forumTitle;
$navbits["forum$forumID.html"] = $forumTitle;


I can see that I remove line 4. But from the layout of the code it seems that the replacement code exceeds more than 1 line. To me I think that I should replace with lines 5, 6, 7, 8, 10 and 11.

Sorry for not understanding fully.

Jezella
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Jezella is offline Offline
9 posts
since May 2005
May 4th, 2005
0

Re: vBulletin mod_rewrite for vB 3.0.7

Take showthread.php for example:

Replace

[php]$highlightwords = iif($goto, '&', '&amp;') . 'highlight=' . urlencode($_GET['highlight']);[/php]

with

[php]$highlightwords = '-' . urlencode($_GET['highlight']);[/php]

Then replace

[php]exec_header_redirect("showthread.php?$session[sessionurl_js]p=$getlastpost[postid]$highlightwords#post$getlastpost[postid]");[/php]

with

[php]exec_header_redirect("threadedpost$getlastpost[postid]$highlightwords.html#post$getlastpost[postid]");[/php]


etc.
Administrator
Staff Writer
Reputation Points: 1422
Solved Threads: 162
The Queen of DaniWeb
cscgal is offline Offline
13,645 posts
since Feb 2002
May 4th, 2005
0

Re: vBulletin mod_rewrite for vB 3.0.7

Got it real fab is this and seems to work a treat. Now I just have to set it up on the main forum and not the testing one.

I did misunderstand the following bits in your code and hope that what I have now done is correct.

$display['forums']["$key"] = "<a href=\"forumdisplay.php?$session[sessionurl]f=$forumid\"><b><u>" . $forumcache["$forumid"]['title'] . '</u></b></a>';
$display['forums']["$key"] = "<a href=\"forum$forumid.html\"><b><u>" . $forumcache["$forumid"]['title'] . '</u></b></a>';
[/html]

showthread.php

[html]$highlightwords = iif($goto, '&', '&amp;') . 'highlight=' . urlencode($_GET['highlight']);
$highlightwords = '-' . urlencode($_GET['highlight']);


$display['forums']["$key"] = "<a href=\"forumdisplay.php?$session[sessionurl]f=$forumid\"><b><u>" . $forumcache["$forumid"]['title'] . '</u></b></a>';
$display['forums']["$key"] = "<a href=\"forum$forumid.html\"><b><u>" . $forumcache["$forumid"]['title'] . '</u></b></a>';


//[/html] deleted this

Next file to change

showthread.php

//[html] deleted this

$highlightwords = iif($goto, '&', '&amp;') . 'highlight=' . urlencode($_GET['highlight']);
$highlightwords = '-' . urlencode($_GET['highlight']);

Many thanks

Jezella
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Jezella is offline Offline
9 posts
since May 2005
May 4th, 2005
0

Re: vBulletin mod_rewrite for vB 3.0.7

I know that another hack added to this most wonderful one posted here may not be right but I have found the following white space remover that helps pages load faster.

Here the link http://www.vbulletin.org/forum/showthread.php?t=69787

I have incorporated this also and set store CSS Styles Sheets as files to yes. With these 2 additional changes to my forum, page display is really fast.

The question is that as re_write is being used in this hack, could this additional white space remove cause a problem which I have not noticed. I have done a bit of testing and it appears not. However, I am far from an expert.

Comments would be appreciated.

I'm feeling good, I'm learning something.

Jezella
Last edited by Jezella; May 4th, 2005 at 1:46 pm. Reason: spelling error
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Jezella is offline Offline
9 posts
since May 2005
May 4th, 2005
0

Re: vBulletin mod_rewrite for vB 3.0.7

Great hack cscgal.
When you say "not for the faint hearted", you aren't kidding.
I recommend to anyone to edit a test board first if you can (I did mine on a exact copy child forum of my default forum first), and BACKUP!

Anyway, I did have a problem with the 'RewriteRule ^threadmode' section in the htaccess file I uploaded. It crashed the site. Don't know why. But I removed those sections for the 'threadmode' RewriteRule and it when back to normal. Also removed the template edits related to same. I don't mind, as I don't let visitors see the mode options anyway, and I removed the Hybrid option a while ago. I don't like the hybrid mode and 90% of my members said they never use it. Also didn't include the online part. I only allow it for members only.

Didn't do the archive in full either. I think part of showing the archives to bots is that they see the unformatted text of the posts (no graphics, etc). They seem to like that. But I did put in the 'View Full Version' links to point to the rewrite htmls'.

But for that, it works like a charm!
If you care to - << url snipped to comply with forum policy >>

I also have a hack named, 'Most Recent Posts', and I replaced the urls in there also. Works fine.

And, I also edited my vBAdvanced CMPS portal for the rewrite. cscgal, if you don't mind, I'll PM you the edits for you to check out. It works fine on my Forum, but you may want to look at my code edits first. << url snipped >>

John
Last edited by cscgal; May 6th, 2005 at 12:50 am.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
wirewolf is offline Offline
3 posts
since May 2005
May 5th, 2005
0

Re: vBulletin mod_rewrite for vB 3.0.7

Well here are my suggestions...

I would recommend making the instruction more clear... as they are right now I think people will find them confusing...

and fix them alittle bit, because right now there is some html tags that are appearing that shouldnt be there...

Quote ...
$forumcache["$forumid"]['title'] . '</u></b></a>';
[/html]

showthread.php

[html]$highlightwords = iif($goto, '&', '&amp;') . 'highlight=' .
and also, it would be great if you could post the template modifications as many (like me) have modified their forums templates alot, and just replacing the new templates will revert all of their custom templates...

just my suggestions thank you for evertyig dani, this hack is really good
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Polo is offline Offline
6 posts
since Sep 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Configuring Readymade Scripts Forum Timeline: Seeking Text Editor for web pages
Next Thread in Configuring Readymade Scripts Forum Timeline: Error message: can I fix the problem?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC