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

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

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 ;).