logical error in autoload func

logical error in autoload func was created by sbox

Posted 10 months 1 week ago #68658
Good afternoon.The plugin is additionally added by me when upgrading from joomla 3 to joomla 4.  At now there is no another free plugin for create popups from images using only its css class, only by short codes. So this plugin may be popular.
  There were a lot of pictures on the site, which were processed by a plugin like the class "joomslide". Your mediabox_ck plugin allow me do not change the materials, but create links to image automatically. Great.
 In which the Autoload function helped.But there is a logical mistake.I've set the next parameters on the tab Autoload Apply automatically on all images - YesFilter by - Only by css classCSS class - joomslide.
 At the same time, links for pictures are formed correctly, but the pictures are not grouped into a gallery. i cannot move between them with the right and left control-arrows, and there is no counter (x / y).But if i shorten the word joomslide to joomslidthen the arrows appear and the counter (x/y) too.I think the problem is in line 202    return (curlink == el) || ((curlink.".$attribtype.".length > ".strlen($attribname).") && el.".$attribtype.".match(relsize[1])); This compares the length of words joomslide (length 9) and (lightbox (length 8))? Why?Check this please. Second problem:
the Autoload procedure ignores the next "General" parameter settings.
Attribute to be applied to links : class/relAttribute name: joomslide  In code we have see only rel="lightbox"  hardcoded into the <a> link generation  (string 591)    $html = '<a rel="lightbox" href="' . $src . '">' . $imgStr . '</a>'; And also  one wish from me:
Please add an alt image field insertion as a link attribute to Autoload function.
Code example from str 555 (module mediabox_ck.php)
      $alttext='';    foreach($xml->attributes() as $tag => $value) {     [ ..skip part of code ..]     if ($tag === 'alt') {    $alttext = ' data-title="'.$value.'" ';    }    }     [ ..skip part of code ..]     $html = '<a rel="lightbox" href="' . $src . '"'.$alttext.'>' . $imgStr . '</a>'; Or using title tag img too, as caption-auto generated.
Thank you.
by sbox
Attachments:

Please Log in or Create an account to join the conversation.

Replied by ced1870 on topic logical error in autoload func

Posted 10 months 1 week ago #68659
Hi
thank you for your technical feedback
I will check that in the coming days and I will let you know
CEd

Joomlack Webmaster and Developer

by ced1870

Please Log in or Create an account to join the conversation.

Replied by ced1870 on topic logical error in autoload func

Posted 10 months 1 week ago #68666

links for pictures are formed correctly, but the pictures are not grouped into a gallery.

I need to add this option because for now the autoload feature do not manage the album (image grouping)

But if i shorten the word joomslide to joomslid then the arrows appear and the counter (x/y) too

strange behavior. In my code there is no album management, and I tested as you and I don't get the album even with "joomslid"

do you have an url where I can see this ?

Attribute to be applied to links : class/relAttribute name: joomslide  In code we have see only rel="lightbox"  hardcoded

yes I need to check that too, you are right

Please add an alt image field insertion as a link attribute to Autoload function

thank you for your suggestion, I also add this to the todolist :)

Joomlack Webmaster and Developer

by ced1870

Please Log in or Create an account to join the conversation.

Replied by sbox on topic logical error in autoload func

Posted 10 months 1 week ago #68671
Posibly i made incorrent description of situation.
So, add screenshots having setings and result. First 3 pic with not working grouping.
Next 3 pics - work excellent. I tthink,cause in string 202
by sbox

Please Log in or Create an account to join the conversation.

Replied by ced1870 on topic logical error in autoload func

Posted 10 months 1 week ago #68673
thank you ! I think it is clear now, I will try again !

Joomlack Webmaster and Developer

by ced1870

Please Log in or Create an account to join the conversation.

Replied by ced1870 on topic logical error in autoload func

Posted 10 months 6 days ago #68702
please install the 2.7.3 version, I have added your 3 requests :)

Joomlack Webmaster and Developer

by ced1870

Please Log in or Create an account to join the conversation.

Time to create page: 0.752 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 771 guests and one member online