Recent Tutorials
Who is online?
In total there are 5 users online :: 0 Registered, 0 Hidden and 5 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

Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4091
Points : 8393
Reputation : 2009
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Google Chrome 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
Beyonder
Member
Title :
Gender : Male
Age : 20
Posts : 18
Points : 993
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?
Michael_vx

Title :
Gender : Male
Age : 24
Posts : 290
Points : 1371
Reputation : 74
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