Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-08-2008, 03:21 AM
CP, CP, is offline
 
Join Date: Aug 2005
Location: UK London
Posts: 276
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Small programming help

PHP Code:
if ($vbulletin->userinfo['field8']) 

    if (
$vbulletin->options['globalignore']) 
    { 
        
$vbulletin->options['globalignore'] = $vbulletin->options['globalignore'] . " " $vbulletin->userinfo['field8']; 
    } 
    else 
    { 
        
$vbulletin->options['globalignore'] = $vbulletin->userinfo['field8']; 
    } 

Hi the above code was taken from a 3.5.4 hack but no longer works for 3.7.1, as you can see above its a very simple short code which presumably needs a few tweaks for it to work on a 3.7.1.

Field 8 you are seeing above is refering to a custom field which was created under each users profile.

I would really appreciate it if somebody could fix the above snippet for a 3.7.1,

Many thanks in advance!
Reply With Quote
  #2  
Old 06-08-2008, 04:23 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What's the error?

The most obvious one is the lack of single quotes - as you can see, the whole block is parsed incorrectly, leading to the weird colours.
Reply With Quote
  #3  
Old 06-08-2008, 04:30 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

He must not have copied that exactly as in the hack. The last field8 only has one quote which should be giving errors in the hack.
Reply With Quote
  #4  
Old 06-08-2008, 12:44 PM
CP, CP, is offline
 
Join Date: Aug 2005
Location: UK London
Posts: 276
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dismounted View Post
What's the error?

The most obvious one is the lack of single quotes - as you can see, the whole block is parsed incorrectly, leading to the weird colours.
There are no errors, nothing simply happens...

Looks pretty simple just needs tweaking.. i remember it working for vb 3.5.4.

[QUOTE=Boofo;1543754]He must not have copied that exactly as in the hack. The last field8 only has one quote which should be giving errors in the hack.[/QUOTE

The one quote was my error.. it has two, one on either side...

Field 8 is the custom field you make for the hack to apply to specific users of the forum. See below.

https://vborg.vbsupport.ru/showthread.php?t=109543

Thanks
Reply With Quote
  #5  
Old 06-08-2008, 12:47 PM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Lets play spot the difference!

Correct:
Code:
$vbulletin->userinfo['field8']
Incorrect:
Code:
$vbulletin->userinfo['field8]
First one to guess it wins a cookie

(I think all this sun is getting to me... )

If it doesn't work after you changed it, then it is probably due to code changes elsewhere. Which would probably require a new modification.
Reply With Quote
  #6  
Old 06-08-2008, 12:51 PM
CP, CP, is offline
 
Join Date: Aug 2005
Location: UK London
Posts: 276
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Opserty View Post
Lets play spot the difference!

Correct:
Code:
$vbulletin->userinfo['field8']
Incorrect:
Code:
$vbulletin->userinfo['field8]
First one to guess it wins a cookie

(I think all this sun is getting to me... )

If it doesn't work after you changed it, then it is probably due to code changes elsewhere. Which would probably require a new modification.
Ive recitfied my initial post. It was actually my error when i had posted it. See my second post above.

Reply With Quote
  #7  
Old 06-08-2008, 12:54 PM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ah, you're second post hadn't appeared when I went to post mine
Reply With Quote
  #8  
Old 06-08-2008, 01:36 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So YOU say...
Reply With Quote
  #9  
Old 06-08-2008, 01:49 PM
CP, CP, is offline
 
Join Date: Aug 2005
Location: UK London
Posts: 276
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry for the confusion guys but the problem still remains it does not work!

My first post was a typo... :erm:
Reply With Quote
  #10  
Old 06-08-2008, 03:30 PM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Where are you putting the code?
Reply With Quote
Reply


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 09:14 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.12393 seconds
  • Memory Usage 2,262KB
  • 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
  • (4)bbcode_code
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete