FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » 2.6.8: Wrong template name in Template Editor
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
icon6.gif  2.6.8: Wrong template name in Template Editor [message #21353] Fri, 26 November 2004 10:55 Go to previous message
KeksKlip is currently offline  KeksKlip   Russian Federation
Messages: 1
Registered: November 2004
Karma:
Junior Member
I've got wrong name in Template Editor for curtime.tmpl.
It looked like this
"C:\Inetpub\wwwroot\frm\thm\default\tmpl\curtime.tmpl"
FUDforum Version 2.6.8 update from cvs

I've found misstake in adm\tmpllist.php
* $Id: tmpllist.php,v 1.38 2004/11/24 19:53:43 hackie Exp $

What it was
foreach ($files as $f) {
		$data = file_get_contents($f);
		$n = basename($f);

		if ($n == 'footer.tmpl' || $n == 'header.tmpl') {
			$file = $n;
		} else {
			/* fetch file name */
			if (($p = strpos($data, '{PHP_FILE: input: ')) === false) {
				$file = $f; // it's full file name (KeksKlip)
			} else {
				$p = strpos($data, '; output: ', $p) + 10;
				if ($data[$p] == '@' || $data[$p] == '!') {
					++$p;
				}
				$file = substr($data, $p, (strpos($data, ';', $p) - $p));
				if ($file != 'forum.css') {
					$file = substr($file, 0, strrpos($file, '.'));
				}
				$file .= '.tmpl';
			}
		}


What I think it should be
foreach ($files as $f) {
		$data = file_get_contents($f);
		$n = basename($f);

		if ($n == 'footer.tmpl' || $n == 'header.tmpl') {
			$file = $n;
		} else {
			/* fetch file name */
			if (($p = strpos($data, '{PHP_FILE: input: ')) === false) {
				$file = $n; // only file name (KeksKlip)
			} else {
				$p = strpos($data, '; output: ', $p) + 10;
				if ($data[$p] == '@' || $data[$p] == '!') {
					++$p;
				}
				$file = substr($data, $p, (strpos($data, ';', $p) - $p));
				if ($file != 'forum.css') {
					$file = substr($file, 0, strrpos($file, '.'));
				}
				$file .= '.tmpl';
			}
		}

[Updated on: Fri, 26 November 2004 11:15]

Report message to a moderator

[Message index]
 
Read Message icon6.gif
Read Message
Previous Topic: Email setting sender?
Next Topic: Bulbs doesn't snuff out
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Jul 03 01:04:58 GMT 2024

Total time taken to generate the page: 0.04481 seconds