smiles in pictur view q2 smiles in pictur view q2
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

smiles in pictur view q2

Started by tiptipon, September 15, 2006, 12:32:48 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

tiptipon

hello agine
thenk you for youre last answer ;D it help me a lot :D

i have edit some of my smiles/icons in the coppermine/include/smilies.inc.php
and they all appear in one row :'(.
were and how can i edit the file to split the icons to more rows like evry 18 icons per a row?

tiptipon
;D

tiptipon

hey gismo

still need help for that topic

please help me

tiptipon

Sami

You need to edit your smiles.inc.php and add a counter to foreach statment to add a <tr> after 18 smiles
‍I don't answer to PM with support question
Please post your issue to related board

tiptipon

hello bmossavari

i am sorry but i didnt anderstand you at all

if you be abel to put youre answer in deatails and exampls so i can do what needs to be done

thenks

tiptipon


Sami

#4
Use this new generate_smilies function  instead of yours under smilies.inc.php

function generate_smilies($form = 'post', $field = 'message')
{
    global $THEME_DIR;
    $smilies = get_smilies_table2();
    $paths = array($THEME_DIR.'/smiles/','images/smiles/');

    if (function_exists('theme_generate_smilies'))
    {
        $html = theme_generate_smilies($smilies, $form);
    }
    else
    {

        $html = '<table width="100%" border="0" cellspacing="0" cellpadding="0">' . "\n" . '        <tr align="center" valign="middle">' . "\n";
        $c=0;
        foreach($smilies as $smiley) {
            $c=$c+1;
            $smile_path = (file_exists($paths[0].$smiley[1]))?($paths[0]):($paths[1]);
            $caption = $smiley[2] . " " . $smiley[0];
            if($c >= 19){
                $html .= '</tr><tr>' . "\n";
                $c=0;
             }
           
$html .= '                <td width="5%"><img src="images/smiles/' . $smiley[1] . '" alt="' . $caption . '" width="15" height="15" border="0" style="cursor:pointer;" title="' . $caption . '" onclick="javascript:emoticon_' . $form . '(\'' . $smiley[0] . '\')" /></td>' . "\n";
        }

        $html .= '        </tr>' . "\n" . '</table>' . "\n";
    }

    $html .= <<<EOT

<script language="JavaScript" type="text/javascript">
<!--
function emoticon_$form(text) {
        text = ' ' + text + ' ';
        if (document.$form.$field.createTextRange && document.post.message.caretPos) {
                var caretPos = document.$form.$field.caretPos;
                caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
                document.$form.$field.focus();
        } else {
                document.$form.$field.value  += text;
                document.$form.$field.focus();
        }
}

I don't test it cause I don't have my test bed , report back the result...
‍I don't answer to PM with support question
Please post your issue to related board

tiptipon

i copy that to the file and got blank page
i replaced it and still got blank page

Sami

I've changed some code on my post try it again with the new code
sorry as I said before I don't have my test bed so I can't debug my code now
‍I don't answer to PM with support question
Please post your issue to related board

tiptipon

no no i am very so sory

it works!

i copy before and i copy it the wrong way

it work fantastic just as i wonted

thankyou very mach

tiptipon

Sami

‍I don't answer to PM with support question
Please post your issue to related board