User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Existing Scripts section within the Web Development category of DaniWeb, a massive community of 374,438 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,060 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Existing Scripts advertiser:
Views: 23459 | Replies: 117
Reply
Join Date: Sep 2004
Posts: 6
Reputation: Polo is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Polo Polo is offline Offline
Newbie Poster

Re: vBulletin mod_rewrite for vB 3.0.7

  #31  
May 3rd, 2005
Excellent! Thank you Dani Great Tutorial
Reply With Quote  
Join Date: May 2005
Posts: 3
Reputation: projectpilot is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
projectpilot projectpilot is offline Offline
Newbie Poster

Re: vBulletin mod_rewrite for vB 3.0.7

  #32  
May 3rd, 2005
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.
Reply With Quote  
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 10,873
Reputation: cscgal is just really nice cscgal is just really nice cscgal is just really nice cscgal is just really nice cscgal is just really nice 
Rep Power: 32
Solved Threads: 108
Admin
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: vBulletin mod_rewrite for vB 3.0.7

  #33  
May 3rd, 2005
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
Reply With Quote  
Join Date: Apr 2005
Posts: 16
Reputation: yakusasci is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
yakusasci yakusasci is offline Offline
Newbie Poster

Re: vBulletin mod_rewrite for vB 3.0.7

  #34  
May 3rd, 2005
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.
Reply With Quote  
Join Date: May 2005
Posts: 9
Reputation: Jezella is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Jezella Jezella is offline Offline
Newbie Poster

Re: vBulletin mod_rewrite for vB 3.0.7

  #35  
May 3rd, 2005
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
Reply With Quote  
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 10,873
Reputation: cscgal is just really nice cscgal is just really nice cscgal is just really nice cscgal is just really nice cscgal is just really nice 
Rep Power: 32
Solved Threads: 108
Admin
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: vBulletin mod_rewrite for vB 3.0.7

  #36  
May 3rd, 2005
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.
Reply With Quote  
Join Date: May 2005
Posts: 9
Reputation: Jezella is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Jezella Jezella is offline Offline
Newbie Poster

Re: vBulletin mod_rewrite for vB 3.0.7

  #37  
May 4th, 2005
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
Reply With Quote  
Join Date: May 2005
Posts: 9
Reputation: Jezella is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Jezella Jezella is offline Offline
Newbie Poster

Re: vBulletin mod_rewrite for vB 3.0.7

  #38  
May 4th, 2005
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 12:46 pm. Reason: spelling error
Reply With Quote  
Join Date: May 2005
Location: LI, NY
Posts: 3
Reputation: wirewolf is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
wirewolf's Avatar
wirewolf wirewolf is offline Offline
Newbie Poster

Re: vBulletin mod_rewrite for vB 3.0.7

  #39  
May 4th, 2005
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 5th, 2005 at 11:50 pm.
Reply With Quote  
Join Date: Sep 2004
Posts: 6
Reputation: Polo is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Polo Polo is offline Offline
Newbie Poster

Re: vBulletin mod_rewrite for vB 3.0.7

  #40  
May 5th, 2005
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...

$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
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Existing Scripts Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Existing Scripts Forum

All times are GMT -4. The time now is 12:13 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC