Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Themes
Author Message
chaos_coa
Regular
Regular



Joined: Oct 11, 2007
Posts: 86

PostPosted: Wed Oct 08, 2008 7:43 pm Reply with quote

Hi All

On my site the top left block is slightly wider than all the other left blocks.

Its a gallery 2 block and it seems like its the photo that gets input into the block that forces the block to be too wide.

Is there a way I can force that block to be the same width as the other left blocks?

Please excuse me if this is a known issue - I searched for over an hour and did not find how to fix it?

I don't mind being pointed in the right direction either - I am really trying as hard as I can to learn this stuff.

Laughing


My site is here:
[ Only registered users can see links on this board! Get registered or login! ]
 
View user's profile Send private message
jakec
Site Admin



Joined: Feb 06, 2006
Posts: 3048
Location: United Kingdom

PostPosted: Wed Oct 08, 2008 11:47 pm Reply with quote

In appears to be IE causing the problem, because it does not happen in Firefox.
 
View user's profile Send private message
Loki
Worker
Worker



Joined: Oct 05, 2003
Posts: 107
Location: Illinois

PostPosted: Thu Oct 09, 2008 12:02 am Reply with quote

Post the block code, it probably has a defined width that needs adjusted.
 
View user's profile Send private message Visit poster's website
chaos_coa







PostPosted: Thu Oct 09, 2008 11:16 am Reply with quote

Hi Thanks for the response

I assume you want the blocks.html code from the theme folder:

Code:
<table width="100%"  border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="margin-bottom:5px; border:1px solid #BDBBBC">

  <tr>
    <td height="28" align="center" valign="middle" style="background-image:url(themes/6446/images/rep_7.jpg); background-position:bottom; background-repeat:repeat-x "><div style="padding-left:0px; padding-right:0px; color: #4A93D4; font-family:arial; font-size:12px; font-weight:bold; text-transform:uppercase">$title</div></td>
  </tr>
  <tr>
   
  </tr>
  <tr>
    <td align="left" valign="top"><div style="padding-left:0px; padding-top:0px"><img src="themes/6446/images/spacer.gif" width="187" height="1"></div>
    <div style="padding-left:5px; padding-top:5px; padding-bottom:10px; padding-right:5px" class="style2">$content</div></td>
  </tr>
</table>




Thanks

Kyle
 
chaos_coa







PostPosted: Thu Oct 09, 2008 1:15 pm Reply with quote

Hmmmmm

I am wondering if this is whats wrong:

width="187"

Perhaps the block in the upper left of my page is correct and the setting for all the other left blocks is too narrow?

Thanks

Kyle
 
Loki







PostPosted: Thu Oct 09, 2008 11:34 pm Reply with quote

No sorry I meant the Digital Photography block code.
 
chaos_coa







PostPosted: Fri Oct 10, 2008 7:06 am Reply with quote

Sure

Here it is "block-G2_Sidebar.php":

Code:
<?php


/*
 * Gallery - a web based photo album viewer and editor
 * Copyright (C) 2000-2006 Bharat Mediratta
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or (at
 * your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA  02110-1301, USA.
 */
/**
 * Gallery 2 sidebar block for PHPNuke.
 * @version $Revision: 15219 $ $Date: 2006-11-17 14:49:54 +0100 (Fri, 17 Nov 2006) $
 * @author Dariush Molavi <dari@nukedgallery.net>
 */

if (eregi("block-G2_Sidebar.php", $_SERVER['SCRIPT_NAME'])) {
    Header("Location: index.php");
    die();
}

global $admin, $user, $cookie,$db,$prefix, $g2moddata;

define("_G2_EMBED_PHP_FILE","embed.php");
define("_G2_CONFIGURATION_NOT_DONE","The module has not yet been configured.");

$g2result = $db->sql_query("SELECT * FROM ".$prefix."_g2config");
list($embedUri, $g2Uri, $activeUserId, $cookiepath, $showSidebar, $g2configurationDone, $embedVersion) = $db->sql_fetchrow($g2result);

if ($g2configurationDone != 1) {
   $content = _G2_CONFIGURATION_NOT_DONE;
   return;
}

preg_match("/^(.*)?(modules\/.*)/i", $g2Uri, $matches);
require_once($matches[2]._G2_EMBED_PHP_FILE);

if (is_admin($admin)) {
   $uid='admin';
}
else {
   if (is_user($user)) {
      cookiedecode($user);
      $uid=''; 
      if (is_user($user)) {
         $uid = $cookie[0];
      }
   }
}

$ret = GalleryEmbed::init(array(
   'embedUri' => $embedUri,
   'g2Uri' => $g2Uri,
   'activeUserId' => "$uid",
   'fullInit' => true));

if ($showSidebar) {
   $content = "The Gallery2 sidebar is enabled.<br>You should disable it before using this block.";
   return true;
}

GalleryCapabilities::set('showSidebarBlocks', false);

if(!isset($g2moddata)) {
   $g2moddata = GalleryEmbed::handleRequest();
   $newG2 = 1;
}

if (isset($g2moddata['headHtml'])) {
   list($title, $css, $javascript) = GalleryEmbed::parseHead($g2moddata['headHtml']);
}

if(!isset($g2moddata['sidebarBlocksHtml'])) {
   $content = "You need to enable sidebar blocks in your Gallery 2 configuration.";
}
else {
   $num_blocks = count($g2moddata['sidebarBlocksHtml']) - 1;
   foreach($css as $stylesheet) {
      $content .= $stylesheet;
   }
   $content .= "<div id=\"gsSidebar\">";
   for($i = 0; $i <= $num_blocks; $i++) {
      if($i != $num_blocks) {
         $content .= $g2moddata['sidebarBlocksHtml'][$i]."<hr size=\"1\" noshade>";
      }
      else {
         $content .= $g2moddata['sidebarBlocksHtml'][$i];
      }
   }
   $content .= "</div>";
}

if(!isset($newG2)) {
   $ret = GalleryEmbed::done();
}

?>
 
Loki







PostPosted: Fri Oct 10, 2008 8:11 am Reply with quote

Ah ic, there is no preset width which means the size of the thumbnail image is stretching the width. Is there a setting for the thumbnail size in the admin config area of gallery? If not it would need to be changed in the section of the gallery module that controls that thumbnail size.
 
chaos_coa







PostPosted: Fri Oct 10, 2008 11:20 am Reply with quote

Hi - I found where you control the thumbnail image size for the top left block - indeed - the thumbnail size you set is for all galleries (or you can set the widths independent).

Shrunk it all the way down to 100 pixes wide to where it looked rather tiny and it did not affect the width of that upper left block . . .

Any way to make all the other left blocks the same width of the block I have in the upper left?
 
chaos_coa







PostPosted: Fri Oct 10, 2008 11:42 am Reply with quote

ahhh ha !

I edited the blocks.html file and set:

<table width="108%" . . ......

and it now matches . . ..

Does not seem to cause any issues?

Update

Actually - I think that fix does cause issues - it cuts off the right side of the right blocks . . . .
 
warren-the-ape
Worker
Worker



Joined: Nov 19, 2007
Posts: 196
Location: Netherlands

PostPosted: Fri Oct 10, 2008 2:28 pm Reply with quote

chaos_coa wrote:
Actually - I think that fix does cause issues - it cuts off the right side of the right blocks . . . .


108% is bigger than 100% the page can't get wider than 100% Wink

Use pixels (108px) instead of percentages.
 
View user's profile Send private message
chaos_coa







PostPosted: Fri Oct 10, 2008 3:01 pm Reply with quote

Thanks !

That did it!

202px was the magic number . . . .

Now if I can just figure out my other issue I can start adding content:
[ Only registered users can see links on this board! Get registered or login! ]

I read the theme.php and it sure seems like the blocks.html code should be set to left justify the text in blocks (it does on all pages with the exception of the home pg which is cursed with centered text)


arrrrgh .. ..
 
chaos_coa







PostPosted: Fri Oct 10, 2008 7:58 pm Reply with quote

No worries here . . .

I figured out the centered text in the left and right blocks on the home pg.

There was some funky code in the message on the home page. . . .

Thanks Everyone for all the help !



Wave
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Themes

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©