This is tweak for universal tag for {url_filename} .
No more for need to go to includes/page_header.php file for add yourself.
Find:
if (!empty($additional_urls)) {
add before:
// Auto-use of {url_filename} uppon PHP ROOT files detection in HTML template files.
if (defined('ROOT_PATH') && @is_dir(ROOT_PATH) && @is_readable(ROOT_PATH)) {
$files_array = array("categories.php", "config.php", "config.new.php", "details.php", "index.php", "lightbox.php", "login.php", "logout.php", "member.php", "captcha.php", "register.php", "search.php", "top.php", "global.php", "download.php", "rss.php", "postcards.php");
$handle = @opendir(ROOT_PATH);
while (false !== ($file = @readdir($handle))) {
$content = @file_get_contents($file);
if ($file != "." && $file != ".." && $file != $files_array[0] && $file != $files_array[1] && $file != $files_array[2] && $file != $files_array[3] && $file != $files_array[4] && $file != $files_array[5] && $file != $files_array[6]
&& $file != $files_array[7] && $file != $files_array[8] && $file != $files_array[9] && $file != $files_array[10] && $file != $files_array[11] && $file != $files_array[12] && $file != $files_array[13]
&& $file != $files_array[14] && $file != $files_array[15] && $file != $files_array[16]
&& preg_match("/\.php$/", $file) && preg_match("/(.+)\.(.+)/", $file) && preg_match("/<[\?|%]+(php|=)?(.*)[\?|%]+>/siU", $content)) {
$file1 = substr($file, 0, -4);
$site_template->register_vars("url_" . $file1, (@file_exists(ROOT_PATH . $file1 . ".php")) ? $site_sess->url(ROOT_PATH . get_file_name(basename($file))) : "");
}
}
@closedir($handle);
unset ($files_array);
unset ($handle);
}
This is no affect core ROOT PHP files of 4images. If upload new PHP file in ROOT_PATH, you can use:
{url_your_new_file} in HTML template. No PHP skill need for add URL tag in template now.