Jump to content
MooMooHost

Question about modifying the template

Recommended Posts

Currently, I know I need to modify the .tpl files.

 

I have done so and am pretty satisfied with my current results, however, when I tried to put a script into a certain page, it does not load

 

It does work when I disable text rich editor, and paste the code in a knowledgebase article .

 

EG .

https://moomoohost.com/index.php?rp=/knowledgebase/4/Testimonials.html

 

However, when I paste it plainly in the .tpl file, I get nothing :(

 

The script in question is a widget from widgetpacks. The script goes something like

<script> bla bla bla bla </script>

 

Thanks in advanced :)

Share this post


Link to post
Share on other sites

My apologies I have an error log that is coupled with the page that i tried putting the script :

 

It is here

 

MooMoo

Smarty Error: Syntax error in template "file:/home/moomooho/public_html/templates/webhoster2/testimonial.tpl" on line 15 "wpac_init.push({widget: 'Comment', id: 6531});" - Unexpected ": ", expected one of: "}"

115.135.128.141

 

Sorry for the double post, I cannot edit the initial post

Share this post


Link to post
Share on other sites

if you're using a 3rd party theme, e.g webhoster, and you're trying to add pages to it - your best bet is to contact the developer.

 

and certainly if you're going to post here, we need to see code... a .tpl file by itself will likely need a corresponding php file.

Share this post


Link to post
Share on other sites

Ahh i'll get back at them :) I'll post the results soon in case anyone might have the same template and the same question :P

Share this post


Link to post
Share on other sites

Yes, the theme metro ( theme coder ) tried it too.

 

Said it doesnt work

Hello Sir,

 

I tried by using {literal} {/literal} tags but still not working, I would like to advise contact WHMCS support for this.

OR you may try by using hook.

 

Because its not seems template issue.

 

--

Thanks and Regards,

Theme Metro Team

 

Their English isn't that good, but I guess I'll stick with pasting the raw HTML into my knowledge base article haha :P

Share this post


Link to post
Share on other sites

try using {literal} tags just around those two opening js lines...

 

<div id="wpac-review"></div>
<script type="text/javascript">
{literal}
wpac_init = window.wpac_init || [];
wpac_init.push({widget: 'Review', id: 6643});{/literal}
... then rest of widget code

i've just quickly added that to homepage.tpl and it works fine.

 

... and Support wouldn't be an option - they'd just tell you it was a customisation and send you back to these forums, or tell you to get a developer... the hook idea would almost certainly work though.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

By using this site, you agree to our Terms of Use & Guidelines