Hello,

I have a site running on Drupal 5.5 on LAMP platform. I have installed and enabled the htmlbox module for all users.

The site uses a custom theme, say ABC, derived from the contributed Siberia theme. In my custom theme there are no changes accept I have added a node-news.tpl.php

If I apply any of the default or contributed themes the textboxes are enabled with htmlbox. When I apply the custom theme ABC the textboxes do not display the htmlbox buttons (ie htmlbox is not enabled). I checked all the permissions and also tried entering the #id of the textarea in htmlbox configuration.

Can you please tell me if I have to implement something in my custom theme to turn on htmlbox.

Thanks.

Comments

Poetro’s picture

HTMLBox uses it's CSS to display the buttons, named htmlbox.css in the module directory. If your theme do not add the module CSS files to the <head> section of the theme, no module CSS files will be visible in your theme. You may have missed the print $styles; from page.tpl.php

user901’s picture

Hello,

Thanks for the quick response.

I checked page.tpl.php it has the following lines

  <?php print $head; ?>
  <?php print $styles; ?>
  <?php print $scripts; ?>

Also when I do a view source on any page on the site I see

<style type="text/css" media="all">@import "/test55/sites/all/modules/htmlbox/htmlbox.css";< /style>
......
......
<script type="text/javascript" src="/test55/sites/all/modules/htmlbox/htmlbox.js">< /script>
<script type="text/javascript">Drupal.extend({ settings: { "htmlbox": { "newline_removal": true } } });< /script>

Is there any other resource that is needed for htmlbox to work?

Thanks.
[I forgot to mention this earlier, I have downloaded the module again, installed it , tried it on different sites and also tried it from both IE and FF]

Poetro’s picture

What should be on the page with HTMLBox visible there:

<style type="text/css" media="all">@import "/sites/all/modules/htmlbox/htmlbox.css";</style>
<script type="text/javascript" src="/sites/all/modules/htmlbox/htmlbox.js"></script>
<script type="text/javascript">Drupal.extend({ settings: { "htmlbox": { "newline_removal": false } } });</script>

and something similar to this at the end of page, near the </body>

<script type="text/javascript">$(function () { $("#edit-code").each(function () {$(this).htmlbox().button("bold").button("italic").button("separator_dots").button("hyperlink").button("separator_dots").button("ul").button("ol").button("code").button("separator_dots").button("indent").button("outdent").button("separator_dots").button("pre").button("html").button("headers").init();})});</script>
user901’s picture

I do not have the second part of the script calling the $(function () { $("#edit-code") on my page. What should I change to get that on my page?

Also I have a < script> call to google analytics near the < /body> tag, I hope that does not hamper in anyway.

Thanks for your help.

user901’s picture

Hello,

Yesterday I upgraded to version 5.x-1.0 to make sure I have the latest code. The behavior is still the same.

Please let me know the next steps.

Thanks.

Poetro’s picture

The 1.0 version had a stupid bug (sorry about that), fixed in 5.x-1.0-1.
Let me know if there is still an issue.

user901’s picture

Yes, the issue is still there, I do not see the script call at the bottom of the page (near the closing body tag).

Thanks.

Poetro’s picture

Oh, I finally got it... the page.tpl.php is missing the print $closure from the bottom of the file, just before the </body>

user901’s picture

Thanks a lot.

That worked, I can now see the htmlbox.

Regards.

Poetro’s picture

Assigned: Unassigned » Poetro
Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.