Page 1 of 4

[MODDB] me and you and we and us Filter 1.0.4b

Posted: Tue May 22, 2007 1:06 pm
by Mickroz
Modification Name: me and you and we and us Filter
Author: Mickroz

Modification Description: Replaces [me] with poster, [you] with reader, [we] with both, and [us] with forum name.
Modification Version: 1.0.4b

Demo URL: http://www.mickroz.nl

Modification Download: http://www.phpbb.com/customise/db/mod/m ... us_filter/
Thanks to: Handyman and Highway of Life on howto using the user_color.
Thanks to DavidIQ for letting me borrow his code from the reimg hook.

Re: [BETA] me and you and we and us Filter 1.0.1

Posted: Tue May 22, 2007 3:46 pm
by chocopi
This sounds pretty grovy, but does anyone have a demo :?:

As that would be awesome :D

Re: [BETA] me and you and we and us Filter 1.0.1

Posted: Tue May 22, 2007 4:11 pm
by Mickroz
updated first post

Re: [BETA] me and you and we and us Filter 1.0.1

Posted: Wed May 23, 2007 10:50 am
by chocopi
Awesome,

Would it be possible for you to make this a per forum basis by a linky in acp etc.

Re: [BETA] me and you and we and us Filter 1.0.1

Posted: Wed May 23, 2007 12:08 pm
by Mickroz
what do you mean with that? that you van use it in some forums,and some forums not?

Re: [BETA] me and you and we and us Filter 1.0.1

Posted: Tue Jul 10, 2007 9:18 am
by chocopi
Yea, so you can pick and choose which forum it would work in, but i guess that will turn a very simple installation into a slightly harder one

~ Chocopi :mrgreen:

Re: [BETA] me and you and we and us Filter 1.0.1

Posted: Thu Jul 12, 2007 2:03 pm
by Omarvelous
Hmmm not quite understanding exactly where these words are replaced.....

Can you point em out?

are the [me] [you] bbcodes that populate when ppl are viewing or something?

Re: [BETA] me and you and we and us Filter 1.0.1

Posted: Thu Jul 12, 2007 3:21 pm
by padalton
Can i easily do it into a if(),
that this code only be run in one topic ???
like this:

Code: Select all

if($f=="2" && $t=="54"){
   $your_username = get_username_string('full', $user->data['user_id'], $user->data['username'], $user->data['user_colour'], $user->lang['GUEST']);
   $my_username = get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']);

   $find = array('[we]', '[me]', '[you]', '[us]');
   $replace = array(
       "$your_username and $my_username",
    $my_username,
    $your_username,
       '<span style="color: red;">' . $config['sitename'] . '</span>',
   );

   $message = str_replace($find, $replace, $message);    
};
in the files of phpbb i only see something like this:

Code: Select all

<!-- IF BLABLA -->
code code code
<!-- ENDIF -->
Edit:
I have now testet ma modification of the mod and it doesn't works !
Are the variables f and t false? these are standing in the link of the topic ?!

Re: [BETA] me and you and we and us Filter 1.0.1

Posted: Thu Jul 12, 2007 5:32 pm
by Mickroz
chocopi wrote:Yea, so you can pick and choose which forum it would work in, but i guess that will turn a very simple installation into a slightly harder one

~ Chocopi :mrgreen:
yeah probably,will give it a test when i got the time.
Omarvelous wrote:Hmmm not quite understanding exactly where these words are replaced.....

Can you point em out?

are the [me] [you] bbcodes that populate when ppl are viewing or something?
Replaces [me] with postername, [you] with readername, [we] with both names, and [us] with forum name.
this will only been seen after posting,and yes,this will be seen when viewing a topic.
padalton wrote:Can i easily do it into a if(),
that this code only be run in one topic ???
like this:

Code: Select all

if($f=="2" && $t=="54"){
$your_username = get_username_string('full', $user->data['user_id'], $user->data['username'], $user->data['user_colour'], $user->lang['GUEST']);
$my_username = get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']);

$find = array('[we]', '[me]', '[you]', '[us]');
$replace = array(
"$your_username and $my_username",
$my_username,
$your_username,
'<span style="color: red;">' . $config['sitename'] . '</span>',
);

$message = str_replace($find, $replace, $message); 
};
in the files of phpbb i only see something like this:

Code: Select all

<!-- IF BLABLA -->
code code code
<!-- ENDIF -->
Edit:
I have now testet ma modification of the mod and it doesn't works !
Are the variables f and t false? these are standing in the link of the topic ?!
try

Code: Select all

if ($forum_id == 2  && $topic_id == 54)
{
   $your_username = get_username_string('full', $user->data['user_id'], $user->data['username'], $user->data['user_colour'], $user->lang['GUEST']);
   $my_username = get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']);

   $find = array('[we]', '[me]', '[you]', '[us]');
   $replace = array(
       "$your_username and $my_username",
    $my_username,
    $your_username,
       '<span style="color: red;">' . $config['sitename'] . '</span>',
   );

   $message = str_replace($find, $replace, $message);
} 

Re: [BETA] me and you and we and us Filter 1.0.1

Posted: Fri Jul 13, 2007 6:12 am
by padalton
THX!
I like this mod!
Simple, but how can i make it that this is
working on preview too ?

Re: [BETA] me and you and we and us Filter 1.0.1

Posted: Fri Jul 13, 2007 6:38 am
by Mickroz
thanks,why do you want to view this in preview?

Re: [BETA] me and you and we and us Filter 1.0.1

Posted: Fri Jul 13, 2007 7:12 am
by padalton
Some of my Forum-members are a bit stupid,
they dont understand that this is not a bbcode!

But i can also write a Tut or something like this!

THX for this mod!

Re: [BETA] me and you and we and us Filter 1.0.1

Posted: Sun Dec 30, 2007 10:23 pm
by notsa
could u please make it for viewforum too.

Re: [BETA] me and you and we and us Filter 1.0.1

Posted: Mon Dec 31, 2007 11:20 am
by Mickroz
as soon as i got my pc back up and running im going to update all my mods.ill see if i can get it to show in preview and in viewforum.

Re: [RC1] me and you and we and us Filter 1.0.2

Posted: Thu Jan 10, 2008 9:43 am
by Mickroz
2008-01-10- Version 1.0.2
  • 3.0.0 Compatible
  • Added for PM