anpera.net https://anpera.dyndns.org/phpbb3/ |
|
MotD Präfixe https://anpera.dyndns.org/phpbb3/viewtopic.php?f=34&t=1461 |
Seite 1 von 1 |
Autor: | Kevz [ So 19 Jun, 2005 12:25 ] |
Betreff des Beitrags: | MotD Präfixe |
MotD Präfixe, damit kann man an jede MotD die man schreibt so wie Umfragen, einen Prefix dranhängen, die bei den Spieleinstellungen selbsteingestellt werden können ![]() Installation: SQL: $this->bbcode_second_pass_code('', 'ALTER TABLE `motd` ADD `motdprefix` VARCHAR( 30 ) NOT NULL ;') motd.php Suche: [php]function motditem($subject,$body){ output("`^`b$subject`b`0",true); // zeile 10-11[/php] Ersetze: [php]function motditem($subject, $body, $prefixe){ output("`^`b $prefixe $subject`b`0",true);[/php] Suche: [php]output("<input type='text' size='50' name='subject' value=\"".HTMLEntities(stripslashes($_POST[subject]))."\">`n",true);[/php] Ersetze: [php]//motdprefixe [© 2005 by Day] $prefixe = explode('|', getsetting('motdprefixe','|Wichtig|Ankündidung')); output("<select name='prefix'>",true); while (list($key,$val)=each($prefixe)){ output("<option value='$val'>$val</option>",true); } output("</select>",true); output("<input type='text' size='39' name='subject' value=\"".HTMLEntities(stripslashes($_POST[subject]))."\">`n",true); //end[/php] Suche: [php]$sql = "INSERT INTO motd (motdtitle,motdbody,motddate) VALUES (\"$_POST[subject]\",\"$_POST[body]\",now())";[/php] Ersetze: [php]//motdprefixe [© 2005 by Day] if($_POST[prefix]>"") $_POST[prefix]=$_POST[prefix].':'; $sql = "INSERT INTO motd (motdtitle,motdbody,motddate,motdprefix) VALUES (\"$_POST[subject]\",\"$_POST[body]\",now(),\"$_POST[prefix]\")"; //end motdprefixe[/php] configuration.php Suche: [php]"dailyspecial"=>"Heutiges besonderes Ereignis",[/php] Darunter: [php]"motdprefixe"=>"MotDPrefixe (Trenne die Prefixe mit \"|\" ),",[/php] Have Fun ![]() |
Seite 1 von 1 | Alle Zeiten sind UTC + 1 Stunde |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |