Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: smiles in pictur view q2  (Read 4689 times)

0 Members and 1 Guest are viewing this topic.

tiptipon

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
    • הפעוטון של טיפטיפון
smiles in pictur view q2
« on: September 15, 2006, 12:32:48 pm »

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
« Last Edit: September 17, 2006, 09:39:51 pm by GauGau »
Logged

tiptipon

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
    • הפעוטון של טיפטיפון
Re: smiles in pictur view q2
« Reply #1 on: September 17, 2006, 07:14:40 am »

hey gismo

still need help for that topic

please help me

tiptipon
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: smiles in pictur view q2
« Reply #2 on: September 17, 2006, 07:37:00 am »

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

tiptipon

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
    • הפעוטון של טיפטיפון
Re: smiles in pictur view q2
« Reply #3 on: September 17, 2006, 08:19:17 am »

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

Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: smiles in pictur view q2
« Reply #4 on: September 17, 2006, 08:51:28 am »

Use this new generate_smilies function  instead of yours under smilies.inc.php
Code: [Select]
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...
« Last Edit: September 17, 2006, 09:19:16 am by bmossavari »
Logged
‍I don't answer to PM with support question
Please post your issue to related board

tiptipon

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
    • הפעוטון של טיפטיפון
Re: smiles in pictur view q2
« Reply #5 on: September 17, 2006, 09:11:17 am »

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

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: smiles in pictur view q2
« Reply #6 on: September 17, 2006, 09:22:17 am »

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
Logged
‍I don't answer to PM with support question
Please post your issue to related board

tiptipon

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
    • הפעוטון של טיפטיפון
Re: smiles in pictur view q2
« Reply #7 on: September 17, 2006, 09:30:27 am »

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
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: smiles in pictur view q2
« Reply #8 on: September 17, 2006, 09:33:29 am »

Happy for you :)
Logged
‍I don't answer to PM with support question
Please post your issue to related board
Pages: [1]   Go Up
 

Page created in 0.025 seconds with 20 queries.