ylahav / mod_baccessibility

Help to make your joomla site more accessibile
7 stars 6 forks source link

Custom the icon weelchair - mod_baccessibility #16

Open Langagemachine opened 7 years ago

Langagemachine commented 7 years ago

Hi, it's possible to custom / change the wheelchair by another picture and/or texte ?

screenshot_1

Regards

ylahav commented 7 years ago

Yes - it is possible. The picture is web font that can be disabled... if you want to change it to another picture you have to go to the 'tmpl/default.php' and change to code to load a different image (or text) You can, also, take a look in the language file to change any displayed text.

Langagemachine commented 7 years ago

Thanks, but i'm not a specialist in php :) Is this the code ?

screenshot_2

And Is the PHP code to add an image ? $img = 'path/to/image.jpg'; header('Content-Type: image/jpeg'); readfile($img);

ylahav commented 7 years ago

That the text BUT your code is not correct. It is HTML not php

Langagemachine commented 6 years ago

Hi :) I'ma not a specialist coder :( Can you help me and give me exemple code ti change text by image please ? :) :)

pippopippo000 commented 5 years ago

Hi, I have the same problem, I need custom the icon. Have you solved? I can't find the image to change. In /modules/mod_baccessibility/asset/images there is the file universal-access.png but is not the wheelchair that is displayed.

PierreCorell commented 5 years ago

Hello @Langagemachine @pippopippo000

first things first: Please never change core files, always do an override inside your used template's html folder. See more details about the whole override principle at https://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core

So for your example you create - if not already existing - the folder structure html/mod_baccessibility/ inside YOURUSEDTEMPLATE and copy the original modules/mod_baccessibility/tmpl/default.php inside it. Final structure is then for suggested YOURUSEDTEMPLATE as beez3: JOOMLAROOT/templates/beez3/html/mod_baccessibility/default.php Only this file should be edited - this works with all modules and components this way.

The icons are realized via font-awesome, which are no images (!) but fonts, in version 4.4.0 - see https://fontawesome.com/icons for all (currently version 4.7.0 - so not all icons are available in Joomla!) Then you choose another icon which you wanna use and replace the class which loads the font-icon (or you just delete it) at the line: https://github.com/ylahav/mod_baccessibility/blob/master/tmpl/default.php#L25 for e.g. into: <i class="fa fa-user fa-3x" aria-label="wheel chair"></i> instead of fa-wheelchair and then a user icon is visible at the mod_baccessibility module in frontend.

Best regards, PCo.

pippopippo000 commented 4 years ago

Hello @Langagemachine @pippopippo000

first things first: Please never change core files, always do an override inside your used template's html folder. See more details about the whole override principle at https://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core

So for your example you create - if not already existing - the folder structure html/mod_baccessibility/ inside YOURUSEDTEMPLATE and copy the original modules/mod_baccessibility/tmpl/default.php inside it. Final structure is then for suggested YOURUSEDTEMPLATE as beez3: JOOMLAROOT/templates/beez3/html/mod_baccessibility/default.php Only this file should be edited - this works with all modules and components this way.

The icons are realized via font-awesome, which are no images (!) but fonts, in version 4.4.0 - see https://fontawesome.com/icons for all (currently version 4.7.0 - so not all icons are available in Joomla!) Then you choose another icon which you wanna use and replace the class which loads the font-icon (or you just delete it) at the line: https://github.com/ylahav/mod_baccessibility/blob/master/tmpl/default.php#L25 for e.g. into: <i class="fa fa-user fa-3x" aria-label="wheel chair"></i> instead of fa-wheelchair and then a user icon is visible at the mod_baccessibility module in frontend.

Best regards, PCo.

Hi @PierreCorell, in my country there is a specific icon for accessibility that is not present in the font-awesome database; is it possible to insert a jpg? If so, where do I have to go to do it? Thank you very much if you want to help me

pippopippo000 commented 4 years ago

@PierreCorell I found the awesome font which is fine: https://fontawesome.com/v4.7.0/icon/low-vision I tried to replace the script in the file /mod_baccessibility/tmpl/default.php but it doesn't work, the icon disappears

PierreCorell commented 4 years ago

Hi @pippopippo000,

the low-vision icon was no part of FontAwesome version 4.4.0 - so it is not included in this set and the "icon disappears" as you wrote. Please follow the previous short tutorial to overwrite the tmpl/default.php file inside your template, the link to the original file in the master branch was just set to link the line for you for better understanding what you have to change to replace the icon - there you can add your wanted image file.