xoops forums

vadimv82

Just popping in
Posted on: 2010/6/9 7:43
vadimv82
vadimv82 (Show more)
Just popping in
Posts: 16
Since: 2008/9/9 9
#1

Template preview problem

When i try to preview template of a module it is blank.
Any way to preview template?

webmystar

Friend of XOOPS
Posted on: 2010/6/9 7:48
webmystar
webmystar (Show more)
Friend of XOOPS
Posts: 415
Since: 2008/6/23
#2

Re: Template preview problem

perhaps a bug in the template. please enable the debug - on mode.

vadimv82

Just popping in
Posted on: 2010/6/9 8:19
vadimv82
vadimv82 (Show more)
Just popping in
Posts: 16
Since: 2008/9/9 9
#3

Re: Template preview problem

I use Xoops 2.4.4

And yes i made debug mode to be ON.
But there is no any errors.

And it is not just a single template not working, i can't preview any of templates. Means there is something wrong with template preview engine or canvas.

vadimv82

Just popping in
Posted on: 2010/6/9 8:50
vadimv82
vadimv82 (Show more)
Just popping in
Posts: 16
Since: 2008/9/9 9
#4

Re: Template preview problem

I made fresh install of Xampp.
PHP: 5.3.1

Fresh install of Xoops 2.4.4
Install went well, not a single warning or error.

Template preview is not working.

Anybody wanna check?

bjuti

Just can't stay away
Posted on: 2010/6/9 14:59
bjuti
bjuti (Show more)
Just can't stay away
Posts: 871
Since: 2009/1/7 2
#5

Re: Template preview problem

It never worked for me :) AFAIK from the 2.0.16 or even lower version :)

ghia

Community Support Member
Posted on: 2010/6/9 23:08
ghia
ghia (Show more)
Community Support Member
Posts: 4954
Since: 2008/7/3 1
#6

Re: Template preview problem

Try the following modification in /modules/system/admin/tplsets/main.php around lines 1200 in the
case 'previewtpl':

section :
$csscount count($css);
//+gv001 Missing start tag?
$dummylayout .= "<style>"
//-gv001 Missing start tag?
for ($i 0$i $csscount$i++) {

Move these lines
$lines preg_split("/(rn|r|n)( *)/"$xoopsTpl->fetch('file:'.XOOPS_CACHE_PATH.'/'.$dummyfile));
$xoopsTpl->clear_compiled_tpl('file:'.XOOPS_CACHE_PATH.'/'.$dummyfile);
unlink(XOOPS_CACHE_PATH.'/'.$dummyfile);

from before
foreach ($lines as $line) {
to before
include_once XOOPS_ROOT_PATH.'/modules/system/admin/tplsets/tplform.php';

vadimv82

Just popping in
Posted on: 2010/6/14 8:21
vadimv82
vadimv82 (Show more)
Just popping in
Posts: 16
Since: 2008/9/9 9
#7

Re: Template preview problem

Yes, it works! Thnx a lot!