ProLight

Custom Footer Icons - ProLight

Custom Footer Icons

by Restless Rancor » Tue Sep 18, 2018 8:02 pm

Hi, I'm trying to add a link with an icon to the footer.
I've gone into config.html and set <!-- DEFINE $CUSTOM1_BUTTON = true --> and <!-- DEFINE $CUSTOM1_ICON = 'fa-wordpress' --> to display this icon, but after a cache purge the icon does not appear, but when you mouse-over the location you can click and be taken to the custom URL.
I've tried different variations for the icon name, but none have worked.
What am I doing wrong?
Thanks
These aren't the droids you're looking for...
User avatar
Restless Rancor
Registered User
Posts: 184
Joined: Tue Sep 18, 2018 1:51 pm
Contact:

Re: Custom Footer Icons

by Peter77sx » Wed Sep 19, 2018 1:22 pm

Can confirm. May as well edit navbar_footer.html and add it in there (and it works) since we have to make manual edits anyway.
Peter77sx
Registered User
Posts: 3257
Joined: Wed Nov 09, 2005 2:51 pm

Re: Custom Footer Icons

by Restless Rancor » Wed Sep 19, 2018 6:26 pm

I've had a closer look at the files I'm no expert but I believe the correct usage would be without the fa-. I have tried this and had the same result (no image, but a clickable link).
These aren't the droids you're looking for...
User avatar
Restless Rancor
Registered User
Posts: 184
Joined: Tue Sep 18, 2018 1:51 pm
Contact:

Re: Custom Footer Icons

by eeji » Thu Sep 20, 2018 8:36 pm

You need to use just the icon name without the fa- prefix. For a full list of icons, see https://fontawesome.com/v4.7.0/icons/ (this link is in the readme in the styles contrib directory)
My phpBB styles: phpbbstyles.oo.gd
My board: iansvivarium.com
User avatar
eeji
Jr. Style Validator
Posts: 1129
Joined: Fri Dec 12, 2008 9:08 pm
Location: Manchester, UK
Contact:

Re: Custom Footer Icons

by Restless Rancor » Thu Sep 20, 2018 8:57 pm

eeji wrote:You need to use just the icon name without the fa- prefix. For a full list of icons, see https://fontawesome.com/v4.7.0/icons/ (this link is in the readme in the styles contrib directory)
Hi, I have tried this, but I'll give it another shot to ensure it wasn't a cache issue. Thanks

Edit:
Nope.
<!-- DEFINE $CUSTOM1_ICON = 'wordpress' --> is what I have used, when I mouse over the location I can click to go to the custom URL, but the image does not display.
I've cleared the cache, deleted cookies and used different browsers all with the same result.

2nd Edit:
I've also gone into navbar_footer.html and changed <i class="icon fa-{CUSTOM1_ICON} fa-fw" aria-hidden="true"></i>to <i class="icon {CUSTOM1_ICON} fa-fw" aria-hidden="true"></i> and added the fa- to <!-- DEFINE $CUSTOM1_ICON = 'wordpress' --> and it yields exactly the same result

3rd Edit:
I have changed <i class="icon fa-{CUSTOM1_ICON} fa-fw" aria-hidden="true"></i> to <i class="icon fa-wordpress fa-fw" aria-hidden="true"></i> to overrule pulling the icon from a different location and it now shows correctly. I've had a closer look at navbar_footer.html to see if I could find anything out of the ordinary but I'm afraid that's as far as my diagnosing capabilities stretch. Hope that helps with finding what's wrong there.

RR
These aren't the droids you're looking for...
User avatar
Restless Rancor
Registered User
Posts: 184
Joined: Tue Sep 18, 2018 1:51 pm
Contact:

Re: Custom Footer Icons

by eeji » Thu Sep 20, 2018 10:01 pm

I found it! It's my error, I missed off a $ character :(

In navbar_footer.html find:

Code: Select all

				<a href="{$CUSTOM1_URL}" title="{CUSTOM1_ICON}" role="menuitem">
					<i class="icon fa-{CUSTOM1_ICON} fa-fw" aria-hidden="true"></i>
				</a>
replace with:

Code: Select all

				<a href="{$CUSTOM1_URL}" title="{$CUSTOM1_ICON}" role="menuitem">
					<i class="icon fa-{$CUSTOM1_ICON} fa-fw" aria-hidden="true"></i>
				</a>
and find:

Code: Select all

				<a href="{$CUSTOM2_URL}" title="{CUSTOM2_ICON}" role="menuitem">
					<i class="icon fa-{CUSTOM2_ICON} fa-fw" aria-hidden="true"></i>
				</a>
replace with:

Code: Select all

				<a href="{$CUSTOM2_URL}" title="{$CUSTOM2_ICON}" role="menuitem">
					<i class="icon fa-{$CUSTOM2_ICON} fa-fw" aria-hidden="true"></i>
				</a>

This will be fixed in the next release.
My phpBB styles: phpbbstyles.oo.gd
My board: iansvivarium.com
User avatar
eeji
Jr. Style Validator
Posts: 1129
Joined: Fri Dec 12, 2008 9:08 pm
Location: Manchester, UK
Contact:

Re: Custom Footer Icons

by Restless Rancor » Thu Sep 20, 2018 10:05 pm

No problem, I'm glad we got there in the end!
Thanks for the edits, I'll make them now.
I spent a little while trying to figure it out, a little annoyed I didn't notice that but you learn something new every day :ugeek:

Thanks for the style!
These aren't the droids you're looking for...
User avatar
Restless Rancor
Registered User
Posts: 184
Joined: Tue Sep 18, 2018 1:51 pm
Contact:

Re: Custom Footer Icons

by minky » Wed Jul 10, 2019 11:07 am

I've changed my navbar_footer.html file to:

Code: Select all

<!-- IF $CUSTOM2_BUTTON -->
			<li data-last-responsive="true">
				<a href="{$CUSTOM2_URL}" target="_blank" title="$CUSTOM2_ICON" role="menuitem">
					<i class="icon fa-{$CUSTOM2_ICON} fa-fw" aria-hidden="true"></i>
				</a>
			</li>
		<!-- ENDIF -->
..and config.html to:

Code: Select all

<!-- DEFINE $CUSTOM2_BUTTON = true -->
<!-- DEFINE $CUSTOM2_URL = 'http://chng.it/vjZg9pKz' -->
<!-- DEFINE $CUSTOM2_ICON = 'clipboard-list' -->
But nothing showing up at all. Have I missed something?

I'm using prolight style. Thanks in advance.
minky
Registered User
Posts: 1
Joined: Wed Jul 10, 2019 7:38 am
Contact:

Re: Custom Footer Icons

by eeji » Thu Jul 11, 2019 6:14 pm

minky wrote:...But nothing showing up at all. Have I missed something?
Have you cleared the cache in your ACP?
My phpBB styles: phpbbstyles.oo.gd
My board: iansvivarium.com
User avatar
eeji
Jr. Style Validator
Posts: 1129
Joined: Fri Dec 12, 2008 9:08 pm
Location: Manchester, UK
Contact: