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: How do I add Smileys to the {CAPTION} section ?  (Read 4727 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.024 seconds with 19 queries.