/me /you
2 posters
Page 1 of 1
/me /you
Is there a way to add /me and /you to the forums.
This hack replaces /me by the username of the poster and replaces /you by the username of the reader.
Code is below. I am on phpbb2 not sure where to put it.. although the txt file says
This hack replaces /me by the username of the poster and replaces /you by the username of the reader.
Code is below. I am on phpbb2 not sure where to put it.. although the txt file says
Put this in the "bbcode-section" of your viewtopic.php
(maybe not the best place to set it, but it works!)
/note/ it will only be seen in the submitted message, not in the preview /note/
- Code:
{
$message = str_replace("/me ","<font color="orange"> " .$poster. "</font> ",$message);
}
{
$message = str_replace("/you ","<font color="violet"> " .$userdata['username']. "</font> ",$message);
}
Then, to prevent the wrong names show up in eventually quotes, put this in your posting.php
FIND
Code:
if ( !empty($orig_word) )
{
$subject = ( !empty($subject) ) ? preg_replace($orig_word, $replace_word, $subject) : '';
$message = ( !empty($message) ) ? preg_replace($orig_word, $replace_word, $message) : '';
}
and place above this the following code:
Code:
{
$message = str_replace("/me "," $quote_username ",$message);
}
blindbat1457- Forumember
- Posts : 667
Reputation : 6
Language : English
Location : Santa Clarita, CA
Re: /me /you
Is there a way I can do this via template editing and if so wanna help me out on where I put it and such? Please?
blindbat1457- Forumember
- Posts : 667
Reputation : 6
Language : English
Location : Santa Clarita, CA
Re: /me /you
it's php so i dont think you can add that.
you can go to the view topic body in your templates and fine the area where the user name is .remove that and add the code but i am not sure if it will work correctly or not.
if it dont just go back and delete the template and it will automatically go back to the default.
you can go to the view topic body in your templates and fine the area where the user name is .remove that and add the code but i am not sure if it will work correctly or not.
if it dont just go back and delete the template and it will automatically go back to the default.
kirk- Forumaster
- Posts : 11037
Reputation : 653
Language : English,Vulcan,Klingon, Romulan,& Gorn
Re: /me /you
So this is something to throw in the suggestions category I guess.
blindbat1457- Forumember
- Posts : 667
Reputation : 6
Language : English
Location : Santa Clarita, CA
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum