1 (edited by Kushi 2012-02-08 13:43)

Topic: Hook is variable

Hello!
I'm trying to edit parser.php, and there's a hook

$return = ($hook = get_hook('ps_handle_img_tag_end')) ? eval($hook) : null;

And well, as far as i understand, whole content of <hook id="ps_handle_img_tag_end"> is signed to variable $result.

So I'm trying something like this

            <hook id="ps_handle_img_tag_end"><![CDATA[
            '<span class="postimg"><a rel="example_group" href="'.$url.'"><img src="'.$url.'" alt="'.forum_htmlencode($alt).'" /></a></span>';
            ]]></hook>

But it doesn't work.
I've also tried

            <hook id="ps_handle_img_tag_end"><![CDATA[
            if (!$is_signature && $forum_user['show_img'] != '0') {
            $return = '<span class="postimg"><a rel="example_group" href="'.$url.'"><img src="'.$url.'" alt="'.forum_htmlencode($alt).'" /></a></span>';
            }
            ]]></hook>

cause I need this conditional, but it also doesn't work. What I am doing wrong?

If any of my dropbox link fails with 404 error, change dl.dropbox.com/u/56038890/punbb/*.zip in address to 82283017.

Currently working on rPlus - responsive theme for developers to create their own themes basing on this one.

2

Re: Hook is variable

Nevermind, I've solved it.

If any of my dropbox link fails with 404 error, change dl.dropbox.com/u/56038890/punbb/*.zip in address to 82283017.

Currently working on rPlus - responsive theme for developers to create their own themes basing on this one.