Welcome, Guest

img.caption script and "none" option
(1 viewing) (1) Guest
  • Page:
  • 1


Posting guidelines
To help us help you faster please ensure that you include the following details in your forum post:
- A link to your site (you can create a support ticket if you need to provide us with confidential information.
- Please ensure that css and javascript compression is disabled in your template settings.
- Please ensure that you have checked the change log and your template and extension are up to date.
- Please search the forum to see if your answer has already been asked before.
- Please ensure that you only post your request in either the forum or ticket system but not both.
- Please only post in an existing thread if your issue is exactly the same as the one being discussed in the thread.

TOPIC: img.caption script and "none" option

img.caption script and "none" option 1 year, 3 months ago #64930

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
  • OFFLINE
  • 3 Month Basic
  • Posts: 11
  • Karma: 0
Last Edit: 1 year, 3 months ago by kinski.

Re: img.caption script and "none" option 1 year, 3 months ago #64955

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
  • OFFLINE
  • Moderator
  • Posts: 8401
  • Karma: 200
Internet Inspired! - Creative Websites (and freelance websmithing!)

Re: img.caption script and "none" option 1 year, 3 months ago #64991

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
  • OFFLINE
  • 3 Month Basic
  • Posts: 11
  • Karma: 0

Re: img.caption script and "none" option 1 year, 3 months ago #65036

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
Creative Unique Minimal Joomla Templates

Re: img.caption script and "none" option 1 year, 3 months ago #65039

Just added the updates
Creative Unique Minimal Joomla Templates

Re: img.caption script and "none" option 1 year, 2 months ago #65059

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
  • OFFLINE
  • 3 Month Basic
  • Posts: 11
  • Karma: 0

Re: img.caption script and "none" option 1 year, 2 months ago #65065

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
Creative Unique Minimal Joomla Templates

Re: img.caption script and "none" option 1 year, 2 months ago #65090

Thanks for the code, I shall be implementing that myself!
  • Seth
  • OFFLINE
  • Moderator
  • Posts: 8401
  • Karma: 200
Internet Inspired! - Creative Websites (and freelance websmithing!)

Re: img.caption script and "none" option 1 year, 2 months ago #65112

Perfect

Now the world is more beautiful than yesterday =)

Thanks Antonio.
Thanks Seth, enjoy!

Regards boys
  • kinski
  • OFFLINE
  • 3 Month Basic
  • Posts: 11
  • Karma: 0

Re: img.caption script and "none" option 1 year, 2 months ago #65124

Thanks for the inspiration.
Creative Unique Minimal Joomla Templates

Re: img.caption script and "none" option 1 year, 2 months ago #65125

Actually just gave you a free sub to say thanks!
Creative Unique Minimal Joomla Templates

Re: img.caption script and "none" option 1 year, 2 months ago #65160

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
  • OFFLINE
  • 3 Month Basic
  • Posts: 11
  • Karma: 0

Re: img.caption script and "none" option 1 year, 2 months ago #65162

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
  • OFFLINE
  • 3 Month Basic
  • Posts: 11
  • Karma: 0

Re: img.caption script and "none" option 1 year, 2 months ago #65184

Community contributions are often rewarded at Joomla Bamboo

www.joomlabamboo.com/blog/about-the-club/the-bamboo-working-bee
  • Seth
  • OFFLINE
  • Moderator
  • Posts: 8401
  • Karma: 200
Internet Inspired! - Creative Websites (and freelance websmithing!)
  • Page:
  • 1
Time to create page: 0.53 seconds