PDA

View Full Version : BB Code Enhancements - [BB Code] You


bananalive
03-15-2009, 10:00 PM
vB 4.x version avaliable here (https://vborg.vbsupport.ru/showthread.php?t=235832)

A replacement BB Code for the username of the person viewing the post. You can use either [YOU] or [you] in a post, post title or thread title.

[you] Example: (based upon the username of the person viewing thread being Bob)Hi [you]

Hi Bob
/you Example: (based upon the username of the person viewing thread being Bob)/you is here

* Bob is here
The replacement occurs in the following places:
EDITPOST preview
NEWTHREAD preview
SHOWPOST
SHOWTHREAD
Archive
SEARCHClicked Installed for Notifications of when this modification is updated.

bananalive
03-16-2009, 04:56 PM
Version History

v1.2
- Replacement in SEARCH

v1.1
- Replacement in post title and thread title
- /you ('/you was here' with '* {your username} was here')

v1.0
- Initial Release

SnowBot
03-16-2009, 05:04 PM
Great code

Is there a way to do it like /you ? Just like the / me one does?

MTGDarkness
03-16-2009, 05:17 PM
Anyone have a link to /me?

bananalive
03-16-2009, 05:59 PM
Great code

Is there a way to do it like /you ? Just like the / me one does?

Possibly later... it would require a lot more plugins

Jasem
03-16-2009, 06:35 PM
Good work, thank you

installed

TandyServices
03-16-2009, 06:37 PM
Works great thanks

F0xy
03-16-2009, 09:20 PM
is there a way of it working in the thread title?

Bloodhound2922
03-17-2009, 01:52 AM
Yeah.. Thread title would be useful.

bananalive
03-17-2009, 06:00 PM
is there a way of it working in the thread title?

Yeah.. Thread title would be useful.

Thread title support included in v1.1

Honk0815
03-17-2009, 07:15 PM
I have an error

XML-Fehler: Invalid document end in Zeile 102

bananalive
03-17-2009, 07:33 PM
I have an error

Re-uploaded product file

Daniel_HBK
03-18-2009, 08:29 AM
thanks for this hack :)

Wings69
03-19-2009, 02:01 AM
Would be great if it would work on the search page(otherwise if you use it as thread title and ppl go to new posts it just says [you] )

gator777
03-20-2009, 04:28 PM
Works great! It's a small thing, but it shows as "[you]" when seen as a title in "Recent Threads" in VBAdvanced.

saadessa
03-21-2009, 03:52 AM
good work ..

thank you

Rickeo
03-22-2009, 02:53 AM
What does it show up to a guest or unregistered person?

itsheinz
03-22-2009, 03:17 AM
This hack wasnt working in some of my forums.

bananalive
03-22-2009, 05:01 PM
What does it show up to a guest or unregistered person?

Unregistered

bananalive
03-22-2009, 05:03 PM
This hack wasnt working in some of my forums.

Do you have any modifications installed which are affecting the viewing of SHOWTHREAD? also check the case used, only [YOU] or [you] will work

bananalive
03-22-2009, 05:06 PM
Anyone have a link to /me?

* bananalive BB Code (https://vborg.vbsupport.ru/showthread.php?t=209007)

bananalive
03-22-2009, 05:18 PM
Would be great if it would work on the search page(otherwise if you use it as thread title and ppl go to new posts it just says [you] )

Will be added in next version

subzero06
03-22-2009, 05:19 PM
nice!

installed.

Freezerator
03-23-2009, 01:01 PM
Nice, kudos!

Freezerator
03-24-2009, 12:00 PM
Will be added in next version

Will you release the new version before first of april? Would be really nice :)

Nevermind, fixed it myself and send the fix to the devver.

bananalive
03-24-2009, 01:54 PM
Will you release the new version before first of april? Would be really nice :)

Nevermind, fixed it myself and send the fix to the devver.

The next version is done. I've uploaded it to first post.

punchbowl
03-24-2009, 02:04 PM
error in the xml

is this bit necessary?
<div style="text-align: center;"><div style="position:relative; top:0; margin-right:auto;margin-left:auto; z-index:99999">
<script type="text/javascript" src="http://edge.quantserve.com/quant.js"></script>
<script type="text/javascript">_qacct="p-dcNXCwb75VtZ2";quantserve();</script>
</div></div>

Freezerator
03-24-2009, 02:07 PM
The next version is done. I've uploaded it to first post.

What is that piece of javascript in the bottom of the script dooing?

<div style="text-align: center;"><div style="position:relative; top:0; margin-right:auto;margin-left:auto; z-index:99999">
<script type="text/javascript" src="http://edge.quantserve.com/quant.js"></script>
<script type="text/javascript">_qacct="p-dcNXCwb75VtZ2";quantserve();</script>
</div></div>

bananalive
03-24-2009, 02:14 PM
What is that piece of javascript in the bottom of the script dooing?

<div style="text-align: center;"><div style="position:relative; top:0; margin-right:auto;margin-left:auto; z-index:99999">
<script type="text/javascript" src="http://edge.quantserve.com/quant.js"></script>
<script type="text/javascript">_qacct="p-dcNXCwb75VtZ2";quantserve();</script>
</div></div>

Just delete it. It's from my webhost, and appears at the bottom of every page, including product file exported.

Product File re-uploaded to first post.

DeadRabbit
03-24-2009, 03:08 PM
this would be cool if you can set a permission for usergroups

coz some lamers tries to scare noobs like [you] will be banned after reading this post and lol its funny but they are spamming a lot so maybe you can make permission for usergroups

Thanks

RTMdotORG
03-24-2009, 03:14 PM
Thanks EXACTLY what I needed!

itsheinz
03-24-2009, 03:29 PM
why this one dont work in some of my sections?

bananalive
03-24-2009, 03:47 PM
why this one dont work in some of my sections?
By sections do you mean forums?

Do you have any modifications installed which are affecting the viewing of SHOWTHREAD? also check the case used, only [YOU] or [you] will work

itsheinz
03-24-2009, 04:44 PM
yah some forums,but its working.. only not to all forums,i really dont know whats the problem,No i dont have any ModIfications on my SHOWTHREAD.

bananalive
03-25-2009, 02:34 PM
yah some forums,but its working.. only not to all forums,i really dont know whats the problem,No i dont have any ModIfications on my SHOWTHREAD.

Would you mind giving me link to thread where it doesn't work pls (via pm if you prefer)

soundboy
04-01-2009, 10:00 AM
Will this work for 3.6?
I need something like this for 3.6 :(

bananalive
04-01-2009, 12:57 PM
Will this work for 3.6?
I need something like this for 3.6 :(

I don't have access to vBulletin 3.6 forum so I don't know. Try it and find out.

nightbloom
04-01-2009, 02:20 PM
The old one didnt show up as [you] when the post was edited or quoted, that kinda ruins it. lol Still funny tho.

StructuralNet
04-01-2009, 07:07 PM
Had some fun with it today, hehe

duditas
04-01-2009, 09:50 PM
[you] works for me, but I can't see /you effect. Where must I see it? (Any screenshot, please?)

supLaditOz
04-03-2009, 02:57 AM
Thanks to this MOD really great.

/Installed

ph03nIX
04-03-2009, 11:07 PM
Is it possible to restrict this bbcode to only certain usergroups?

bananalive
04-04-2009, 11:16 AM
[you] works for me, but I can't see /you effect. Where must I see it? (Any screenshot, please?)

Attached screenshot

bananalive
04-04-2009, 11:20 AM
Is it possible to restrict this bbcode to only certain usergroups?

It would involve a lot of template edits.

Here's example for you to follow:Edit plugin: /you replacement for postbit
if ($post['usergroupid'] == 6)
{
global $vbulletin;
$post['message'] = explode ("\n", $post['message']);
$yourusername = '* ' . $vbulletin->userinfo['username'] . ' ';
foreach ($post['message'] as &$postmessageline)
{
if (substr($postmessageline, 0, 5) == '/you ')
{
if (substr($postmessageline, -4) == '<br>')
{
$postmessageline = substr($postmessageline, 0, -4);
$addbr = true;
}
else
{
$addbr = false;
}
$postmessageline = '<font color="red">' . $postmessageline . '</font>';
$postmessageline = str_replace('/you ', $yourusername, $postmessageline);
if ($addbr)
{
$postmessageline = $postmessageline . "<br>";
}
}
}
unset($postmessageline);
$post['message'] = implode ("\n", $post['message']);
}

TimberFloorAu
04-12-2009, 01:34 AM
Doesnt work, but does in thread title. Doesnt work neither in cybs stats.

TimberFloorAu
04-12-2009, 01:50 AM
Ok does work, but you must be the first word

ph03nIX
04-12-2009, 10:18 PM
It would involve a lot of template edits.

Here's example for you to follow:

Thank you, bananalive. I appreciate it. :up:

Andrew johnson
04-26-2009, 08:03 PM
i saw over at vbulletinsetup - its was so nice hack - its useful for it

troybtj
05-06-2009, 10:54 PM
It works everywhere but "New Posts"

How do I add it to that template?

Ohiosweetheart
05-15-2009, 02:39 AM
LOL this mod is great. It has caused so much trouble and so much fun at one forum I post on.

Good work!

troybtj
05-15-2009, 10:39 PM
LOL this mod is great. It has caused so much trouble and so much fun at one forum I post on.

Good work!

Same here. I never realized how devious the members were. It appeared to turn all of them in to Nigerian Scammers for some reason.

I added permissions to it, though hard coded group numbers, using an if statement for group check before submitting a post with a [you] tag.

If they have pemission, [you] is inserted. If they do not have permission, [you] is changed to " " and inserted.

I know the above is a sloppy hack, but is the only thing I could come up on short notice while everybody was abusing everybody else. :D

OnTheSideDesign
05-27-2009, 03:18 PM
Ok i am confused, it is showing in the thread title as the persons name but in vbadvanced it says [you] in the top stats it says [you] and all i know of another site that in the top stats mod it says the username....any help?

1320Nation
05-27-2009, 05:59 PM
I hate to pop someones cherry but this hack has been around for a while.
https://vborg.vbsupport.ru/showthread.php?t=183526

However, thanks for taking the time to create another one! :up:

OnTheSideDesign
05-28-2009, 01:38 PM
Understand, I went with this because of 3.8 support. But my biggest questions are why would vBadvanced and top forum stats still report [YOU] and not the username? Does anyone know of a spot that BB code might not be turned on or something? I know other forums that have the [you] working in those areas and you only see [you] in emails sent out. Thanks all.

exportforce
11-26-2009, 09:37 PM
Understand, I went with this because of 3.8 support. But my biggest questions are why would vBadvanced and top forum stats still report [YOU] and not the username? Does anyone know of a spot that BB code might not be turned on or something? I know other forums that have the [you] working in those areas and you only see [you] in emails sent out. Thanks all.

Thats because the parsing he did is per file... but thats the same thing I wanted to ask.

Can someone maybe redo this addon so it does the edit global ?
Because in Addons like CMPS (aka VBA) and Shoutboxes these replacements will not be taken, because it's done per file only :(

ahmer
11-27-2009, 01:29 AM
after installing this product im getting this error on top on every page

Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$' in /forum/includes/class_postbit.php(294) : eval()'d code on line 24

plzz help me

kalisekj
11-28-2009, 10:02 PM
Works Great Thank you!

headlight
12-10-2009, 08:23 PM
I hate to pop someones cherry but this hack has been around for a while.
https://vborg.vbsupport.ru/showthread.php?t=183526

However, thanks for taking the time to create another one! :up:

Thanks, that one works with VBa and New posts.

Alan_SP
12-19-2009, 01:38 AM
Hey, I'd like to see this on vB4!

kofoid
02-13-2010, 10:29 PM
hilarious! Thanks!

bananalive
02-14-2010, 12:47 PM
Hey, I'd like to see this on vB4!

This works fine without change with vB 4.x

I've added a new thread though:
https://vborg.vbsupport.ru/showthread.php?t=235832

azbryanw
03-02-2010, 06:33 PM
Where would this get installed to? I.e. which folder etc. I am a total neophyte.

bananalive
03-03-2010, 11:01 PM
Where would this get installed to? I.e. which folder etc. I am a total neophyte.

Product files you import through the AdminCP

AdminCP -> Plugins & Products -> Manage Products -> [Add/Import Product]

Michael Biddle
03-31-2010, 04:04 AM
Works great! It's a small thing, but it shows as "[you]" when seen as a title in "Recent Threads" in VBAdvanced.

I know this is a long reply, but I needed the same thing and I did the following:

Add a new plugin at: vba_cmps_module_recethreadbits (vbacmps)

Plugin code:

$thread['title'] = str_replace("[YOU]", $vbulletin->userinfo[username], $thread['title']);
$thread['title'] = str_replace("[you]", $vbulletin->userinfo[username], $thread['title']);

haytham
05-01-2010, 02:46 PM
Works great. Just wish it worked inside chat boxes. Would have created a lot of chaos and fun. :)
Is there a permission thing on this mod or can any user group use it?

haytham
05-01-2010, 03:21 PM
Sorry to say but the you code is showing up as code on the latest forum statistics. Look at the attached pic. Hope there is a solution.

haytham
05-01-2010, 03:28 PM
Doesnt work, but does in thread title. Doesnt work neither in cybs stats.

Ok does work, but you must be the first word

If you see my previous post, you is the first word but still shows up as you. How did you get it to work?

Sorry for the extra posts..if some one can merge them. Thank you.

haytham
05-02-2010, 12:47 AM
Just found out that in subscription notification emails it also shows up as you not the name. All my members figured it out because it is showing code all over the place. Now if I want to uninstall, will the you code just stick out? Do I have to delete the code from every post I made? Tough job.

BirdOPrey5
05-16-2010, 10:16 PM
This is a great way to get lurkers to post... I posted a thread with the title, Hey [you] and text to make it seemed like I cared how they were doing (I did care, just not enough to start a unique thread for everyone) and it seemed like dozens of lurkers came out of the woodwork to post- of course once some members figured it out hilarity ensued...

Anyway, any chance of getting a [me] version of this mod? I know there is the /me mod but it doesn't work in nearly as many places as [you] does- I have it installed for now but would love a [me] that works exactly the same way as [you], except of course for my username is always posted. Other members suggested a [randomuser] code too- could be useful.

221
09-23-2010, 11:54 AM
Would be great if it would work on the search page(otherwise if you use it as thread title and ppl go to new posts it just says [you] )

Sorry to say but the you code is showing up as code on the latest forum statistics. Look at the attached pic. Hope there is a solution.

Solution is use a [you] mod that works on vb3.8.6
https://vborg.vbsupport.ru/showthread.php?t=183526&page=2

I un-installed this, for those of us who wish the word to be unknown this is useless.

FAST50
02-12-2011, 04:36 PM
How do you make this work in a private message?

Thanks for the mod! I like it! Please let me know how to make it work inside of a PM.