• Board index ‹ Special Interest Forum ‹ phpBB3 Mods
  • Change font size
  • FAQ • Search • Register • Login

It is currently Sat Feb 04, 2012 1:42 am

/me /you and /random MOD for phpBB3

Place to discuss phpbb3 modifications. Help, tips, ideas, suggestions...with no guarantees!!!!
Post a reply
4 posts • Page 1 of 1

/me /you and /random MOD for phpBB3

Postby Vladd44 on Fri Aug 15, 2008 2:12 pm

Noticed someone looking for this for phpBB3, so I created a page for others who may want to sow the seeds of misdirection.

Link : me you and random MOD for phpBB3

Example:
Vladd44 is tired of Anonymous talking bad about Havaecoto.
Jewish Kid: Is anyone else having problems concentrating on this? I just can't seem to concentrate.
Cartman: Maybe we should send you to a concentration camp.
User avatar
Vladd44
Site Admin
 
Posts: 4577
Joined: Wed Dec 31, 1969 7:00 pm
Location: New Orleans Crypt 69
  • Website
Top

Re: /me /you and /random MOD for phpBB3

Postby Fliggerty on Mon Nov 10, 2008 4:57 pm

This is a very fun little mod, and it works perfectly.

Unfortunately it has the source of much contention, a lot of tasteless jokes offended people before it was common knowledge how this works.

How difficult would it be to make this only work if the poster is a mod or admin?
Fliggerty
 
Posts: 1
Joined: Mon Nov 10, 2008 4:40 pm
Top

Re: /me /you and /random MOD for phpBB3

Postby ..Ñøßߥ.. on Tue Nov 11, 2008 2:22 pm

Fliggerty wrote:Unfortunately it has the source of much contention, a lot of tasteless jokes offended people before it was common knowledge how this works.


I thought that was the point? :fire
If electricity comes from electrons, does morality come from morons?


Link Building Services | Laser Teeth Whitening Products | Acne Home Treatment
User avatar
..Ñøßߥ..
Site God
 
Posts: 3451
Joined: Mon Dec 15, 2003 5:42 pm
Location: Darkness
Top

Re: /me /you and /random MOD for phpBB3

Postby Vladd44 on Tue Nov 11, 2008 4:59 pm

Have not tested this, but it should work. Replace the bolded section below with the second one


//parse me and you and random name
if ( strstr($message, "/random")) {
$sql = "SELECT username FROM " . USERS_TABLE . " ORDER BY rand() LIMIT 1";
$vresult = $db->sql_query($sql);
$vow = $db->sql_fetchrow($vresult);
$db->sql_freeresult($vresult);
$message = preg_replace("/\/random\b/","" .$vow['username']. "",$message);
}
$message = preg_replace("/\/me\b/","" .$row['username']. "",$message);
$message = preg_replace("/\/you\b/","" .$user->data['username']. "",$message);
// end /me /you /random modifcation



Replace with :



if ($row['user_rank']>0) {
//parse me and you and random name
if ( strstr($message, "/random")) {
$sql = "SELECT username FROM " . USERS_TABLE . " ORDER BY rand() LIMIT 1";
$vresult = $db->sql_query($sql);
$vow = $db->sql_fetchrow($vresult);
$db->sql_freeresult($vresult);
$message = preg_replace("/\/random\b/","" .$vow['username']. "",$message);
}
$message = preg_replace("/\/me\b/","" .$row['username']. "",$message);
$message = preg_replace("/\/you\b/","" .$user->data['username']. "",$message);
// end /me /you /random modification
}
Jewish Kid: Is anyone else having problems concentrating on this? I just can't seem to concentrate.
Cartman: Maybe we should send you to a concentration camp.
User avatar
Vladd44
Site Admin
 
Posts: 4577
Joined: Wed Dec 31, 1969 7:00 pm
Location: New Orleans Crypt 69
  • Website
Top


Post a reply
4 posts • Page 1 of 1


Return to phpBB3 Mods

Who is online

Users browsing this forum: No registered users and 0 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC - 6 hours [ DST ]
  • SitemapIndex SitemapIndex
  • RSS Feed RSS Feed
  • Channel list Channel list
© 2000, 2002, 2005, 2007 phpBB Group •
phpBB SEO
created by stylerbb.net & nero