954,152 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Have you modified any vBulletin PHP script files, or any templates?

Natch
Newbie Poster
16 posts since Oct 2004
Reputation Points: 10
Solved Threads: 0
 

I noticed that when you go to click on the latest post, the target url is "newpostinthread3.html" but when you click it, it links you to "showthread.php?p=3#post3" so did I do something wrong? Yet when you are viewing the forum and click on that thread, it shows "thread3.html"

And also, I want to fix the Online Location problem, but Natch's solution was too hard for me to figure out, so is there an easier way? Or one that goes into more detail so I can figure it out?

http://www.daniweb.com/tutorials/12725.html

Natch
Newbie Poster
16 posts since Oct 2004
Reputation Points: 10
Solved Threads: 0
 

hello,

can someone tell me what´s the differences between Dani´s Tutorial and Keith´s Tutorial?

greetz MaTriX

MaTriX
Newbie Poster
2 posts since Oct 2004
Reputation Points: 10
Solved Threads: 0
 

I originally started with my tutorial. Then Ted S expanded on my ideas. Then Keith took my original tutorial, and combined it with Ted's ideas, and put it all together as a new tutorial.

cscgal
The Queen of DaniWeb
Administrator
19,421 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 229
 

What about sessionid in URLs, aren't they got lost resulting in only cookie-users can login?

Thomas P
Newbie Poster
5 posts since Oct 2004
Reputation Points: 10
Solved Threads: 0
 
I originally started with my tutorial. Then Ted S expanded on my ideas. Then Keith took my original tutorial, and combined it with Ted's ideas, and put it all together as a new tutorial.

Thank you!

I have tested this hack, but when I upload the ".htaccess" I get an "Error 500". What does this mean? What should I do?

Greetz MaTriX

MaTriX
Newbie Poster
2 posts since Oct 2004
Reputation Points: 10
Solved Threads: 0
 

ok, got it to work.
now, when i was going through the tutorial:
Find all instances of:

PHP Code:
$threadtitle

And replace with:

PHP Code:
$threadtitle

Find all instances of:

PHP Code:
$forumtitle

And replace with:

PHP Code:
$forumtitle
couldn't find any of those instances in my functions_online.php :(

fate
Newbie Poster
3 posts since Oct 2004
Reputation Points: 10
Solved Threads: 0
 

Question... I have not installed v3 Articles 1.0.1 - [vB 3.0.1] or vB Journal3.0.3(v1.0.0) yet but I would like to know if it will do a mod_rewrite for them as well? Sorry if this is a dumb question... no clue how they work without the install yet

TraderX
Light Poster
37 posts since Sep 2004
Reputation Points: 10
Solved Threads: 0
 

Thank you!

I have tested this hack, but when I upload the ".htaccess" I get an "Error 500". What does this mean? What should I do?

Greetz MaTriX

You should check over every edit you have made in your .htaccess file: if you make the slightest mistake, errors in this file will cause a 500 Internal Server ErrorQuestion... I have not installed v3 Articles 1.0.1 - [vB 3.0.1] or vB Journal3.0.3(v1.0.0) yet but I would like to know if it will do a mod_rewrite for them as well? Sorry if this is a dumb question... no clue how they work without the install yetOK - any hack can be recoded to work along the same lines as this one: for the person thqt asked, I have done vBadvanced CMPS modules to work with this standard, and it works well... ( www.mobileforces.org for a working demo) - other hacks similarly...

Natch
Newbie Poster
16 posts since Oct 2004
Reputation Points: 10
Solved Threads: 0
 

it's been a long time since the [Revised] vBulletin Mod_rewrite Tutorial has been published, and nobody has noticed an error in it. weird. anyway, in the File Edits part there are 2 mistakes:

Find all instances of:

PHP Code:
<a href="showthread.php?$session[sessionurl]t=$threadid\" title=\"$threadpreview\">$threadtitle</a> 

And replace with:

PHP Code:
<a href="t$threadid-" .mod_rewrite_title($threadtitle). ".html\" title=\"$threadpreview\">$threadtitle</a> 

Find all instances of:

PHP Code:
<a href="forumdisplay.php?$session[sessionurl]f=$forumid\">$forumtitle</a> 

And replace with:

PHP Code:
<a href="f$forumid-" .mod_rewrite_title($forumtitle). ".html\">$forumtitle</a>

should be

Find all instances of:

PHP Code:
<a href=<strong>\</strong>"showthread.php?$session[sessionurl]t=$threadid\" title=\"$threadpreview\">$threadtitle</a> 

And replace with:

PHP Code:
<a href="t$threadid-" .mod_rewrite_title($threadtitle). ".html\" title=\"$threadpreview\">$threadtitle</a> 

Find all instances of:

PHP Code:
<a href=<strong>\</strong>"forumdisplay.php?$session[sessionurl]f=$forumid\">$forumtitle</a> 

And replace with:

PHP Code:
<a href="f$forumid-" .mod_rewrite_title($forumtitle). ".html\">$forumtitle</a>

please edit the tutorial.

now a question. i wanted my forum links to look a bit different, so instead of using

<em><a href="t$threadid-" .mod_rewrite_title($threadtitle). ".html\" title=\"$threadpreview\">$threadtitle</a></em>


and

<em><a href="f$forumid-" .mod_rewrite_title($forumtitle). ".html\">$forumtitle</a></em>


i used

<em><a href=\"thread/$threadid\" title=\"$threadpreview\">$threadtitle</a></em>
<em>and <a href=\"forum/$forumid\">$forumtitle</a></em>

so all my links to threads would look like thread/[threadid] and the links to forums would look like forum/[forumid]. however, in the Who's Online if i am viewing some forum, for example with id of 1, in the location column it says "Unknown Location /forum/1". it shows the threads fine, but not forums for some weird reason. any help there?

regards.

fate
Newbie Poster
3 posts since Oct 2004
Reputation Points: 10
Solved Threads: 0
 

I really liked the idea of the titles in the url so I played aroung with modrewite and came up with this:

[php]RewriteRule ^/f([0-9]+)-(.*)\.html$ /forumdisplay.php?forumid=$1 [L][/php]

This tells modrewrite to forward any url fXID-XTEXT-.html to the forumdisplay.php?forumid=$XID url, this way you can have any text you want but since the ID is used in the URL, it is possible to use one rewrite rule for every forum.

To go along with this, you need to modify your forumbit templates to use the link [php][/php] No files need to be changed as far as I can recall. So far I am testing this on a template that my users don't access so please confirm this works for you before putting it on a live site. Thanks for the wonderful hack, I had limited spidering in the past and it worked wonders so I can only expect even better results from this deep spidering system.

Hello,

how can I use "titles in urls" for topics? Can you say me that? I have use it in my IPB and it's very sexy. :cheesy:

Thanks ;)

Hexemer
Newbie Poster
1 post since Nov 2004
Reputation Points: 10
Solved Threads: 0
 

i have this running on my site, thanks for the great hack :)

avizion
Newbie Poster
15 posts since Oct 2004
Reputation Points: 11
Solved Threads: 0
 

hi cscgal. i know a little bit of html. can u brief me of wats a vbulletin in the first plac. guess i have a lo to learn yet

anastacia
Junior Poster
142 posts since Nov 2004
Reputation Points: 11
Solved Threads: 1
 

Sorry to be a pain but I would love this hack to work but I have obviously done something wrong :cool:

the forums come up correctly but I get a 404 error on every page. I have redone the hack from start three times now but the same thing always happens

You can see at www.forums.ic-games.co.uk

Any idea whats up? I have tried to read as much of this thread as I can put its getting on 12 pages and I may have missed something.

Any help appreciated

Coasters
Newbie Poster
4 posts since Dec 2004
Reputation Points: 10
Solved Threads: 0
 

I have vbulletin 3.0.3.

I was looking at the instructions that you outlined in the first message of the thread. You stated to edit forumhome_forumbit_level1_nopost and use the following line:



I looked at this file and it already contained this line. I have never edited this template before. Is your hack recommended for version 3.0.3?

softstor
Newbie Poster
5 posts since Dec 2004
Reputation Points: 10
Solved Threads: 0
 

Yes, it works for any version of vBulletin. I think that you musunderstood the instructions. It says to edit forumhome_forumbit_level1_nopost and FIND that line ... which apparently you did, and to replace it with something else.

cscgal
The Queen of DaniWeb
Administrator
19,421 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 229
 
Yes, it works for any version of vBulletin. I think that you musunderstood the instructions. It says to edit forumhome_forumbit_level1_nopost and FIND that line ... which apparently you did, and to replace it with something else.

Thanks for the prompt reply. Some questions...

1) Is it possible to give me an example of what I may replace that line with?

2) It looks like this thread is quite long. Are all of the suggested hacks in the first message of this thread?

softstor
Newbie Poster
5 posts since Dec 2004
Reputation Points: 10
Solved Threads: 0
 

Please ignore question #1. I saw the replace line of:



at the end of the message.

softstor
Newbie Poster
5 posts since Dec 2004
Reputation Points: 10
Solved Threads: 0
 

Sorry to sound dumb here, but which mod works?
In other words do I follow the orignal, or the second one cscgal started? The one TedS did or do I combine the two?

My forum is new, and with no visitors to speak of now is a good time to get in and customise it, but errr I'm not sure which one I should do.

nathanaus
Light Poster
31 posts since Dec 2004
Reputation Points: 10
Solved Threads: 0
 

I notice there is another one started by another user. Do I use that one instead of this one?

nathanaus
Light Poster
31 posts since Dec 2004
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You