[pmwiki-users] using PTVs from pagelists in skin scripts (or how to register a new PV)

a.sonderhoff at gassi-tv.de a.sonderhoff at gassi-tv.de
Sat May 12 02:20:02 CDT 2012


Dear Hans,

> I don't understand why you want to include a php script that way or
> any other way inside the tmpl file. The tmpl file is processed late,
> and you bound to have problems with the script.

The script is my own html5 video with flash fallback script. It serves the same mp4 as html5 video to safari and mobilesafari browsers and with a flash player to all others. I like to bundle it with the skin, because it’s an essential part of the skin. It’s not just _a_ player, it’s _the_ primary content object. To me it’s more elegant to have the script referenced in the skin’s template, because it’s not intended to be available as a markup to editors. Also I was counting on the tmpl file to be processed as late as possible.


> How do you load your custom skin?

config.php: $Skin = "someSkin";
and in /someSkin/someSkin.php: LoadPageTemplate($pagename, "$SkinDir/someSkin-someTemplate.tmpl");


> Please include the script in the same way as you would set your skin,

I rewrote the template script into a cookbook script and included it in config.php as Peter suggested. no luck there. apparently the problem is about setting PTVs from within a pagelist.

why does (:var: {=$:var}:) produce an epic fail, while (:title {=$:var}:) just works fine?


Thanks for helping me clarify the problem.

Take care,
Josh


> Hi Josh,
> 
>> Saturday, May 12, 2012, 7:11:23 AM, you wrote:
>> I will also look into triggering the script as a php markup script
>> (<!--markup:(:somescript:)--> instead of
>> <!--file:somescript.php-->). hopefully this workaround will solve
>> the order issues by having PmWiki figure them out.
>> 
> 
> Please include the script in the same way as you would set your skin,
> i.e. in config.php or a Group.php or Group.Name.php file in the
> local/ directory to load the skin and script for a page group "Group"
> or for a single page "Group.Name".
> How do you load your custom skin?
> 
> Best regards,
> Hans   
> www.softflow.co.uk



More information about the pmwiki-users mailing list