NineChime forum

Furry stuff, oekaki stuff, and other stuff.

You are not logged in.

Post a reply

Write your message and submit
Options
Humanity test

What is seven + one?

Go back

Topic review (newest first)

avch
07-10-2009 13:20:14

Thank you so much! It works perfectly now!

Waccoon
07-10-2009 03:50:54

Hmm... the code works fine for me.  That error usually means a quote or double quote got messed up.  Here, I put it in a file, so it'll be easier to copy/paste into the page you're making:  (code)

avch
07-09-2009 13:55:31

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

Waccoon
07-09-2009 01:17:38

Nope, that is missing a curly bracket.  Here is the full code, with some more comments:

Code:

<?
// 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 />
<? } ?>
avch
07-08-2009 14:41:04

Ah, thank you so much! One thing, where should the code end in the "print smilies" code? I was guessing this

Code:

<?
// 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);
?>
Waccoon
07-08-2009 04:44:12

That has to be coded into the board.  You can copy/paste the smilies rendering code from "comment.php".  Just search for "print smilies" to find it.

avch
07-07-2009 22:45:52

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?

avch
07-07-2009 18:59:02

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. =\

Board footer

Yep, still running PunBB
© Copyright 2002–2008 PunBB