Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Making my complete coppermine gallery only 600px width so it fits in my website?  (Read 7138 times)

0 Members and 1 Guest are viewing this topic.

Bartez

  • Coppermine newbie
  • Offline Offline
  • Posts: 10

Is there a way to make my website just 600px width so it fits in my website?

I maneged to got it good in view mode...only after logging in, the admin menu makes it to wide.....

is there a way to split the admin menu in 2 rules? so it doesn't break out the 600px?

Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project

- let's try... :)
what is your theme?
Logged
‍I don't answer to PM with support question
Please post your issue to related board

Bartez

  • Coppermine newbie
  • Offline Offline
  • Posts: 10

well, that's the template "hardwired".......i all has to fit in a width of 600px......and not more......but when i edit template.html to be a maximum of 600 px.....it still gets to big in the real....
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project

- on template.html right after
Code: [Select]
{CUSTOM_HEADER} , did you change the witdh of table to 600 ?
- you should add this
Code: [Select]
style="width:600px" to last div tag
Logged
‍I don't answer to PM with support question
Please post your issue to related board

Bartez

  • Coppermine newbie
  • Offline Offline
  • Posts: 10

this is what i've got:

Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="{LANG_DIR}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
<meta http-equiv="Pragma" content="no-cache" />
<title>{TITLE}</title>
<link rel="stylesheet" type="text/css" href="themes/hardwired/style.css" />
{META}
<script type="text/javascript" src="scripts.js" ></script>
<!-- $Id: template.html,v 1.13 2006/02/05 22:35:09 gaugau Exp $ -->
</head>
<body>
{CUSTOM_HEADER}
<table width="600"  border="0" cellspacing="0" cellpadding="0">
  <tr valign="top">
    <td width="53" rowspan="3" id="far-left"><img src="themes/hardwired/images/far-left.gif" width="54" height="14" alt="" /></td>
    <td width="18" class="middle-left"><img src="themes/hardwired/images/middle-left.gif" width="18" height="14" alt="" /></td>
    <td height="62" class="right-banner">
        <div class="left-banner">
        <div class="gal_name">{GAL_NAME}</div>
        <div class="gal_description">{GAL_DESCRIPTION}</div>
        </div>
    </td>
    <td width="19" class="middle-right"><img src="themes/hardwired/images/middle-right.gif" width="19" height="14" alt="" /></td>
    <td width="53" rowspan="3" class="far-right"><img src="themes/hardwired/images/far-right.gif" width="53" height="14" alt="" /></td>
  </tr>
  <tr>
    <td width="18" class="middle-left">&nbsp;</td>
    <td class="gallery"><div align="right" class="topmenu"> {SYS_MENU} </div>
      <br />
      <div align="left" class="topmenu">{SUB_MENU}</div> <br />
      <div align="center"> {THEME_SELECT_LIST} {LANGUAGE_SELECT_LIST} </div>
      <br />
      {ADMIN_MENU} {GALLERY}</td>
    <td width="19" class="middle-right">&nbsp;</td>
  </tr>
  <tr valign="baseline">
    <td width="18" class="middle-left"><img src="themes/hardwired/images/bottom-left.gif" width="18" height="31" alt="" /></td>
    <td class="bottom-middle">&nbsp;</td>
    <td width="19" class="middle-right"><img src="themes/hardwired/images/bottom-right.gif" width="19" height="31" alt="" /></td>
  </tr>
</table>
<br />
{CUSTOM_FOOTER}
{VANITY}
</body>
</html>
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project

it's work for me what is going wrong for you can you post a link of your CPG?
« Last Edit: April 20, 2006, 01:04:31 pm by bmossavari »
Logged
‍I don't answer to PM with support question
Please post your issue to related board

Bartez

  • Coppermine newbie
  • Offline Offline
  • Posts: 10

check http://www.bartvanstrien.nl/fotoboek

to see it is not 600 px......but bigger.....

also when i make the table about 400px....it still keeps as the width like it now is...
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project

if you set 560 px for main table it will display 600px with border(560 px main table + 40 px border of main table) on hardwired (it can't be smaller) theme but not in mac ox x
Logged
‍I don't answer to PM with support question
Please post your issue to related board

Bartez

  • Coppermine newbie
  • Offline Offline
  • Posts: 10

is it possible to change for instance the theme waterdrop to maximum 600px?

if i do so.....it will show nice....but after logging in....it shows the admin menu.....and that menu is the wide.....how to split the admin menu in 2 lines?

i don't care what theme i use....i just want it all to fit in 600px....including admin menu etc.....

is that possible?
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project

did you try classic theme? it get 500 px when it's in user mode and 600px when it's in admin mode check that...
Logged
‍I don't answer to PM with support question
Please post your issue to related board

Bartez

  • Coppermine newbie
  • Offline Offline
  • Posts: 10

nope....after logging in....the admin menu shows all kind of buttons......is there a possibility to get rid of those buttons and just show text instead? like the usermenu?
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project

if you want more size changing you should modify themes.inc.php , that I don't recommand this .
yes you can change Admin menu button by editing "admin_menu" and some othe style on style.css take look at them may be you got chance , let me know after that
Logged
‍I don't answer to PM with support question
Please post your issue to related board

Bartez

  • Coppermine newbie
  • Offline Offline
  • Posts: 10

i got the buttons away.....but i just don't know how to make the admin menu go on 2 lines instead of 1.

because if i solved that problem......it is done!!

so the problem actually is......how to split the admin menu in 2 lines......???

have you got any idea how to do that?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de

edit themes/yourtheme/theme.php, find
Quote
// HTML template for gallery admin menu
and add a linebreak where you see fit. Depending on the way the admin menu is being built, it will be enough to enter <br /> somewhere if the admin menu just consits of a line with hyperlinked text. If the admin menu is being created using tables, you'll have to add </tr><tr> in the appropriate place. However, I don't understand why you're so eager to do this: it is merely a cosmetical issue: as the admin menu only shows up for you as admin, your visitors won't see it anyway.
Sidenote: having a fixed width layout for dynamic content is hard work and not recommended.

if you want more size changing you should modify themes.inc.php , that I don't recommand this .
Avoid editing of this file under all circumstances.
Logged

Bartez

  • Coppermine newbie
  • Offline Offline
  • Posts: 10

i'm sorry but i can;t find that piece of code......this is my theme.php:

Code: [Select]
<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2006 Coppermine Dev Team
  v1.1 originally written by Gregory DEMAR

  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.
  ********************************************
  Coppermine version: 1.4.4
  $Source: /cvsroot/coppermine/stable/themes/classic/theme.php,v $
  $Revision: 1.15 $
  $Author: gaugau $
  $Date: 2006/02/24 13:32:45 $
**********************************************/

// ------------------------------------------------------------------------- //
// This theme has all CORE items removed                                     //
// ------------------------------------------------------------------------- //
define('THEME_IS_XHTML10_TRANSITIONAL',1);

// Added to display flim_strip
function theme_display_film_strip(&$thumb_list$nbThumb$album_name$aid$cat$pos$sort_options$mode 'thumb')
{
    global 
$CONFIG$THEME_DIR;
    global 
$template_film_strip$lang_film_strip;

    static 
$template '';
    static 
$thumb_cell '';
    static 
$empty_cell '';
    static 
$spacer '';

    if ((!
$template)) {
        
$template $template_film_strip;
        
$thumb_cell template_extract_block($template'thumb_cell');
        
$empty_cell template_extract_block($template'empty_cell');
    }

    
$cat_link is_numeric($aid) ? '' '&amp;cat=' $cat;

    
$thumbcols $CONFIG['thumbcols'];
    
$cell_width ceil(100 $CONFIG['max_film_strip_items']) . '%';

    
$i 0;
    
$thumb_strip '';
    foreach(
$thumb_list as $thumb) {
        
//modify $new_size for max dimension of thumbnails in filmstrip
        
$new_size 65;
        
preg_match('/(?<=width=")[0-9]*/',$thumb['image'],$matches,PREG_OFFSET_CAPTURE);
        
$srcWidth=$matches[0][0];
        
preg_match('/(?<=height=")[0-9]*/',$thumb['image'],$matches,PREG_OFFSET_CAPTURE);
        
$srcHeight=$matches[0][0];
        
$ratio max($srcWidth$srcHeight) / $new_size;
        
$ratio max($ratio1.0);
        
$destWidth = (int)($srcWidth $ratio);
        
$destHeight = (int)($srcHeight $ratio);
        
$thumb['image']=preg_replace('/width="[^"]*"/','width="'.$destWidth.'"',$thumb['image']);
        
$thumb['image']=preg_replace('/height="[^"]*"/','height="'.$destHeight.'"',$thumb['image']);
        
$i++;
        if (
$mode == 'thumb') {
            
$params = array('{CELL_WIDTH}' => $cell_width,
                
'{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&amp;pos={$thumb['pos']}",
                
'{THUMB}' => $thumb['image'],
                
'{CAPTION}' => $thumb['caption'],
                
'{ADMIN_MENU}' => ''
                
);
        } else {
            
$params = array('{CELL_WIDTH}' => $cell_width,
                
'{LINK_TGT}' => "index.php?cat={$thumb['cat']}",
                
'{THUMB}' => $thumb['image'],
                
'{CAPTION}' => '',
                
'{ADMIN_MENU}' => ''
                
);
        }
        
$thumb_strip .= template_eval($thumb_cell$params);
    }

    if (
defined('THEME_HAS_FILM_STRIP_GRAPHICS')) {
        
$tile1 $THEME_DIR 'images/tile1.gif';
        
$tile2 $THEME_DIR 'images/tile2.gif';
    } elseif (
defined('THEME_HAS_FILM_STRIP_GRAPHIC')) {
        
$tile1=$tile2=$THEME_DIR 'images/tile.gif';
    } else {
        
$tile1=$tile2'images/tile.gif';
    }

    
$params = array('{THUMB_STRIP}' => $thumb_strip,
        
'{COLS}' => $i,
        
'{TILE1}' => $tile1,
        
'{TILE2}' => $tile2,
        );

    
ob_start();
    
starttable($CONFIG['picture_table_width']);
    echo 
template_eval($template$params);
    
endtable();
    
$film_strip ob_get_contents();
    
ob_end_clean();

    return 
$film_strip;
}
?>
Logged

Gizmo

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1015
    • BullsEye Photos

Hi Bartez,

You need to open the Sample theme that's in your theme folder and copy the section GauGau references. Then add the break <br /> between the two menu items you want cut.

Now for the important issue, width formatting. Like GauGau said, setting a fixed width can't be considered lightly. If you go to low (600 is low) then trying to get all your content to fit will be difficult especially if you have a heavly dynamic site like CPG. Not every page has the same structured content and some pages require more width than others. It's very important that you also consider your monitor resolution that you're programming on. If you're on a 800x600 (I hope not   ;) ) or a 1024x768 and you have lots of extra room around your main content then for those of us with high resolution monitors, we will have to squint to see your content. My laptop is 1400x1050 and webpages designed on older lower resolution screens can be very hard to see. I'd recommend that you don't go below 760 pixels width so that all current monitors can easily see your content (you have to be considerate of us over 40 age group   ;D ). This way older 800x600 monitors will have a full screen with little left and right white space and higher resolution monitors will be able to see your fonts.

Search the web for creating webpages and monitor resolution and you'll get much better explanations and visual examples. Here's good starting point:

http://webdesign.about.com/od/webdesign/a/aa123002a.htm

Good luck!

Billy
« Last Edit: April 21, 2006, 02:21:23 pm by Gizmo »
Logged
Did you read the manual first???? Taking 2 minutes to backup your files can save you hours of wondering what you screwed up.
Billy Bullock - BullsEyePhotos Blog of Indecision

Gizmo

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1015
    • BullsEye Photos

Hey Bartez,

I tried checking you site and all I get is a white page but I reread your post and it looks like you want to have CPG inside your webpage. Maybe take a look at this and see if this isn't more desirable. CpmFethch allows you to view CPG images on your website outside of CPG and then you could point them to the full gallery if need be. http://forum.coppermine-gallery.net/index.php?topic=19564.0

Just thinking out loud...
Logged
Did you read the manual first???? Taking 2 minutes to backup your files can save you hours of wondering what you screwed up.
Billy Bullock - BullsEyePhotos Blog of Indecision
Pages: [1]   Go Up
 

Page created in 0.026 seconds with 19 queries.