Log in

View Full Version : Image next to Username for Members that have donated...


Welshy2008
03-24-2009, 04:14 PM
Hi guys,

Before I upgraded from 3.6.8 PL2 to 3.8.1 PL1, I had a seperate usergroup that has a "Golden Cup" image linked to it.

What would happen is that when a member made a 'Donation' to the forum, I would add them as a member of this group. In return the Golden Cup would show to the right of their username.

Although the usergroup is still there, The golden cups have vanished.

I have forgotten how I did this previously, so would there be anyone out there that could explain to me how I could get it to work again please?

Many Thanks.

Lynne
03-24-2009, 04:18 PM
The easy way to do it is to add it in the username html markup in the usergroup manager.

Welshy2008
03-24-2009, 04:23 PM
Hi Lynne,

I failed to mention that I tried that, Sorry. It shows with a border line around it and they show in the "Members that have visited in the last 24 hrs" section as suchh too, and it looks terrible.

Lynne
03-24-2009, 04:26 PM
Exactly where is it that you wish to have this image show then? Only on the showthread page? Have you considered using Ranks?

Welshy2008
03-24-2009, 04:28 PM
What would also show is, for exmple, let's say that the username is: Dobe.

When you hover your mouse over the username, it would show (title/alt) Dobe has donated

--------------- Added 1237915768 at 1237915768 ---------------

On the post bit, profile and the users' posts, are where I would ideally like them to be seen. Not on the "Members that have visited" section, though. :|

--------------- Added 1237915996 at 1237915996 ---------------

Ranks, Lynne?

Lynne
03-24-2009, 04:49 PM
For the hovering on the username on the main page, you can just edit the template (to find the template - vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of the template called around your part of the code. Sometimes the template is the one mentioned at the very top of the page source.) and add into the <a> tag a condition:
<if condition="is_member_of($loggedin,x)">title="$loggedin[username] has Donated"</if>

And in the postbits, you could just add in this condition where you want:
<if condition="is_member_of($post,x)">image code</if>

As for Ranks, just take a look in the manual - link in my sig and under Quick Links.

Welshy2008
03-24-2009, 06:13 PM
I would have to do that for every user?

There was a much siplier way of just selecting the tick box of the usergroup that I set up for the "Donators" and the Golden Cup would automatically appear at the side of their username.

It is driving me mad that I can't remember. :(

--------------- Added 1237923336 at 1237923336 ---------------

I have just tried the "Rank" option and I got the following error....


Forbidden
You don't have permission to access /admincp/ranks.php on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

--------------- Added 1237925874 at 1237925874 ---------------

I have added the image as HTML in the Rank.

It shows on the right, under the reputation bars in the profile,


And under the username in the postbit. (where I wanted it) - Thanks Lynne.


How exactly - do I add the title/alt of "[username] (whoever it maybe) Has donated, Please?

I do believe that it is something like {1}?

I would like to add this to their profile and Posting ones only - If that makes sense?


Thanks Again,

Lynne
03-24-2009, 08:07 PM
is_member_of is a usergroup function. So, if you use it, you are setting a condition for whether a user is in that usergroup. So no, you don't need to do a condition per user id.

Do you mean you want an actual title - like mine here is Moderator - of just the alt text which is what you get when you hover over a name?

Welshy2008
03-25-2009, 08:16 AM
Just the alt text when the mouse is hovered over a name, please Lynee.

Lynne
03-25-2009, 03:00 PM
You can either add it to the link using title or to the image using alt="" . I outlined how to do it in post 6.

Welshy2008
03-26-2009, 05:54 PM
Tried that Lynne, But it failed to work.

Thanks anyway. :(

Lynne
03-26-2009, 06:13 PM
It doesn't help for you to just say you "tried that". You should post exactly what you did and where or else I have no clue and can't help.