vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Miscellaneous Hacks - Advanced [YOU] BB Code (with options) by BOP5 (https://vborg.vbsupport.ru/showthread.php?t=254373)

Conehead555 08-28-2011 07:57 PM

Awesome in 4.1.4!

WendM 10-25-2011 02:05 PM

Quote:

Originally Posted by hugh_ (Post 2185176)
Is there a way of making this work with the widgets in the CMS?

I'm just wondering that, as it does make it (cms) look a bit odd just seeing [you] displayed! Hope some kind soul can address this! Thanks! :)

btw, works fine on vB4.1.7

BirdOPrey5 10-26-2011 09:58 AM

Updating this to work with the CMS/Suite has been added to my queue of back-logged projects. ;)

sweetpotato 10-28-2011 05:20 PM

How to make it work with VSa-Advanced Forum Statistics please?

BirdOPrey5 10-28-2011 05:38 PM

I don'y know, I don't use that mod.

sweetpotato 10-29-2011 01:38 PM

Your Mod work well on my site except the title on VSa-Advanced Forum Statistics

hugh_ 03-04-2012 07:39 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2261667)
Updating this to work with the CMS/Suite has been added to my queue of back-logged projects. ;)

My users love this mod! Please consider adding forum block support too...

hugh_ 03-04-2012 07:58 PM

This has generated tens of thousands of posts on my forum...

BirdOPrey5 03-26-2012 12:34 AM

Updated to an all new, re-coded version. 0.97.

Now works virtually everywhere on the forum including blogs, CMS, sidebar, widgets, picture comments, PMs,. Visitor Messages, Social groups, as well as forums themselves.

The "immune usergroup" feature remains but the "bloc-usergroup" feature which was never fully implemented in the old version has been removed from this version.

Enjoy. :up:

hugh_ 03-26-2012 01:24 AM

This works brilliantly, excellent work!

RisingGlow 03-26-2012 04:04 AM

Great code. but is it possible to enable this in profiles?
I'm running 4.1.10 and it shows [YOU], not the real username.

BirdOPrey5 03-26-2012 08:06 AM

Where exactly in the profile is it showing [YOU]? Like what part? It should most certainly be working in Visitor Messages (if you have them enabled)...

BirdOPrey5 03-26-2012 11:21 AM

Updated to version 0.975- a couple of bugs were causing the [YOU] not to work in blogs.

Also I had accidentally deleted the code that made it work in thread titles (fixed this.)

If you downloaded 0.97 you should definitely update to this version.

RisingGlow 03-28-2012 04:55 AM

Quote:

Originally Posted by BirdOPrey5 (Post 2313430)
Updated to version 0.975- a couple of bugs were causing the [YOU] not to work in blogs.

Also I had accidentally deleted the code that made it work in thread titles (fixed this.)

If you downloaded 0.97 you should definitely update to this version.

on the left where it has ur name and profile picture

BirdOPrey5 03-28-2012 04:16 PM

I don't see where it would be...

are you talking like this page?

http://www.qapla.com/mods/member.php/196-Joe-Mod

Maybe you could give me a screenshot so I know where exactly you mean?

RisingGlow 03-29-2012 03:09 AM

Quote:

Originally Posted by BirdOPrey5 (Post 2314308)
I don't see where it would be...

are you talking like this page?

http://www.qapla.com/mods/member.php/196-Joe-Mod

Maybe you could give me a screenshot so I know where exactly you mean?

yah, that page.

BirdOPrey5 03-29-2012 10:21 AM

OK, but I don't see [YOU] on that page. :confused:

Alan_SP 03-29-2012 05:43 PM

As I remember, your mod looks only for primary usergroup for checking if [you] BBcode could be used, or for immunity to [you] BBcode.

This is a bit of a problem for me and it also somehow clashes with this mod: https://vborg.vbsupport.ru/showthread.php?t=229146

This mod also looks only for primary usergroups (and has also some bugs).

For my reasons I want to have myself set to look outside as regular users. Could you maybe change your mod to look to all usergroups, not only primary? In that case I'll could start using this other mod (if I use your mod and this, I'll look to outside world as admin, or I couldn't use [you] BBcode, or be immune). For the moment I use only your mod.

BirdOPrey5 03-30-2012 11:42 AM

This version doesn't do a usergroup check on who can use it, it only does a usergroup check on immune users. But yes it does look for primary group only.

However it is a 1 line fix to make it work for secondary and primary groups:

Edit the Advaned [YOU] Function Plugin:

Find this line:
Code:

elseif (in_array($yougroup, explode(',', $vbulletin->options['adyoubop5_im']))) //If an immune user
and replace it with:
Code:

elseif (is_member_of($vbulletin->userinfo, explode(',', $vbulletin->options['adyoubop5_im']))) //If an immune user

As for the mod it clashes with I would think this new version shouldn't clash with any mods but I haven't checked it as I have my own version of the "HTML Markup Everywhere" mod.

Boofo 03-30-2012 01:17 PM

I have been curious about this and wonder which way is actually better. Is one less intensive than the other?

Code:

if (is_member_of($vbulletin->userinfo, explode(',', $vbulletin->options['adyoubop5_im'])))

OR

Code:

$test = explode(',', $vbulletin->options['adyoubop5_im']);

if (is_member_of($vbulletin->userinfo, $test))


BirdOPrey5 03-30-2012 03:47 PM

There will be no noticeable differences between those two codes in a production environment.

Over a thousand iterations you would still see no difference.

Over a million iterations you will notice the first one (all on one line) would be slightly better since there is one less variable assignment made.

But the difference in performance on a forum is in no way justification for code you can read and maintain easier.

Boofo 03-30-2012 04:20 PM

I have always done it the seperate explode way but I am seeing it done like you did it more now. I was just curious as to your thoughts on it is all.

Alan_SP 03-30-2012 04:33 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2314992)
As for the mod it clashes with I would think this new version shouldn't clash with any mods but I haven't checked it as I have my own version of the "HTML Markup Everywhere" mod.

Sorry, didn't mean in sense it caused something to malfunction, but in sense that I needed to be in protected usergroup as primary usergroup, not in secondary.

And mod that I mentioned looks also only for primary usergroups to show them to outside world (mod is basically cosmetic).

As I want to appear as regular user to all others and still have all admin privileges (i.e. be protected from [you] BBcode), I needed to set myself as admin in primary usergroup. But, in this case that other mod showed me as admin. So, I decided not to use that mod and use yours. Till now. :) Now I can use both mods. :)

dawges 04-02-2012 12:37 AM

Hi, nice mod. Can it be made where it will display the users avatar, ip address and email as well as username?

I saw this once on a forum using you code and it was great for pranks.

BirdOPrey5 04-02-2012 11:27 AM

No, none of those things would be possible with this mod- nor do I see reason to add them. Sorry.

DAMINK 04-19-2012 12:35 AM

I use a shoutbox and was wondering if this mod can work inside that as well or is that entirely the shoutbox creators department?
Either way i like it thanks BOP5

drchinh 04-19-2012 05:05 AM

It is great, thank you so much!

BirdOPrey5 04-19-2012 10:03 AM

Quote:

Originally Posted by DAMINK (Post 2321427)
I use a shoutbox and was wondering if this mod can work inside that as well or is that entirely the shoutbox creators department?
Either way i like it thanks BOP5

I've played with a couple of shout boxes before and never got it to work right. It would be a fairly easy feature to implement (I would think) for Shoutbox developers. They could include an on/off option to enable [YOU] and they would just have to scan the content being output to the screen for "[YOU]" using str_ireplace() function and replace it wilth $vbulletin->userinfo['username']. The idea of the [YOU] hack has been around long before me so if you get any shoutbox developer to add it let them know no credit is needed or anything like that- but I think the first one to implement this easy option will have an edge on the others since a number of people have been asking for it.

BirdOPrey5 04-28-2012 08:43 PM

Updated to 0.976 - Fixes [YOU] in user title's in profiles.

Edit - 0.977 now- fixed in member's list too.

hugh_ 06-01-2012 11:39 PM

This doesn't work in the activity stream...

AusPhotography 06-15-2012 09:53 AM

Quote:

Originally Posted by hugh_ (Post 2335629)
This doesn't work in the activity stream...

Same here - no surprise, AS is new

AusPhotography 04-09-2013 09:25 AM

Bump -- activity stream?

BirdOPrey5 04-09-2013 01:29 PM

Doesn't appear to be any hooks in the Activity Stream to let this work.

AusPhotography 04-10-2013 03:36 AM

Quote:

Originally Posted by BirdOPrey5 (Post 2415317)
Doesn't appear to be any hooks in the Activity Stream to let this work.

Thanks. I had a look at the AS code as well ... :(

Maybe we ask vB (Jira) for a hook for this in 4.3?

BirdOPrey5 04-13-2013 07:15 PM

Worth a shot- please vote for the issue - http://tracker.vbulletin.com/browse/VBIV-15676

AusPhotography 04-14-2013 09:46 PM

Voted! Thanks

t-j 06-10-2013 09:16 AM

Just a side note tried on 4.2.0 but displays [you] in advanced forum stats > https://vborg.vbsupport.ru/showthread.php?t=235841

Would be nice to see this developed further for vb4 :)

BirdOPrey5 06-12-2013 04:40 PM

I do not have plans to make this work with other 3d party mods, sorry.

If you follow PHP code at all it is fairly simple to duplicate wherever needed.

hugh_ 01-11-2014 09:08 PM

Joe is there a way of adding an image for this bbcode to the editor window?


All times are GMT. The time now is 09:25 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01287 seconds
  • Memory Usage 1,809KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (39)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete