[rellect] Favicon For Links

[rellect] Favicon For Links 3.0.1

No permission to download

sbj

Well-known member
Favicons started not working for me suddenly. Like some do work, some doesn't. Anyone else having the same issue?
 

deslocotoco

Well-known member
Favicons started not working for me suddenly. Like some do work, some doesn't. Anyone else having the same issue?

I can confirm this.

I think there is another add-on for the same purpose around here, but I'm not finding.

If someone knows, please share with us.
 

frm

Well-known member
Favicons started not working for me suddenly. Like some do work, some doesn't. Anyone else having the same issue?
Everything is still working fine on my side, even with the adjustment to remove favicons for my own site.

Only some will not show, and as a world, if they don't have a favicon or their headers pass something other than an OK status (even though viewable).
 

sbj

Well-known member
Everything is still working fine on my side, even with the adjustment to remove favicons for my own site.

Only some will not show, and as a world, if they don't have a favicon or their headers pass something other than an OK status (even though viewable).
Even my internal links, so stuff from my own board has no favicons. I will try to reinstall the addon, it seems a problem specific to me, thanks.
 

Iggy

Well-known member
yes actually i did also notice this recently.....forgot we even had this addon installed, but i noticed it most where internal links to the old vb version of the site still use the favicon, but now somewhere along the way they stopped working for the main, xenforo version...

a bit suspect about the unfurled snippets being inconsistent as well but that could be a number of things still...nice to hear anyway we arent the only ones having a problem..
 
  • Like
Reactions: sbj

frm

Well-known member
Even my internal links, so stuff from my own board has no favicons. I will try to reinstall the addon, it seems a problem specific to me, thanks.
Maybe it's a conflict with a newer version of XF? I'm still on 2.1.5a.
 
  • Like
Reactions: sbj

Masetrix

Well-known member
The tool works great with XF 2.1.10 PL2

I'm not sure what you mean, but if you want to disable it in specific forums, try adding to your css something like
CSS:
body[data-container-key="node-15"] .link.has-favicon {
    background: none !important;
    padding: 0px !important;
}
Replace 15 with the relevant forum id.

Thanks for that tipp but it is too much todo with this.

MyWay:

Activate the XF developer mode, then go to
/admin.php?template-modifications/
and look for "[rellect] Favicon For Links"
open there the template "helper_js_global".
scoll down @ "replace" and change:

Before:
Code:
<!--XF:JS-->
<xf:if is="'public' === $app">
   <xf:macro template="rellect_favicon" name="script" />
</xf:if>

After:
(The NodeIDs here are only examples and must be adapted to your circumstances.)
Code:
<!--XF:JS-->
<xf:if is="!in_array($__globals.forum.node_id, [1,2,3,4,5])">
<xf:if is="'public' === $app">
<xf:macro template="rellect_favicon" name="script" />
</xf:if>
</xf:if>

Now in the forums whose IDs are used above, FavIcons are no longer used and Google no longer receives metadata ...
So with us in all "private" forums ... :D

@rellect
Perhaps it is possible for you to integrate this, and the code for internal links above in another post, into the settings of your add-on. Then it would be even more useful than it already is. It is already one of my "CoolTools" because it implements so much functionality with so much speed in XF.
 
Last edited:

Slion

Active member
That AddOn still works great for me on XF 2.2.4.
Except that that Google S2 API has become rather useless and is more often returning their default favicon rather than actual domains' favicons.
Thankfully you can easily modified this AddOn template to use GitHub favicon API instead.

JavaScript:
//https://www.google.com/s2/favicons?domain=
var matches = link.getAttribute('href').match(/^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i);
var domain = matches && matches[1];  // domain will be null if no match is found
link.style.backgroundImage = "url('https://favicons.githubusercontent.com/" + domain + "')"

See: https://stackoverflow.com/a/8498629/3969362
 

Slion

Active member
Actually GitHub favicon service is far from perfect either.
I had implemented some clever AJAX version that would use both services to get the best favicon but that won't work on production because of cross site security issues. Instead I did a not so clever implementation with hardcoded URL target per hostname. It can also invert favicon color if needed for those of us running dark themed forums.
 

Attachments

  • rellect-FaviconForLinks-4.0.0.zip
    15.6 KB · Views: 1
Top