Advanced search  

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]

Pages: [1] 2   Go Down

Author Topic: margin-left 200px  (Read 10473 times)

0 Members and 1 Guest are viewing this topic.

desiredbard

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
margin-left 200px
« on: July 12, 2006, 02:10:46 pm »

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
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: margin-left 200px
« Reply #1 on: July 12, 2006, 02:24:18 pm »

where did you put that extra menu's code(the code after </body> tag)?
 in themes.inc.php?
« Last Edit: July 12, 2006, 02:37:05 pm by bmossavari »
Logged
‍I don't answer to PM with support question
Please post your issue to related board

desiredbard

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Re: margin-left 200px
« Reply #2 on: July 17, 2006, 11:44:08 pm »

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

Joachim Müller

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

desiredbard

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Re: margin-left 200px
« Reply #4 on: July 21, 2006, 11:46:59 pm »

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:
Code: [Select]
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)
Code: [Select]
$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?




« Last Edit: July 22, 2006, 11:04:28 am by GauGau »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: margin-left 200px
« Reply #5 on: July 22, 2006, 11:05:46 am »

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.
« Last Edit: July 22, 2006, 11:14:04 am by GauGau »
Logged

desiredbard

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Re: margin-left 200px
« Reply #6 on: July 24, 2006, 11:50:52 am »

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)
« Last Edit: July 24, 2006, 11:58:23 am by desiredbard »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: margin-left 200px
« Reply #7 on: July 24, 2006, 05:15:27 pm »

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.
Logged

desiredbard

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Re: margin-left 200px
« Reply #8 on: July 24, 2006, 05:57:11 pm »

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
Logged

desiredbard

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Re: margin-left 200px
« Reply #9 on: July 24, 2006, 06:42:55 pm »

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
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.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;
        }

?>

Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: margin-left 200px
« Reply #10 on: July 24, 2006, 07:41:44 pm »

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).
Logged

desiredbard

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Re: margin-left 200px
« Reply #11 on: July 26, 2006, 12:32:23 am »

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: margin-left 200px
« Reply #12 on: July 26, 2006, 06:17:33 am »

Usually happens if you have spaces of blank lines after
Code: [Select]
?>
This is leading nowhere - I suggest replacing your edited files with fresh ones and reconsidering your overall approach.
Logged

desiredbard

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Re: margin-left 200px
« Reply #13 on: July 26, 2006, 01:56:03 pm »

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
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.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
Code: [Select]
$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'];
Logged

Nibbler

  • Guest
Re: margin-left 200px
« Reply #14 on: July 26, 2006, 03:15:51 pm »

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

desiredbard

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Re: margin-left 200px
« Reply #15 on: July 26, 2006, 04:24:40 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!

« Last Edit: July 26, 2006, 06:07:29 pm by desiredbard »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: margin-left 200px
« Reply #16 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.
Logged

desiredbard

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Re: margin-left 200px
« Reply #17 on: July 26, 2006, 08:12:08 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?

Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: margin-left 200px
« Reply #18 on: July 26, 2006, 10:41:40 pm »

Code: [Select]
//'{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.
Logged

desiredbard

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Re: margin-left 200px
« Reply #19 on: July 26, 2006, 11:00:12 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)



« Last Edit: July 27, 2006, 12:05:40 pm by desiredbard »
Logged
Pages: [1] 2   Go Up
 

Page created in 0.029 seconds with 19 queries.