PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : wie binde ich ein "form" in vbulletin ein ?


metulsky
15.08.2005, 22:03
hallo !

ich bin voelliger vbulletin neuling und moechte eine modifikation vornehmen. ich komme da nur ueberhaupt nicht klar :

das soll ich tun :

-----------------------------------

Easy - takes only a few minutes:

1. Add the 2 templates.

2. Edit form.php - the instructions are all inside the PHP file itself, in the top half. Follow the instructions carefully!

3. Upload form.php

Just link to form1.php eg. http://www.yourforum.com/forums/form.php

Done!

Use this hack to make as many forms as you like!
---------------------------


was muss ich bitte tun ?

datein die ich habe :

form.php
form.txt
formanswers.txt
installation.txt


wie gesagt, ich bin absoluter neuling und ich waere wirklich dankbar !

gruesse

metulsky

Metro Man
15.08.2005, 22:05
Um welchen Hack handelt es sich genau?

metulsky
15.08.2005, 22:09
Um welchen Hack handelt es sich genau?

es ist dieser :
FORM to THREAD/ FORUM/ POLL/ PM/ EMAIL - Totally CUSTOMIZABLE FORMS
Version 1.6 for vBulletin 3.x.x by Dr Erwin Loh

siehe :

http://www.vbulletin.org/forum/showthread.php?t=66082

Metro Man
15.08.2005, 22:12
vermutlich musst du den inhalt der beiden *.txt dateien

formanswers.tx

und

form.txt

jeweils in ein neues Template erstellen im Admin Bereich bei Template hinzufügen

Bin mir aber auch nicht so ganz sicher aber dürfte stimmen

metulsky
15.08.2005, 22:13
und die form.php - was mache ich damit ?

danke fuer die schnelle unterstützung !

Metro Man
15.08.2005, 22:16
<?php

/*======================================================================*\
|| #################################################################### ||
|| # FORM TO THREAD/ FORUM/ PM/ EMAIL - Totally CUSTOMIZABLE FORMS # ||
|| # Version 1.6 for vBulletin 3.x.x by Dr Erwin Loh # ||
|| # ---------------------------------------------------------------- # ||
|| # Copyright ©2000–2004 Dr Erwin Loh. All Rights Reserved. # ||
|| # This file may not be redistributed in whole or significant part. # ||
|| #################################################################### ||
\*======================================================================*/

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

$globaltemplates = array(
'form',
'formanswers'
);

// ######################### REQUIRE BACK-END ############################
require_once('./global.php');

globalize($_POST, array(
'normalanswer1' => STR,
'radioanswer1' => STR,
'radioanswer2' => STR,
'radioanswer3' => STR,
'radioanswer3other' => STR,
'answer1' => STR,
'answer2' => STR,
'answer3' => STR,
'longanswer1' => STR,
'action' => STR
));

// #######################################################################
// ######################## CUSTOMIZE VARIABLES ##########################
// #######################################################################

////////////////////////////////////////////////////////////////////////////////////////////////////
////// BEGIN CUSTOMIZATION BELOW////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//USERGROUPS ALLOWED
//You can add or remove usegroups that are ALLOWED to use this form by changing the numbers below in the array
////////////////////////////////////////////////////////////////////////////////////////////////////

if (!in_array($bbuserinfo['usergroupid'], array(2,5,6,7))) print_no_permission();

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//NAME OF THIS PHP FILE AND TEMPLATES - DO THIS BIT IF YOU ARE MAKING MORE FORMS!
//You can easily make more forms by just copying this file, renaming it, and modifying the variable in
//this file. You can keep the same templates for different forms. For more customization, you can
//use different templates, by renaming and modifying the templates.
////////////////////////////////////////////////////////////////////////////////////////////////////

// Name of this file
$phpfilename = "form.php";

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//CHOOSE WHETHER YOU WANT FORM TO BE POSTED IN A NEW THREAD, NEW POLL, REPLY TO EXISITING THREAD, PMed OR EMAILED
///////////////////////////////////////////////////////////////////////////////////////////////////

//ENABLE FORM TO BE POSTED - 1 = yes, 0 = no
$formforum = "1";

//FORUM TO POST NEW THREAD IN
$formforumid = "131";

//ENABLE POLL TO BE CREATED - 1 = yes, 0 = no
$formpoll = "0";
$formoption1 = "Yes";
$formoption2 = "No";

////////////////////////////////////////////////////////////////////////////////////////////////////

//ENABLE FORM TO REPLY TO EXISTING THREAD
$formreply = "0";

//EXISTING THREAD ID FOR FORM TO REPLY IN
$formreplythreadid = "12345";

//FORUM ID WHERE THE EXISTING THREAD IS IN
$formreplyforumid = "456";

////////////////////////////////////////////////////////////////////////////////////////////////////

//ENABLE FORM TO BE PMED - 1 = yes, 0 = no
$formpm = "0";

//USERID TO PM TO
$formpmid = "1";

////////////////////////////////////////////////////////////////////////////////////////////////////

//ENABLE FORM TO BE EMAILED - 1 = yes, 0 = no
$formemail = "0";

//EMAIL ADDRESS TO EMAIL TO
$formemailaddress = "youremail@yourforums.com";

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//REDIRECT OPTIONS:
// 0 - thank you message
// 1 - redirect to post
// 2 - redirect to thread
// 3 - redirect to forum
// 4 - redirect to editpost to upload attachments
//
// Feel free to change the thank you message if you choose option 0
////////////////////////////////////////////////////////////////////////////////////////////////////

$redirectoption = "0";

$errormessage = "Thank you for submitting this form!"; //This is the thank you message

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//FORCE USER TO ANSWER ALL QUESTIONS - 1 = yes, 0 = no
////////////////////////////////////////////////////////////////////////////////////////////////////

$answerall = "0";

////////////////////////////////////////////////////////////////////////////////////////////////////
//TITLE OF FORM (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////

$formtitle = "Generic Form";

////////////////////////////////////////////////////////////////////////////////////////////////////
//PURPOSE OF FORM (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////

$formpurpose = "The purpose of this form is to allow you to submit a form, and this form will be made into a thread in a particular forum, or be PMed to a moderator or be emailed to a moderator.";

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//NORMAL INPUT BOX : QUESTION 1 (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////

$normalquestion1 = "What is the meaning to life?";

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//RADIO BOX CHOICES : QUESTION 1 (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////

$radioquestion1 = "Choose one of the following choices";

// The following choices must NOT have quotation marks
$radiochoice1a = "yes";
$radiochoice1b = "no";

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//RADIO BOX CHOICES : QUESTION 2 (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////

$radioquestion2 = "Choose another one of the following choices";

// The following choices must NOT have quotation marks
$radiochoice2a = "good";
$radiochoice2b = "bad";
$radiochoice2c = "both";

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//RADIO BOX CHOICES : QUESTION 3 (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////

$radioquestion3 = "Is it yes or no? If yes, please elaborate";

// The following choices must NOT have quotation marks
$radiochoice3a = "yes";
$radiochoice3b = "no";

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//QUESTION 1 (do not use quotation marks or you will get a parse error)
$question1 = "What is your name?";
$explain1 = "Please enter your real name here.";

//QUESTION 2 (do not use quotation marks or you will get a parse error)
$question2 = "What is your email?";
$explain2 = "Please enter your real email here.";

//QUESTION 3 (do not use quotation marks or you will get a parse error)
$question3 = "What is your website?";
$explain3 = "Please enter your URL here.";

////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
//LONG TEXT AREA INPUT: QUESTION 1 (do not use quotation marks or you will get a parse error)
////////////////////////////////////////////////////////////////////////////////////////////////////

$longquestion1 = "Please write down a paragraph about yourself.";
$longexplain1 = "For example, a bit about your experience in this area.";

////////////////////////////////////////////////////////////////////////////////////////////////
////// END OF CUSTOMIZATION ////////////////////////////////////////////////////////////////////
///// DO NOT CHANGE BELOW UNLESS YOU KNOW WHAT YOU ARE DOING!!! ////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////


In diesem Bereich kannst du deine Einstellungen festlegen das meiste ist ja gut kommentiert

metulsky
15.08.2005, 22:18
ja, aber wo speicher ich die ? in welchem verzeichnis ???

Metro Man
15.08.2005, 22:21
lade die Datei einfach in das Hauptverzeichniss deines Forums hoch

metulsky
15.08.2005, 22:29
tut mir echt leid, dass ich sooo unwissend bin, aber wo ist template hinzufuegen ?

bei mir gibt es nur :
styles und template und da kann ich nur templates durchsuchen und aktualisierte templates suchen ....

sonst finde ich nix ??

Metro Man
15.08.2005, 22:33
So also bei dir im Admin Center

Styles & Templates -> Styles verwalten -> dort findest du bei deinem style ne auswahlbox dort gibt es ne option "Neues Template hinzufügen"

metulsky
15.08.2005, 22:39
vielen dank fuer die geduld - hat geklappt !

jetzt muss ich nurnoch die php anpassen und schauen, ob es klappt....

wenn ich haenge melde ich mich nochmal - hoffe das ist ok !?

Metro Man
15.08.2005, 22:40
kein Problem bin noch ne Stunde da denke ich, bei Fragen immer her damit :)

metulsky
16.08.2005, 09:41
hi !

hat alles geklappt, funktioniert jetzt auch - bis auf das ich eine fehlermeldung bekomme :
--------------------
Datenbankfehler in vBulletin 3.0.8:

Ungueltige SQL-Abfrage: INSERT INTO post (postid,threadid,title,username,userid,dateline,pagetext,allowsmilie,showsignature,ipaddress,iconid, visible) VALUES (NULL,'3','wmmadmin Termin','wmmadmin','1','1124177643','Termin
wmmadmin

What is the meaning to life?
sfsdfsdfsdf

Choose one of the following choices
yes

Choose another one of the following choices
good

Is it yes or no? If yes, please elaborate
yes


What is your name?
sdfsdf

What is your email?
sdfsdf

What is your website?
sdfsdf

-----------------------------------------------------
Please write down a paragraph about yourself.

sdfsdfsdf

------------------------------------------------------

','1','1','0','0','1')
mysql error: Table 'd0019cbe.post' doesn't exist

mysql error number: 1146

Datum: 16.08.2005 09:34:03
Skript: http://www.wermachtmit.de/forum/form.php
Referer: http://www.wermachtmit.de/forum/form.php
Benutzername: wmmadmin
IP-Adresse: .................


---------------------------

was mache ich da falsch ?

dies sind meine einstellungen der php datei :


////////////////////////////////////////////////////////////////////////////////////////////////////
//CHOOSE WHETHER YOU WANT FORM TO BE POSTED IN A NEW THREAD, NEW POLL, REPLY TO EXISITING THREAD, PMed OR EMAILED
///////////////////////////////////////////////////////////////////////////////////////////////////

//ENABLE FORM TO BE POSTED - 1 = yes, 0 = no
$formforum = "1";

//FORUM TO POST NEW THREAD IN
$formforumid = "2"; ------------> was muss hier rein ?

//ENABLE POLL TO BE CREATED - 1 = yes, 0 = no
$formpoll = "0";
$formoption1 = "Yes";
$formoption2 = "No";

////////////////////////////////////////////////////////////////////////////////////////////////////

//ENABLE FORM TO REPLY TO EXISTING THREAD
$formreply = "1"; ------------> was muss hier rein ?
[/CODE]
//EXISTING THREAD ID FOR FORM TO REPLY IN
$formreplythreadid = "3"; ------------> was muss hier rein ?

//FORUM ID WHERE THE EXISTING THREAD IS IN
$formreplyforumid = "2"; ------------> was muss hier rein ?

////////////////////////////////////////////////////////////////////////////////////////////////////

//ENABLE FORM TO BE PMED - 1 = yes, 0 = no
$formpm = "0";

//USERID TO PM TO
$formpmid = "1";

////////////////////////////////////////////////////////////////////////////////////////////////////

//ENABLE FORM TO BE EMAILED - 1 = yes, 0 = no
$formemail = "0";

//EMAIL ADDRESS TO EMAIL TO
$formemailaddress = "youremail@yourforums.com";



bin etwas ratlos....

StGaensler
16.08.2005, 10:02
Benutzt du ein Tabellen-Präfix? Wenn ja, dann solltest du das entweder in den Einstellungen des Hacks noch eintragen, oder der Hack unterstützt das nicht.

metulsky
16.08.2005, 10:09
was ist ein tabellenpraefix ?

(bin neuling - habe wenig ahnung)

ich will mit dem ding ueber ein definiertes formular ein thema im jeweiligen thread erzeugen....

ist das ueberhaupt so moeglich ?

oder kann ich ggf. auch die funktion "neues thema" so modifizieren, das dort ein formulaar aufgewrufen wird ?

metulsky

Metro Man
16.08.2005, 10:20
ein tabellenprefix ist zb vb3_ oder vbtest_ das ganze siehst du vor deinen tabellen in der datenbank

StGaensler
16.08.2005, 10:24
Genau. Die Tabellen heißen dann z.B. nicht mehr "post" (wie das Script meint), sondern "vb3_post". Das kannst du in der config.php einstellen.