margin-left 200px margin-left 200px
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

margin-left 200px

Started by desiredbard, July 12, 2006, 02:10:46 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

desiredbard

Hi There

I need for a reoccuring menu to move the basic layout 200px to the right. Amending the margins in the active template stylesheet does the trick however that works fine till for example here: http://www.de-ridder.info/photos/displayimage.php?album=1&pos=0
when clicking the scaled down image it opens in a new screen based on displayimage.php as well, which has the menu as well.
1) I do not want the menu there
2) The menu is F-ed up as well but thats beside the point see 1)

Now is there a way to instruct http://www.de-ridder.info/photos/displayimage.php?album=1&pos=0  (and others like it (so the album ones) to open the fullsize image in lets say a displayfullimage.php which is then going to miss the code for the menu. Or even better just open the orriginal jpg in a new browser screen without frills

Regards
Bas

Sami

#1
where did you put that extra menu's code(the code after </body> tag)?
in themes.inc.php?
‍I don't answer to PM with support question
Please post your issue to related board

desiredbard

No its not in the theme but in the bottom of the respective php pages , should i have done that diff

Joachim Müller


desiredbard

#4
Haloeschen

Did the suggested thing:
Am using the waterdrop template for the moment.
Since the Theme.php was emty I copied the following lines and the end of the file now reads:
foreach($thumb_list as $thumb) {
        $i++;
        if ($mode == 'thumb') {
            if ($aid == 'lastalb') {
                $params = array('{CELL_WIDTH}' => $cell_width,
                    '{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&pos={$thumb['pos']}",  //next line for thumb to fullsize mod
                    '{LINK_TGT}' => "javascript:;\" onClick=\"MM_openBrWindow('displayimage.php?pid={$thumb['pid']}&fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=yes,status=yes,resizable=yes,width={$thumb['pwidth']},height={$thumb['pheight']}')",
                    '{THUMB}' => $thumb['image'],
                    '{CAPTION}' => $thumb['caption'],
                    '{ADMIN_MENU}' => $thumb['admin_menu']
                    );
            } else {
                $params = array('{CELL_WIDTH}' => $cell_width,
                    '{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&pos={$thumb['pos']}",  //next line for thumb to fullsize mod
                    '{LINK_TGT}' => "javascript:;\" onClick=\"MM_openBrWindow('displayimage.php?pid={$thumb['pid']}&fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=yes,status=yes,resizable=yes,width={$thumb['pwidth']},height={$thumb['pheight']}')",
                    '{THUMB}' => $thumb['image'],
                    '{CAPTION}' => $thumb['caption'],
                    '{ADMIN_MENU}' => $thumb['admin_menu']
                    );
            }
        } else {
            $params = array('{CELL_WIDTH}' => $cell_width,
                '{LINK_TGT}' => "index.php?cat={$thumb['cat']}",
                '{THUMB}' => $thumb['image'],
                '{CAPTION}' => $thumb['caption'],
                '{ADMIN_MENU}' => ''
                );
        }
// HTML template for template sys_menu spacer
$template_sys_menu_spacer ='<img src="themes/water_drop/images/orange_carret.gif" width="8" height="8" border="0" alt="" />';

?>


I amended the functions.inc.php to (line 170)
$thumb_list[$i]['pid'] = $row['pid'];   //added for thumb to fullsize mod
                        $thumb_list[$i]['pwidth'] = $row['pwidth'];
                        $thumb_list[$i]['pheight'] = $row['pheight'];


Calling the page results in:

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in C:\Documents and Settings\Bas\My Documents\My Web Sites\photos\include\functions.inc.php on line 2927

Any suggestions?





Joachim Müller

#5
Use the code buttons in the future (I edited your posting accordingly). You appear to be self-hosted, which is not recommended at all, however not related to your issues. What's the line 2927 for you?

Edit: don't PM me (or any other dev/supporter). Read my signature and the board rules! Over and out.

desiredbard

#6
Sorry fort the PM, should have RTFM or Userguide
I am not really self hosted, I test locally would have expected the rror to com back with localhost instead of the full path)
I'll check the line  and get back to you

The thing is there is no line 2927  (It only runs to line 300)

Joachim Müller

include/functions.inc.php should contain around 2940 lines. If your copy doesn't, then something has gone wrong when you edited that file. Replace it with a fresh copy.

desiredbard

Might that have to do with the fact that line numbering in dreamweaver is kind of odd
Is there another editor you could recommend

Sorry for the hassle and thanks so much for your help (and patience) so far

desiredbard

Now get a
Parse error: parse error, unexpected $end in C:\Documents and Settings\Bas\My Documents\My Web Sites\photos\themes\classic\theme.php on line 53

theme php reads (its the clasic)

How do I do code? ah found it

<?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.8
  $Source$
  $Revision: 3116 $
  $Author: gaugau $
  $Date: 2006-06-08 00:11:54 +0200 (Do, 08 Jun 2006) $
**********************************************/

    
foreach($thumb_list as $thumb) {
        
$i++;
        if (
$mode == 'thumb') {
            if (
$aid == 'lastalb') {
                
$params = array('{CELL_WIDTH}' => $cell_width,
                    
'{LINK_TGT}' => "thumbnails.php?album={$thumb['aid']}",
                    
'{THUMB}' => $thumb['image'],
                    
'{CAPTION}' => $thumb['caption'],
                    
'{ADMIN_MENU}' => $thumb['admin_menu']
                    );
            } else {
                
$params = array('{CELL_WIDTH}' => $cell_width,
                    
//'{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&amp;pos={$thumb['pos']}",
                    
'{LINK_TGT}' => "javascript:;\" onClick=\"MM_openBrWindow('displayimage.php?pid={$thumb['pid']}&fullsize=1','" uniqid(rand()) . "','scrollbars=yes,toolbar=yes,status=yes,resizable=yes,width={$thumb['pwidth']},height={$thumb['pheight']}')",
                    
'{THUMB}' => $thumb['image'],
                    
'{CAPTION}' => $thumb['caption'],
                    
'{ADMIN_MENU}' => $thumb['admin_menu']
                    );
            }
        } else {
            
$params = array('{CELL_WIDTH}' => $cell_width,
                
'{LINK_TGT}' => "index.php?cat={$thumb['cat']}",
                
'{THUMB}' => $thumb['image'],
                
'{CAPTION}' => $thumb['caption'],
                
'{ADMIN_MENU}' => ''
                
);
        }
        echo 
template_eval($thumb_cell$params);

        if (((
$i $thumbcols) == 0) && ($i count($thumb_list))) {
            echo 
$row_separator;
        }

?>



Joachim Müller

Use another editor or configure properly. WYSIWYG-editors like Dreamweaver modify code in a way that breaks the files. That's the default behaviour of those editors. Either edit Dreamweaver's configuration or use a plain-text editor (notepad.exe is fine).

desiredbard

now all i get is a blank page
no error but no album either.
*beep* is going wrong...what am i doing wrong?

Joachim Müller

Usually happens if you have spaces of blank lines after ?>

This is leading nowhere - I suggest replacing your edited files with fresh ones and reconsidering your overall approach.

desiredbard

OK New DB new fresh instal of coppermine, files edited by notepad ---> blank screeen in IE and Firefox.

what th F am I doing wrong?

using the standard theme at thr moment
theme.php now reads

<?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.8
  $Source$
  $Revision: 3116 $
  $Author: gaugau $
  $Date: 2006-06-08 00:11:54 +0200 (Do, 08 Jun 2006) $
**********************************************/
//'{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&pos={$thumb['pos']}",  //next line for thumb to fullsize mod
  
'{LINK_TGT}' => "javascript:;\" onClick=\"MM_openBrWindow('displayimage.php?pid={$thumb['pid']}&fullsize=1','" uniqid(rand()) . "','scrollbars=yes,toolbar=yes,status=yes,resizable=yes,width={$thumb['pwidth']},height={$thumb['pheight']}')",
// ------------------------------------------------------------------------- //
// This theme has all CORE items removed                                     //
// ------------------------------------------------------------------------- //
define('THEME_IS_XHTML10_TRANSITIONAL',1);

?>




functions.inc.php from line 1708

$thumb_list[$i]['aid'] = $row['aid'];
$thumb_list[$i]['pid'] = $row['pid'];   //added for thumb to fullsize mod
$thumb_list[$i]['pwidth'] = $row['pwidth'];
$thumb_list[$i]['pheight'] = $row['pheight'];

Nibbler

You must add into theme.php only complete sections of code, ie. functions and templates.

desiredbard

#15
Quote from: Nibbler on July 26, 2006, 03:15:51 PM
You must add into theme.php only complete sections of code, ie. functions and templates.
And thats what I dont get, I'm completely new to php.
What part do I have to put in. I know this seems stupid to you guys but all I hoped to get with coppermine was an easy to maintain photoalbum.
Just to ask the orriginal size picture to open outside of the displayimage.php (due to own menu appearing) seems a nightmare so far.

I followed the instructions to the letter: Put the ammended code into the theme.php .... How am i supposed to know whatits part of or what complete is.

I am not angry just anoied and desperate to get this sorted. My photo section has been down quite some time now.

OK just tried again used the theme.php from the sample folder and only ammended lines so that should leave the text complete.
Refreshed the page but the f-ing javascript menu (all webmenu generated) still appears on the popup!


Joachim Müller


desiredbard

Quote from: GauGau on July 26, 2006, 06:48:28 PM
Take a look at http://forum.coppermine-gallery.net/index.php?topic=34066.msg159305#msg159305 - should give you an idea what sections to copy.
Thats what I've done i used the theme.php out of sample... all is working now but it still displays the original size image within displayimage.php and that is what i started out to avoid.

The downsized image (larger than thumbnail should display the menu, howebver a click on the downsized image should either open a different page or the jpg directly.

Can this be done at all?


Joachim Müller

Quote from: desiredbard on July 26, 2006, 01:56:03 PM

//'{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&pos={$thumb['pos']}",  //next line for thumb to fullsize mod
  '{LINK_TGT}' => "javascript:;\" onClick=\"MM_openBrWindow('displayimage.php?pid={$thumb['pid']}&fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=yes,status=yes,resizable=yes,width={$thumb['pwidth']},height={$thumb['pheight']}')",


Those two lines can't stand on their own, remove them.

desiredbard

#19
Quote from: GauGau on July 26, 2006, 10:41:40 PM
Those two lines can't stand on their own, remove them.
OK b4 I do that now I'm confused acc to the croospost these lines had to go in there?
These are the lines i went to all that trouble cutting and pasting them over, and now you say delete them
That means nothing has changed?

The link you gave me to the start links through to:

http://forum.coppermine-gallery.net/index.php?topic=15671.msg75024#msg75024

And that states this alteration had to be made, in the sama thread and the one you send me this line is mentioned again.

Sorry if I'm annoying you but I really do not get it, I dont want anyone top do it for me, i do want advise though but now there are contradictions

(the lines are not on their own I copied theme.php from sample to classic since it was the only theme file that contained the line to be replaced, the other themes do not have the line and the thread states to copy it over in that case)