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 :: Unread Messages :: Polls :: Message Navigator
| Subscribe to topic | Remove from bookmarks 
Switch to threaded view of this topic Create a new topic Submit Reply
SEO url mods question [message #168637] Wed, 12 June 2013 06:48 Go to next message
elmer_fudd is currently offline  elmer_fudd   United States
Messages: 2
Registered: May 2013
Karma: 1
Junior Member
add to buddy list
ignore all messages by this user
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
Re: SEO url mods question [message #168639 is a reply to message #168637] Thu, 13 June 2013 07:20 Go to previous messageGo to next message
elmer_fudd is currently offline  elmer_fudd   United States
Messages: 2
Registered: May 2013
Karma: 1
Junior Member
add to buddy list
ignore all messages by this user
i figured it out myself. later after i finish this job i will post the files some where in case someone else needs them.
Re: SEO url mods question [message #168642 is a reply to message #168639] Fri, 14 June 2013 12:53 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
It would be great it you can clean it up a bit so we can add it to the next release.
Message by cpreston is ignored  [reveal message]  [reveal all messages by cpreston]  [stop ignoring this user] Go to previous messageGo to next message
Message by cpreston is ignored  [reveal message]  [reveal all messages by cpreston]  [stop ignoring this user] Go to previous messageGo to next message
Re: SEO url mods question [message #168820 is a reply to message #168812] Sat, 27 July 2013 04:34 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
Now implemented in core and in the PATH_INFO template set.
For details, see http://sourceforge.net/p/fudforum/code/5627/
Thanks to everyone that worked on this mod.
Message by cpreston is ignored  [reveal message]  [reveal all messages by cpreston]  [stop ignoring this user] Go to previous messageGo to next message
Re: SEO url mods question [message #168967 is a reply to message #168826] Mon, 12 August 2013 02:22 Go to previous message
naudefj is currently offline  naudefj   
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
The SEO code was split out into a new PATH_INFO_SEO template set (FUDforum 3.0.5 RC2 and higher).
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: Email Obfuscation Plugin
Next Topic: User reminder mod
Goto Forum:
  

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

Current Time: Wed Nov 06 19:39:24 EST 2024

Total time taken to generate the page: 0.04803 seconds