Post Reply  Post Thread 
SpiceFuse Shoutbox Tweek (SEO Links)
mechme
Junior Member
**

Posts: 3
Group: Registered
Joined: Jan 2009
Status: Offline
Reputation: 0
Post: #1
SpiceFuse Shoutbox Tweek (SEO Links)

I installed the SpiceFuse SEO mod along with the SpiceFuse Shoutbox, and since the shoutbox uses the old style links, i desided to update it so it also used the SEO links.

Here is what i did

Open %forumroot%/inc/plugins/spicefuse_shoutbox.php (be sure to make a BACKUP before doing this)

Find this code:
#1

Code:
$message  = $parser->parse_message($row['shout_msg'], $parser_options);


add below this code:

Code:
$username = $row['username'];


Find this code:
#2

Code:
$username = '<a href="member.php?action=profile&uid='.intval($row['uid']).'"'.$extra.'>'.$row['username'].'</a>';


Replace with:

Code:
$username = '<a href="'.$username.'-u-'.intval($row['uid']).'.html">'.$row['username'].'</a>';



Then do it again (there is 2 places for each)

This removes the $extra var which I'm not sure what exactly it does, but my forum wasn't using it. Also it leaves uppercase letters in usernames. I don't see any issues with this, but if there are, you could replace #1's code like this:

Code:
$username = strtolower ($row['username']);


Also this edits the links in the "View Full Shoutbox" link.

Live preview of this working : http://mech.me/forum/index.php

I am not a php expert or mybb forum expert, but I am learning Smile

Enjoy the tweek.

PS. I uploaded my php file just incase you couldn't get it working. Always backup your orignal though.
http://uppit.com/BGHR0P


Mech.me The Mechscape Search Engine!
01-09-2009 04:11 AM

This post was last modified: 01-09-2009 04:13 AM by mechme.

Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: