XF 2.3 Social Media Share icons in the header. How?

Levina

Active member
I'm working on a new site and would like to move the Social Media Share icons to the header, the way Macrumors has it. I just have no idea how to accomplish this. I thought I'd ask ChatGPT but his code nearly broke my new site! :rolleyes: I'd be grateful for some help.

Here's a screenshot. I really like how this looks, clean without any borders.

Scherm­afbeelding 2024-12-27 om 00.52.51.webp
 
Ah, I would have never thought of that. Thanks very much, Nick.

So, I tried different things and got the best results with the share_tooltip template. After playing with the code a bit I went from this:

Scherm­afbeelding 2024-12-27 om 09.00.36.webp
to this:

Scherm­afbeelding 2024-12-27 om 09.09.41.webp

The icons look exactly right, except they're vertical and I lost the Copy link. I don't know how to fix either. And maybe using the code from that template is not the correct way to do this anyway? I could use a bit more help.
 
Use this code:
HTML:
<xf:macro id="share_page_macros::buttons" arg-iconic="{{ true }}" />
Then in extra.less template:
Less:
.shareButtons--iconic
{
    min-width: 300px;
}

Sure there is a better way but it works...
 
Use this code:
HTML:
<xf:macro id="share_page_macros::buttons" arg-iconic="{{ true }}" />
Then in extra.less template:
Less:
.shareButtons--iconic
{
    min-width: 300px;
}

Sure there is a better way but it works...

I do the same thing with the HTML, in the header ad, except here's my extra.less:

Less:
.p-header-inner
{
    .shareButtons-buttons
    {
        display: block;
    }
}
 
Guys, I have a problem!

I love the share buttons in the header but they seem to be messing with the editor on my iPad and iPhone in that it is now inaccessible.

Everything is fine on my desktop but on iPhone/iPad there is no "Write your reply..." placeholder and no way to type any text. I can only type something after clicking the Reply or Quote button.

What's really weird is that guests do have a normal functioning editor (I am allowing guests to reply) but as soon as I log in, nope. I thought maybe the buttons were too big, so I made them smaller but that made no difference.

I have disabled the code for now and the editor is okay again but I really like those buttons in the header. Any idea how to fix this?

IMG_3452.webp
 
Back
Top Bottom