View Full Version : BETA: FULL WIDTH module - creating an ABOUT US block
memobug
01-03-2005, 05:46 AM
For various reasons I thought it would be a good idea to have a full width module at the top of my homepage. I am using it as a welcome block, but I can see other applications.
I thought I would share this template hack because it's pretty darn simple.
IN ACTION:
I am using this template hack at http://www.bonsaiTALK.com It's used to create the the "About bonsaiTALK" block that is only visible to folks not logged in.
HOW TO DO IT
Creating the block requires creating a new template, attaching it to a module and activating it.
Posted below is a template modification that you can use to create a full width module. You want to install it in the left column and make sure that it is the FIRST block rendered on the page where it's used.
1. First create a new template - I called mine "adv_portal_fullwidth" and put the code below in it. You can leave out the comment lines if you wish.
2. Replace the PUT YOUR STUFF HERE with the contents of the block that you want to appear across the top. You can use the code taken from any existing module or create something new. Whatever you put there will bridge all the columns beneath it.
3. Replace the part that says
td width="180" towards the bottom with your actual first column's width as you've set it up in your vbadvanced options.
4. in your admincp VBA_CMPS tool, create and enable a new module called topspan or something. Point it to "fullwidth" for the template (leave off that adv_portal part). Enable it and select for whom it should be viewable. I made mine visible only to Unregistered/Not Logged In users because I want to use it as kind of a splash page bit that will disappear once they've joined
5. Make sure it is first in the sequence and put it in the leftmost column.
<!-- START Full width module -->
<!-- closing off the existing table, as unused -->
</td></tr></table>
<!-- opening the new fullwidth table -->
<table align="center" class="page" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td width="100%">
<!-- PUT YOUR NEW TEMPLATE RIGHT HERE!!! -->
<!-- closing the new fullwidth header -->
</td></tr></table>
<!-- Now we need a dummy block first column -->
<table align="center" class="page" cellspacing="0" cellpadding="0"width="100%">
<tr valign="top">
<!-- change this 180 to your column width? -->
<td width="180">
<!-- End Full width module -->
How it works:
This template modification works basically by closing off the table that VBA_CMPS generates to open the first row. This enables us to open a new full-width row (in a new table) without regard to the number of columns that will follow it. After the module is rendered, the new table is closed and the VBACMPS code that will reopen the normal VBA table is repeated, leaving everything (I hope) as it should appear
Regards,
Matt
Zachariah
01-05-2005, 11:51 AM
:eek: Great Idea !
/me installs. :cool:
Grumpy ol' Jim
01-23-2005, 09:12 PM
Matt, this is just great. I am not very good with coding and such, but you made this simple to follow guide and I am very happy. All I have is text in now (depending on when you look at it), but it will be a great addition to my pages.
Thank you!
Grump www.TheMadModder.com
TLCAnna
03-09-2005, 01:24 PM
I installed this, but I was wondering how to get this in a box like the other mods. I have attached a picture of what my page looks like, but I was wanting to put it inside a box (to match the others). How do I do that?
http://www.grabassgirls.com/images/welcomehack.gif
TLCAnna
03-10-2005, 09:03 PM
Anyone know?
Pretty please??
TIA
Ironhead
03-10-2005, 10:06 PM
Try this.
<!-- START Full width module -->
<!-- closing off the existing table, as unused -->
</td></tr></table>
<!-- opening the new fullwidth table -->
<table align="center" class="page" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td width="100%">
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat"><span class="small1"><b>$vba_options[portal_blockbullet] <font color="#FFFFFF">EDIT THIS</font></b></span></td>
</tr>
<tr>
<td class="$getbgrow" width="100%">
<!-- Begin custom code -->
<html>
<body>
PUT YOUR STUFF HERE BETWEEN THE BODY TAGS
</body>
</html>
<!-- End custom code -->
</td>
</tr>
</table>
<br />
<!-- closing the new fullwidth header -->
</td></tr></table>
<!-- Now we need a dummy block first column -->
<table align="center" class="page" cellspacing="0" cellpadding="0"width="100%">
<tr valign="top">
<!-- change this 180 to your column width? -->
<td width="180">
<!-- End Full width module -->
Tom M
03-10-2005, 10:55 PM
This is a nice idea.
BTW - while visiting your site I encountered the attached. Perhaps you're already aware of it. The screen grab is using Firefox. IE has a different problem. I also forwarded via e-mail a color-matched set of vb buttons ;).
HeadRat
03-18-2005, 01:09 PM
I can't get it to load on the page on top of the welcome block, what am I doing wrong? Also, where can I find the code so that it is in a box like the other modules?
HeadRat
03-20-2005, 03:57 AM
ok, I got this up. www.ratpackinternational.com, but I can't get it to appear in a module type of box like the rest of my modules, any ideas?
mholtum
04-28-2005, 11:59 AM
worked perfectly.. Now I just have to come up with some content.
memobug
04-28-2005, 09:32 PM
ok, I got this up. www.ratpackinternational.com, but I can't get it to appear in a module type of box like the rest of my modules, any ideas?
I can't see your site at the moment, but if you don't have a module frame you probably just need to put a table in the block surrounding your content. Use any of the basic modules, like Online buddies or something to get the basic format.
Regards,
Matt
mholtum
04-28-2005, 09:49 PM
try this one, you actually have to put a template inside a template (so to speak.
<!-- START Full width module -->
<!-- closing off the existing table, as unused -->
</td></tr></table>
<!-- opening the new fullwidth table -->
<table align="center" class="page" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td width="100%">
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<thead>
<tr>
<td class="tcat smallfont" style="font-weight: bold;"><a style="float: $stylevar[right]" href="#" onclick="return toggle_collapse('forumhome_$mods[filename]')"><img id="collapseimg_forumhome_$mods[filename]" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_forumhome_randomtopic].gif" width="15" height="15" border="0" alt="Collapse/Expand" /></a>$vba_options[portal_blockbullet] $mods[title]</td>
</tr>
</thead>
<tfoot style="display: none;"><tr><td></td></tr></tfoot>
<tbody id="collapseobj_forumhome_$mods[filename]">
<tr style="$vbcollapse[collapseobj_forumhome_randomtopic]">
<td class="$getbgrow">
<!-- put module content here -->
</td>
</tr>
</tbody>
</table>
<br />
<!-- closing the new fullwidth header -->
</td></tr></table>
<!-- Now we need a dummy block first column -->
<table align="center" class="page" cellspacing="0" cellpadding="0"width="100%">
<tr valign="top">
<!-- change this 180 to your column width? -->
<td width="180">
<!-- End Full width module -->
its the one I use and it is collapsable. :0
SuperGLS
05-09-2005, 10:04 PM
Great hack. Thanks.
Zooktalk
06-03-2005, 05:10 PM
Hey Matt, great idea and thanks for posting this for full width stuff with the CMPS.
Regarding the http://www.bonsaitalk.com site; what is the code needed to make the fullwidth module collapsable?
I also noticed there is a large space between the Navbar and the fullwidth module, how can a person make that space smaller?
Thanks for any info. :)
mholtum
06-03-2005, 05:44 PM
Hey Matt, great idea and thanks for posting this for full width stuff with the CMPS.
Regarding the http://www.bonsaitalk.com site; what is the code needed to make the fullwidth module collapsable?
I also noticed there is a large space between the Navbar and the fullwidth module, how can a person make that space smaller?
Thanks for any info. :)
<!-- START Full width module -->
<!-- closing off the existing table, as unused -->
</td></tr></table>
<!-- opening the new fullwidth table -->
<table align="center" class="page" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td width="100%">
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<thead>
<tr>
<td class="tcat smallfont" style="font-weight: bold;"><a style="float: $stylevar[right]" href="#" onclick="return toggle_collapse('forumhome_$mods[filename]')"><img id="collapseimg_forumhome_$mods[filename]" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_forumhome_randomtopic].gif" width="15" height="15" border="0" alt="Collapse/Expand" /></a>$vba_options[portal_blockbullet] $mods[title]</td>
</tr>
</thead>
<tfoot style="display: none;"><tr><td></td></tr></tfoot>
<tbody id="collapseobj_forumhome_$mods[filename]">
<tr style="$vbcollapse[collapseobj_forumhome_randomtopic]">
<td class="$getbgrow">
<!-- put module content here -->
</td>
</tr>
</tbody>
</table>
<br />
<!-- closing the new fullwidth header -->
</td></tr></table>
<!-- Now we need a dummy block first column -->
<table align="center" class="page" cellspacing="0" cellpadding="0"width="100%">
<tr valign="top">
<!-- change this 180 to your column width? -->
<td width="180">
<!-- End Full width module -->
BradE
07-04-2005, 03:37 PM
Sorry to bump this up but I've got a problem I can't seem to figure out. I can't get the text to align correctly next to the image I'm using. I've tried all kinds of valign formats, I can't get anything to work. Here is what I'm talking about.
Here is the template.
<!-- START Full width module -->
<!-- closing off the existing table, as unused -->
</td></tr></table>
<!-- opening the new fullwidth table -->
<table align="center" class="page" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td width="100%">
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat"><span class="smallfont"><strong>$vba_options[portal_blockbullet] Welcome To DetailersClub.com! </strong></span></td>
</tr>
<tr>
<td class="$getbgrow" width="100%">
<left><img border="1" src="/forums/images/bentley.gif" width="150" height="95"></left>
***** I ENTER TEXT OF MESSAGE HERE*****
</td>
</tr>
</table>
<br />
<!-- closing the new fullwidth header -->
</td></tr></table>
<!-- Now we need a dummy block first column -->
<table align="center" class="page" cellspacing="0" cellpadding="0"width="100%">
<tr valign="top">
<!-- change this 180 to your column width? -->
<td width="175">
<!-- End Full width module -->
How can I get the text to align correctly at the top next to the image?
Thanks.
mholtum
07-04-2005, 04:05 PM
Try placing the image & text message in seperate tables, worked for me:
<!-- START Full width module -->
<!-- closing off the existing table, as unused -->
</td></tr></table>
<!-- opening the new fullwidth table -->
<table align="center" class="page" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td width="100%">
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<thead>
<tr>
<td class="tcat smallfont" style="font-weight: bold;"><a style="float: $stylevar[right]" href="#" onclick="return toggle_collapse('forumhome_$mods[filename]')"><img id="collapseimg_forumhome_$mods[filename]" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_forumhome_randomtopic].gif" width="15" height="15" border="0" alt="Collapse/Expand" /></a>$vba_options[portal_blockbullet] Welcome!</td>
</tr>
</thead>
<tfoot style="display: none;"><tr><td></td></tr></tfoot>
<tbody id="collapseobj_forumhome_$mods[filename]">
<tr style="$vbcollapse[collapseobj_forumhome_randomtopic]">
<td class="$getbgrow">
<div align="center">
<center>
<table border="0" width="100%">
<tr>
<td width="6%"><img border="0" src="/forum/images/raven.gif"></td>
<td width="94%"><div align="left"><font face="Georgia">***** TEXT Message ******</font></div></td>
</tr>
</table>
</center>
</div>
</td>
</tr>
</tbody>
</table>
<br />
<!-- closing the new fullwidth header -->
</td></tr></table>
<!-- Now we need a dummy block first column -->
<table align="center" class="page" cellspacing="0" cellpadding="0"width="100%">
<tr valign="top">
<!-- change this 180 to your column width? -->
<td width="180">
<!-- End Full width module -->
BradE
07-04-2005, 04:28 PM
I figured it out, the image had to be included in the table with the text or it acted screwy.
Thanks man. :)
alyster4k
08-05-2005, 03:19 PM
I can't get this sucker to work just right. It puts the block in the center middle above the rest of the blocks, not full width. I used mholtum's example and the original one with no success. Any ideas?
mholtum
08-05-2005, 04:45 PM
I can't get this sucker to work just right. It puts the block in the center middle above the rest of the blocks, not full width. I used mholtum's example and the original one with no success. Any ideas?Is it the number 1 module on the left side? It only works there
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.