Latest topics
» [HELP] About Profile Cover Code
by omarpop23 Today at 06:39

» bloquer un membre
by berlingo Yesterday at 18:19

» IconSkouliki Graphics
by skouliki Yesterday at 03:54

» [IN PROGRESS] Can this code work on pun version
by skouliki Thu 16 Nov 2017, 03:50

» Auto-suggest @mentions as You Type
by skouliki Wed 15 Nov 2017, 14:56

» [TUTORIAL] [ALL VERSIONS] Warning before posting
by demon99 Wed 15 Nov 2017, 08:12

» About Add Reply & New Topic button (popup form)
by omarpop23 Mon 13 Nov 2017, 20:31

» Hello everyone this is Adam from France
by Adam Mon 13 Nov 2017, 13:32

» Add a login popup for the toolbar
by Ape Sun 12 Nov 2017, 18:41

» Post a message automatically when locking a topic
by ThunderTB Sun 12 Nov 2017, 13:51

» Control pannel issue
by Ange Tuteur Sun 12 Nov 2017, 09:49

» BUG... forum members birthday's
by Ape Sat 11 Nov 2017, 11:44

» Display a Preview of Groups on Hover
by ThunderTB Fri 10 Nov 2017, 21:56

» Search box only visible on hover
by Ange Tuteur Mon 06 Nov 2017, 09:57

» [GAME] Animal Game
by SLGray Sun 05 Nov 2017, 15:04

Recent Tutorials
Who is online?
In total there are 11 users online :: 0 Registered, 0 Hidden and 11 Guests

None

[ View the whole list ]


Most users ever online was 172 on Fri 19 Feb 2016, 05:17

Stylize & Make Rank Titles Link To Groups

View previous topic View next topic Go down

avatar
Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 22
Posts : 4712
Points : 9584
Reputation : 2341
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Sat 03 Aug 2013, 18:34

Creating the rank title
Firstly you will need to create a new rank(at least for this tutorial if you're a novice)

Go to Administration Panel > Users & Groups > Ranks > Rank Administration > Add new rank

Now write the name of your rank into the rank title, for this tutorial I will be using Administrator. Once you have done that we will now make the title a link by adding:
Code:
<a href="/g1-administrators" class="Administrator" target="_blank">Administrator</a>

The group I am referring to is '/g1-administrators' if no primary url is present href will target local pages, for each group it changes, you can check these urls on the homepage. Our class being used is simple class="Administrator" this will be our hook selector so we can stylize the rank title through CSS. Lastly I am opening these ranks in a new window using target="_blank" you can remove or keep that depending on how you wish the rank link to behave.

Once you have edited the above to your liking be sure to save the rank title.

Stylizing the rank title
Now that we have our rank title and hook selector setup we can start stylizing our rank.

Go to Administration Panel > Display > Pictures and Colors > Colors > CSS Stylesheet

Our selector we will be using is 'a[href="/g1-administrators"].Administrator' read the following for a quick explanation. 'a[href="/g1-administrators"]' will help us stylize the url, it selects every '< a>' element whose href attribute value contains the substring "/g1-administrators". '.Administrator' is our basic selector for stylizing the default text of the rank title. Putting two together will help us in fully customizing the rank title however, this combination will not display properly on outdated browsers.

The setup I am using is the following, you can replace the selectors I have if you're using different ones.
Code:
a[href="/g1-administrators"].Administrator{
color: #C20000;
font-weight:bold;
text-shadow: 0px 0px 6px #C20000;
transition:0.5s;
}
.Administrator:hover{
margin-left:10px;
}

Once you have pasted the code into your stylesheet be sure to hit submit to apply the changes! Afterwards you should now have a stylized rank title that also links to the group of that title. Good luck! Wink

Explanations
For the transition effect we use the pseudo selector ':hover' on our basic selector.(.Administrator) When a user hovers their mouse over the rank the rank will move to the right by 10px; by adding a margin of 10px over 0.5seconds to the left which creates the effect of a moving unit. You can remove the hover and transition effect entirely if you do not prefer such.

Explanation :
color: This will allow you to modify the color of the rank title; you can specify colors using RGB, Hex, or text.
font-weight: This allows you to adjust the weight of the font using numbers or text.(700 is bold and bold is bold)
text-shadow: This allows you to create a text shadow for the text.(Read This for detailed info.)
transition: This specifies the amount of time it takes to complete a hover effect.
margin-left: This is the margin added to the left on a hover, it is specified in pixels(px) you can add different hover effects if you wish. Be sure to modify transition for different speeds.


Tutorial written by Ange Tuteur
avatar
Beyonder
Member
Title :
Gender : Male
Age : 21
Posts : 18
Points : 1338
Reputation : 6
Location : Beyond Realm
Language : English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other
Awards :
View all awards
View user profile http://narutorpguniverse.forumotion.com

PostBeyonder on Sat 25 Jul 2015, 05:33

Does this also work for hidden groups?
and how do i get the same title ranks as yours?
avatar
Michael_vx

Title :
Gender : Male
Age : 25
Posts : 301
Points : 1742
Reputation : 75
Language : Arabic
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other
Awards :
View all awards
View user profile http://miccsoft.net https://www.facebook.com/Michaelvx2008

PostMichael_vx on Sat 25 Jul 2015, 11:52

can i see a preview as Example Very Happy
thank you
also please look in my question in the qeustions section thank you

View previous topic View next topic Back to top

Create an account or log in to leave a reply

You need to be a member in order to leave a reply.

Create an account

Join our community by creating a new account. It's easy!


Create a new account

Log in

Already have an account? No problem, log in here.


Log in

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