FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Plugins and Code Hacks » SEO url mods question
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
SEO url mods question [message #168637] Wed, 12 June 2013 10:48 Go to previous message
elmer_fudd is currently offline  elmer_fudd   United States
Messages: 2
Registered: May 2013
Karma:
Junior Member
hi,

I am new to fudforum but not new to php. i installed fudforum a few days ago and after it was running it came to my slow brain that i needed more search engine friendly urls. it already has traffic coming to it and i need to hurry and make this change. it is indexed by google and it is a pain to have a bunch of urls indexed and then change them.

anyway, i find myself trying to comb through a ton of code to find what i need. i have basically switched to the path_info template and have everything running like it should. i found this post (i cant use links yet) fudforum.org/forum/index.php?t=msg&goto=162567&&srch=seo+links# msg_162567 and used it as a guide... or am trying to. i changed the code more like this

$_seo_forum_name = $r[10];
$_seo_forum_name = strtolower($_seo_forum_name);
$_seo_forum_name = strip_tags($_seo_forum_name);
$_seo_forum_name = html_entity_decode($_seo_forum_name);
$_seo_forum_name = urldecode($_seo_forum_name);
$_seo_forum_name = trim($_seo_forum_name);
$_seo_forum_name = preg_replace('/ +/', ' ', $_seo_forum_name);
$_seo_forum_name = preg_replace('/[^A-Za-z0-9\s]/', '', $_seo_forum_name);
$_seo_forum_name = preg_replace('/ /', '-', $_seo_forum_name);

in www/forum/theme/path_info/index.php.

then in index.php i found where /f/ is used like here

'<a href="'.(empty($r[12]) ? './f/'.$r[7].'/'._rsid

and changed it to something like this

'<a href="'.(empty($r[12]) ? './f/'.$r[7].'/'._rsid.$_vcb_forum_name


So far so ok. I switched to thread.php and tried the same thing and it don't work. i can't seem to find the code that generates the thread. For example on this forum (the one we are on now) at the top of the page you are reading it has this

"Home » FUDforum Development » Plugins and Code Hacks"

"Plugins and Code Hacks" is a link. on my forum that link might look something like this "/forum/f/11/" on the index page my forum would show that link like this "/forum/f/11/plugins-and-code-hacks" it clicks and works fine. problem is on the post page i cant find where the code is to make that same link. well i sure thought i found it but not. i hard coded a string onto the end of the url i thought was it but that did not even show up.

maybe i am totally missing something, maybe i been at it too long or maybe i am just a moron. any idea where the code is i need? i plan to "seo" the thread url as well but until i can knock out the other problem there is not much sense.

i know i am rambling, its late, i cant stay awake. i hardly ever ask anyone for help but i am in a bind and don't have time to run all this down. i feel like i am in the twilight zone with this link. i am changing what sure seems the right one but nothing is happening haha. these are the actual code changes in thread.php i am making

<a href="'.(empty($r[12]) ? './f/'.$r[7].'/'._rsid.$_seo_forum_name : $r[12] ) .'">'.$r[10].'</a>';

<td class="RowStyleA wa"><a href="'.(empty($r[12]) ? './f/'.$r[7].'/'._rsid.$_seo_forum_name : $r[12] ) .'" class="big">'.$r[10].'</a>'.($r[11] ? '<br />'.$r[11] : '').$moderators.'</td>

$data .= '&nbsp;&raquo; <a href="./f/'.$fid.'/'._rsid.$_seo_forum_name.'">'.$fn.'</a>';


i am thankful for any and all help
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Email Obfuscation Plugin
Next Topic: User reminder mod
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Apr 28 19:34:02 GMT 2024

Total time taken to generate the page: 0.04572 seconds