Support Forum

  • Page:
  • 1

img.caption script and "none" option

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

hi, excuse my bad english

I was testing the plugin jb in local site
and found two problems, and just want to communicate them

one: with mootools core, more, caption, core-js, disabled using the plugin,
the inline
window.addEvent ('load', function () {

new JCaption ('img.caption');

});
Loading continuous, (it is very difficult to remove, almost no extension can eliminate the script)
and no mootools, this generates an error (obviously) in the browser.

Two: if using the plugin, I choose not to load anything (not jquery and not mootools)
with the option "none"
the result is:
(look the word none)
"http://ajax.googleapis.com/ajax/libs/jquery/none/jquery.min.js"

using joomla 2.5.3, and latest version plugin

regards!
  • kinski's Avatar
  • kinski
  • 3 Month Basic
  • 11 posts
  • Karma: 0
Last Edit: 12 years 1 month ago by kinski.
The administrator has disabled public write access.
Hi there,

The first issue, as you rightly say, is a core Joomla issue and one that is so far proving elusive. I have been unable to remove that in my own templates also, though I shall continue to try and find a way as I am sure Anthony will. Joomla is really at fault as it is injecting that .js into the head when Mootools is not being loaded, and regardless of whether it is required on the page.

The second issue is most likely because you have the jQuery source set to Google. Set it to local instead.
  • Seth's Avatar
  • Seth
  • Moderator
  • 8358 posts
  • 225 Thanks
  • Karma: 202
The administrator has disabled public write access.
thanks for reply Seth

but, no here, if i chose "local" and not "google" is it the same,
load :
src="/site/media/plg_jblibrary/jquery/jquery-none.min.js" type="text/javascript">
with error 404 not found (pretty obvious)

about the "hard kill" script img.caption.
i use this, and work for me, you may find it useful
if (isset($this->_script['text/javascript']))
{
    $this->_script['text/javascript'] = preg_replace('%window\.addEvent\(\'load\',\s*function\(\)\s*{\s*new\s*JCaption\(\'img.caption\'\);\s*}\);\s*%', '', $this->_script['text/javascript']);
    if (empty($this->_script['text/javascript']))
        unset($this->_script['text/javascript']);
}

regards from southern Cone!
  • kinski's Avatar
  • kinski
  • 3 Month Basic
  • 11 posts
  • Karma: 0
The administrator has disabled public write access.
Hi there,

Thanks so much for this.

The jQuery none was a silly missed check in the code.

Ive adapted your regex and added it to the next release coming today.

Cheers Anthony
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.
Just added the updates :)
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.
thanks Anthony!
for considering my topic, you are very kind

Can there was an error with the zip when you package it?

because I see no change, the same two errors still occur
(of course, i download from "download 2.5")
can be a problem of my version of php? I'm using 5.3.0.
(have all options in the plugin disabled)
and use default templates as atomic or beez
I seems strange that continue to occur.

perhaps something was lost on the way =)
i don't know

regards
  • kinski's Avatar
  • kinski
  • 3 Month Basic
  • 11 posts
  • Karma: 0
The administrator has disabled public write access.
Yes I think something did get lost. Too many files open I think.

Ive just uploaded v1.2.4. Let me know if that works for you.

Thanks again.

Anthony
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.
B) Thanks for the code, I shall be implementing that myself!
  • Seth's Avatar
  • Seth
  • Moderator
  • 8358 posts
  • 225 Thanks
  • Karma: 202
The administrator has disabled public write access.
Perfect

Now the world is more beautiful than yesterday =)

Thanks Antonio.
Thanks Seth, enjoy!

Regards boys
  • kinski's Avatar
  • kinski
  • 3 Month Basic
  • 11 posts
  • Karma: 0
The administrator has disabled public write access.
Thanks for the inspiration.
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.
Actually just gave you a free sub to say thanks!
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.
excuse me Antonio , I do not understand, remember that I barely know English.
(and google translator does not help me) what is sub? it means?

you need me for to do another test? of course
I thank you
  • kinski's Avatar
  • kinski
  • 3 Month Basic
  • 11 posts
  • Karma: 0
The administrator has disabled public write access.
aahh now i capisci =)

wow, thanks Antonio.
you are very kind.
I should not accept, but I never had a "sub"

of course, if you need me to test something, just ask me
  • kinski's Avatar
  • kinski
  • 3 Month Basic
  • 11 posts
  • Karma: 0
The administrator has disabled public write access.
Community contributions are often rewarded at Joomla Bamboo :)

www.joomlabamboo.com/blog/about-the-club/the-bamboo-working-bee
  • Seth's Avatar
  • Seth
  • Moderator
  • 8358 posts
  • 225 Thanks
  • Karma: 202
The administrator has disabled public write access.

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Happy Campers