Main menu

Forum


× Help Forum English

[SOLVED] How to change text categories to images

  • Lecyk
  • Topic Author
  • New Member
  • New Member
More
8 years 5 months ago - 8 years 5 months ago #12787 by 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?
Last edit: 8 years 5 months ago by Lyr!C. Reason: [SOLVED]

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

  • Lyr!C
  • Lyr!C's Avatar
  • Administrator
  • Administrator
  • Lead Developer
More
8 years 5 months ago #12792 by Lyr!C
Replied by Lyr!C on 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 Attachment:

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

  • Lecyk
  • Topic Author
  • New Member
  • New Member
More
8 years 5 months ago #12796 by Lecyk
Replied by Lecyk on 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.

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

  • Lyr!C
  • Lyr!C's Avatar
  • Administrator
  • Administrator
  • Lead Developer
More
8 years 5 months ago #12808 by Lyr!C
Replied by Lyr!C on 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 Attachment:

The following user(s) said Thank You: Lecyk

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

  • Lecyk
  • Topic Author
  • New Member
  • New Member
More
8 years 5 months ago #12823 by Lecyk
Replied by Lecyk on 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.

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

  • Lyr!C
  • Lyr!C's Avatar
  • Administrator
  • Administrator
  • Lead Developer
More
8 years 5 months ago #12826 by Lyr!C
Replied by Lyr!C on 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 Attachment:

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

Moderators: Lyr!C
Time to create page: 0.091 seconds

 

Follow Us

Create your Joomla templates with Template Creator CK

acymailing logo new