•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 456,564 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,560 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 PHP advertiser: Lunarpages PHP Web Hosting
Views: 71633 | Replies: 238
![]() |
ok... I just finish every thing from post #1, but at the top of my pages I am getting this
script type="text/javascript">
(www.4xtraders.com/forum to take a look)
What did I do wrong?
script type="text/javascript">
(www.4xtraders.com/forum to take a look)
What did I do wrong?
Sorry for so many post... but I seem to be having a prob with my links to my sub-forums. I am not sure if I did some thing wrong or missed a step.
On my boards, you can see the sub-forum with it's link. Now the prob is that it is a broken link
http://www.4xtraders.com/forum/.html
Which leads to no where land.... Any ideas on how to correct this or tell me what I did wrong?
Coll
On my boards, you can see the sub-forum with it's link. Now the prob is that it is a broken link
http://www.4xtraders.com/forum/.html
Which leads to no where land.... Any ideas on how to correct this or tell me what I did wrong?
Coll
•
•
Join Date: Aug 2004
Location: Albuquerque, NM
Posts: 18
Reputation:
Rep Power: 5
Solved Threads: 0
•
•
•
•
Originally Posted by Ted S
It looks like you missed the party by keith... $thread['url'] = ereg_replace("[/?!.$%£()~*@]+", "", $thread['url']); (I believe thats on page 5 of the thread)
Ted, that still didn't fix the problem. You need to modifiy this code to work with your method, which resides in showthread.php and forumdisplay.php:
[php]foreach ($parentlist AS $forumID)
{
$forumTitle = $forumcache["$forumID"]['title'];
$navbits["forum$forumID.html"] = $forumTitle; // edited by dani
}[/php]
here is a link to my forums so you can see what is wrong. look at the navigation part ("The PC Forum - PC Troubleshooting, Help, and Discussion > Hardware > Motherboards"):
http://www.thepcforum.com/forum/t4-d...sions-a&b.html
•
•
Join Date: Aug 2004
Location: Albuquerque, NM
Posts: 18
Reputation:
Rep Power: 5
Solved Threads: 0
For people having my problem, I have fixed it. People using Ted's method, go into showthread.php and forumdisplay.php and search for "dani". edit your code to look like this below:
[php]foreach ($parentlist AS $forumID)
{
$forumTitle = $forumcache["$forumID"]['title'];
$forumURL = strtolower(str_replace(" ", "-",str_replace("/", "-", $forumTitle)));
$navbits["f$forumID-$forumURL.html"] = $forumTitle; // edited by dani
}[/php]
navigation links should now work nicely
[php]foreach ($parentlist AS $forumID)
{
$forumTitle = $forumcache["$forumID"]['title'];
$forumURL = strtolower(str_replace(" ", "-",str_replace("/", "-", $forumTitle)));
$navbits["f$forumID-$forumURL.html"] = $forumTitle; // edited by dani
}[/php]
navigation links should now work nicely
•
•
Join Date: Sep 2004
Posts: 10
Reputation:
Rep Power: 5
Solved Threads: 0
Great forum guys, seo guy just told me about and the rewrite hack so i started following the steps.
It's my first time using this forum so I'm gonna come out as a dummy here
.
Anyway here's my question.
At the bottom of Step 2 of the original #1 post it says:
What exactly do you mean here? replace what with the following?
I searched all 7 pages to find out if anyone asked the same question but i wan't able to find it... I'm guessing that there is something wrong with me here.
It's my first time using this forum so I'm gonna come out as a dummy here
.Anyway here's my question.
At the bottom of Step 2 of the original #1 post it says:
All need to be replaced with the following: PHP Code: <a href="$forum[url].html">
What exactly do you mean here? replace what with the following?
I searched all 7 pages to find out if anyone asked the same question but i wan't able to find it... I'm guessing that there is something wrong with me here.
•
•
Join Date: Sep 2004
Posts: 10
Reputation:
Rep Power: 5
Solved Threads: 0
•
•
•
•
Originally Posted by Cyber-SEO
Great forum guys, seo guy just told me about and the rewrite hack so i started following the steps.
It's my first time using this forum so I'm gonna come out as a dummy here.
Anyway here's my question.
At the bottom of Step 2 of the original #1 post it says:
All need to be replaced with the following: PHP Code: <a href="$forum[url].html">
I searched all 7 pages to find out if anyone asked the same question but i wan't able to find it... I'm guessing that there is something wrong with me here.
LOL, N/M I'm an idiot....
What exactly do you mean here? replace what with the following?
•
•
•
•
Originally Posted by Cyber-SEO
LOL, N/M I'm an idiot....
What exactly do you mean here? replace what with the following?
Don't even worry about it.... did you see that idiot that kept posting and post asking questions while not following ALL of the steps first....WAIT that was me!!
It took me a couple read thrus to understand it. What you need to do is open each one from FORUMHOME templates. ie.. forumhome_forumbit_level1_nopost, forumhome_forumbit_level1_post, forumhome_forumbit_level2_nopost, forumhome_forumbit_level2_post, forumhome_subforumbit_nopost, forumhome_subforumbit_post
Each one of them has the same code, search for
[PHP]<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"> [/PHP]
and then replace it with
[PHP]<a href="$forum[url].html">[/PHP]
I am thinking that is was just an easier way for her to post it is all
Hope that helps
Coll
•
•
Join Date: Sep 2004
Posts: 10
Reputation:
Rep Power: 5
Solved Threads: 0
Has anyone noticed that the nav bar links kind of give us duplicate content pages?
Here is an example:
http://www.agentserver.net/forum/agentserver.html
We have this url repeated with:
http://www.agentserver.net/forum/forum1.html
This happens when you view a thread or a sub forum, the navbar will display the forum url names as forum[number].
As an example you can view:
http://www.agentserver.net/forum/how...questions.html
And you will notice that the AgentServer title is pointing to the page http://www.agentserver.net/forum/forum1.html
Here is an example:
http://www.agentserver.net/forum/agentserver.html
We have this url repeated with:
http://www.agentserver.net/forum/forum1.html
This happens when you view a thread or a sub forum, the navbar will display the forum url names as forum[number].
As an example you can view:
http://www.agentserver.net/forum/how...questions.html
And you will notice that the AgentServer title is pointing to the page http://www.agentserver.net/forum/forum1.html
•
•
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 11,020
Reputation:
Rep Power: 33
Solved Threads: 117
Hey there Cyber-SEO. Glad you got it worked out. The navbar problem has already been explained in my original post. The problem is that the way that vBulletin calculates subforums, a forum ID # is required to be within the loop, in order for vBulletin to figure out the parent forums of a subforum and correctly make the navbit. For that reason, your options are to have forum1.html or to have f1-forumname.html like Ted S has done it. It's logically impossible to have forumname.html only
Dani the Computer Science Gal
Do you run a computer-related website? Feature it in our niche link directory!
Do you run a computer-related website? Feature it in our niche link directory!
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- [Revised] vBulletin Mod_rewrite Tutorial (PHP)
- vBulletin mod_rewrite for vB 3.0.7 (Existing Scripts)
- vBulletin mod_rewrite for vB 3.0.7 (Growing an Online Community)
- vBulletin mod_rewrite in phpBB mod format (Existing Scripts)
Other Threads in the PHP Forum
- Previous Thread: Help Needed
- Next Thread: mysql_num_rows warning



Linear Mode