Hello all,
I recently came across xpZone-camo theme from anp-inc.net but their site has been down for a couple of days now. Only one issue I have with it, and that is that the center block (not news) is cut into 2 columns.
For instance, this screenshot hereshows that my PNphpBB2 Multi block is divided, but you can also see that the news below it is fine, full width for the center block. I went through the theme.php file but can't make out where it is doing it, tried via my usual means of adding borders to stuff to find a table cell but no joy.
Any help in pointing it out would be appreciated. I did not post the full theme file as I am not positive that is where it is being set at (but pretty sure).
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- mazdev responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 05:25 PM
- nestormateo responded to »Fillters in Clip« 06:33 AM
- damon responded to »Can the Updated Version Check be Turned Off (Z 1.3)« 03:19 AM
- frw responded to »Bug in the SMTP mail transfer protocol - Port 25 - Zikula 1.2.9« 22. May
- mdee responded to »Short URL questions« 22. May
- mesteele101 responded to »Problem in Database Connection« 21. May
- Herr.Vorragend responded to »Clip Documentation and Doubt« 19. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Center Block in 2 columns
-
- Rank: Expert
- Registered: Aug 20, 2002
- Last visit: Jan 12, 2010
- Posts: 1219
I would need to see the code, but maybe the table HTML that renders the center block is set to width="50%", or maybe the table width is hardcoded internal to the code of the block. Check there.
-Shawn
--
Get the Revolutionary AutoTheme HTML Theme System! Currently for Zikula, PHP-Nuke, CRE Loaded, osCommerce and Wordpress! -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 15
Thanks AbraCadaver, I checked it out and found no widths less than 100% that made a difference when editing them (like 15% or 20%).
Here is the section I think draws the block. With all other themes, this center block is fine:
Code
."<table border='0' cellpadding='3' cellspacing='0' width='166'>\n"
."<tr>\n"
."<td>\n"
.$block['content']
."</td>\n"
."</tr>\n"
."</table>\n"
Code
// Theme Global Definition
$thename = 'xpZone-camo';
$postnuke_theme = true;
themes_get_language();
// Theme Colors Definition
define("_HSDIRNAME","xpZone-camo");
$bgcolor1 = "#BDC3B5";
$bgcolor2 = "#6B756B";
$bgcolor3 = "#BDC3B5";
$bgcolor4 = "#6B756B";
$textcolor1 = "#000000";
$textcolor2 = "#000000";
$creme = "#EEEDD7";
define("_GLOBALBGCOLOR","#BDC3B5"); // this is the lightest background
define("_FONTCOLOR1","#363636"); // article title font color
define("_FONTCOLOR2","#505050"); // article text font color
define("_FONTCOLOR3","#999999"); // article header font colors
define("_FONTCOLOR4","#075325"); // for the side boxes
// OpenTable Functions()
function OpenTable() {
global $bgcolor1, $bgcolor2;
echo "<table width='100%' border='0' cellspacing='1' cellpadding='0' bgcolor='$bgcolor2'><tr><td>\n";
echo "<table width='100%' border='0' cellspacing='1' cellpadding='8' bgcolor='$bgcolor1'><tr><td>\n";
}
function OpenTable2() {
global $bgcolor1, $bgcolor2;
echo "<table border='0' cellspacing='1' cellpadding='0' bgcolor='$bgcolor2' align='center'><tr><td>\n";
echo "<table border='0' cellspacing='1' cellpadding='8' bgcolor='$bgcolor1'><tr><td>\n";
}
function CloseTable() {
echo "</td></tr></table></td></tr></table>\n";
}
function CloseTable2() {
echo "</td></tr></table></td></tr></table>\n";
}
// Function themeheader()
function themeheader() {
global $index;
global $bgcolor1, $bgcolor2,$bgcolor4;
$slogan = pnConfigGetVar('slogan');
$sitename = pnConfigGetVar('sitename');
$banners = pnConfigGetVar('banners');
$type = pnVarCleanFromInput('type');
// current user
if (!pnUserLoggedIn()) {
$username = pnConfigGetVar('anonymous');
} else {
$username = pnUserGetVar('uname');
}
echo "<script language=\"javascript\">\n"
."<!-- /* Table Menu */\n"
."function movein(which,html){\n"
."which.style.background='#94696B'\n"
."which.style.color='#ffffff'\n"
."description.style.background=''\n"
."description.style.color='yellow'\n"
."description.innerHTML='<B>'+html+'</B>'\n"
."}\n"
."function moveout(which){ \n"
."which.style.background='$bgcolor2'\n"
."description.style.background=''\n"
."description.innerHTML=' '\n"
."}\n"
."//-->\n"
."</script>\n"
."</HEAD>";
echo "<body topmargin='0' leftmargin='0' bgcolor='"._GLOBALBGCOLOR."' marginheight='0' marginwidth='0'>\n\n";
echo "<table cellpadding='0' cellspacing='0' width='100%' border='0'><tr><td>\n";
echo "<!----- PLEASE DO NOT REMOVE COPYRIGHTS NOTICE ----->\n";
echo "<!----- Copyrights (c) 1993-2003 Jsivins http://www.anp-inc.net ----->\n";
echo "<!----- webmaster AT anp DASH inc DOT net ----->\n\n\n\n\n\n\n\n";
// site logo strip (contains old strip and initial new one)
echo "<table background='themes/"._HSDIRNAME."/images/head1.gif' cellpadding='0' cellspacing='0' width='100%' height='80' border='0' bgcolor='$bgcolor2'>\n"
."<tr>\n"
."<td align='left' valign='center'></td>\n"
."<td align='right' valign='center'>\n";
// show banner here
pnBannerDisplay('1');
echo "</td></tr></table>\n"
// menu strip
."<table cellpadding='0' cellspacing='0' width='100%' border='0' align='center' background='themes/"._HSDIRNAME."/images/head2.gif' >\n"
."<tr valign='middle' >\n"
."<td align='left' nowrap width='15%'><font class='head' color='"._FONTCOLOR1."'>\n";
echo " "._HSWELCOMEUSER." <B>$username</B>!"." ";
echo "</font></td>\n"
// insert menu herrrre
."<td >";
echo "<table width='100%' bgcolor='#F2F4F4' align='center' border='1' bordercolor='#ffffff' cellpadding='0' cellspacing='0'>"
."<tr>"
."<td width='20%' class='menu' bordercolor='$creme' name='choice1' id='choice1' style='background-color:$bgcolor2; cursor:hand' onmouseover='movein(choice1,\""._TOPLINKDESC11."\")' onmouseout='moveout(choice1)'><center> <a href='"._TOPLINKURL11."'><b>"._TOPLINKNAME11."</b></a></center></td>"
."<td width='20%' class='menu' bordercolor='$creme' name='choice2' id='choice2' style='background-color:$bgcolor2; cursor:hand' onmouseover='movein(choice2,\""._TOPLINKDESC12."\")' onmouseout='moveout(choice2)'><center> <a href='"._TOPLINKURL12."'><b>"._TOPLINKNAME12."</b></a></center></td>"
."<td width='20%' class='menu' bordercolor='$creme' name='choice3' id='choice3' style='background-color:$bgcolor2; cursor:hand' onmouseover='movein(choice3,\""._TOPLINKDESC13."\")' onmouseout='moveout(choice3)'><center> <a href='"._TOPLINKURL13."'><b>"._TOPLINKNAME13."</b></a></center></td>"
."<td width='20%' class='menu' bordercolor='$creme' name='choice4' id='choice4' style='background-color:$bgcolor2; cursor:hand' onmouseover='movein(choice4,\""._TOPLINKDESC14."\")' onmouseout='moveout(choice4)'><center> <a href='"._TOPLINKURL14."'><b>"._TOPLINKNAME14."</b></a></center></td>"
."<td width='20%' class='menu' bordercolor='$creme' name='choice5' id='choice5' style='background-color:$bgcolor2; cursor:hand' onmouseover='movein(choice5,\""._TOPLINKDESC15."\")' onmouseout='moveout(choice5)'><center> <a href='"._TOPLINKURL15."'><b>"._TOPLINKNAME15."</b></a></center></td>"
."</tr>"
."</table>"
."</td>"
."<td align='right' nowrap width='15%'><font class='head'>\n";
// display date and time
echo ml_ftime(_DATEBRIEF, (GetUserTime(time())));
echo "</font> </td>\n"
."</tr>\n";
echo "<tr>"
."<td align='center' bordercolor='#000000' id='description' name='description' bordercolor='black' height='18' width='100%' colspan='3'><font face='Verdana' size='1'></font></td>"
."</tr>"
."</table>\n"
."<!----- Begin Main Content Table ----->\n"
."<table width='100%' cellpadding='0' cellspacing='0' border='0' bgcolor='"._GLOBALBGCOLOR."' align='center'><tr valign='top'>\n"
."<td bgcolor='$bgcolor2'><a href=\"http://www.anp-inc.net\"><img src='themes/"._HSDIRNAME."/images/pixel.gif' width='10' height='1' border='0' alt=''></a></td>\n"
."<td bgcolor='$bgcolor2' width='175' valign='top'>\n";
blocks('left');
echo "</td><td bgcolor='$bgcolor2'><a href=\"http://www.anp-inc.net\"><img src='themes/"._HSDIRNAME."/images/pixel.gif' width='15' height='1' border='0' alt=''></a></td>\n"
."<td background='themes/"._HSDIRNAME."/images/shadow2.gif' bgcolor='"._GLOBALBGCOLOR."'><img src='themes/"._HSDIRNAME."/images/shadow_corner.gif' width='15' height='13' border='0' alt=''></td>\n"
."<td width='100%'>\n";
echo "<table width='100%' cellpadding='0' cellspacing='0' border='0' bgcolor='"._GLOBALBGCOLOR."' align='center'><tr valign='top'>\n"
."<td background='themes/"._HSDIRNAME."/images/shadow1.gif' bgcolor='"._GLOBALBGCOLOR."'><img src='themes/"._HSDIRNAME."/images/shadow1.gif' width='15' height='7' border='0' alt=''></td>\n"
."</tr></table>";
// If we have admin messages or blocks of 'centre' type, lets display them
if ($index) {
blocks('centre');
}
}
// function themefooter()
function themefooter() {
global $index;
global $bgcolor1, $bgcolor2;
echo "<br /></td><td bgcolor='"._GLOBALBGCOLOR."'><img src='themes/"._HSDIRNAME."/images/shadow3.gif' width='15' height='13' border='0' alt=''>\n";
if ($index) {
echo "</td><td bgcolor='$bgcolor2'><a href=\"http://www.anp-inc.net\"><img src='themes/"._HSDIRNAME."/images/pixel.gif' width='15' height='1' border='0' alt=''></a></td><td valign='top' width='150'bgcolor='$bgcolor2'>\n";
blocks('right');
}
echo "</td><td bgcolor='$bgcolor2'><a href=\"http://www.anp-inc.net\"><img src='themes/"._HSDIRNAME."/images/pixel.gif' width=10 height=1 border=0 alt=''></a>\n";
// this td specifies the minumum height of the window
echo "</td><td width='0' height='400'>\n"
."</td></tr></table>\n"
."<table width='100%' cellpadding='0' cellspacing='0' border='0' bgcolor='".$bgcolor2."' align='center'>\n"
."<tr align='center'>\n"
."<td width='100%' colspan='3'><br>\n";
pnBannerDisplay('2');
echo "<br />\n";
footmsg();
echo "<br></td>\n"
."</tr></table>\n";
// this is the keeper table, it keeps the page from craching the article's header on multiple lines, by limiting the page width shrinking to 650 points
echo "</td></tr><tr><td><table cellpadding='0' cellspacing='0' width='650' border='0'><tr><td></td></tr></table>";
echo "</td></tr></table>";
}
// Function themeindex()
function themeindex ($_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $info, $links, $preformat) {
global $bgcolor1, $bgcolor2;
$tipath = pnConfigGetVar('tipath');
echo "<br><table border='0' cellpadding='0' cellspacing='0' bgcolor='"._GLOBALBGCOLOR."' width='100%'>\n"
."<tr>\n"
."<td>\n"
// title
."<table border='0' cellpadding='0' cellspacing='0' width='100%'>\n"
."<tr>\n"
."<td align='left' valign='top' width='26' height='30'><img src='themes/"._HSDIRNAME."/images/sidebox-title-left.gif'></td>\n"
."<td align='left' valign='middle' background='themes/"._HSDIRNAME."/images/sidebox-title-bg.gif' width='100%' height='30'>\n"
."<font class='option' color='#ffffff'> <b>".$info['title']."</b></font>\n"
."</td>\n"
."<td align='left' valign='middle' width='23' height='30' background='themes/"._HSDIRNAME."/images/sidebox-title-bg.gif' ><a href='".$links['fullarticle']."'><img border=0 src='themes/"._HSDIRNAME."/images/max.gif'></a></td>\n"
."<td align='left' valign='top' width='6' height='30'><img src='themes/"._HSDIRNAME."/images/sidebox-title-right.gif'></td>\n"
."</tr>\n"
."</table>\n"
// all the rest:
."<table border='0' cellpadding='0' cellspacing='0' width='100%'>\n"
."<tr>\n"
."<td>\n"
// header
."<table border='0' cellpadding='0' cellspacing='0' width='100%'>\n"
."<tr>\n"
."<td align='left' valign='top' width='15' height='22' background='themes/"._HSDIRNAME."/images/storybox-left.gif'><img src='themes/"._HSDIRNAME."/images/storybox-left.gif'></td>\n"
."<td align='left' valign='middle' background='themes/"._HSDIRNAME."/images/storybox-bg.gif' width='100%' height='22'>\n"
."<font color='"._FONTCOLOR3."' size='1'>"._POSTEDBY." ";
echo $info['informant'];
echo " "._ON." ".$info['briefdate']."(".$info['counter']." "._READS.")</font>\n"
// ."<font color='"._FONTCOLOR3."'>".$preformat['readmore']."</font>\n"
."</td>\n"
."<td width='4' align='left' valign='top' background='themes/"._HSDIRNAME."/images/storybox-content-right.gif'><img src='themes/"._HSDIRNAME."/images/storybox-content-right.gif'></td>\n"
."</tr>\n"
."</table>\n"
// body
."<table background='themes/"._HSDIRNAME."/images/white.gif' border='0' cellpadding='0' cellspacing='0' width='100%'>\n"
."<tr>\n"
."<td width='4' align='left' valign='top' background='themes/"._HSDIRNAME."/images/sidebox-bar-left.gif'><img src='themes/"._HSDIRNAME."/images/sidebox-bar-px.gif'></td>\n"
."<td>\n"
."<table border='0' cellpadding='3' cellspacing='0' width='100%'>\n"
."<tr valign='top'>\n"
."<td>\n";
echo $preformat['searchtopic'];
$boxstuff = "<a href='user.php?op=userinfo&uname=".$info['informant']."'>".$info['informant']."</a> ";
$boxstuff .= "<font class='content'>"._WRITES." '".$info['hometext'];
if(!empty($info['notes'])){
$boxstuff .= "'<br><br><u>Note:</u> <i><b>".$info['notes']."</b></i>\n";
}
echo "<font class='content' color='"._FONTCOLOR2."'>$boxstuff</font>\n";
echo "</td></tr></table>\n"
."</td>\n"
."<td width='4' align='left' valign='top' background='themes/"._HSDIRNAME."/images/storybox-content-right.gif'><img src='themes/"._HSDIRNAME."/images/storybox-content-right.gif'></td>\n"
// ."<td width='13' align='left' valign='top' background='themes/"._HSDIRNAME."/images/storybox-content-right.gif'><img src='themes/"._HSDIRNAME."/images/storybox-content-right-px.gif'></td>\n"
."</tr></table>\n"
// trailer
."<table border='0' cellpadding='0' cellspacing='0' width='100%'>\n"
."<tr valign='top'>\n"
."<td width='9' height='29' align='left' valign='top'><img src='themes/"._HSDIRNAME."/images/storybox-bottom-left.gif'></td>\n"
."<td width='100%' valign=center align=right height='29' background='themes/"._HSDIRNAME."/images/storybox-bottom-bg.gif'>\n"
."<font color='"._FONTCOLOR3."'>".$preformat['more']."</font>\n"
."</td><td width='18' height='29' align='left' valign='top'><img src='themes/"._HSDIRNAME."/images/storybox-bottom-right.gif'></td>\n"
."</tr></table>\n"
."</td></tr></table>\n"
."</td></tr></table>\n";
}
// Function themearticle()
function themearticle ($_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $info, $links, $preformat) {
$tipath = pnConfigGetVar('tipath');
global $bgcolor1, $bgcolor2;
echo "<table border='0' cellpadding='0' cellspacing='0' bgcolor='"._GLOBALBGCOLOR."' width='100%'><tr><td>\n"
."<table border='0' cellpadding='1' cellspacing='0' bgcolor='#000000' width='100%'><tr><td>\n"
."<table border='0' cellpadding='3' cellspacing='0' bgcolor='$bgcolor2' width='100%'><tr><td align='left'>\n"
."<font class='option' color='#ffffff'><b>".$info['title']."</b></font>\n"
."<font class='content'>"._POSTEDON." ".$info['longdatetime']." "._BY." ";
echo $info['informant'];
if (authorised(0, 'Stories::', "$info[aid]:$info[cattitle]:$info[sid]", ACCESS_EDIT)) {
echo '[ <a href="admin.php?module=NS-AddStory&op=EditStory&sid='.$info['sid'].'">'._EDIT.'</a>';
if (authorised(0, 'Stories::', "$info[aid]:$info[cattitle]:$info[sid]", ACCESS_DELETE)) {
echo '| <a href="admin.php?module=NS-AddStory&op=RemoveStory&sid='.$info['sid'].'">'._DELETE.'</a> ]';
}
}
echo "</td></tr></table></td></tr></table><br>";
echo $preformat['searchtopic'];
$boxstuff = "<a href='user.php?op=userinfo&uname=".$info['informant']."'>".$info['informant']."</a> ";
$boxstuff .= "<font class='content'>"._WRITES." ".$preformat['fulltext'];
echo "<font class='content' color='"._FONTCOLOR2."'>$boxstuff</font>\n";
echo "</td></tr></table><br>\n\n\n";
}
// Function themesidebox()
function themesidebox($block) {
global $bgcolor1, $bgcolor2;
if (empty($block['title'])) {
echo "<font class='boxcontent'>$block[content]</font>";
}
else
{
if(pnUserLoggedIn()) {
if(checkuserblock($block)=='1') {
if (!empty($block['title'])) {
$button =" <a href=\"modules.php?op=modload&name=Blocks&file=index&req=ChangeStatus&bid=$block[bid]&authid=".pnSecGenAuthKey()."\"><img src=\"themes/"._HSDIRNAME."/images/xpminimize.gif\" border=\"0\" alt=\"\"></a>";
}
} else {
$block['content'] ='';
if (!empty($block['title'])) {
$button =" <a href=\"modules.php?op=modload&name=Blocks&file=index&req=ChangeStatus&bid=$block[bid]&authid=".pnSecGenAuthKey()."\"><img src=\"themes/"._HSDIRNAME."/images/xpmaximize.gif\" border=\"0\" alt=\"\"></a>";
}
}
}
else
{
$button = "<img src=\"themes/"._HSDIRNAME."/images/xpminimize.gif\" border=\"0\" alt=\"\">";
}
echo "<br><table border='0' cellpadding='0' cellspacing='0' width='175'><tr><td>\n"
// title
."<table background='themes/"._HSDIRNAME."/images/linearcolor2.jpg' border='0' cellpadding='0' cellspacing='0' width='100%'>\n"
."<tr>\n"
."<td align='left' valign='top' width='2' height='20'><img src='themes/"._HSDIRNAME."/images/left-up-corner.gif'></td>\n"
."<td align='left' valign='middle' width='118' height='20'>\n"
// ." <img align='middle' src='themes/"._HSDIRNAME."/images/logosmall.gif'><font class='option' color='"._FONTCOLOR4."'> <b>".$block['title']."</b></font></td>\n"
."<font class='option' color='"._FONTCOLOR4."'> <b>".$block['title']."</b></font></td>\n"
."<td align='right' valign='middle' width='25' height='20'>\n"
.$button
."</td>"
."<td align='left' valign='top' width='2' height='20'><img src='themes/"._HSDIRNAME."/images/right-up-corner.gif'></td>\n"
."</td></tr>\n"
."</table>\n"
."</td>\n"
."</tr>\n"
."</table>\n\n";
if (!empty($block['content'])) {
echo "<!----- Side Box Content ----->\n"
."<table border='0' cellpadding='0' cellspacing='0' width='175'>\n"
."<tr valign='top'>\n"
."<td width='1' bgcolor='#ffffff' align='left' valign='top' ></td>\n"
."<td bgcolor='".$bgcolor1."' width='173' align='left' valign='top'>\n"
."<table border='0' cellpadding='3' cellspacing='0' width='166'>\n"
."<tr>\n"
."<td>\n"
.$block['content']
."</td>\n"
."</tr>\n"
."</table>\n"
."</td>\n"
."<td width='1' bgcolor='#ffffff' align='left' valign='top' ></td>\n"
."<tr><td colspan='3' width='175' bgcolor='#ffffff'></td></tr>"
."</tr></table>\n";
}
}
}
?> -
- Rank: Expert
- Registered: Aug 20, 2002
- Last visit: Jan 12, 2010
- Posts: 1219
That first table says width='166'?
-Shawn
--
Get the Revolutionary AutoTheme HTML Theme System! Currently for Zikula, PHP-Nuke, CRE Loaded, osCommerce and Wordpress! -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 15
That isn't it, when I make it 100%, nothing happens as in pic below, I also bumped that border to 10 and you can see it effects left/right/center blocks.:
http://www.snipatown.net/images/forum_pics/2columns1.JPG -
- Rank: Expert
- Registered: Aug 20, 2002
- Last visit: Jan 12, 2010
- Posts: 1219
The theme you're using doesn't seem to differenciate between diff blocks. Best bet is, after this:
Code
To add something like this:
Code
// if block is a center block, do this html
if ($block['position'] == "c") {
echo '<table width="100%"><tr><td>'.$block['title'].'</td></tr>'
.'<tr><td>'.$block['content'].'</td></tr></table>';
}
Then tweak it from there to get the look you want.
Or even better, check out AutoTheme. Then you can just use an HTML editor and an admin interface to do everything. :)
-Shawn
--
Get the Revolutionary AutoTheme HTML Theme System! Currently for Zikula, PHP-Nuke, CRE Loaded, osCommerce and Wordpress! -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 15
AbraCadaver,
Great, that worked out, but I am getting duplicate center block info now. Would I have to redo the rest of the code where it is just calling the "$block['content']" to differentiate between left and right as well?
If so, I can take what you gave and just change to ==l and ==r and try to reconfigure the tables.
Will AutoTheme work with existing themes without converting them? ie: can it run side by side the default theme engine? -
- Rank: Expert
- Registered: Aug 20, 2002
- Last visit: Jan 12, 2010
- Posts: 1219
Sorry. Yes it needs some tweaking. To solve your problem, after the } in the code I posted, just add:
return;
AutoTheme only controls AutoTheme themes, and runs perfectly with legacy themes (you can run them both). There is an AutoConvert module that will help you most of the way in converting a legacy theme if you want.
-Shawn
--
Get the Revolutionary AutoTheme HTML Theme System! Currently for Zikula, PHP-Nuke, CRE Loaded, osCommerce and Wordpress!
- Moderated by:
- Support
