Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 03-24-2005, 06:22 PM
Rich's Avatar
Rich Rich is offline
 
Join Date: Mar 2004
Location: U.S.A
Posts: 921
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Cell Problem

Hello,
This problem has to do with the modules that are installed when VBCMPS is iinstalled. I believe the problem is my coding or the cells.
I have been trying to work with some cells that will surround the blocks. The code is working fine, except it pushes blocks away. So, the blocks won't stay in line and it tosses my homepage into a spin. I was trying to hardcode it because I don't know any other way to do it.

I opened each block and added this code to it:

PHP Code:
<table align="center"><td valign="top">
<
div align="center">
<
table border="0" cellpadding="0" cellspacing="0"><tr>
  <
td>
  <
img border="0" src="http://www.iguanacenter.com/images/blockimg/aeditsideleft.jpg" width="20" height="35"></td>
  <
td background="http://www.iguanacenter.com/images/blockimg/aeditsidemiddle.jpg"></td>
  <
td>
  <
img border="0" src="http://www.iguanacenter.com/images/blockimg/aeditsideright.jpg" width="20" height="35"></td>
</
tr><tr>
  <
td background="http://www.iguanacenter.com/images/blockimg/asideleft.jpg"></td>
  <
td>

<!--
Start Text Here-->

Whatever is written in place of this text is surrounded by the cellsI got that workingBut something is wrong because it throws all the blocks into a spinWhat is coded wrong that would cause thatI would like for all of the blocks that I make in the future to also work with this code.

<!-- /
End Text Here-->

    </
td>
  <
td background="http://www.iguanacenter.com/images/blockimg/asideright.jpg"></td>
</
tr><tr>
  <
td>
  <
img border="0" src="http://www.iguanacenter.com/images/blockimg/aeditsideleftbottom.jpg" width="20" height="35"></td>
  <
td background="http://www.iguanacenter.com/images/blockimg/aeditsidemiddlebottom.jpg"></td>
  <
td>
  <
img border="0" src="http://www.iguanacenter.com/images/blockimg/aeditsiderightbottom.jpg" width="20" height="35"></td>
</
tr></table>
</
div><br /><br />

</
td
This is my first run with cells. I thought I had done everything right. It looked great on my pc. lol Once I added this code to the blocks, some got covered by other blocks, some stayed in place and started a new line, etc. How could I make this code work so that if added to each block, they would all remain uniform?

Thanks to anyone that has a better knowledge of this than me.
Reply With Quote
  #2  
Old 03-24-2005, 10:39 PM
Jolten Jolten is offline
 
Join Date: Mar 2004
Posts: 749
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Same post made at vb.org. You're missing a couple tags.


HTML Code:
<table align="center">
<tr>
<td valign="top"> 

<table border="0" cellpadding="0" cellspacing="0" align="center">
	<tr> 
		<td> 
			<img border="0" src="http://www.iguanacenter.com/images/blockimg/aeditsideleft.jpg" width="20" height="35"></td> 
		<td background="http://www.iguanacenter.com/images/blockimg/aeditsidemiddle.jpg"></td> 
		<td> 
			<img border="0" src="http://www.iguanacenter.com/images/blockimg/aeditsideright.jpg" width="20" height="35"></td> 
	</tr>
	<tr> 
		<td background="http://www.iguanacenter.com/images/blockimg/asideleft.jpg"></td> 
		<td> 

<!--Start Text Here--> 
sad
ssssssssasdasd
<!-- /End Text Here--> 

		</td> 
		<td background="http://www.iguanacenter.com/images/blockimg/asideright.jpg"></td> 
	</tr>
	<tr> 
		<td> 
			<img border="0" src="http://www.iguanacenter.com/images/blockimg/aeditsideleftbottom.jpg" width="20" height="35"></td> 
		<td background="http://www.iguanacenter.com/images/blockimg/aeditsidemiddlebottom.jpg"></td> 
		<td> 
			<img border="0" src="http://www.iguanacenter.com/images/blockimg/aeditsiderightbottom.jpg" width="20" height="35"></td> 
	</tr>
</table> 
<br /><br /> 

</td>
</tr>
</table>
Reply With Quote
  #3  
Old 03-25-2005, 03:31 PM
Rich's Avatar
Rich Rich is offline
 
Join Date: Mar 2004
Location: U.S.A
Posts: 921
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello,
I have used that code and I am recieving a new error. The tags that were missing corrected the issue with distortion relevant to other blocks. Now the blocks don't auto-resize like they originally did. So now I have some blocks that look correct, and others that don't.

I posted a full response at vb.org. To see what I mean, have a look:

http://www.iguanacenter.com

Notice the size issues with the blocks now? Plus the left side spacing from the center blockk is different from the right side spacing.
Reply With Quote
  #4  
Old 03-25-2005, 05:07 PM
Jolten Jolten is offline
 
Join Date: Mar 2004
Posts: 749
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it's just a matter of sorting out widths on some table cells. And coding the html to wrap the elements properly. Here's a page that has everything set correctly, view source and you can see how I set it up.

Click here
Reply With Quote
  #5  
Old 03-25-2005, 09:04 PM
Rich's Avatar
Rich Rich is offline
 
Join Date: Mar 2004
Location: U.S.A
Posts: 921
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello,
Thank you. So I need to hardcode the widths for each block. So that means that when the blocks are moved, I have to change them again?

Prior to the blocks being encased with the border cells, they would autosize. Why is it that the code added isn't autosizing anymore? If we can figure that out, I should be able to rewrite this so I don't need to hardcode the widths as they will just enlarge as they are needed. (They were supposed to do that this whole time. lol)
Reply With Quote
  #6  
Old 03-25-2005, 09:12 PM
Jolten Jolten is offline
 
Join Date: Mar 2004
Posts: 749
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It does auto resize. Due to your use of a specific size image on the sides you must code those cells to remain that width. basically.. the cells containing the 20 pixel wide image need to always be 20 pixels wide or the appearance breaks. The middle cell which contains the top, content and bottom information will auto-expand to any width. If you open the page I linked to you can adjust the browser width to any width and the tables resize. I'm not certain what it is you're referring to since it all works properly here.

I have it figured out.... but I don't think you're "getting it"
Reply With Quote
  #7  
Old 03-25-2005, 10:22 PM
Rich's Avatar
Rich Rich is offline
 
Join Date: Mar 2004
Location: U.S.A
Posts: 921
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello,
I think I have got it just fine. I think it may be you that have missed what I am trying to do, or perhaps me for not explaining it better. Either way, your method is only good if I were going to leave all the blocks like that or in that position. otherwise, as I move them around, I need to go in and "hardcode" the widths again to make them match.

That I could have done from the beginning. I am not interested in hardcoding widths. I want these blocks to expand and contract just as if there were no borders around them at all.

Without the borders, every block is evenly spaced. It doesn't matter where i move it, it automatically resizes itself to accomodate the spacing. i don't need to edit anything so this happens, it just does.

What I was working on is the code that I wrote corrected so that once it is written and applied to each block, it will automatically resize to look just like the cmps page does when they are not installed.

With your code, I need to set the width for each block. that means that if I move a block, I need to go in and manually set the new width.

I don't want to do that. I know this code can be written so it will do what I am asking. I just haven't figured it out yet. lol

Quote:
Due to your use of a specific size image on the sides you must code those cells to remain that width. basically.. the cells containing the 20 pixel wide image need to always be 20 pixels wide or the appearance breaks.
There are 8 images that make up the cell structure plus the empty middle cell. There are 4 corners, and 4 middles. (left right top bottom) The middles were written to "fill" the cell if the length is longer or shorter. They adjust with the block. I don't see how the 20 pixel set sides have anything to do with this. The width of them is 20. The code can go as far and high as it wants and the sides will not be effected niether will the corners. That is where you lost me with your explanation. The corners are set at 20 wide, so they align with the sides. If the top and bottom need to expand to 100 pixels, they are ok. The sides are the same way. Right up through the corners, the 20 pixel set is there. They can extend upward as much as they want and at no point have I had a break in the images.

What I need to know is how I can surround the blocks with images, but they will auto expand and contract to the column they are in automatically. If these blocks were coded as default, how would they have been written in so that every block was surrounded with the cells, but they look just like the stock cmps? Perhaps that is clearer for what it is I am looking for.

I want to have one set of code that I can apply to each block, and they will all align up with each other bother vertically, and horizontally. If a block from one of the sides is moved into the middle, I want it to expand to the width of the other blocks in the middle automatically.
If a block from the center is placed on the side, I want it to line up and be the same width as the other blocks on that side.

I used the section of code you have written for the yada yada yada on the left hand side, and placed 2 left hand side modules in it. They did not line up. The navigation module and the polls module had different widths. The polls module stuck out closer to the center blocks than the navigation module did. The navigation module should have adjusted itself to remain the same width as the widest block in that column. Your code didn't do that. So I think "I got it" in regards to having to physically assign the widths. But that isn't what I am looking for. Thank you though.

I would love to hear if you know how to write the one code bit that will do what I am asking.

Basically, it seems like it needs to read the outside edge of the widest block, and then adjust to that width.
Reply With Quote
  #8  
Old 03-25-2005, 10:56 PM
Jolten Jolten is offline
 
Join Date: Mar 2004
Posts: 749
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay well I give up. I've tried. I've never had such a struggle trying to help someone. The code I provided is expandable. It's only the basic skeleton that requires some coding to ensure things look right regardless of where they are locate don the page.

I suggest you start by learning HTML since you're obviously not terribly familiar with it. I don't know what you're doing with the code I've provided but I can add blocks, move blocks delete blocks and they all retain the proper appearance.
Reply With Quote
  #9  
Old 03-26-2005, 11:05 AM
Rich's Avatar
Rich Rich is offline
 
Join Date: Mar 2004
Location: U.S.A
Posts: 921
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello,
I took your code from the view source. I took the left column code actually. I didn't edit i in any way. I then used that code on 2 different blocks. Both were going to reside in the left column.

The moment I added the code and looked at the blocks, they did not line up correctly.

To make things clear, I posted that this was my FIRST time writing cells. So telling me to go learn HTML was remedial. I already stated that i was JUST LEARNING this. Your lip isn't needed when responding to people. Especially when the person lays everything out in front of you ahead of time. Maybe you should read an entire post before you get lippy with people. Thats just plain ignorant and rude.

Now, your code will work great if I were going to write up a completely custom html page. Then again, MY code worked if I was writing up a completely custom HTML page. That isn't the issue.

I am using this code on the adv_portal homepage. EACH module template is getting this code wrapped around it. Its THEN that problems arise.

If it is a width issue, then why are the modules NOT lining up with the default cell structure? WHY would i need to go into each block and customize it so that they all line up correctly?

I am not saying that I didn't appreciate your assistance, but I did not apprecaite your attitude in your final response. If I knew how to handle this 100% on my own,. I wouldn't have bothered posting.

If you can't handle people asking questions, don't waste our time with posting. I would rather have gone ignored, which seems to happen a lot on these sites, than be insulted.
Reply With Quote
  #10  
Old 03-26-2005, 03:58 PM
Jolten Jolten is offline
 
Join Date: Mar 2004
Posts: 749
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You simply aren't copying code correctly. Look at my link again... boxes repeated over and over and they all line up. It's got nothing to do with a custom coded page, it's basic html.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:57 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04339 seconds
  • Memory Usage 2,281KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_html
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete