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)

BirdOPrey5 10-01-2011 12:04 PM

Disable your hooks: https://www.vbulletin.com/forum/show...ystem-globally

Then try uninstalling again.

Make sure you delete any files you uploaded.

KHALIK 01-27-2012 05:21 PM

Does this still work?

BirdOPrey5 01-27-2012 08:06 PM

It works fine for me on 3.8.7

beekay 05-21-2012 09:54 PM

has anyone ever come up with a way to disable this for guests? i hate turning off access to my forums during big events. i was wondering about a possible conditional that would disable the javascript for a usergroup

Lynne 05-21-2012 11:31 PM

Just change all the plugins to have a condition for whether the user is a guest or not.

beekay 05-22-2012 12:59 AM

Quote:

Originally Posted by Lynne (Post 2331432)
Just change all the plugins to have a condition for whether the user is a guest or not.


Live topic stopped working when I put this condition in the plugin

<if condition="is_member_of($bbuserinfo, array(5,6,7))">
{
$is_livetopic = true;
$livetopichook = 'ajax_start';
include 'includes/livetopic_hooks.php';
}
</if>


any ideas?

BirdOPrey5 05-22-2012 03:19 AM

Quote:

Originally Posted by beekay (Post 2331443)
Live topic stopped working when I put this condition in the plugin

<if condition="is_member_of($bbuserinfo, array(5,6,7))">
{
$is_livetopic = true;
$livetopichook = 'ajax_start';
include 'includes/livetopic_hooks.php';
}
</if>


any ideas?

That's because you're using template code in a plugin (plugins are php code.)

It would be:
Code:

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

also you need to use $vbulletin->userinfo instead of $bbuserinfo in php/plugins.

Fireballx 05-22-2012 03:55 AM

installed and working great. can i assign threads which are only to be made live?? This is in case I dont want any random thread to be made live.

beekay 05-22-2012 06:16 AM

Quote:

Originally Posted by BirdOPrey5 (Post 2331463)
That's because you're using template code in a plugin (plugins are php code.)

It would be:
Code:

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

also you need to use $vbulletin->userinfo instead of $bbuserinfo in php/plugins.

Live topic stopped working for all users when I used that code.

I also tried using this, which I borrowed from a plugin for hiding links from guests but it didn't work either.

Code:

if ((!$this->registry->userinfo[userid]) OR (is_member_of($this->registry->userinfo, 5, 2, 6, 7)))
{
$is_livetopic = true;
$livetopichook = 'ajax_start';
include 'includes/livetopic_hooks.php';
}


BirdOPrey5 05-22-2012 01:13 PM

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.


All times are GMT. The time now is 03:01 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.02335 seconds
  • Memory Usage 1,745KB
  • 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
  • (5)bbcode_code_printable
  • (3)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