Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 03-14-2011, 03:25 AM
Pilot iQ Pilot iQ is offline
 
Join Date: Oct 2010
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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 ,
Reply With Quote
  #2  
Old 03-16-2011, 02:44 AM
Pilot iQ Pilot iQ is offline
 
Join Date: Oct 2010
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can i add somthing like :
Code:
<if condition="visitormessage">
			disable : ajax ;	
			</if>
Please someone help me
Reply With Quote
  #3  
Old 03-16-2011, 12:44 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:
Reply With Quote
  #4  
Old 03-16-2011, 02:19 PM
Pilot iQ Pilot iQ is offline
 
Join Date: Oct 2010
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BirdOPrey5 View Post
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;
Reply With Quote
  #5  
Old 03-16-2011, 02:38 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 03-16-2011, 02:52 PM
Pilot iQ Pilot iQ is offline
 
Join Date: Oct 2010
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BirdOPrey5 View Post
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
Reply With Quote
  #7  
Old 03-16-2011, 03:26 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #8  
Old 03-16-2011, 03:37 PM
Pilot iQ Pilot iQ is offline
 
Join Date: Oct 2010
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You are a hero

its work awesome

Thank you very very very much

Regards ,
Reply With Quote
  #9  
Old 03-16-2011, 03:41 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #10  
Old 03-16-2011, 03:47 PM
Pilot iQ Pilot iQ is offline
 
Join Date: Oct 2010
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BirdOPrey5 View Post
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
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:36 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.04532 seconds
  • Memory Usage 2,259KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (5)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete