View Full Version : Help With Grid
pwhitehead
11-09-2013, 04:42 PM
Hello... I kinda get how to make a custom grid. Going to yahoo's coding and working with their UI on building a grid doesnt help because it wont work with vb's framework. I see lots of class titles and references which I have no idea what they mean. Is there a list or a guide explaining what terms mean what?
<style type="text/css">
.two_columns {float: right;}
.col_1 {width: 240px; float:left; margin-right: -250px;}
.col_2 { float:left; margin: 0 250px;}
.col_3 {width: 240px; float: right; margin-left: -250px; }
</style>
<div id="doc3" class="yui-tvb-l3">
<div class="two_columns">
<div class="col_2">
<ul class="list_no_decoration widget_list" id="widgetlist_column2">$column[2]</ul>
</div>
<div class="col_3">
<ul class="list_no_decoration widget_list" id="widgetlist_column3">$column[3]</ul>
</div>
</div>
<div class="col_1">
<ul class="list_no_decoration widget_list" id="widgetlist_column1">$column[1]</ul>
</div>
</div>
Good example is in the quotes. How am i suppose to know what the different id's are like "widgetlist?" Yes its pretty obvious what it is, but there are other id's and classes that are hard to figure out. Any help would greatly be appreciated. If i were to make a box that i can put 3 smaller boxes inside of it and a larger box below that so my main news can go there, how would this be implemented? What are the class and different ID's that need to be used? Making the grid isnt the hard part, its knowing the classes and ID's to put.
Lynne
11-09-2013, 06:32 PM
widget_list is just a CSS class - it styles the grid. So is list_no_decoration. Try removing it and see what happens. ids are just *unique* identifiers (make sure they are unique!).
pwhitehead
11-09-2013, 06:44 PM
Are there tutorials specifically for building grids for vbulletin? Um.. I'm really confused.. Like under the header if i wanted a main container, with 3 small containers side by side. Under that a main container just for the news. How would this be done? And im just coming up with this out of plain randomness... I'm trying to grasp the concept of building my own. Are regular css classes used that you would ordinarily see in Dreamweaver, like sidebar, so on and so forth?
Lynne
11-09-2013, 06:47 PM
I have seen no tutorials. It's all just CSS really. You don't need to use the yahoo guis, you can just write your own CSS for the divs.
pwhitehead
11-09-2013, 06:54 PM
Can you break a basic grid down and explain to me the different parts of it and what they mean?
<div id="doc3" class="yui-tvb-l3">
<div class="two_columns">
<div class="col_2">
<ul id="widgetlist_column2">$column[2]</ul>
</div>
<div class="col_3">
<ul id="widgetlist_column3">$column[3]</ul>
</div>
</div>
<div class="col_1">
<ul id="widgetlist_column1">$column[1]</ul>
</div>
</div>
what do the widgetlists_column1 lines mean, with the string $collumn[1]. there is really no tutorials around the vb forums explaining and breaking this all down.
Lynne
11-09-2013, 11:43 PM
As I already said the widgetlists_column1 is the unique id. In this case, they have it correspond to the column number. So, if you have a $column[4], use the id widgetlists_column4.
In the modifications forum is a mod thread that has a whole bunch of downloadable grids. You may want to take a look at those as they may help you understand it a bit more.
tbworld
11-10-2013, 12:38 AM
Thanks Lynne for the information :)
pwhitehead
11-11-2013, 12:42 AM
are the column strings a vbulletin string so that forum identifies it? other than that, its just a bunch of div boxes inside of div boxes? So each div u make u have to identify it with a $column[#]? There should really be tutorials on this, or more explained in the vb manual.
Lynne
11-11-2013, 04:24 PM
Every column you have where you want to add a module/widget must be identified as $column[x] or you will not see them when you try to use the Layout Manager to add modules/widgets.
pwhitehead
11-17-2013, 12:18 PM
still cant believe there's no tutorials out there explaining how a grid is coded. its nice to get grids made by others, but you cant understand unless you understand the coding. is there any grids out there thats commented and explained how it was made? can you make a tutorial lynne?
ozzy47
11-17-2013, 12:22 PM
Perhaps this will help.
http://www.vbulletin.com/vbcms/content.php/562-Using-CMS-Grids-Layout
pwhitehead
11-17-2013, 12:30 PM
This tutorial i understand. This does not explain the coding that goes into it.
ozzy47
11-17-2013, 12:32 PM
I would suggest then, downloading a grid then, and study the code. There is no tutorial on how to code, you have to learn it. :)
pwhitehead
11-17-2013, 12:36 PM
Ok.. How is one suppose to study the code if we dont know what each line of code is?
<div id="doc3">
<div id="bd">
<div class="yui-gb">
<div class="yui-u first yui-panel">
<ul class="list_no_decoration" id="widgetlist_column1" style="width:100%">$column[1]</ul>
</div>
<div class="yui-u yui-panel">
<ul class="list_no_decoration" id="widgetlist_column2" style="width:300px">$column[2]</ul>
</div>
<div class="yui-u yui-panel">
<ul class="list_no_decoration" id="widgetlist_column3" style="width:300px">$column[3]</ul>
</div>
</div>
</div>
</div>
what is a yui-gb class? what is yui-u first yui-panel referenced to?
ozzy47
11-17-2013, 12:38 PM
Those are classes that call to the css
pwhitehead
11-17-2013, 12:41 PM
are they classes that are made up by the creator or are they classes that identify a certain thing to each cell? This is what needs to be explained dude..
--------------- Added 1384695900 at 1384695900 ---------------
are the classes specifically used to make the grid, or is it a class the coder makes up?
ozzy47
11-17-2013, 12:45 PM
You really need to learn to code with html, css
http://www.codecademy.com/tracks/web
http://www.w3schools.com/
pwhitehead
11-17-2013, 12:47 PM
i understand how to code html and css. what i wana know is, can any class be used in those spots or does it have to be yui-gb as the class, the same with yui-u yui-panel? Can any classes be used in these spots. That and where is the reference in the manuals about the $column strings that have to be used? Everything else is explained in the manuals except this.
--------------- Added 1384697531 at 1384697531 ---------------
well? your just gonna give up on me? is it all just basic css and html and you use an id $ for the columns? this needs to be explained man.
Lynne
11-17-2013, 06:57 PM
All the yui stuff is from here - http://developer.yahoo.com/yui/grids/
pwhitehead
11-17-2013, 10:50 PM
but are the yui names needed for the classes? or can i use my own class names for each one of the tables? you guys keep beating around the bush and turn away from explaining.
tbworld
11-18-2013, 02:32 AM
but are the yui names needed for the classes? or can i use my own class names for each one of the tables? you guys keep beating around the bush and turn away from explaining.
First, "be nice", no one here has to answer your questions, most/all of us volunteer are time to help others in this community, think of us as enthusiasts. This is "not" vbulletin support.
Second, @Lynne answered your question -- in my opinion -- correctly, and referred you to the YUI manual.
Third, sometimes we do not know the answer, because we haven't worked on that section of the code ourselves. So we then try to steer you in the right direction, like supporting documents.
You will get the most help here when we can clearly understand your programming goal and we can follow along in your project, otherwise we have no real vested interest in what you are doing. References to your code should be provided for convenience. If it's vbulletin code, you cannot post it, but you can refer to a file/line# where we can follow along.
I hope this will help you in understanding the community here. It is all good. :)
Lynne
11-18-2013, 03:24 AM
I already told you to just use plain old CSS if you want. The yui stuff is already defined and so it's easy to use. But, if you don't want to use it, just write your own. They are classes - CSS. So, you can write it or rewrite it however you want. If you don't understand what CSS is, then you need to read up on understand Cascading Style Sheets.
pwhitehead
11-18-2013, 03:35 AM
With all due respect, I'm not beating up on anybody. It's a shame there is no references in the vbulletin manual or tutorials around on how to build a grid and how to code them as normal CSS. The only tutorial out there is how to flatten a grid and add custom code. Every time I've posted a question or have see questions posted by other members they are always left with a link with no explanation as if no one wants to help. I'm not asking for you guys to code my site, but better answers or more explanation is more useful. It's easy for someone to just post a link referencing to learn html or CSS then actually giving help so the person doesn't have to make the same threads and asking the same question over and over again. No flaming or trying to be rude here, just looking for help.
Lynne
11-18-2013, 04:54 PM
Basically, if you don't want to use any of the grids supplied in the Grid Manager, then you need to create a new grid and flatten it. Once it's flattened, you need to use CSS to create your own grid. If you want to use the yui classes, then those are available, but I've always just figured it's easier to just use your own CSS to make it look how you want.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.