The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Awards System With Hover Over

Go down

Tutorial Awards System With Hover Over

Post by SLGray June 13th 2018, 8:02 am

Profile Awards With Hover Over Names

Dear members,

We are often asked how you can add an item to your profiles and add a name to the items when you hover over them.
I have made an awards system using this.

Great news is We now have a code that is easy to use and understand With thanks to @Walt From the French support forum.

This comes in 3 easy steps.

Step 1
Create a new profile filed.

ACP >> Users & Groups Tab >> Users >> Profiles >>

Type : Text Zone.
Name : Profile Rewards (Or what ever your like)
Description : (what ever your like)
Display : Profile Messages
Display type : (what ever your like)
Who can modify the profile field value ? Moderators
Display this field for users that are at least : (what ever your like)
Separator :
(what ever your like)
Default content * :
[center][table][tr][td class="scrollable-zone"]No Awards Yet[/td][/tr][/table][/center]
Max length : 15000

Now save.

Step 2

Create a JavaScript
ACP >> Modules Tab >> HTML & JAVASCRIPT >> Javascript codes management >>

Title * : Profile Awards.
Placement : Topic's
$(function() {
  var all_items_images = [
    '', //Reward 1
    '',  // Reward 2
    '', // Reward 3
    '', // Reward 4
    '', // Reward 5
    '', // Reward 6
  var all_items_legend = [
    'You hit 100 posts',                  // Reward 1
    'You hit 200 posts',                  // Reward 2
    'You hit 500 posts',                  // Reward 3
    'You hit 5000 posts',                // Reward 4
    'You get 100 likes',                  // Reward 5
    '10 Or More Items From Credit Store', // Reward 6
  $('.postprofile .scrollable-zone img').each(function() {
    var a = all_items_images.indexOf( $(this).attr('src') );
    $(this).attr('title', all_items_legend[a]);


The only way to give a title to each item is to find it with the URL of the image. That's why we have to list in the variable all_items_images all the images available in this profile zone. I already put in this variable all the items that were in your profile, but if there are others, you will have to add it.

In order to give a title to each item, we have the variable all_items_legend, and each line is the legend of the equivalent image in the all_items_images variable.

For example :

Awards System With Hover Over CBGrrqL

So if you add images, you will add the legends in the same order... I hope I'm clear ahah

Step 3

Adding your Awards to your members profile's:
Go to your members profile you want to add a Award to and add one of the following codes found in the list below.

Adding your Awards :
I have made 6 for you but you can make your own if you wish.
See Awards:
Adding more than one:
Say you want to add the first one and the last one just do the following


You will have to add the code where you see this part of the code. No Awards Yet
the code should look something like this
[center][table][tr][td class="scrollable-zone"][img][/img][img][/img][/td][/tr][/table][/center]

Note: You will have to add this (Manually) to each member (sadly This system does not have a auto fill setting) Then Save.

And this is the result :
Awards System With Hover Over Ezgif_17

This should work in all forums unless you have made a lot of change to your Templates.
I hope you like this little cool setting.
If you have any problems Please feel free to make a thread in the main forum linking me to this thread and tagging me.

Awards System With Hover Over Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.

Male Posts : 51408
Reputation : 3519
Language : English
Location : United States

trajce likes this post

Back to top Go down

Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum