How do I add Smileys to the {CAPTION} section ? How do I add Smileys to the {CAPTION} section ?
 

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]

Main Menu

How do I add Smileys to the {CAPTION} section ?

Started by popupbob, February 05, 2007, 10:41:12 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

popupbob

Hi, I use the displayimage.php as profile page, and have {CAPTION} to contain the userprofile text.. the comment section works fine with smileys, but how do I integrate them into the {CAPTION} section too?

thanks in advance :)

Nibbler

Copy function theme_html_picture() from the sample theme's theme.php into your theme's theme.php and modify


    $params = array('{CELL_HEIGHT}' => '100',
        '{IMAGE}' => $CURRENT_PIC_DATA['header'].$CURRENT_PIC_DATA['html'].$CURRENT_PIC_DATA['footer'],
        '{ADMIN_MENU}' => $CURRENT_PIC_DATA['menu'],
        '{TITLE}' => bb_decode($CURRENT_PIC_DATA['title']),
        '{CAPTION}' => bb_decode($CURRENT_PIC_DATA['caption']),
        );


to


    require_once 'include/smilies.inc.php';

    $params = array('{CELL_HEIGHT}' => '100',
        '{IMAGE}' => $CURRENT_PIC_DATA['header'].$CURRENT_PIC_DATA['html'].$CURRENT_PIC_DATA['footer'],
        '{ADMIN_MENU}' => $CURRENT_PIC_DATA['menu'],
        '{TITLE}' => bb_decode($CURRENT_PIC_DATA['title']),
        '{CAPTION}' => process_smilies(bb_decode($CURRENT_PIC_DATA['caption'])),
        );

popupbob

..change "¤#  to   ('%&'), and it should work :)

Amazing, I spent weeks to try figure a way around it, and then you just change one single line and everything works :D

Thanks a lot Nibbler  (now I have to figure how to post some carma for you) hehe

Joachim Müller

#3
Thanks for resolving your thread.

Quote from: popupbob on February 06, 2007, 01:09:39 AM
Thanks a lot Nibbler  (now I have to figure how to post some carma for you) hehe
You can't. Only members of privileged groups can change karma. However, there are ways to contribute (and subsequently say thanks as well as being promoted to such a privileged group) - see "We need your help". In the future, please start your threads on the proper sub-board in the first place ;).