Do you have a link of this shoutbox in action? Can we check it out? How do we make the db tables? Any chance somone can make a php file that will create these db alterations? TIA 🙂
Psst! Click mcmike’s name for his site, where you may just find what you’re looking for.
For creating the table, add the following into the start_shout()
function of the plugin’s php file (place it right after GLOBAL $_POST;
):
global $wpdb;
$wpdb->query("CREATE TABLE IF NOT EXISTS wp_roeptumaar (rid int(11) NOT NULL auto_increment, naam varchar(255) NOT NULL default '', http varchar(255) NOT NULL default '', email varchar(255) NOT NULL default '', text text NOT NULL, tijd int(11) NOT NULL default '0', PRIMARY KEY (rid)) ENGINE=MyISAM AUTO_INCREMENT=0");
Hi Kafkaesqui,
Thanks for the help. I copied and pasted the info to make the db but I am getting all kind of errors. Below is what I have:
//Actual updating information for the shoutbox…
function start_shout() {
GLOBAL $_POST;
global $wpdb;
$wpdb->query(“CREATE TABLE IF NOT EXISTS
wp_roeptumaar (rid int(11) NOT NULL auto_increment,
naam varchar(255) NOT NULL default ”, http varchar
(255) NOT NULL default ”, email varchar(255) NOT
NULL default ”, text text NOT NULL, tijd int(11)
NOT NULL default ‘0’, PRIMARY KEY (rid))
ENGINE=MyISAM AUTO_INCREMENT=0″);
if ($_POST[‘shout_naam’] != “” && $_POST[‘shout_text’] != “” && $_POST[‘shout_naam’] != “Je naam”) {
$tijd = time();
mysql_query(“INSERT INTO wp_roeptumaar (naam, http, email, text, tijd) VALUES (‘$_POST[shout_naam]’,’$_POST[shout_http]’,’$_POST[shout_mail]’,’$_POST[shout_text]’,’$tijd’)”);
}
}
NM, I figured the db part of it. I installed it on my test server (windows) with no problems. I uploaded the files to my linux host and when I add a shout it doesnt show. Also, how do you get the smiles to show?