Coding-Spot

You are not connected. Please login or register

 
 
 

Adding background gradient for staff

Message (Page 1 of 1)

#1

Mark

Mark
 
Administrator
Administrator

Posted August 9th 2013, 6:26 pm

 
Hello! In this tutorial i'm going to show you on how to put a gradient background for staff/selected user, depends on how you'll handle this.

The demo is the same with the forumotion staff member.
Version: All Version

1. Go to Modules > HTML and JS Management > JS Management > Create a new Javascript: (Check in all pages)
- For PunBB:
Code:

jQuery(document).ready(function(){
jQuery(".post:has('.csrank')").css('background','url(http://i48.servimg.com/u/f48/17/48/49/15/photo10.png) repeat-y top left')});
- For Phpbb2:
Code:

jQuery(document).ready(function(){
jQuery("td.row2:has('.csrank')").css('background','url(http://i48.servimg.com/u/f48/17/48/49/15/photo10.png) repeat-y top left')});

jQuery(document).ready(function(){
jQuery("td.row1:has('.csrank')").css('background','url(http://i48.servimg.com/u/f48/17/48/49/15/photo10.png) repeat-y top left')});
- For Phpbb3:
Code:

jQuery(document).ready(function(){
jQuery("div.post:has('.csrank')").css('background','url(http://i48.servimg.com/u/f48/17/48/49/15/photo10.png) repeat-y top left')});
- For Invision:
Code:

jQuery(document).ready(function(){
jQuery(".postprofile:has('.csrank')").css('background','url(http://i48.servimg.com/u/f48/17/48/49/15/photo10.png) repeat-y top left')});
2. Now go to ACP > User and Groups > Ranks > Rank Administration > Add new rank: (Fill up)
- Rank name:
Code:
<span class="csrank">Rank here</span>
- Set as Special Rank: Yes


Then save. Tadaaa! Laugh Wink



Last edited by Mark on August 11th 2013, 10:40 am; edited 5 times in total



https://coding-spot.darkbb.com


#2

weeknight

weeknight
 
Senior Member

Posted August 9th 2013, 9:27 pm

 
hi bro mark, thanks for share new tutorial.

before i done try in phpbb2 version, but doesn't work,

background post still default use hex color. :)





#3

Mark

Mark
 
Administrator
Administrator

Posted August 9th 2013, 9:51 pm

 

*
THANKED

Make sure the variable for the rank is present on your viewtopic_body. Wink 



https://coding-spot.darkbb.com


#4

weeknight

weeknight
 
Senior Member

Posted August 9th 2013, 10:03 pm

 
what is a variable?
whether it should be in a state of default? Happy 





#5

Mark

Mark
 
Administrator
Administrator

Posted August 9th 2013, 10:04 pm

 
This one: Happy 
Code:
{postrow.displayed.POSTER_RANK_NEW}



https://coding-spot.darkbb.com


#6

weeknight

weeknight
 
Senior Member

Posted August 9th 2013, 10:19 pm

 
oh that code :)
but that code does not exist in my viewtopic_body bro mark Unsure 

how? :)





#7

Mark

Mark
 
Administrator
Administrator

Posted August 9th 2013, 10:22 pm

 
Yep. That's why the code isn't functioning. Just find this one:
Code:
{postrow.displayed.POSTER_AVATAR}
Then place this below it:
Code:
<br/>{postrow.displayed.POSTER_RANK_NEW}



https://coding-spot.darkbb.com


#8

weeknight

weeknight
 
Senior Member

Posted August 9th 2013, 10:49 pm

 
bro mark, work Happy

but i have little problem, gradient BG only work on mozilla browser
Adding background gradient for staff FHqsJmf

http://budokai.indonesianforum.net/t24-sdfsd#121

when i try open with google chrome or other (latest/new version), failed, background still use hex color/default :)

This seems to still have a problem Smile

how?





#9

Mark

Mark
 
Administrator
Administrator

Posted August 9th 2013, 11:00 pm

 
Ooops, something mistake on the code, can you try to copy it again then place on the JS Management.



https://coding-spot.darkbb.com


#10

weeknight

weeknight
 
Senior Member

Posted August 9th 2013, 11:15 pm

 
this bro mark :)

Code:
jQuery(document).ready(function(){
jQuery("td.row2:has('.nomedorank')").css('background','url(http://i48.servimg.com/u/f48/17/48/49/15/photo10.png) repeat-y top right')});
-----------
bro mark
gradient that only appears in "row2"
can also appear in "row1"? Happy





#11

Mark

Mark
 
Administrator
Administrator

Posted August 9th 2013, 11:43 pm

 
Codes are working with google chrome too. Nothing to worry about.
But for phpbb2 there is a slight bug, will provide the code tomorrow. Happy 



https://coding-spot.darkbb.com


#12

Mark

Mark
 
Administrator
Administrator

Posted August 11th 2013, 10:41 am

 
Done, check now the code for PhpBB2 Happy 



https://coding-spot.darkbb.com


#13

weeknight

weeknight
 
Senior Member

Posted August 11th 2013, 12:14 pm

 
ok solved bro mark, not bug again when open in chrome, :)

good tutorial Happy





#14

Mark

Mark
 
Administrator
Administrator

Posted August 12th 2013, 9:16 am

 
No problem! Blush Happy 



https://coding-spot.darkbb.com


#15

Sponsored content


 

Posted

 





Message (Page 1 of 1)

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

In total there is 0 user online :: 0 Registered, 0 Hidden and 0 Guests

Users browsing this forum: None