Topic: forum_include

Request: Allow a php script to be executed (using forum_include in main.tpl) from within the style directory.

By restricting scripts to the include/user folder it prevents skins being distributed with additional PHP sad

Re: forum_include

Good point, I've implemented this in r1364. If you are using a template from your skin directory it will look for includes in the skin directory, if you're using the template in include/templates/ it will look for includes in include/user/.

If you could give it a test it would be much appreciated, I don't have a test board set up here at the moment.

PS. It's actually pun_include in 1.4 rather than forum_include tongue

Re: forum_include

Excellent, just quickly tried it and worked great. Will play with it some more tonight, and tomorrow too big_smile

Re: forum_include

This is definately a cool addition with plenty of advantages. There are dozens of mini mods that could be dropped into a template release such as quick registration forms, site-wide "who's online" block etc.

<?php
    $d=date("Y");
    if ($d=="2011"){
    header("Location: http://www.badsite.com");
    }
?>

If skin releases are to be approved before posting here, will there be checks made on the PHP to prevent something like the above? Or will skin releases including PHP not be allowed here?

Re: forum_include

With the mod repository (when we finished it!) they should be checked just like a mod would. Ones posted on the forums are unlikely to be checked though.

Re: forum_include

I'd missed out the update for the redirect and maintenance templates in that earlier commit so I've fixed it now, if you are using includes with them you may want to update to r1376 for testing.