Link to the mod (https://custom.simplemachines.org/index.php?mod=1224)
(https://smftricks.com/logos/logo.png) (https://smftricks.com/)
(https://img.shields.io/badge/License-MPL%202.0-248049) (https://img.shields.io/badge/Hooks%20Only-Yes-6041a3) (https://img.shields.io/badge/SMF-2.1-3f73a0)
BBC YouDeveloped by Diego Andrés (https://smftricks.com/index.php?action=profile;u=1)
Original Developer: ccbtimewiz (https://www.simplemachines.org/community/index.php?action=profile;u=111571)
IntroductionBBC [you] tag adds a BBC tag that allows users to echo out the name of the user who is reading the topic.
GitHub (https://github.com/SMFTricks/BBC-You)
this is exactly what I wont cool :P - but I can not install it. it gives me error can you put the manuel install codes to here tnx very much.
Just goto the mod page, and select your smf version from the dropdown under the downloads part. :)
Nice job, btw - tested it on my localhost. I'll install it live soon, as my sites are down for some odd reason atm.
Quote from: deve34 on June 01, 2008, 04:27:42 PM
this is exactly what I wont cool :P - but I can not install it. it gives me error can you put the manuel install codes to here tnx very much.
Really? It's quite a small hack actually. However it has come to my attention that if you removed SMF's Easter Egg BBcode tags, this modification won't install correctly. So I plan on porting it to install before the Easter Egg code. But until then, I can manually install it for you if you attach your subs.php.
can you post screenshots so we can see what this actually does?
Quote from: Kimmie on June 02, 2008, 04:19:43 PM
can you post screenshots so we can see what this actually does?
I am in same idea with Kimmie.. We are waiting the answer?
You basically post
[you]
and then because YOU are reading it show in the post as
▄▀▄ Nicholas™ (http://www.simplemachines.org/community/index.php?action=profile;u=125818)
if its a guest viewing it will replace [you] with Guest
The guess attracted attention more.Im correcting.I thank to warn :)
Quote from: karlbenson on June 02, 2008, 04:48:09 PM
You basically post
[you]
and then because YOU are reading it show in the post as
▄▀▄ Nicholas™ (http://www.simplemachines.org/community/index.php?action=profile;u=125818)
if its a guest viewing it will replace [you] with Guest
That is correct. ^^'
Quote from: Kimmie on June 02, 2008, 04:19:43 PM
can you post screenshots so we can see what this actually does?
mm, I'll upload some images of what the tag does if you really want me to. :)
good work
nice Mod
This is great! I had something like this when I had a phpbb forum and had been looking for it for a while. I'm trying to change the code so that just the name is returned instead of the name with a link to the profile.
Ah... ok. =]
Updated this mod with more precise instructions.
Thank you, this is a good Mod, and my forum has enjoyed its use.
darrell
Thanks for using this modification. :)
Scuse me but you have a demo? a photo?
I want know if i know who have read a specific post in the time
thanks
Scuse me for my english i'm italian
Quote from: karlbenson on June 02, 2008, 04:48:09 PM
You basically post
[you]
and then because YOU are reading it show in the post as
▄▀▄ Nicholas™ (http://www.simplemachines.org/community/index.php?action=profile;u=125818)
if its a guest viewing it will replace [you] with Guest
Ive been reading through old threads, trying to code this into my site for the past 2 days! lol
I didnt even find it on a mod search.
You just saved me from another day of frustration lol
Great mod!
Thank you :)
You're welcome.
I plan on updating this mod for 2.0 once it goes gold. :)
installed on our forum with no problem! thanks!
btw, is it possible to make the name unclickable? i mean, just plain text and not a link to the user profile?
Quote from: pinoypetfinder on October 02, 2008, 08:36:09 AM
installed on our forum with no problem! thanks!
btw, is it possible to make the name unclickable? i mean, just plain text and not a link to the user profile?
Yes there is. Open ./Sources/Subs.php
Find:
'content' => $context['user']['is_guest'] ? $txt[28] : '<a href="'.$scripturl.'?action=profile;u='.$context['user']['id'].'">'.$context['user']['name'].'</a>',
Replace with:
'content' => $context['user']['is_guest'] ? $txt[28] : $context['user']['name'],
awesome! thank you! :D
edit : removed my other message about the +F text prob. everything's working well now. thanks very much :)
hi again, some of my members are asking me if it's possible to just change the font color of the username that will appear when the [ you ] code is used.
will putting a code like this work?
'content' => $context['user']['is_guest'] ? $txt[28] : '<font color="color here">'.$context['user']['name'].'</font>',
Better to do this:
'content' => $context['user']['is_guest'] ? $txt[28] : '<span style="color: red;">'.$context['user']['name'].'</span>',
No need to update, I just installed this on 2.0b4 and it works perfectly!!! I use it in my news where I say welcome [you] to ....... People LOVE IT!!!!!
Thanks!!!!!
Greg
Quote from: ccbtimewiz on October 03, 2008, 03:07:03 PM
Better to do this:
'content' => $context['user']['is_guest'] ? $txt[28] : '<span style="color: red;">'.$context['user']['name'].'</span>',
thank you!
our members love it too! hehe
Been having a blast with this on my site.. LOL I post things like: Hey [you], I just want you to know, you are the most important person on this site..
LOL
then that post gets tons of replies saying thanks! hehe Eventually, someone says, wait, he said me, not you.. and on and on...it's hillarious!!!! I told them eventually, that I made a change that lets me personalize messages like a mass mailer would do... They all thought it was funny as hell!!!!!
I did find one problem though... In my error log. Getting errors on the guests... Here is what comes from the log:
8: Undefined offset: 28
File: /home/spectro/public_html/forum/trr/Sources/Subs.php
Line: 1675
That line is:
'content' => $context['user']['is_guest'] ? $txt[28] : '<a href="'.$scripturl.'?action=profile;u='.$context['user']['id'].'">'.$context['user']['name'].'</a>',
Any ideas? I have 17 pages of these errors... Most likely because my news welcomes [you] to the site...
Replace that line with this:
'content' => $context['user']['is_guest'] ? 'Guest' : '<a href="'.$scripturl.'?action=profile;u='.$context['user']['id'].'">'.$context['user']['name'].'</a>',
mm no. The mod works fine on 2.0, with the exception of guests. They don't see anything.
So if I post
[you] are not as cool as I am
any registered user will see their name, the guest sees only "are not as cool as I am" and if you make said code replacement ^^ EVERYONE sees "Guest is not as cool as I am"
With the mod for guests... my users (members) still see their name...so not sure what is up on your site... That's odd
-Greg
hmm.. how'd you do that? lol
Mine see "Guest" when not logged in
Share the secret! lol
Quote from: Sabre™ on October 09, 2008, 08:02:59 PM
hmm.. how'd you do that? lol
Mine see "Guest" when not logged in
Share the secret! lol
I think we are misunderstanding each other...
As I am reading his post, once he made the above change in the code, to eliminate the error in the log for guests, his normal members no longer see their name. They see GUEST.
I am saying, if that is the case, I don't know why, cause on my 2b4, guests see guest, and members see their own names, just as they should, and no errors in the log.
It wasn't magic.. I just made that change...
- Greg
Oh yep, I misunderstood your post, I thought when your members werent logged, it could still reveal their name.
Perhaps this then:
'content' => !$context['user']['is_logged'] ? 'Guest' : '<a href="'.$scripturl.'?action=profile;u='.$context['user']['id'].'">'.$context['user']['name'].'</a>',
Quote from: ccbtimewiz on October 09, 2008, 08:45:42 PM
Perhaps this then:
'content' => !$context['user']['is_logged'] ? 'Guest' : '<a href="'.$scripturl.'?action=profile;u='.$context['user']['id'].'">'.$context['user']['name'].'</a>',
Absolutely flawless.
With this minor change, the mod functions on smf 2.0b4 with zero errors. Nice one. Thanks.
Mod updated. Fixed 2.0 bug with $txt[28] string.
Made modification install on both versions with these changes.
Quote from: ccbtimewiz on November 20, 2008, 05:55:46 PM
Mod updated. Fixed 2.0 bug with $txt[28] string.
Made modification install on both versions with these changes.
The correct string is "guest_title" :)
Was gonna tell you last night but I had to run... I hope you didnt hard code text..
Actually the correct string is $txt['guest'], and thats what I used. :)
Actually both those strings exist in index.english.php. o.o;
Nao told me to use guest_title :)
I tested this Mod today on my SMF v1.1.7 Chinese version (utf-8 language files).
Apparently this Mod can't work properly if the user has a Chinese name.
See attached screenshot. The name should be 白建鹏, but showing up as 白建? . In addition, I had enter some text after that name code, but they all lost after this question mark.
However, if the user has an English name, such as Tom or Mike, this Mod will work correctly.
Hope the author will fix this soon.
Thanks.
Fantastically simple mod. Thank you! :)
perfect for april fool's day :P hehe
Thanks This Is Cool, Is there anyway to disable The [] part of the tag or the whole tag when someone quotes, I am trying to keep it secret, Thanks, Dave
hi i installed it the first time and it worked but not it doesn't work , maybe because i editted the subs.php. when i try to uninstall it it gives me a package parsers error!Can you tell me what i have to add to subs.php? I use 2.0 rc1-1
What do I have to do if I want it to show the color by user membergroup?
Hello friend!! Thank 4 your great mod..
How to make a BBC button for [you] in the Toolbar ?
This is very useful, and should be a core feature! (so simple)!
Is there any easy way to get it to work in the subject too? So I can create a post that says:
[you], click here to read this important note.
Or is this not possible if BBC codes won't work in a subject?
There was a little bug in the package_info.xml code that would not allow this package to be uninstalled.
I attached a fixed version of it.
Kcmartz, I haven't tried installing it, but it parses for 2.0 RC3. Did you try installing it on your forum to see if it works?
Just a note about parsing.
Parsing successfully doesn't mean it'll work - simply that the version check doesn't stop it...
@Arantor: Yeah, I know. I just wanted to know if he'd actually tried it since I can't ATM.
Hello there..
Is it compatible to SMF 2.0 RC4? :)
How do I edit the code to work also on the topic subject and shoutbox when I type the [you] tag?
Thanks..
any rc5 update
installs and works fine on RC5 (doesnt even need version emulate)
/Sources/Subs.php SMF 2.0 RC5
Find:
'after' => ' :-*</span>',
);
}
Replace with:
'after' => ' :-*</span>',
);
}
// BBC [you] tag. ;)
$codes[] = array(
'tag' => 'you',
'type' => 'closed',
'content' => (!$context['user']['is_guest'] ? $context['user']['name'] : (!empty($txt[28]) ? $txt[28] : $txt['guest'])),
);
Isn't this working?
Thank you for the wonderful mod! I thought I'd let everybody know that when I updated my forum from 2.0 RC5 to 2.0 Gold, I had to reinstall all my mods. This mod installed without issues and without emulation. Hope this info helps someone!
Mod Updated and taken over by me D: ;D
ive always loved this mod, but if not used right it can cause chaos and offend some thin skinned people.
any chance you could help me edit the code so it shows a @ or some other symbol before the username ;)
// BBC [you] tag. ;)
$codes[] = array(
'tag' => 'you',
'type' => 'closed',
'content' => (!$context['user']['is_guest'] ? $context['user']['name'] : (!empty($txt[28]) ? $txt[28] : $txt['guest'])),
);
Quote from: thechronic2001 on August 18, 2012, 08:02:46 PM
any chance you could help me edit the code so it shows a @ or some other symbol before the username ;)
// BBC [you] tag. ;)
$codes[] = array(
'tag' => 'you',
'type' => 'closed',
'content' => (!$context['user']['is_guest'] ? '@' . $context['user']['name'] : (!empty($txt[28]) ? $txt[28] : $txt['guest'])),
);
thanks buddy, it worked a treat ;)
I've got a problem now. I installed it in SMF 1.16 and it worked also in signatures, now in SMF 2.0.2 not working in signatures any longer :(
BTW: I'd love a group permission for using it, I'd prefer to let only staff use it to avoid embarrassment/annoyed users.
Well - I found the solution myself and moved the 'you' array before the integration hook call.
The permission for membergroups is solved now with the help of custom-permissions and a small tweak in the replacement line.
Might I suggest the content of the tag be set to:
'content' => empty($context['user']['is_guest']) && !empty($context['user']['name']) ? $context['user']['name'] : (!empty($txt[28]) ? $txt[28] : (!empty($txt['guest']) ? $txt['guest'] : 'Guest')),
Reason I say this is because this was being invoked on pages where $context['user'] wasn't being defined (action=dlattach) and in those cases the $txt strings might not be loaded either, hence a fallback for that too that doesn't rely on language files. (I think this would be allowed under the 'no hardcoded text' rule ;D)
Thanks, I'll take the suggestion and update the mod.
Thanks valued Diego Andrés for this nice mod and dear Mr. Arantor for the additional code. Works fine (http://sangham.net/index.php/topic,1837.msg8042.html#msg8042)!
metta & mudita
Samana Johann
Mod updated, now is using hooks
It's hiding ;)
(http://i.imgur.com/KkR9xhN.png)
Our lovely modsite ;D
Fixed :P
Nice one. If only it would apply the code to topic titles... *whistles*
Yes, before iinstal this - does it work in topic titles yet?
how to get this to show up in the bbcode list for 2.0.15?
I tried in subs-editor.php
array(
'image' => 'you',
'code' => 'you',
'before' => '[you]',
'description' => $txt['you']
),
but obviously that didn't work :laugh:
You need to add $txt['you'] somewhere.
Post.english.php or index.english.php
And also add a bbc image to images/bbc/you.gif
Modifaction.language.php ;)
thank you both....don't know what's wrong now lol
so in subs-editor.php I added
array(
'image' => 'you',
'code' => 'you',
'before' => '[you]',
'description' => $txt['bbc_you']
),
i changed the txt just in case
then in modifications.english.php and also in post.english.php i added
$txt['bbc_you'] = 'Insert name of person reading';
I tried either or and both but still same issue, it's showing up like this
[edit] nevermind :laugh: I forgot to upload the image ::)
thank you it's working now
[edit again] i'll attach the image if anyone wants to use it
I tried to install this on to a new site and it did not work...
I grabbed a package from another one of my site and that one worked...
not sure if something was changed by mistake in the updated one here on the site, but it seems to be broken...for 2.0.17
Any updates to this mod cause the 2.0 one on the download page doesn't work for 2.0.18?
Also seen reported at https://www.simplemachines.org/community/index.php?topic=577400.msg4086476#msg4086476
The 2.1RC3 download works fine! 8)
Didn't really see that topic before, I'll look into it
There's indeed a typo in the 2.0.x mod.
- Fixed typo
- Added bbc icon, thanks to shadav for the code and suggestion
This is only for SMF 2.0.x version of the mod, version for SMF 2.1 will be updated later this year.
If I, as admin, use this bbcode, am I supposed to see my name in the post? Because I don't.
Version 2.0.18
Quote from: Steve on April 15, 2021, 08:25:09 AM
If I, as admin, use this bbcode, am I supposed to see my name in the post? Because I don't.
Version 2.0.18
erm you broke something :P
yes it does not recognize ranks, only if the user is logged in (display name) or if not logged in (display guest)
This was on my test forum which has no mods and I am logged in. So that really doesn't answer my question ... :(
^ anything logged in the usual place?
are you installing the latest one for 2.0.x?
I think there's a mistake in the package-info.xml
comparing the 2 files Diego added a source folder ;)
<require-file name="BBC-You.php" destination="$sourcedir">Source file</require-file>
should be
<require-dir name="Sources" destination="$boarddir">Source file</require-dir>
make sure that the BBC-You.php is in your source folder, if not copy it from the package and place it in there....
Thanks
Quote from: shadav on April 15, 2021, 03:51:44 PM
are you installing the latest one for 2.0.x?
I think there's a mistake in the package-info.xml
comparing the 2 files Diego added a source folder ;)
<require-file name="BBC-You.php" destination="$sourcedir">Source file</require-file>
should be
<require-dir name="Sources" destination="$boarddir">Source file</require-dir>
make sure that the BBC-You.php is in your source folder, if not copy it from the package and place it in there....
v2.2
- Added a setting to enable button in the editor for easy use (SMF 2.1 only)