Jump to content

PHP Inside TPL Files


hyder7nh

Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated