View Full Version : How to disable ajax on (visitormessage)
Pilot iQ
03-14-2011, 03:25 AM
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 :
<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:
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
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:
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 1300289686 at 1300289686 ---------------
Can I select this option to a specific UserGroup ?
like this :
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:
if (THIS_SCRIPT == 'member' AND is_member_of ($vbulletin->userinfo, 1, 2, 6))
$vbulletin->options['disable_ajax'] = 2;
Edited typo in code.
Pilot iQ
03-16-2011, 02:52 PM
I believe for usergroups you'd try:
if (THIS_SCRIPT == 'member' AND is_member_of ($vbulletin->userinfo, 1, 2, 6)")
$vbulletin->options['disable_ajax'] = 2;
if i set it like this :
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...
if (THIS_SCRIPT == 'member' AND in_array($vbulletin->userinfo['usergroupid'], array(1, 2,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
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
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.