Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
@reply linking
Duane
New
what files do i edit to change the url that is pointed to when taggin in disuccion and profile links...
example: @carpediem
example: @carpediem
0
Comments
if ($Activity->ActivityUserID == $Activity->RegardingUserID) {
// If the activityuser and regardinguser are the same, use the $Gender Ref as the RegardingName
$RegardingName = $RegardingProfile = $Gender;
$RegardingNameP = $RegardingProfileP = $Gender;
} else if ($Activity->RegardingUserID > 0 && $ProfileUserID != $Activity->RegardingUserID) {
// If there is a regarding user and we're not looking at his/her profile, link the name.
$RegardingNameD = urlencode($Activity->RegardingName);
if (!$IsYou) {
$RegardingName = Anchor($RegardingName, '/profile/' . $Activity->RegardingUserID . '/' . $RegardingNameD);
$RegardingNameP = Anchor($RegardingNameP, '/profile/' . $Activity->RegardingUserID . '/' . $RegardingNameD);
}
$RegardingWall = Anchor('wall', '/profile/activity/' . $Activity->RegardingUserID . '/' . $RegardingNameD . '#Activity_' . $Activity->ActivityID);
<code></ code>
But no, I don't believe that's it; that's from the ActivityHeadline method. It's another ~150 lines past that in the Html method. Search for this text:
public static function Html($Mixed)
and it follows that.Also, what happens when someone changes their nickname? Wouldn't that break all the previous comments your nickname was linked to?
I assume changing your username would break all instances of linking, but then again how often would you do that? It's the same on Twitter. Sure, you can change it, but it's going to screw everyone else up so there's good social pressure against doing it often.
Personally I'm going to make much more use of the comment replies plugin
i am assuming there is
1. another file or peice of code in another file that produces the hyperlinking
or
2. some changes need to be made in the database tables maybe?
here is where i am
// Handle @mentions // This one grabs mentions that start at the beginning of $Mixed $Mixed = preg_replace( '/^(@([\d\w_]{1,20}))/si', Anchor('\\1', '/profile/\\2'), $Mixed ); // This one handles all other mentions $Mixed = preg_replace( '/([\s]+)(@([\d\w_]{3,20}))/si', '\\1'.Anchor('\\2', '/profile/\\3'), $Mixed ); return $Formatter->Format($Mixed); } }
and this makes not one bit of sense LOL
So look at the first line after preg_replace:
'/^(@([\d\w_]{1,20}))/si'
That's a regular expression to match the pattern '@username' (the pattern is between the backslashes; the 's' at the end is actually irrelevant here and the 'i' tells it to be case-insensitive)
In the next line, the \\1 is what's in the first set of parenthesis (in this case, the entire thing), the \\2 is what's in the second set (just their username without the @). The Anchor method creates a link, linking the text in the first argument to the path in the second argument.
So in that first preg_replace it's linking your @username to /profile/username. If you want it to link somewhere else, change '/profile/\\2' to your new target, where \\2 is their username.
You're in for a long day if you're diving into regex: http://us.php.net/manual/en/pcre.pattern.php