![]() |
Table On Forumhome -- Filling it with PHP/SQL Data
Hey guys. After trying to make this work in the header of my site, I have given up. It is making for a ton of alignment and sizing issues.
What I want to do now is have the PHP code make a new table and place it on the ForumHome page in line with the actual forums. Here is a mockup of what I am talking about: http://img232.imageshack.us/img232/3503/examplewo0.jpg The new table needs to have a column span of 2 because I want to seperate the loot winner and the actual name of the loot. Here is my current code. I am using this as a plugin at the moment. PHP Code:
Any help would be appreciated. Thanks. |
If you can, give the mysql vb user access to your eqdkp_items table, you won't need to create another connection to your database.
Don't echo anything in your plugin. You should just use the template system. So, put a variable in your FORUMHOME template, where you want your table to appear; let's call it $winners. HTML Code:
<if condition="!empty($winners)"> PHP Code:
$winners will be replace by its value during fetch_template('FORUMHOME') in index.php |
Quote:
Thank you very much for your help. |
On phpmyadmin, privileges => edit the user used by your forum
see 'Database-specific privileges' Select the database that contain your eqdkp_items table, and give SELECT right on the database or the table. edit: just added YOUR_DB before the table name in the sql query, don't forget to change it |
If the table is in the same database as your vbulletin, you don't need to worry about giving the MySQL user access to the table.
|
All times are GMT. The time now is 01:13 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|