Sorry, ze az teraz... ale vcera som musel naformatovat disk.
Tu je uz funkcny vysledok (inkriminovana cast kodu):
Kód: Vybrať všetko
// Display write new message form
if ($_GET['new_message'] == "TRUE") {
// Display a Form for submitting a new message
$output .= "<table width='100%'><tr><td>";
$output .= "<script language='JavaScript' type='text/javascript'> function emoticon(text) { var txtarea = document.post.message; text = ' ' + text + ' '; if (txtarea.createTextRange && txtarea.caretPos) { var caretPos = txtarea.caretPos; caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? caretPos.text + text + ' ' : caretPos.text + text; txtarea.focus(); } else { txtarea.value += text; txtarea.focus(); } } </script>";
$output .= "<form action='' method='post' name='post' onsubmit='return checkForm(this)'>";
$output .= "<input type='hidden' name='id' value='$pageid' />";
$output .= "<input type='hidden' name='submitted' value='$submitted' /><center>";
$output .= $_lang_guestbook["name_or_alias"]."<br /><center><input name='subject' size='40' /><br /><br />";
$output .= "<a href=\"javascript:emoticon(':D')\"><img src='assets/images/wink.gif' alt''></a>";
$output .= "<br /><br /><center>".$_lang_guestbook["message"]."<br /><center><text"."area rows='8' cols='50' name='message'></"."text"."area>";
$output .= "<br /><br /> <input type='submit' name='submit' value='".$_lang_guestbook["send"]."' />";
$output .= " <input type='reset' name='reset' value='".$_lang_guestbook["reset"]."' />";
$output .= " <input type='button' value='".$_lang_guestbook["cancel"]."' onClick=\"window.location.href='$pageurl&new_message=FALSE'\">";
$output .= "</form>";
$output .= "</td></tr></table>";
}
Riadok:
Kód: Vybrať všetko
$output .= "<a href=\"javascript:emoticon(':D')\"><img src='assets/images/wink.gif' alt''></a>";
... uprav podla svojich smajlikov. Syntax (podla funkcie 'smile($text)' v snippete): ': D' je v tomto pripade kod smajlika a 'assets/images/wink.gif' cesta k nemu. Ak chces pridat dalsieho smajlika, tak pridaj riadok.
Subor '../assets/site/
gb.js' mozes kludne vymazat - uz sa nepouziva.
btw: Neskor toho poriesim viac. Aby bol formular viditelny vzdy (podla potreby), bezpecnostne overenie podla captcha obrazkoveho kodu (ochrana proti spammu), texy! syntax pisania prispevkov... ale to az na buduce.
