Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Restore template from .php cached file

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
mxc
Smarty Rookie


Joined: 25 Feb 2009
Posts: 5

PostPosted: Thu Nov 26, 2015 6:59 pm    Post subject: Restore template from .php cached file Reply with quote

Hello, everyone.

I have a problem. I have overwritten smarty template with an older file, and lost all the changes I made to template over the last year. But I have a .php file in "templates_c" directory, which is unchanged and contains the latest compile version.

The question is: is it possible to parse the code from .php file back to template file? I am using smarty 3.x version if that is important.

Thank you.
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Fri Nov 27, 2015 12:39 am    Post subject: Reply with quote

There's two kinds of system administrators.
Those making backups, and those now making backups.
Back to top
View user's profile Send private message
mxc
Smarty Rookie


Joined: 25 Feb 2009
Posts: 5

PostPosted: Fri Nov 27, 2015 2:27 am    Post subject: Reply with quote

Yeah, sure, thanks for help.
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Fri Nov 27, 2015 4:38 am    Post subject: Reply with quote

It is theoretically possible to reconstruct the template from compiled form.
But the amount of work required would likely equal creating a new template from scratch.
Back to top
View user's profile Send private message
bsmither
Smarty Elite


Joined: 20 Dec 2011
Posts: 322
Location: West Coast

PostPosted: Wed Dec 02, 2015 3:02 am    Post subject: Reply with quote

Actually, I think it would be rather easy. Tedious, yes, but otherwise very do-able.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP