VampireFreaks
[ Vampirefreaks.com ]



VFLayouts.com - Vampirefreakss Official Layout Site

Vampirefreaks Buttons



Pick a Section




Button Classes


Like most of the stuff on your VF page, each button (or input) has its own class, a sort of ID by which it can be referred to when you want to change or hide it.
Nb there is one slight difference between button classes and table/ image etc classes on your profile- for buttons, the class is attached to the form the button is in and not the button itself, so you need to add "input" after the class to do anything to it other than hiding, otherwise the invisible form (and not the button) is all that will be affected. With hiding, the class alone will suffice because hiding the form also hides everything in it.
If this makes no sense, don't worry, just copy and paste the full class with the input bit- that will always work.

button classes


As well as having their own individual classes, the buttons are in 3 separate tables, which is handy if you want to hide 2 or 3 together without writing out each buttons separate class. These are the groups.

button groups


To change things about any button, you can just refer to it by its class, for instance, to make the report button red, the code would be:

<style type="text/css">
.report input { background: red; }
</style>


Remember, if all you want to do is hide the button, you can skip the input part if you like:

<style type="text/css">
.addfriend { display: none; }
</style>


And if you want to hide a bunch of buttons together, you can use their group class-

<style type="text/css">
.buttons1 { display: none; }
</style>





Affecting All Buttons


A note for the lazy- If you want to affect every button on your page in exactly the same way, you can do away with the classes and simply apply your styles to input. This will affect every button on your page, for instance:

<style type="text/css">
input { background: red; }
</style>

Will give them all a red background, or:

<style type="text/css">
input { display: none; }
</style>

will hide them all. Remember, input is NOT a class. There is no dot before it, and hiding all inputs is only a good idea if you don't want custom buttons of your own- it will hide all buttons- VFs, yours, and the little round buttons on your rate bar.





Writing Your Own Buttons


If you want to change the text on your buttons, you have to hide the originals and write your own in. Here's the code for each button:


o Report Button
<form action='http://vampirefreaks.com/u/admin' method='post'>
<input type='submit' value='REPORT BUTTON TEXT'>
</form>



o Block Button
<form action='http://vampirefreaks.com/profile_action.php?user=YOUR VF NAME' method='post'>
<input type='hidden' name='block_user' value='1'>
<input type='submit' value ='BLOCK BUTTON TEXT'>
</form>



o Add Friend Button
<form action='http://vampirefreaks.com/profile_action.php?user=YOUR VF NAME' method='post'>
<input type='hidden' name='friendslist' value='1'>
<input type='submit' value='ADD FRIEND TEXT'>
</form>



o Add Favorite Button
<form action='http://vampirefreaks.com/profile_action.php?user=YOUR VF NAME' method='post'>
<input type='hidden' name='favorites' value='1'>
<input type='submit' value='ADD FAVORITE TEXT'>
</form>



o Add to Cult Button
<form action='http://vampirefreaks.com/group_inviteuser.php?user=YOUR VF NAME' method='post'>
<input type='submit' value='ADD TO CULT TEXT'>
</form>



o Add to Shitlist Button
<form action='http://vampirefreaks.com/profile_action.php?user=YOUR VF NAME' method='post'>
<input type='hidden' name='shitlist' value='1'>
<input type='submit' value ='ADD TO SHITLIST TEXT'>
</form>



o Comment Button
<form action='http://vampirefreaks.com/user_comment.php?user=YOUR VF NAME' method='post'>
<input type='submit' value='COMMENT BUTTON TEXT'>
</form>



o Rate & Comment Button
<form action='http://vampirefreaks.com/user_comment.php?user=YOUR VF NAME&rate=1' method='post'>
<input type='submit' value='RATE & COMMENT TEXT'>
</form>






Hiding Buttons


Hiding buttons is done by applying display: none; to the button(s) you want to hide. You can hide individual buttons by referring to them by their class [ click here for all buttons classes ] like this:

<style type="text/css">
.report { display: none; }
</style>


Or if you want to remove a few at once, referring to them by their [ group class ] is quicker:

<style type="text/css">
.buttons1 { display: none; }
</style>


Finally, to get rid of them all, you can use

<style type="text/css">
input { display: none; }
</style>

(removes ALL inputs including custom ones and the little round buttons on the rate bar)

If you just want to remove VFs buttons use:

<style type="text/css">
.buttons1, .buttons2, .buttons3 { display: none; }
</style>





Decorating Buttons


You can give your buttons backgrounds, borders, colors, text styles.. in fact just about anything! Let's use the report button as an example. To apply a border:

<style type="text/css">
.report input { border: 1px solid red; }
</style>


Or how about a background:

<style type="text/css">
.report input { background: white; }
</style>


You could even use a background image:

<style type="text/css">
.report input {
background: url('http://URL OF YOUR IMAGE.gif');
background-position: top right;
background-repeat: no-repeat;
}
</style>

[ More on backgrounds and borders ]

To affect more than one button at once, you could just apply your styles to input (this affects all buttons):

<style type="text/css">
input {
border: 1px solid red;
background: white;
}
</style>


Or, if you just want to affect two or three, don't forget that they have [ group classes ] too. This code would make only the comment, and rate & comment buttons blue:

<style type="text/css">
.buttons3 input { background: navy; }
</style>





Design by [ KineticShock.com ] && [ PrintedExistence[dot]com ]
All content copyright © PrintedExistence 2006 - 2008


Contact VFLayouts
[ Contact VFLayouts! ]