Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
andreamarucci
Experienced
Topic Author
Posts: 308
Joined: 01 Mar 2011, 11:13

Replace the asterisk with something other

26 Jan 2016, 08:08

Hello Karl, I'd like to replace the icon that appear when I hover on each gallery
Schermata 2016-01-26 alle 14.06.20.png
Schermata 2016-01-26 alle 14.06.20.png (156.35 KiB) Viewed 5258 times
with another png icon.

How can I do that?
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13997
Joined: 30 Sep 2006, 03:37

Re: Replace the asterisk with something other

26 Jan 2016, 11:35

First of all, this is not a PNG, but a font-ICON from the font-awesome library:
http://fortawesome.github.io/Font-Awesome/icons/

I could probably create a hack for you so you can replace the icon with another icon from the list in the link above. However, it would be complicated to replace it with a custom PNG image. It would have to be scaled correctly, and loaded separately ... Keep in mind, font-icons are VECTOR, so scale is irrelevant.
 
User avatar
sprocket
Experienced
Posts: 98
Joined: 18 Dec 2008, 19:40

Re: Replace the asterisk with something other

26 Jan 2016, 14:13

I'd be interesting in a hack to use a different icon from the font-awesome icons
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13997
Joined: 30 Sep 2006, 03:37

Re: Replace the asterisk with something other

27 Jan 2016, 01:35

sprocket wrote:I'd be interesting in a hack to use a different icon from the font-awesome icons
Use this resource to find the "content" code for the icon you want to use:
http://astronautweb.co/snippet/font-awesome/

Then go to panel->settings->custom->css:
Code
.folders .image-container:before {
  content: '\f004' !important;
}
You can also get codes from this updated resource, but you will need to extract codes \f244 from []:
https://fortawesome.github.io/Font-Awesome/cheatsheet/
 
User avatar
andreamarucci
Experienced
Topic Author
Posts: 308
Joined: 01 Mar 2011, 11:13

Re: Replace the asterisk with something other

27 Jan 2016, 03:27

I've tried to put that code but I got an error
Code
Error -> TextStatus:error
and the code was not saved...
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13997
Joined: 30 Sep 2006, 03:37

Re: Replace the asterisk with something other

27 Jan 2016, 03:49

Really? It works here ... Can you click Save WITHOUT the code now? I would need link and login to your panel to diagnose further ...
Image
 
User avatar
andreamarucci
Experienced
Topic Author
Posts: 308
Joined: 01 Mar 2011, 11:13

Re: Replace the asterisk with something other

27 Jan 2016, 03:58

I clicked save with the field empty and it worked but as soon as I put the code in and click Save, I got that error. I've sent you a PM with login and password.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13997
Joined: 30 Sep 2006, 03:37

Re: Replace the asterisk with something other

27 Jan 2016, 04:15

Suhosin :(
 
User avatar
andreamarucci
Experienced
Topic Author
Posts: 308
Joined: 01 Mar 2011, 11:13

Re: Replace the asterisk with something other

27 Jan 2016, 04:22

Solved, don't know if it's the same but it was mod_security. Disabling it do the trick... Thanks!
 
User avatar
andreamarucci
Experienced
Topic Author
Posts: 308
Joined: 01 Mar 2011, 11:13

Re: Replace the asterisk with something other

27 Jan 2016, 04:29

Also upgraded PHP to 7.0 and X3 works perfectly and it seems faster than before... 8)
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13997
Joined: 30 Sep 2006, 03:37

Re: Replace the asterisk with something other

27 Jan 2016, 04:36

andreamarucci wrote:Also upgraded PHP to 7.0 and X3 works perfectly and it seems faster than before... 8)
Nice
 
User avatar
sprocket
Experienced
Posts: 98
Joined: 18 Dec 2008, 19:40

Re: Replace the asterisk with something other

28 Jan 2016, 09:04

I've discovered a little glitch with this hack. As long as "hover" existing in the css classes (the folders tab is where I'm using it), everything appears as expected. the hover icon changes to your liking.
normal.jpg
normal.jpg (40.77 KiB) Viewed 5222 times
However, if you have a page where you don't want a hover icon (no "hover" in the css class), then a small character appears between title and image. The character is there with or without hovering.
glitch.jpg
small glitch
glitch.jpg (41.25 KiB) Viewed 5222 times
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13997
Joined: 30 Sep 2006, 03:37

Re: Replace the asterisk with something other

28 Jan 2016, 09:18

Yea, I guess that's why you call it a hack ... It should work if you make the CSS more specific like below, but it will make it even more of a "hack" really. With the below, it only applies for folders where you have the hover class applied.
Code
.folders.hover .image-container:before {
  content: '\f004' !important;
}
 
User avatar
sprocket
Experienced
Posts: 98
Joined: 18 Dec 2008, 19:40

Re: Replace the asterisk with something other

28 Jan 2016, 09:35

mjau-mjau wrote:Yea, I guess that's why you call it a hack ... It should work if you make the CSS more specific like below, but it will make it even more of a "hack" really. With the below, it only applies for folders where you have the hover class applied.
Code
.folders.hover .image-container:before {
  content: '\f004' !important;
}
That got it and I see within the folder css classes, we can use 'hover' for our hacked hover icon or 'x3-hover-icon-asterisk-primary' to keep the original hover icon, allowing us to mix and match the two. Thanks