Check for keyword in $template_display_media? Check for keyword in $template_display_media?
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

Check for keyword in $template_display_media?

Started by nickelas, February 20, 2011, 10:08:29 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

nickelas

I've inserted some html on the sides of the intermedia picture - excellent documentation by the way. I want to check for some keywords and then customize the html when a keyword is found. Is it possible to add php-code to $template_display_media that checks for a specific keyword?
Thanks,
http://uppsalafoto.se/galleri/
Human

nickelas

Ah, $template_display_media is not for php. I am guessing I have to do some reading up on where I can put php that checks keywords (than use that info in $template_display_media?). Any pointers?
Thanks
Human

ΑndrĂ©

I suggest to just add placeholders in $template_display_media and replace them with your actual content in the function theme_html_picture like it's done for the other placeholders:
    $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']),
        );

nickelas

Thanks! got it finally
So what I did was to put a token {SOMETHING} in $template_display_media. Then in theme_html_picture I put something in it: '{SOMETHING}' => "SOMETHING",
Human