vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   How to disable ajax on (visitormessage) (https://vborg.vbsupport.ru/showthread.php?t=260331)

Pilot iQ 03-14-2011 03:25 AM

How to disable ajax on (visitormessage)
 
Hello ,

I have a problem on the comments of visitors on the Profile .

When you add any comment shows a blank page

When i disable all Ajax from admincp aproblem disappear and everything run ok .

So i need away to disable Ajax only on Profile :(

Please anyone can help me ???

Note :
the problem only with user colored by this mod
https://vborg.vbsupport.ru/showthread.php?t=108910



Regards ,

Pilot iQ 03-16-2011 02:44 AM

can i add somthing like :
Code:

<if condition="visitormessage">
                        disable : ajax ;       
                        </if>

Please someone help me

BirdOPrey5 03-16-2011 12:44 PM

Looks like you need to do the conditional in a plugin... I just tested this, seems to work:

Go to Admin CP -> Plugin Manager -> Add a New Plugin

Product: vBulletin
hook location: global_start
Title: AJAX Disable on MEMBERINFO
Execution Order: 5
PHP Code:
PHP Code:

if (THIS_SCRIPT == 'member')
   
$vbulletin->options['disable_ajax'] = 2

Set ACTIVE to YES and SAVE.

Ajax should be disabled on your member.php page, which controls visitor messaging. :up:

Pilot iQ 03-16-2011 02:19 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2173976)
Looks like you need to do the conditional in a plugin... I just tested this, seems to work:

Go to Admin CP -> Plugin Manager -> Add a New Plugin

Product: vBulletin
hook location: global_start
Title: AJAX Disable on MEMBERINFO
Execution Order: 5
PHP Code:
PHP Code:

if (THIS_SCRIPT == 'member')
   
$vbulletin->options['disable_ajax'] = 2

Set ACTIVE to YES and SAVE.

Ajax should be disabled on your member.php page, which controls visitor messaging. :up:

Thank you very much ,, Ajax killed on member.php

You are awesome,

God bless you


Regards ,

--------------- Added [DATE]1300289686[/DATE] at [TIME]1300289686[/TIME] ---------------

Can I select this option to a specific UserGroup ?

like this :
Code:

if (THIS_SCRIPT == 'member'1,2,6")
  $vbulletin->options['disable_ajax'] = 2;


BirdOPrey5 03-16-2011 02:38 PM

I believe for usergroups you'd try:

PHP Code:

if (THIS_SCRIPT == 'member' AND is_member_of ($vbulletin->userinfo126))
   
$vbulletin->options['disable_ajax'] = 2

Edited typo in code.

Pilot iQ 03-16-2011 02:52 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2174016)
I believe for usergroups you'd try:

PHP Code:

if (THIS_SCRIPT == 'member' AND is_member_of ($vbulletin->userinfo126)")
   
$vbulletin->options['disable_ajax'] = 2; 


if i set it like this :
Code:

if (THIS_SCRIPT == 'member' AND is_member_of ($vbulletin->userinfo, 1, 2, 6)")
it give me user does not exist

BirdOPrey5 03-16-2011 03:26 PM

My bad, it looks like I have an extra " in there for some reason, take the " out between the last two ) )...

OR.. I just tested this, this works too...

PHP Code:

if (THIS_SCRIPT == 'member' AND in_array($vbulletin->userinfo['usergroupid'], array(12,6) ))  
 
$vbulletin->options['disable_ajax'] = 2


Pilot iQ 03-16-2011 03:37 PM

You are a hero

its work awesome

Thank you very very very much

Regards ,

BirdOPrey5 03-16-2011 03:41 PM

No problem. :up:

FYI the difference between the two is the first one I posted will work on primary OR secondary usergroups, where as the second code only works on primary usergroups, which is probably all you need.

Pilot iQ 03-16-2011 03:47 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2174044)
No problem. :up:

FYI the difference between the two is the first one I posted will work on primary OR secondary usergroups, where as the second code only works on primary usergroups, which is probably all you need.

Exactly :up:

Because I need to disable Ajax only with a member colored by rainbow mod


All times are GMT. The time now is 10:13 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.01048 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
  • (3)bbcode_code_printable
  • (5)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete