Furry stuff, oekaki stuff, and other stuff.
You are not logged in.
Hi, I was playing around with the smilies hack in hack.php, and I was wondering if I could add more than what's on the smilies list? I tried, but it does not show up at all. =\
D'OH! Never mind, I figured t out, sorry about that. Although, I have another question, how do I add the smilies on a separate page within Wacintaki? You know, with a link to the smilies at the top?
Ah, thank you so much! One thing, where should the code end in the "print smilies" code? I was guessing this
<? // Print smilies $q = count ($smilies_group); if (defined('MAX_SMILIES') && MAX_SMILIES < $q) { $q = MAX_SMILIES; } if ($cfg['smilies'] == 'yes' && $q > 0) { reset ($smilies_group); for ($i=0; $i < $q; $i++) { list ($s_code, $s_img) = each ($smilies_group); ?>
Nope, that is missing a curly bracket. Here is the full code, with some more comments:
<? // Print smilies // Make sure we don't print too many $q = count ($smilies_group); if (defined('MAX_SMILIES') && MAX_SMILIES < $q) { $q = MAX_SMILIES; } // If smilies are enabled if ($cfg['smilies'] == 'yes' && $q > 0) { // Start at the beginning of the array ("each" requires this) reset ($smilies_group); // For each smiley for ($i=0; $i < $q; $i++) { list ($s_code, $s_img) = each ($smilies_group); // Print the HTML code for one smiley ?> <img onclick="insertText('comment', ' <?=$s_code?> ');" onmouseover="if (style.cursor) style.cursor='hand';" src="./smilies/<?=$s_img?>" alt="<?=$s_code?>" /> <? // Wrap smilies so they don't form uneven lines across the screen if ($breakpoint > 0) { if (($i % $breakpoint) == $breakpoint - 1) { // End the line, and start a new line echo "<br />\n"; } } } ?> <br /> <? } ?>
Offline
Thank you for the code! But, now when I put the code it in it's own page, I get this error when I click the link
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING