Hi

First of all, great theme, I love it! I'm trying to remove the javascript addition of the ALT/TITLE below images, I feel they are redundant for my website and structure. I don't want to hack the theme, so I would like to ask you for some guidance in removing it the correct way in my sub-theme. Is there a good way to do that?

It's these lines in script.js that I want to "unset" or "remove" or some other great expression.

  $(".field-type-image img").each(function (i, ele) {
    var alt = this.alt;
      if ($("img-caption").length == 0) {
        $(this).closest(".field-type-image .field-item").append("<span " +
          "class='img-caption'>" + this.alt + "</span>");
        }
        else {
          $(this).closest(".field-type-image .field-item").append("");
        }
  });

Yours truly
Adam

Comments

Danny Englander’s picture

Component: Miscellaneous » Code
Assigned: Unassigned » Danny Englander
Category: Support request » Feature request
Status: Active » Fixed

Hi Thanks for using Bamboo! I added a new theme setting for image captions, you can go into the theme settings UI and uncheck the box. Be sure to clear cache as well. This is in dev and will show up in 1.7 sooner or later. cheers!

AdamEvertsson’s picture

Wow. Nice going! Thank you very much! I'll update at once.

Yours truly
Adam

AdamEvertsson’s picture

Hi again

I've just tested this and it works great if you're using the theme as your default theme. Though, I've created a sub-theme and even if the checkbox for not having the captions added via javascript, it does so anyways, thus giving me a lot of captions. Any advise on how to solve it. Should I copy some files into the subtheme perhaps... if so, which ones?

Yours truly
Adam

Danny Englander’s picture

Version: 7.x-1.5 » 7.x-1.8

I just tested with a sub-theme and this works fine. I unchecked the captions box in the sub-theme settings and saved. The caption on my image went away. If you go back into the theme settings, you'll probably notice that the box is checked again so if you change anything else and save, you'll need to update that as well. Beyond that, you could also copy the entire theme settings and template.php pages to your sub-theme and rename all the functions to have fully working sub-theme settings page UI overrides or you could also do a .remove with jQuery ensuring that your sub-theme scripts file gets weighted last.

Status: Fixed » Closed (fixed)

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