Welcome Guest [Log In] [Register]
Search Members Calendar | Rules ZB Code Index IF Code Index
ZBCode
  • Navigation
  • ZBCode
  • Coding Support
  • InvisionFree and Zetaboards Support
  • [IF] Modify the look of my posts
Hey, welcome to ZBCode, the premier coding forum for ZB. Here you fill find some of the best Invisionfree and Zetaboards Codes on the network! Unfortunately, you're sorta hovering around in guest mode at the moment; why not join in on the fun? Register an account and you can start accessing the wealth of resources we have available here. Enjoy your stay at ZBCode, and remember to tell all your friends about us; the more members, the more codes available. ;)

Interested in joining? Click here.


If you are already a member of ZBCode, feel free to login right here:

Username:   Password:
Locked Topic
[IF] Modify the look of my posts
Tweet Topic Started: Apr 25 2010, 11:43 PM (242 Views)
The Truth Apr 25 2010, 11:43 PM Post #1


Posts:
22
Group:
Member
Member
#3,711
Joined:
Feb 28, 2010
Hi everyone!

This is what my posts look like now:

Posted Image

This is my goal:

Posted Image


Color Codes for different membergroups:

Code:
 
<script type='text/javascript'>
<!--
var admincolor="#816B08",
admin2color="#645305",
modcolor="#0B2F0B",
mod2color="#092609",
memcolor="#241D13",
mem2color="#1F1810",
donorcolor="#11114E",
donor2color="#0D0D3C";

GET_SPAN=document.getElementsByTagName('SPAN');
for(a=0; a<GET_SPAN.length; a++){
n=GET_SPAN[a];
if(n.className=="postdetails" && n.innerHTML.match(/Group: Admin/i)){
n.parentNode.parentNode.parentNode.parentNode.className="admin";
document.write("<style type='text/css'>.admin .post2, .admin .post1 { background-color:" + admincolor + "} </style> <style type='text/css'>.admin .row4 { background-color:" + admin2color + "} </style>");
}
if(n.className=="postdetails" && n.innerHTML.match(/Group: Moderators/i)){
n.parentNode.parentNode.parentNode.parentNode.className="moderator";
document.write("<style type='text/css'>.moderator .post1, .moderator .post2 { background-color:" + modcolor + "} </style> <style type='text/css'>.moderator .row4 { background-color:" + mod2color + "} </style>");
}
if(n.className=="postdetails" && n.innerHTML.match(/Group: Members/i)){
n.parentNode.parentNode.parentNode.parentNode.className="member";
document.write("<style type='text/css'>.member .post1, .member .post2 { background-color:" + memcolor + "} </style> <style type='text/css'>.member .row4 { background-color:" + mem2color + "} </style>");
}
if(n.className=="postdetails" && n.innerHTML.match(/Group: Donors/i)){
n.parentNode.parentNode.parentNode.parentNode.className="donors";
document.write("<style type='text/css'>.donors .post1, .donors .post2 { background-color:" + donorcolor + "} </style> <style type='text/css'>.donors .row4 { background-color:" + donor2color + "} </style>");
}
}
//-->
</script>


Is there anyway I can get rid of the cells in my posts, and divide the post into 3 colors, 1 for the area with the username, 1 for the post contents and finally one for the border?

Thanks in advance for any help!! :)

-Truth ^_^
Offline Profile Goto Top
 
Kitsueki Apr 26 2010, 01:43 AM Post #2
Member Avatar
♠ Aizu

Posts:
742
Group:
Dedicated
Member
#3,453
Joined:
Aug 31, 2009
This isn't a matter of HTML and CSS, what you're changing is the HTML of the board, which you can't really access as far as I know.

Achieving the effect would be easy, if you could access the board's HTML.

Idk if this can be done with javascript either, lol.
Kingdom of Etruria
Spoiler: click to toggle
Kingdom of Etruria


Starring in the Medieval times, this Kingdom is an isolated territory not bothered by any other Kingdoms.
The military has recently caught on to something big, and its their job to stop it.
Will you walk your own path, or aid the Etrurian Military in exterminating the evil that is about to come forth?
It's Ready!

Kingdom of Etruria is a Roleplaying forum I created, also with the help of a few friends.
You can pick from many classes, fight any way you want, and gain rank in the military, or even start your own Faction.
It all starts with a Character Registration, if you're interested in taking part of this RP, PM me and I'll be sure to give you the link when I open it.
There are many things to do at Kingdom of Etruria, so be sure to find out for yourself
Thanks for reading!

Offline Profile Goto Top
 
The Truth Apr 26 2010, 02:24 AM Post #3


Posts:
22
Group:
Member
Member
#3,711
Joined:
Feb 28, 2010
What about just changing which cell has which color. For example have the username cell and the one directly under it one color, and the rest of the post another color.

As for the borders, I'm pretty confident that this would be possible because all hidden posts on my forums have red borders and red backgrounds?

...But then again what do I know :P
Offline Profile Goto Top
 
Kitsueki Apr 26 2010, 02:59 AM Post #4
Member Avatar
♠ Aizu

Posts:
742
Group:
Dedicated
Member
#3,453
Joined:
Aug 31, 2009
Give me some time to tinker with some CSS, i'll see what I can come up with.


EDIT: Getting all the rows BG color to be the same is easily done. As far as the border I can't seem to figure out how to change it.
Edited by Kitsueki, Apr 26 2010, 03:13 AM.
Kingdom of Etruria
Spoiler: click to toggle
Kingdom of Etruria


Starring in the Medieval times, this Kingdom is an isolated territory not bothered by any other Kingdoms.
The military has recently caught on to something big, and its their job to stop it.
Will you walk your own path, or aid the Etrurian Military in exterminating the evil that is about to come forth?
It's Ready!

Kingdom of Etruria is a Roleplaying forum I created, also with the help of a few friends.
You can pick from many classes, fight any way you want, and gain rank in the military, or even start your own Faction.
It all starts with a Character Registration, if you're interested in taking part of this RP, PM me and I'll be sure to give you the link when I open it.
There are many things to do at Kingdom of Etruria, so be sure to find out for yourself
Thanks for reading!

Offline Profile Goto Top
 
The Truth Apr 26 2010, 04:23 AM Post #5


Posts:
22
Group:
Member
Member
#3,711
Joined:
Feb 28, 2010
To make things so much easier (or at least I think lol); this below would be fine :)

Posted Image

Would just need to change which cells are colored with my post color code :)
Edited by The Truth, Apr 26 2010, 04:23 AM.
Offline Profile Goto Top
 
Kitsueki Apr 26 2010, 05:46 AM Post #6
Member Avatar
♠ Aizu

Posts:
742
Group:
Dedicated
Member
#3,453
Joined:
Aug 31, 2009
That would be easy, but it'd be reversed.
In the top row, theres 2 cells, which use a class (A class is like ID but it can be used for more than one thing). Unfortunately they both use the same class, and we can't reassign them any ID's or Classes. The top row uses a class of '.row 4' and the post info and post area use a class of '.post 2'
whatever color you set applies to both sides.

I don't know how to do what you're asking without getting a completely different effect, this and I have no way of changing the border color (to my knowledge)

Sorry, try posting this in Code Requests, hopefully someone will notice that has a proper solution.
Kingdom of Etruria
Spoiler: click to toggle
Kingdom of Etruria


Starring in the Medieval times, this Kingdom is an isolated territory not bothered by any other Kingdoms.
The military has recently caught on to something big, and its their job to stop it.
Will you walk your own path, or aid the Etrurian Military in exterminating the evil that is about to come forth?
It's Ready!

Kingdom of Etruria is a Roleplaying forum I created, also with the help of a few friends.
You can pick from many classes, fight any way you want, and gain rank in the military, or even start your own Faction.
It all starts with a Character Registration, if you're interested in taking part of this RP, PM me and I'll be sure to give you the link when I open it.
There are many things to do at Kingdom of Etruria, so be sure to find out for yourself
Thanks for reading!

Offline Profile Goto Top
 
The Truth Apr 26 2010, 06:14 PM Post #7


Posts:
22
Group:
Member
Member
#3,711
Joined:
Feb 28, 2010
Hmm I guess I will just give up on this xD
Edited by The Truth, Apr 26 2010, 06:14 PM.
Offline Profile Goto Top
 
RedBldSandman Apr 27 2010, 12:11 PM Post #8
Member Avatar
ZIPPY!

Posts:
482
Group:
Coding Staff
Member
#2,122
Joined:
Jan 25, 2009
Code:
 
.row4[valign=middle] {
background:#FFFFFF;
}

.row4[valign=top] {
background:#000000;
}

.post1[valign=top],.post2[valign=top] {
background:red;
}

.post1[valign=top][width="100%"],.post2[valign=top][width="100%"] {
background:green;
}
Try putting that in your CSS, it should make everything brightly coloured and you can then change the backgrounds :) The only problem would be these classes (with the same attributes) being used in other places but I had a quick scout around and I couldn't find any. If there are then post back here :O
Posted Image
"To iterate is human, to recurse divine."

Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · InvisionFree and Zetaboards Support · Next Topic »
Locked Topic

Track Topic · E-mail Topic Time: 3:37 AM Jul 11
Hosted for free by ZetaBoards · Privacy Policy