I have set up a template variable called:
"tv_youtube" (Link) -> Contains a hyperlink reference to a youtube clip
I have a custom modifier which takes the output and strips out the ?watch part so I can use it to create a Flash player.
However, the custom modifier does not work. At all.
PHx is on, and the cache is cleared for both document and website.
I’ve done a custom modifier where I output the incoming input and do a simple test, neither of which work.
Can someone verify the solution to why these custom modifier tests do not output anything:
<p>
Youtube raw: [+tv_youtube+] -- This is fine and prints the value of the template variable<br />
Test: [+tv_youtube:test+] -- Nothing is returned <br />
Youtube urlencode:[+tv_youtube:urlencode+] -- Nothing is returned <br />
Get youtube: [+tv_youtube:get_youtube+] -- Nothing is returned.
</p>
The modifiers:
// phx:test
// This does even get outputted. The value of input and output are null
print 'Input: ' . $input;
print 'Output: '. $output;
// phx:urlencode
// Nothing s returned
$output = urlencode($output);
return ($output);
// phx:get_youtube
// It should do a print_r of all vars, but it doesn't do anything
$url = $output;
$parsed_url = parse_url($url);
parse_str($parsed_url[query], $parsed_query);
print_r($parsed_query);
//return ($parsed_query['v']);