vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   banned users in database (https://vborg.vbsupport.ru/showthread.php?t=277834)

aebstract 01-31-2012 06:12 PM

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!

kh99 01-31-2012 06:25 PM

I think what you want is in the table 'userban'.

aebstract 01-31-2012 06:36 PM

WOW I feel retarded now haha. Thanks a lot :P

kh99 01-31-2012 06:40 PM

lol, there's no reason to - there are a lot of db tables.

aebstract 01-31-2012 07:02 PM

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.

kh99 01-31-2012 07:08 PM

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?

aebstract 01-31-2012 07:14 PM

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.

kh99 01-31-2012 07:17 PM

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?

aebstract 01-31-2012 07:23 PM

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.

kh99 01-31-2012 07:32 PM

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.


All times are GMT. The time now is 06:25 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.01076 seconds
  • Memory Usage 1,723KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete