The current code creates the link like this:

$variables['flag_friend_link'] = $flag->theme($flag->is_flagged($account_id) ? 'unflag' : 'flag', $account_id);

What I need to end up with is links that looks like:

<a class="author-flag-friend-add-icon" href="LINK TO ADD FRIEND">Add friend<span></span></a>
<a class="author-flag-friend-remove-icon" href="LINK TO REMOVE FRIEND">Remove friend<span></span></a>

(Yes, the empty span on the end is intentional, to allow for image replacement)

I was hoping to simply provide you with a patch so it was no hassle on your part but the code isn't using a normal l() that I can adjust. I don't actually know how to get the extra class & span into there. I don't have flag friend installed anywhere at the moment since I don't personally use it, which makes it harder for me to dig into it.

If you have a moment, I'd appreciate you making the adjustment(s) needed. Otherwise I'll install FF and hunt it down sometime before AF 2.x is released.

Thanks,

Michelle

Comments

sirkitree’s picture

Since we're using $flag->theme() here, it is left up to Flag module which actually creates the link with a .tpl file (@see flag/theme/flag.tpl.php). So I think what would need to happen here is to implement a preprocessor and change around the $link_text variable, appending the empty span. This would have to only be executed if APK is enabled.

michelle’s picture

Project: Flag Friend » Author Pane
Version: 6.x-1.x-dev » 6.x-2.x-dev

Ok, I'll pull this back into my queue and look to see what I can do in preprocessing. Thanks. :)

Michelle

michelle’s picture

Title: Author Pane adjustment » Make Flag Friend work with 2.x

Just renaming because the old title makes no sense now that it's in my queue. :)

Michelle

michelle’s picture

If anyone out there wants to jump in and work on this, feel free. I don't use Flag Friend so it's very low on my priority list. I'd like to see it included because FF is a nice module but I doubt I'll get to it any time soon since I don't need it for myself.

Michelle

michelle’s picture

I really hate to say this but I don't use FF and simply don't have the time to support it. If no one steps forward willing to maintain this integration, I'm going to have to pull it from AP 2.x. :( Nothing against FF, it's a nice module. I've just chosen to use User Relationships and there's only so much time to go around.

Michelle

michelle’s picture

Project: Author Pane » Flag Friend

Scooting this back to flag friend to see if it can attract any attention there since no one in my queue has jumped on it since November.

Michelle

michelle’s picture

Title: Make Flag Friend work with 2.x » Make Flag Friend work with Author Pane 2.x

Ugh, sorry for the multiple responses here. Just noticed the title.

Michelle

crea’s picture

Flag Friend 2.x will be different because it supports arbitrary number of user Flags (where each flag designates distinct relationship type). Also theming stuff has changed. Thus info provided in this thread is probably irrelevant. Are you sure you don't want to move it to 1.x ?

michelle’s picture

Version: 6.x-2.x-dev » 6.x-1.x-dev

1.x is fine. I didn't notice the version because it just copied it over from the same AP version. Basically, I'm just looking to support the integration whether it be a FF maintainer or another interested party. It's something I would like to have but I'm already chasing so many variables of contrib integration that I'm having to pull back and stick with the ones that I actually use as much as possible.

Michelle

sirkitree’s picture

Status: Active » Closed (won't fix)

Doesn't seem to have gained any attraction here either. Closing unless someone comes up with some code.

michelle’s picture

Yeah, doesn't look like it, unfortunately. :(

Michelle

crea’s picture

I'm sorry to admit,
these days I haven't got much time to work on Flag Friend (and on my other modules).
I planned to use it for one of my sites but it turned out too early thing to do.
I'm really looking forward to recent "Paying for the plumbing" movement. Perhaps community could work out a way for us developers to work on our modules full time...

Andrey

michelle’s picture

I'm still using User Relationships. I had planned to move to something custom but, honestly, my users just don't make use of the friending feature anyway so it hasn't been worth my time to move to anything else. Since I don't use Flag Friend, I just can't make time for maintaining the integration. If someone really wants it, they'll need to step up and take care of it.

Michelle