hyder7nh Posted December 24, 2011 Share Posted December 24, 2011 Hello there guys, i have a client who wanted to edit his template files for the web hosting plans and homepage himself because he does not want to mess around with the code. So the way to do this is obviously php, mysql and a wysiwyg. So i built him a admin panel of my own to edit his templates, i created a database, put the content(html) of the tpl files in there, a login script and tinymce and post forms and all that and made a template editor for him. But its useless unless the tpl files get updated, if they dont get updated the changes made in the panel i made him wont reflect in the whmcs site. So the way to do this is to use php inside the tpl files and pull the html from mysql. But sadly php does not work inside tpl files. ive used {php}code{/php} {literal}code{/literal} and tried include as well, but no luck. My client is using ScriptHost(premium template which he bought) So id like to know how to add php in there. I also read something about creating smarty mod and then using smarty values in there, can someone tell me further about this. Im completely lost about smarty mods and stuff. 0 Quote Link to comment Share on other sites More sharing options...
WebsiteIntegrations Posted December 24, 2011 Share Posted December 24, 2011 when you tried include did you do it like this {php} include ('../inc/file.php'); {/php} 0 Quote Link to comment Share on other sites More sharing options...
hyder7nh Posted December 24, 2011 Author Share Posted December 24, 2011 No, but i just tried it now and it does not work. this is the website http://www.one2onehost.com As you can see, only the header and footer are there. im trying to pull the homepage content into the tpl file but its not working. 0 Quote Link to comment Share on other sites More sharing options...
WebsiteIntegrations Posted December 24, 2011 Share Posted December 24, 2011 well its hard for me to diagnosis on a forum - but i have used that before on many sites. maybe he should have used wordpress 0 Quote Link to comment Share on other sites More sharing options...
hyder7nh Posted December 24, 2011 Author Share Posted December 24, 2011 wtf dude, lol, please help ;3 0 Quote Link to comment Share on other sites More sharing options...
hyder7nh Posted December 24, 2011 Author Share Posted December 24, 2011 allright ive got it working but now variables such as $systemurl and stuff are not being understood by the file and so linking and stuff does not fully work, so id appreciate it if you told me how i can make those variables work. Right now im just linking the stuff manually without using $systemurl 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.