Advanced search  

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

Pages: [1]   Go Down

Author Topic: How do I add Smileys to the {CAPTION} section ?  (Read 4909 times)

0 Members and 1 Guest are viewing this topic.

popupbob

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
How do I add Smileys to the {CAPTION} section ?
« 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 :)
« Last Edit: February 06, 2007, 08:08:11 am by GauGau »
Logged

Nibbler

  • Guest
Re: How do I add Smileys to the {CAPTION} section ?
« Reply #1 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'])),
        );
Logged

popupbob

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: How do I add Smileys to the {CAPTION} section ?
« Reply #2 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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: How do I add Smileys to the {CAPTION} section ?
« Reply #3 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". In the future, please start your threads on the proper sub-board in the first place ;).
« Last Edit: February 06, 2007, 08:42:37 am by GauGau »
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 20 queries.