Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 01-31-2012, 06:12 PM
aebstract aebstract is offline
 
Join Date: Nov 2007
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default banned users in database

I need to find in the database what users are banned and by who so I can do a custom little script that we would like to implement. My end result will basically just be getting a count of how many people someone has banned so I really just need to know how to link banned users to a specific user's ID if that's how it is setup?
Thanks in advance!
Reply With Quote
  #2  
Old 01-31-2012, 06:25 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think what you want is in the table 'userban'.
Reply With Quote
  #3  
Old 01-31-2012, 06:36 PM
aebstract aebstract is offline
 
Join Date: Nov 2007
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

WOW I feel retarded now haha. Thanks a lot :P
Reply With Quote
  #4  
Old 01-31-2012, 06:40 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

lol, there's no reason to - there are a lot of db tables.
Reply With Quote
  #5  
Old 01-31-2012, 07:02 PM
aebstract aebstract is offline
 
Join Date: Nov 2007
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

True, though I skimmed through and have been working around the users table for a little bit today so I should have seen it lol. Do you happen to know of anywhere that might explain how to write a small script that is useable in the style.xml file? I want to be able to write a short php script but use it where needed. Never really done this with vbulletin so no too sure.
Reply With Quote
  #6  
Old 01-31-2012, 07:08 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm not sure what you mean by "usable n the style.xml file". To be honest I don't know a whole lot about styles, is that the file you get from exporting a style?
Reply With Quote
  #7  
Old 01-31-2012, 07:14 PM
aebstract aebstract is offline
 
Join Date: Nov 2007
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The style that we use on our forums is loaded via an .xml file by going in to the Admin panel and clicking on styles & templates > download / upload styles and browsing for the file under "import style xml file" and letting it override the one in use. So with this method, whenever I am working on the layout I just work in that xml file and re-upload.

Let's say that I'm trying to just add "<?php echo "test"; ?>" to a specific location on the page.
Reply With Quote
  #8  
Old 01-31-2012, 07:17 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you're changing templates, it's not going to let you use php like that. You'd need to write a plugin, then register a variable to the template, and then use something like {vb:raw varname}. But I'm not familiar with what's allowed in a style xml file - are you allowed plugins?
Reply With Quote
  #9  
Old 01-31-2012, 07:23 PM
aebstract aebstract is offline
 
Join Date: Nov 2007
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah, that sounds right. The xml file has a lot of things like that. I'm using some plugins and they work fine. Using vbgarage and a thumbnail plugin for top level of threads.

So I guess the part I need to figure out is how to write the plugin and register the variable.
Reply With Quote
  #10  
Old 01-31-2012, 07:32 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well to write a plugin you go to "Add New Plugin" under "Plugins & Products" in the adminCP. The problem is that you need to know which hook location you want your plugin to run at, and I guess for you that would depend on which template you wanted to use the output in. If you don't know, you could start out using global_start.

Another thought I had - you could also write your own php script, in which case you could use <?php...?> to switch between php and html, but then you're kind of on your own for creating the entire page.
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:58 PM.


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.08304 seconds
  • Memory Usage 2,237KB
  • 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
  • (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