Main menu

Forum


× Help Forum English

[SOLVED] How to change text categories to images

  • Lecyk
  • Auteur du sujet
  • Nouveau membre
  • Nouveau membre
Plus d'informations
il y a 8 ans 5 mois - il y a 8 ans 5 mois #12787 par Lecyk
Hi,

my client what categories no text only icon. I add fields to sql table category icon and icon_alt, icsetvar.php a code similar like feature icon and trying to add code like feature icon and I no showing on webpage. What i can do yet for showing icon category instead text?
Dernière édition: il y a 8 ans 5 mois par Lyr!C. Raison: [SOLVED]

Connexion ou Créer un compte pour participer à la conversation.

  • Lyr!C
  • Portrait de Lyr!C
  • Administrateur
  • Administrateur
  • Lead Developer
Plus d'informations
il y a 8 ans 5 mois #12792 par Lyr!C
Réponse de Lyr!C sur le sujet How to change text categories to images
Hello,

Do you mean you want to replace category name by an icon, or to hide category name, and show only a custom Features Icon created in iCagenda admin ?

Best Regards,
Cyril

Latest version : iCagenda 3.9.8
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

Fichier attaché :

Connexion ou Créer un compte pour participer à la conversation.

  • Lecyk
  • Auteur du sujet
  • Nouveau membre
  • Nouveau membre
Plus d'informations
il y a 8 ans 5 mois #12796 par Lecyk
Réponse de Lecyk sur le sujet How to change text categories to images
I want replace category name to category icon. Hide category name and show only features icon is very simple.
But I trying add show category icon. I add in files code like features icon, but this not showing.
Maybe you know how to change? I don't need change icon by back-end, only add to mysql in table categories and show in front end category icon, no text.

Connexion ou Créer un compte pour participer à la conversation.

  • Lyr!C
  • Portrait de Lyr!C
  • Administrateur
  • Administrateur
  • Lead Developer
Plus d'informations
il y a 8 ans 5 mois #12808 par Lyr!C
Réponse de Lyr!C sur le sujet How to change text categories to images
Hello,
I want replace category name to category icon. Hide category name and show only features icon is very simple.
But I trying add show category icon. I add in files code like features icon, but this not showing.
Maybe you know how to change? I don't need change icon by back-end, only add to mysql in table categories and show in front end category icon, no text.
Feel free to edit what you want in code/data base (as it is open-source code) but if so, i won't give you such code, as it won't be a good idea to keep your iCagenda up-to-date, and not something i will do not recommend.

What could be done today would be to use css to hide category name and use feature icons instead (and then to select the fature icon in each event options) or to create your own custom theme pack (safe went updating iCagenda), and to edit file.
For example, as the category name is displayed by a php variable in the HTML content, you can imagine to have image with same name as category in your media folder, and then use a php function to replace category name by a html tag like this :
Example in YOUR_THEME_events.php file, by replacing this :
<?php // Category ?>
				<div class="title-cat ic-title-cat ic-float-right <?php if ($CATEGORY_FONTCOLOR == 'fontColor') : ?>ic-text-border<?php endif; ?>"
					style="color: <?php echo $CATEGORY_COLOR; ?>;">
					<?php echo $CATEGORY_TITLE; ?>
				</div>
By something like this :
<?php // Category ?>
				<div class="title-cat ic-title-cat ic-float-right">
					<img src="..PATH TO IMAGES FOR CATEGORIES/<?php echo $CATEGORY_TITLE; ?>.jpg" />
				</div>

This is an idea where you won't have to edit database nor core files.
Just the need to create a images folder, and add there images for each category with exactly the category name for each files (in my example, all image are .jpg )

Hope this gives you an easier to do this right now ? (as your idea could be a future feature, but don't know when i will check this possibility).

Best Regards,
Cyril

Latest version : iCagenda 3.9.8
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

Fichier attaché :

Les utilisateur(s) suivant ont remercié: Lecyk

Connexion ou Créer un compte pour participer à la conversation.

  • Lecyk
  • Auteur du sujet
  • Nouveau membre
  • Nouveau membre
Plus d'informations
il y a 8 ans 5 mois #12823 par Lecyk
Réponse de Lecyk sur le sujet How to change text categories to images
Very, very thanks for this. You're awesome. This code resolve my problem.
This solution are better than my, because no change base files Icagenda, only my templates.
You're may closed this post.

Connexion ou Créer un compte pour participer à la conversation.

  • Lyr!C
  • Portrait de Lyr!C
  • Administrateur
  • Administrateur
  • Lead Developer
Plus d'informations
il y a 8 ans 5 mois #12826 par Lyr!C
Réponse de Lyr!C sur le sujet How to change text categories to images
Hi!

You're welcome ;-)

Best Regards,
Cyril

Latest version : iCagenda 3.9.8
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

Fichier attaché :

Connexion ou Créer un compte pour participer à la conversation.

Modérateurs: Lyr!C
Temps de génération de la page : 0.089 secondes

 

Follow Us

Créez vos templates Joomla avec Template Creator CK

acymailing logo new