Details
-
Bug
-
Resolution: Obsolete
-
Medium
-
None
-
4.5.0alpha
-
None
Description
Hi there. i think this is more an ezwebin issue than an ezoe one. probaly we need to change a bit some of the kernel templates also.
As you know, you can use custom attributes for your ezoe tags. Further more, you can add some settings in order to improve the user experience when working with it.
So, i've add two files in my extesion, content.ini.append.php and ezoe_attributes.ini.append.php
First one looks like this
<?php /* [embed] CustomAttributes[] CustomAttributes[]=border */?>
Second one looks like
<?php /* [CustomAttribute_embed_border] Name=Borde Type=cssborder */ ?>
having this and after selecting an image, i can add border style just like the attached pic show.
But this has no effect in the result. i think it's because provided override image template of ezwebin for this case [1] doesn't take in account this possibility. it checks if $object_parameteres.border_size or $object_parameteres.border_colors are set, but no if $object_parameters.border is.
So, my proposed solution is showed in the attached git diff file.
It just check the existence of object_parameters.border. if so, and know that would be something like '2px solid #f12345", it explode it by ' ', and then add these values to the first_set operations.
But one thing to note. for the first one (the border_size) i'm casting it to int, because default datatype ezimage template adds px to border_size by default.
that makes me wonder how can we deal if someone choose a 20em border (not usual, but possible though). having it like this, that will produce a 20px border, becuase the int cast.
Let me know your thoughts about the git and i'll commit it to github.
Cheers.