• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.4 Change text to icons

RichardKYA

Well-known member
#1
Hello,

I'm trying to change the "watch forum" and "unwatch forum" text to icons in forum view.

I can remove the phrases from the "forum_view" template...


<xen:if is="{$canWatchForum}">
<a href="{xen:link 'forums/watch', $forum}" class="OverlayTrigger" data-cacheOverlay="false">{xen:if $forum.forum_is_watched, '{xen:phrase unwatch_forum}', '{xen:phrase watch_forum}'}</a>
</xen:if>


...and replace them with either <img> tags or <div>'s that have classes applied that link to my icons...


<xen:if is="{$canWatchForum}">
<a href="{xen:link 'forums/watch', $forum}" class="OverlayTrigger" data-cacheOverlay="false">
{xen:if $forum.forum_is_watched, '<div class="unwatch_forum concealed" title="Unwatch Forum"></div>',
'<div class="watch_forum concealed" title="Watch Forum"></div>'}</a>
</xen:if>


Either of these work fine, apart from, after the tab is clicked and the forum is either "watched" or "unwatched", the phrase reappears until the page is refreshed...

Before it's clicked...

Screen Shot 2015-03-17 at 14.57.03.jpg

After it's clicked...

Screen Shot 2015-03-17 at 14.58.35.jpg

After the page is refreshed...

Screen Shot 2015-03-17 at 14.59.21.jpg

Obviously the phrases are stored somewhere else as well, but I don't know where and/or how they get applied if I have removed the phrase from the template.

Does anyone know where I need to remove these from?

Please and Thank you

:)
 

RichardKYA

Well-known member
#3
Hello,

You can see where I have changed the text to an icon by doing what I mentioned above, so to me, the edits are in the right place because the phrases are removed and the icons display fine. It's just what happens in between that doesn't make sense. (Well, to me anyway)

 
Last edited: