You are not logged in.
- Topics: Active | Unanswered
Pages: 1
#1 2010-02-08 15:20:49
- orkneywd
- Member

- Registered: 2008-05-10
- Posts: 96
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 ![]()
Offline
#2 2010-02-11 13:53:27
- Reines
- Lead developer

- From: Scotland
- Registered: 2008-05-11
- Posts: 3,140
- Website
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 ![]()
Offline
#3 2010-02-11 14:26:42
- orkneywd
- Member

- Registered: 2008-05-10
- Posts: 96
Re: forum_include
Excellent, just quickly tried it and worked great. Will play with it some more tonight, and tomorrow too ![]()
Offline
#4 2010-02-11 17:33:02
- orkneywd
- Member

- Registered: 2008-05-10
- Posts: 96
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?
Offline
#5 2010-02-11 17:53:06
- Reines
- Lead developer

- From: Scotland
- Registered: 2008-05-11
- Posts: 3,140
- Website
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.
Offline
#6 2010-02-12 15:31:05
Offline
Pages: 1
