Main menu

Forum


× Help Forum English

[SOLVED] How to change text categories to images

  • Lecyk
  • Autore della discussione
  • New Member
  • New Member
Di più
8 Anni 5 Mesi fa - 8 Anni 5 Mesi fa #12787 da 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?
Ultima Modifica 8 Anni 5 Mesi fa da Lyr!C. Motivo: [SOLVED]

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • Lyr!C
  • Avatar di Lyr!C
  • Administrator
  • Administrator
  • Lead Developer
Di più
8 Anni 5 Mesi fa #12792 da Lyr!C
Risposta da Lyr!C al topic 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) .

File allegato:

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • Lecyk
  • Autore della discussione
  • New Member
  • New Member
Di più
8 Anni 5 Mesi fa #12796 da Lecyk
Risposta da Lecyk al topic 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.

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • Lyr!C
  • Avatar di Lyr!C
  • Administrator
  • Administrator
  • Lead Developer
Di più
8 Anni 5 Mesi fa #12808 da Lyr!C
Risposta da Lyr!C al topic 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) .

File allegato:

Ringraziano per il messaggio: Lecyk

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • Lecyk
  • Autore della discussione
  • New Member
  • New Member
Di più
8 Anni 5 Mesi fa #12823 da Lecyk
Risposta da Lecyk al topic 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.

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • Lyr!C
  • Avatar di Lyr!C
  • Administrator
  • Administrator
  • Lead Developer
Di più
8 Anni 5 Mesi fa #12826 da Lyr!C
Risposta da Lyr!C al topic 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) .

File allegato:

Si prega Accedi o Crea un account a partecipare alla conversazione.

Moderatori: Lyr!C
Tempo creazione pagina: 0.122 secondi

 

Follow Us

Create your Joomla templates with Template Creator CK

acymailing logo new