vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Miscellaneous Hacks - Live Topic (https://vborg.vbsupport.ru/showthread.php?t=201228)

beekay 05-22-2012 02:47 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2331554)
I didn't check whether the code is good or not, just that what you wrote the first time was definitely invalid.

This is what I use personally to disable for users with IE 9... (on the global_start hook)
Code:

if (ieversion() < 9.0)
{
  $is_livetopic = true;
  $livetopichook = 'template_edits';
  include 'includes/livetopic_hooks.php';
}


And it works for everyone else. If you want it only for mods and admins I would suggest:



Code:

global $vbulletin;
if (is_member_of($vbulletin->userinfo, 5, 6, 7))
{
  $is_livetopic = true;
  $livetopichook = 'template_edits';
  include 'includes/livetopic_hooks.php';
}

(you don't need an array.)

If it still breaks for other users then I don't know, check and make sure no other code was changed.


Thank you, that code worked perfectly. :up:

Wonksta 05-24-2012 04:58 AM

Does it not work with IE9?

If so would you kindly show us how one would incorporate the IF IE9 and usergroup options into one.

I'd like to disable the mod for IE9 like you have BOP and also set it only for specific usergroups.

Thanks so much

BirdOPrey5 05-25-2012 12:49 AM

For me it was not working for IE9, your mileage may vary.

To disable for IE9 just follow what I did in post #1220... Go to plugin manager, edit that plugin, and make the block of code look like what I posted.

If you want to disable on IE9 AND limit it to certain usergroups:

Code:

global $vbulletin
if (ieversion() < 9.0 AND is_member_of($vbulletin->userinfo, 5, 6, 7))
{
  $is_livetopic = true;
  $livetopichook = 'template_edits';
  include 'includes/livetopic_hooks.php';
}

That will allow usergroups 5, 6, and 7 to use it and only if they are NOT using IE9.

beekay 05-28-2012 10:12 PM

This code was working well for me but Live Topic eventually stopped working for me until I reinstalled it. It seemed to work fine during lower activity levels but once I had more members online it stop working.

Code:

global $vbulletin
is_member_of($vbulletin->userinfo, 5, 6, 7))
{
  $is_livetopic = true;
  $livetopichook = 'template_edits';
  include 'includes/livetopic_hooks.php';
}

Also is there a not_member_of alternative? I would like to give this another try to see if it stops working again.

Thanks again to BOP5!

BirdOPrey5 05-29-2012 09:01 AM

Actually that code is missing the if condition, it probably never worked right...

If you want to specify groups the member is NOT a member of, simply put an ! in front of "is_member_of"

example:

Code:

if(!is_member_of($vbulletin->userinfo, 1, 2))
That would be true for all members NOT in usergroups 1 or 2.

Wonksta 05-29-2012 11:49 AM

Are you please able to amend the code above with the if condition fixed I am not sure where it goes in php :\

BirdOPrey5 05-29-2012 01:11 PM

just this:

Code:

global $vbulletin
if (is_member_of($vbulletin->userinfo, 5, 6, 7))
{
  $is_livetopic = true;
  $livetopichook = 'template_edits';
  include 'includes/livetopic_hooks.php';
}

work only for groups 5, 6, and 7

OR


Code:

global $vbulletin
if (!is_member_of($vbulletin->userinfo, 1, 2))
{
  $is_livetopic = true;
  $livetopichook = 'template_edits';
  include 'includes/livetopic_hooks.php';
}

work for all groups EXCEPT 1 and 2.

Wonksta 05-29-2012 03:51 PM

Thank you very much

beekay 05-30-2012 01:05 AM

Quote:

Originally Posted by BirdOPrey5 (Post 2334279)
just this:

Code:

global $vbulletin
if (is_member_of($vbulletin->userinfo, 5, 6, 7))
{
  $is_livetopic = true;
  $livetopichook = 'template_edits';
  include 'includes/livetopic_hooks.php';
}

work only for groups 5, 6, and 7

OR


Code:

global $vbulletin
if (!is_member_of($vbulletin->userinfo, 1, 2))
{
  $is_livetopic = true;
  $livetopichook = 'template_edits';
  include 'includes/livetopic_hooks.php';
}

work for all groups EXCEPT 1 and 2.


I'm sorry but this code is just not working for me, I'm wondering if maybe theres a conflict somewhere else. I've tried both versions of the code and Live Topic stops working no matter what I do. I've tried adding it to both ajax_start and global_start. I've tried each plugin individually with the code as well as both of them having the code. :confused:

Wonksta 05-30-2012 01:36 AM

Do you have mods the amend postbit? Like adsense ad insertations? It will break if you do, happened for me.

In the mean time DragonByte has his version of thiis available that was less buggy


All times are GMT. The time now is 03:00 PM.

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.02446 seconds
  • Memory Usage 1,747KB
  • 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
  • (9)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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