Welcome Guest [Log In] [Register]
Search Members Calendar | Rules ZB Code Index IF Code Index
ZBCode
  • Navigation
  • ZBCode
  • Coding Resources
  • Zetaboards Modifications
  • [SC] Latest Posts in Sidebar
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
  • Pages:
  • 1
  • 2
  • 3
[SC] Latest Posts in Sidebar
Tweet Topic Started: Dec 8 2008, 10:58 PM (2,451 Views)
HolySavior Dec 8 2008, 10:58 PM Post #1
Member Avatar
Modifying The World Around You

Posts:
2,488
Group:
Distinguished Coder
Member
#7
Joined:
Jul 2, 2008
Coding language
Everything
Alrighty many people have this for IF. So here is a ncie one for ZB.
If you have a side bar already and want to put it in one of those boxes follow the instructions.
If you dont. well than you can make a Div tag and use positioning in the CSS I can explain that later if people want.

alrighty! here we go!

Put this in your board theme.

Red = the url of your portal. sX.zetaboards.com/forumName/site/ something like that
Green = ID of the sidebar box you want it to be in.

Quote:
 

<script type="text/javascript">
/* Created by HolySavor of ZBcode and Javascriptin.com */

var theboard = "UR PORTAL URL"
var sidebar = $("#theposts");
$.ajax({
type : "GET",
url : theboard,
success : function (response) {
var edoc = document.createElement("DIV");
edoc.innerHTML = response;
var posts= $(edoc).find("div#portal_l").html();
sidebar.html(posts);

}
});

</script>


so once you get that done time to style it!
Edit this to your board.
Replace the #theposts part with the ID of your Sidebar. and than change the background and what not of your board :P
Quote:
 

/* Lastest posts on board */

#theposts h4 {
background:url(http://z3.ifrm.com/48/55/0/p34577/c_bg.gif) repeat-x top #F0F0F0;
border-left:1px solid #DAD9D9;
border-right:1px solid #DAD9D9;
color:#557496;
font-size:88.3%;
font-weight:400;
margin:0;
}
#theposts h2 {
background:url(http://z3.ifrm.com/48/55/0/p32555/h2.gif) repeat-x top left #577597;
color:#E7E7E7;
font-size:110%;
font-weight:700;
}
#theposts h2 {
padding:7px 5px 9px 0px;
text-align:center;
}
Edited by Reid, Jun 15 2009, 08:24 PM.
Offline Profile Goto Top
 
PIWYRCOM Dec 8 2008, 11:16 PM Post #2
Member Avatar
PrideInWhatYouRide

Posts:
368
Group:
Member
Member
#53
Joined:
Jul 17, 2008
Coding language
None
Sorry do not get this part ?

Quote:
 
''Green = ID of the sidebar box you want it to be in. ''


How do you get an sidebar box ID ?

And this too.. we have a few different sidebars on test themes but they do not all work in all browsers.
Quote:
 
If you dont. well than you can make a Div tag and use positioning in the CSS I can explain that later if people want.

Edited by PIWYRCOM, Dec 8 2008, 11:18 PM.
» TEST FORUM »
FIND IT HERE !
Spoiler: click to toggle

→ Infinite Results (themes)
→ ZBThemeZone (themes)

→ Big Boards (codes/themes)
→ ZBCodes (codes/themes)
→ The Coding Zone (codes/themes)

→ Code Index ('Official')
→ ZetaDoc's ('Official - How To Info')

Posted Image

Offline Profile Goto Top
 
HolySavior Dec 8 2008, 11:22 PM Post #3
Member Avatar
Modifying The World Around You

Posts:
2,488
Group:
Distinguished Coder
Member
#7
Joined:
Jul 2, 2008
Coding language
Everything
as for the Green Part. make sure you Div tag has an ID. that will be the div tag of your sidebar.

well you need one sidebar box. if you had to make several divs cuz of the browers than you did something wrong. sorry but 1 div can work for all browers.
Offline Profile Goto Top
 
PIWYRCOM Dec 9 2008, 12:06 AM Post #4
Member Avatar
PrideInWhatYouRide

Posts:
368
Group:
Member
Member
#53
Joined:
Jul 17, 2008
Coding language
None
OK got it to work on a test theme, just need to reposition where the sidebar shows.

We have our portal set up with all info on the left.
This picks up everything thats posted there not just the posts.

Do you know if the latest posts was by its self on one side would this be all it would pick up ?
» TEST FORUM »
FIND IT HERE !
Spoiler: click to toggle

→ Infinite Results (themes)
→ ZBThemeZone (themes)

→ Big Boards (codes/themes)
→ ZBCodes (codes/themes)
→ The Coding Zone (codes/themes)

→ Code Index ('Official')
→ ZetaDoc's ('Official - How To Info')

Posted Image

Offline Profile Goto Top
 
HolySavior Dec 9 2008, 12:22 AM Post #5
Member Avatar
Modifying The World Around You

Posts:
2,488
Group:
Distinguished Coder
Member
#7
Joined:
Jul 2, 2008
Coding language
Everything
hmmm.. didnt think about that.
try this
find this

var posts= $(edoc).find("div#portal_l").html();

replace with ....

var posts= $(edoc).find("div#portal_l").children(div.portal_box).html();

see if that works
Offline Profile Goto Top
 
PIWYRCOM Dec 9 2008, 01:20 AM Post #6
Member Avatar
PrideInWhatYouRide

Posts:
368
Group:
Member
Member
#53
Joined:
Jul 17, 2008
Coding language
None
Tried that and nothing would show.
So put the other back and it now shows as before.

The other issue we are having is every sidebar theme we have tried it on the sidebar is no longer beside the board but above it.

Is there a theme layout example you can post that shows how to do it ?
» TEST FORUM »
FIND IT HERE !
Spoiler: click to toggle

→ Infinite Results (themes)
→ ZBThemeZone (themes)

→ Big Boards (codes/themes)
→ ZBCodes (codes/themes)
→ The Coding Zone (codes/themes)

→ Code Index ('Official')
→ ZetaDoc's ('Official - How To Info')

Posted Image

Offline Profile Goto Top
 
HolySavior Dec 9 2008, 02:30 AM Post #7
Member Avatar
Modifying The World Around You

Posts:
2,488
Group:
Distinguished Coder
Member
#7
Joined:
Jul 2, 2008
Coding language
Everything
can you link me to your board?
Offline Profile Goto Top
 
PIWYRCOM Dec 9 2008, 01:06 PM Post #8
Member Avatar
PrideInWhatYouRide

Posts:
368
Group:
Member
Member
#53
Joined:
Jul 17, 2008
Coding language
None
We got it fixed (the part about having the sidebar right), maybe not the right way but it seems to be working in Chrome and IE.

What we did was put the sidebar box code in a left table set at 5% and the board in a table on the right set at 95%.

Using the ''no portal-blog-pages-sign in- etc'' code as part of it the sidebar is just a strip of color on the left until you get to the pages the code is not set to hide it on.

By wrapping it also in a manual scroll box the length of the index it contains it, and will then expand the sidebar wider to what ever the scoll box is set on. It goes from about 5% to 20%.

Seems to be working nicely, it also loads great to (considering all the other codes we have installed)

Here is a couple screenshots:

With the posts hidden with the ''No Portal etc'' code.
Posted Image

With it showing.
Posted Image
Edited by PIWYRCOM, Dec 9 2008, 01:18 PM.
» TEST FORUM »
FIND IT HERE !
Spoiler: click to toggle

→ Infinite Results (themes)
→ ZBThemeZone (themes)

→ Big Boards (codes/themes)
→ ZBCodes (codes/themes)
→ The Coding Zone (codes/themes)

→ Code Index ('Official')
→ ZetaDoc's ('Official - How To Info')

Posted Image

Offline Profile Goto Top
 
HolySavior Dec 9 2008, 01:20 PM Post #9
Member Avatar
Modifying The World Around You

Posts:
2,488
Group:
Distinguished Coder
Member
#7
Joined:
Jul 2, 2008
Coding language
Everything
nice i will be editing this. there have been acouple requests on ZB about this so there will be some updates/upgrades to this soon hopefully.
Offline Profile Goto Top
 
PIWYRCOM Dec 9 2008, 01:24 PM Post #10
Member Avatar
PrideInWhatYouRide

Posts:
368
Group:
Member
Member
#53
Joined:
Jul 17, 2008
Coding language
None
This should become extremly popular IF others can show how to do the sidebar that works in all browsers.
» TEST FORUM »
FIND IT HERE !
Spoiler: click to toggle

→ Infinite Results (themes)
→ ZBThemeZone (themes)

→ Big Boards (codes/themes)
→ ZBCodes (codes/themes)
→ The Coding Zone (codes/themes)

→ Code Index ('Official')
→ ZetaDoc's ('Official - How To Info')

Posted Image

Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · Zetaboards Modifications · Next Topic »
Locked Topic
  • Pages:
  • 1
  • 2
  • 3

Track Topic · E-mail Topic Time: 7:49 PM Jul 10
Hosted for free by ZetaBoards · Privacy Policy