View Full Version : banned users in database
aebstract
01-31-2012, 06:12 PM
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!
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
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.
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.
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.
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.
aebstract
01-31-2012, 07:37 PM
Okay cool, I'm about to head out of the office for the day but will get back to this in the morning and see if I can figure out the hook portion and get it working. Will post back if I have troubles. Thanks for all the information.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.