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

get tpl file contents problem

 
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 -> Plugins
View previous topic :: View next topic  
Author Message
Ori The Man
Smarty n00b


Joined: 05 Sep 2012
Posts: 1

PostPosted: Wed Sep 05, 2012 11:16 pm    Post subject: get tpl file contents problem Reply with quote

hi,
i'm new with smarty,
i want to make plugin that check if in every tpl file have my own tag like {ori}
and to compare the value of the tag with other value,
if its equal continue if not abort the script (die)
if the tag is not ther die to
i'm tring to get the content of the tpl file and to get the tag by:

Code:
$file = file_get_contents("file.tpl");
if(!strpos($file, "{ori}")) {
echo "String not found!";
}
else
{
   echo "Found!";
}


how can i make it?
if you have doc's that could help to make smarty plugin post here Smile
thanks (sorry for the english)
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 -> Plugins 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