forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: popupbob on February 05, 2007, 10:41:12 pm

Title: How do I add Smileys to the {CAPTION} section ?
Post by: popupbob on February 05, 2007, 10:41:12 pm
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 :)
Title: Re: How do I add Smileys to the {CAPTION} section ?
Post by: Nibbler on February 05, 2007, 11:10:39 pm
Copy function theme_html_picture() from the sample theme's theme.php into your theme's theme.php and modify

Code: [Select]
    $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

Code: [Select]
    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'])),
        );
Title: Re: How do I add Smileys to the {CAPTION} section ?
Post by: popupbob on February 06, 2007, 01:09:39 am
..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
Title: Re: How do I add Smileys to the {CAPTION} section ?
Post by: Joachim Müller on February 06, 2007, 08:10:34 am
Thanks for resolving your thread.

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 (http://forum.coppermine-gallery.net/index.php?topic=14227.0)". In the future, please start your threads on the proper sub-board in the first place ;).