Page 1 of 1

How to return a deleted Template

Posted: Sat Nov 11, 2006 9:34 pm
by jackie
Hi,

I have deleted a template, I want to have back. Is there a possibility in CMSMS?

I can still see the number in the Admin Log.

THX

Re: How to return a deleted Template

Posted: Sat Nov 11, 2006 10:41 pm
by tsw
from backup.

you do have backups right ;)

if you dont ask your hosting company, it might cost a bit if they restore a backup...

Re: How to return a deleted Template

Posted: Sat Nov 11, 2006 10:48 pm
by jackie
yes, I´ve made a backup toda, the filesystem and the database, but I don´t want to put the whole thing back, because I´ve upgraded and worked quiet a bit.

Can I get the module straight out of the Backup

This ist the error messages

string(74) "Smarty error: unable to read resource: "module_db_tpl:MenuManager;abesit"" string(74) "Smarty error: unable to read resource: "module_db_tpl:MenuManager;abesit""

THX

Re: How to return a deleted Template

Posted: Sat Nov 11, 2006 10:51 pm
by tsw
if you did a mysqldump its a plaintext file, you should be able to find your template there and then create new one with the same name and copy paste the content from the dump file

Re: How to return a deleted Template

Posted: Sat Nov 11, 2006 10:59 pm
by jackie
I´ve tried this, searched for keywords in the dump, but I could´t find it

How is a module stored? Is there a section in the db?

What keywords do I have to use (see the error message above)?

THX

Re: How to return a deleted Template

Posted: Sat Nov 11, 2006 11:09 pm
by jackie
could it be this....


INSERT INTO `cms_module_templates` VALUES ('MenuManager', 'abesit', '{* CSS classes used in this template:\r\n.active - The active page in the horizontal menu (first level). \r\n.bullet_sectionheader - To style section header\r\nhr.separator - To style the ruler for the separator *} \r\n{if $count > 0}\r\n\r\n{foreach from=$nodelist item=node}\r\n{if $node->depth > $node->prevdepth}\r\n{repeat string="" times=$node->depth-$node->prevdepth}\r\n{elseif $node->depth prevdepth}\r\n\r\n{repeat string="" times=$node->prevdepth-$node->depth}\r\n\r\n{elseif $node->index > 0}\r\n{/if}\r\n{if $node->current == true or $node->parent == true}\r\nurl}" class="active"{if $node->target ne ""} target="{$node->target}"{/if}>{$node->menutext}\r\n{elseif $node->type == ''sectionheader''}\r\n{$node->menutext}\r\n{elseif $node->type == ''separator''}\r\n\r\n{else}\r\nurl}"{if $node->target ne ""} target="{$node->target}"{/if}>{$node->menutext}{/if}\r\n{/foreach}\r\n\r\n{repeat string="" times=$node->depth-2}\r\n\r\n{/if}\r\n', '2006-08-07 22:16:24', '2006-08-07 22:17:05');

Re: How to return a deleted Template

Posted: Sat Nov 11, 2006 11:20 pm
by jackie
Ok, it done, that was the statement

Thanks a lot. It´s back.