The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Moding question.
MY INFO:
Vbulletin: 3.5.4 Vbadvanced: 2.1.0 GARS: 2.0 RC2 [commercial script] Photopost: vbulletin enhanced [commercial script] Ok, I run The Vanguard Library @ vanguardlibrary.com I've been very busy getting my site layed out, and am now needing some very specic pages. What I am looking for is ANY links and info on how to make custom pages with my own data read from the database, and another form for posting to the database. MORE DETAIL: Vanguard Library is a fansite for The Vanguard Saga of Heros game. I will be having info for races/classes/skills/spells etc. I'm trying to determine the best way to go about this. I need an admin page where people with admin rights can add/edit this info. I need a user page where they will see the data entered. I need a submit page that users can submit info and it will await for approval from an admin, then be posted. All of the data pages I need will be very different. I need any links or info on how to go about creating these. My first thought was to use GARS however it does not seem like it is what I'm after here. My second thought was to create the raceshow.php racesubmit.php etc... The problem is I want it to use the vbulletin DB and I'm unsure of how to do this. I can make my own db connection script, and use a different database, howver I then wont have the ability to use vbulletins permissions. I know I've rambled, and if some kind soul PM's me I'd be glad to give more info and examples. Thank you, Sokol |
#2
|
||||
|
||||
Maybe the webtemplates mod by logician ?
|
#3
|
|||
|
|||
Unless I misunderstood, Logicians Web templates are for reading from the DB, not wrting to.
Now I'm a newbie php coder, and code from example alot; so I'm mostly familiar with the code examples I've been. I have a custom page, the custom page uses a custom template. Now all I need is to access the Vbulletin databse query functions. However I'm unsure how certain things differ. For instance: Code:
// Validate the email address. if (!empty($_POST['email'])) { $rn = escape_data($_POST['race_name']); } else { echo '<p><font color="red" size="+1">Please enter a Race Name address!</font></p>'; $rn = FALSE; } Code:
// Validate the email address. if (!empty($_POST['race_name'])) { $rn = escape_string($_POST['race_name']); } else { echo '<p><font color="red" size="+1">Please enter a Race Name</font></p>'; $rn = FALSE; } Now reading and writing to the Db confuses me abit more. Code:
if ($rn) { // If everything's OK. // Make sure the email address is available. $query = "SELECT race_name FROM races WHERE race_name='$rn'"; $result = mysql_query ($query) or trigger_error("Query: $query\n<br />MySQL Error: " . mysql_error()); if (mysql_num_rows($result) == 0) { // Available. But how does vbulletin handle mysql_num_rows? And how about writing to the database? Code:
$query = "INSERT INTO races (race_name) VALUES ('$rn', NOW() )"; $result = mysql_query ($query) or trigger_error("Query: $query\n<br />MySQL Error: " . mysql_error()); Again I'm pretty new to PHP and can code and adapt by example, but i'm abit stumped as to vbulletins mysql handling syntax. -Sokol Here is the NON vbulletin php file that I began to make. Quote:
Here is my vbulletin RACESUBMIT template Quote:
value="<?php if(isset($_POST['race_name'])) echo $_POST['race_name']; ?> Anyw ay I can get my template file to allow me to add php into the template? Here is my vbulletin code that formats my form into my vbulletin format. Quote:
and it seems to submit, but it will not update the database, and I'm assuming it's due to my RACESUBMIT template. Any ideas? Thanks a bunch, Sokol |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|