Support Forum
Ike said
In Reboot the column widths work differently to allow the columns to use different widths for different mobile / tablet viewport sizes:The column's in the template have the tagId=spColForumX,
The #Id in the stylesheet references a variable in the overlay:
<br />
div#spColForumX { width: ; }<br />
So being as the widths are controlled through the overlay, in whatever overlay you are using - see the variable $ColForum_1[0], $ColForum_2[0] etc.. where [0] is with no media rule applied i.e desktop.
As you can see, all the widths add up to 97%, so if you want to make a new one, copy one of the blocks and rename all to $ColForum_5[0], $ColForum_5[800], $ColForum_5[720] etc..
Then you will want to reduce one of the other columns to make some space, and give $ColForum_5[0], a width.
As Steve said - don't exceed 100%, and try and keep it below 99% if possible.
WHOA! Sorry, you lost me here.
Let me try and word it differently!
OK - The column widths are controlled in the overlay.
Open your overlay file and search for '$ColForum_1'. You should see the initial variable
$ColForum_1 = array();
And then underneath you will see the column variables within that array -
$ColForum_1[0] = '5%'; $ColForum_1[800] = '6%'; $ColForum_1[720] = '7%'; $ColForum_1[600] = '0%'; $ColForum_1[480] = '0%'; $ColForum_1[360] = '0%'; $ColForum_2[0] = '50%'; $ColForum_2[800] = '47%'; $ColForum_2[720] = '47%'; $ColForum_2[600] = '48%'; $ColForum_2[480] = '48%'; $ColForum_2[360] = '48%'; $ColForum_3[0] = '39%'; $ColForum_3[800] = '46%'; $ColForum_3[720] = '44%'; $ColForum_3[600] = '48%'; $ColForum_3[480] = '48%'; $ColForum_3[360] = '48%'; $ColForum_4[0] = '3%'; $ColForum_4[800] = '3%'; $ColForum_4[720] = '3%'; $ColForum_4[500] = '5%'; $ColForum_4[480] = '0%'; $ColForum_4[360] = '0%';
In each of these blocks, focus on the first entry $ColForum_x[0] where [0] relates to desktop. These all relate to the 4 columns in your template and is where the column width is controlled.
To add a new column, you would need to add a $ColForum_5[0] and specify a width in the same way as all the others.
But - Remember the widths as I said in my last post. The overall forum row is 100% wide, there are also two 1px separator's in a forum row. This is why when you add up the widths of all the columns (i.e 5%, 50%, 39% and 3%) it reaches 97% to allow for the 1px separators and a small amount of breathing room.
Maybe try reducing column 2 to 45%, and make your new column 5% wide. That way, you are not changing the overall size. You might need to tweak the sizes once you have your new column set up and working.
So, you would then need to add your new column in the same way as you have done above, but adding the tagId=spColForum5. See:
sp_ColumnStart('tagId=spColForum5&tagClass=spColumnSection spLeft&width=0&height=0px'); if ($spThisForum->unreads > 0) sp_AddIcon(‘tagClass=spRowIcon spRight&icon=sp_Unread.png’); sp_ColumnEnd();
This doesn't need to be done in order so you can insert it before spColForum4, or before spColForum3 if you like.
So i'm gathering that I need to do this first in the overlay:
$ColForum_1 = array();
$ColForum_2 = array();
$ColForum_3 = array();
$ColForum_4 = array();
$ColForum_1[0] = '5%';
$ColForum_1[800] = '6%';
$ColForum_1[720] = '7%';
$ColForum_1[600] = '0%';
$ColForum_1[480] = '0%';
$ColForum_1[360] = '0%';
$ColForum_2[0] = '45%';
$ColForum_2[800] = '47%';
$ColForum_2[720] = '47%';
$ColForum_2[600] = '48%';
$ColForum_2[480] = '48%';
$ColForum_2[360] = '48%';
$ColForum_3[0] = '39%';
$ColForum_3[800] = '46%';
$ColForum_3[720] = '44%';
$ColForum_3[600] = '48%';
$ColForum_3[480] = '48%';
$ColForum_3[360] = '48%';
$ColForum_4[0] = '3%';
$ColForum_4[800] = '3%';
$ColForum_4[720] = '3%';
$ColForum_4[500] = '5%';
$ColForum_4[480] = '0%';
$ColForum_4[360] = '0%';
$ColForum_5[0] = '5%';
Then I go into the forumview and add this:
# ----------------------------------------------------------------------
sp_ColumnStart('tagId=spColForum2&tagClass=spColumnSection spLeft&width=0&height=0px');
sp_TopicIndexName('tagClass=spRowName', __sp('Browse the thread %NAME%'));
if (function_exists('sp_TopicDescription')) sp_TopicDescription();
sp_TopicIndexFirstPost('iconClass=spIcon spLeft&icon=sp_ArrowRightSmall.png&nicedate=0&date=1&time=1&stackdate=0&stackuser=0&stackdate=0&itemBreak= - ', __sp('Started By'));
sp_InsertBreak();
if (function_exists('sp_TopicIndexTagsList')) sp_TopicIndexTagsList('tagClass=spTopicTagsList spLeft&delimiter=|&delimiterClass=spTagsDelimiterForum&collapse=0&iconClass=spIcon', __sp(''), __sp('Show the tags for this topic'));
if (function_exists('sp_TopicIndexRating')) sp_TopicIndexRating('tagClass=spStatusIcon&spRight&skipZero=1');
sp_ColumnEnd();
sp_ColumnStart('tagId=spColForum5&tagClass=spColumnSection spLeft&width=0&height=0px'); if ($spThisForum->unreads > 0) sp_AddIcon(‘tagClass=spRowIcon spRight&icon=sp_Unread.png’); sp_ColumnEnd();
sp_InsertBreak('tagClass=groupBreak');
# Column 3 of the forum row
# ----------------------------------------------------------------------
When the page goes completely blank it virtually always points to a PHP fatal error suggesting you have typed something in your code incorrectly or used characters in the php code that are not allowed (like Word Processing quote for example instead of plain text quotes).
This will; also almost certainly show up in your php error log and probably your forum error log as well and will give a good idea of hat the error is.
YELLOW
SWORDFISH
|
Oh - the quote marks you have around the 'sp_ColumnStart' arguments there are rich text - curly. They need to be plain text - straight.
It's always best to use the syntax highlighter, I was going to say earlier but thought I'd put enough information on the screen!
You should try and preserve the code and not copy and paste from various places / web pages. Always try and use the 'View Source' button where possible, here we have 'View Raw Code' above code snippets.
When you paste code here, highlight it and click the syntax highlighter (last icon on the right at the top of the editor toolbar, looks like a sheet of paper with 2 curly braces) and pick 'PHP'.
If that was the problem, make sure you always use a plain text editor like notepad or notepad ++ or equivalent.
Hmmm...I copied your code and used notepad++ to edit the code and it went to a blank page.
Here's the code copied from notepad:
Overlay:
$ColForum_1 = array();
$ColForum_2 = array();
$ColForum_3 = array();
$ColForum_4 = array();
$ColForum_1[0] = '5%';
$ColForum_1[800] = '6%';
$ColForum_1[720] = '7%';
$ColForum_1[600] = '0%';
$ColForum_1[480] = '0%';
$ColForum_1[360] = '0%';
$ColForum_2[0] = '45%';
$ColForum_2[800] = '47%';
$ColForum_2[720] = '47%';
$ColForum_2[600] = '48%';
$ColForum_2[480] = '48%';
$ColForum_2[360] = '48%';
$ColForum_3[0] = '39%';
$ColForum_3[800] = '46%';
$ColForum_3[720] = '44%';
$ColForum_3[600] = '48%';
$ColForum_3[480] = '48%';
$ColForum_3[360] = '48%';
$ColForum_4[0] = '3%';
$ColForum_4[800] = '3%';
$ColForum_4[720] = '3%';
$ColForum_4[500] = '5%';
$ColForum_4[480] = '0%';
$ColForum_4[360] = '0%';
$ColForum_5[0] = '5%';
Forumview:
# ----------------------------------------------------------------------
sp_ColumnStart('tagId=spColForum2&tagClass=spColumnSection spLeft&width=0&height=0px');
sp_TopicIndexName('tagClass=spRowName', __sp('Browse the thread %NAME%'));
if (function_exists('sp_TopicDescription')) sp_TopicDescription();
sp_TopicIndexFirstPost('iconClass=spIcon spLeft&icon=sp_ArrowRightSmall.png&nicedate=0&date=1&time=1&stackdate=0&stackuser=0&stackdate=0&itemBreak= - ', __sp('Started By'));
sp_InsertBreak();
if (function_exists('sp_TopicIndexTagsList')) sp_TopicIndexTagsList('tagClass=spTopicTagsList spLeft&delimiter=|&delimiterClass=spTagsDelimiterForum&collapse=0&iconClass=spIcon', __sp(''), __sp('Show the tags for this topic'));
if (function_exists('sp_TopicIndexRating')) sp_TopicIndexRating('tagClass=spStatusIcon&spRight&skipZero=1');
sp_ColumnEnd();
sp_ColumnStart('tagId=spColForum5&tagClass=spColumnSection spLeft&width=0&height=0px');
if ($spThisForum->unreads > 0) sp_AddIcon(‘tagClass=spRowIcon spRight&icon=sp_Unread.png’);
sp_ColumnEnd();
sp_InsertBreak('tagClass=groupBreak');
# Column 3 of the forum row
Yes - Like I said your quote marks are incorrect.
The only example I could find was the double quote, but the same applies to single quotes.
Unless it's because you are not using the syntax highlighter as I mentioned above, if you could repost the code using the highlighter it would confirm whether they are wrong or right.
1 Guest(s)