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
where did you put that extra menu's code(the code after </body> tag)?
in themes.inc.php?
No its not in the theme but in the bottom of the respective php pages , should i have done that diff
Try http://forum.coppermine-gallery.net/index.php?topic=27785.0
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?
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.
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)
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.
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
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&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;
}
?>
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).
now all i get is a blank page
no error but no album either.
*beep* is going wrong...what am i doing wrong?
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.
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'];
You must add into theme.php only complete sections of code, ie. functions and templates.
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!
Take a look at http://forum.coppermine-gallery.net/index.php?topic=34066.msg159305#msg159305 - should give you an idea what sections to copy.
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?
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.
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)
If you have a Ford and want to make it drive faster, it won't help to throw a spare part of a Porsche into the trunk. You'll have to do something sensible, use the right tools, the right spare parts and insert them into the proper place of your car.
For Coppermine, the same thing is true: when you want to change a function, copy the entire function and then modify it (as suggested before): copy the entire function definitionfunction theme_display_thumbnails(&$thumb_list, $nbThumb, $album_name, $aid, $cat, $page, $total_pages, $sort_options, $display_tabs, $mode = 'thumb')
{
global $CONFIG;
global $template_thumb_view_title_row,$template_fav_thumb_view_title_row, $lang_thumb_view, $template_tab_display, $template_thumbnail_view, $lang_album_list;
static $header = '';
static $thumb_cell = '';
static $empty_cell = '';
static $row_separator = '';
static $footer = '';
static $tabs = '';
static $spacer = '';
if ($header == '') {
$thumb_cell = template_extract_block($template_thumbnail_view, 'thumb_cell');
$tabs = template_extract_block($template_thumbnail_view, 'tabs');
$header = template_extract_block($template_thumbnail_view, 'header');
$empty_cell = template_extract_block($template_thumbnail_view, 'empty_cell');
$row_separator = template_extract_block($template_thumbnail_view, 'row_separator');
$footer = template_extract_block($template_thumbnail_view, 'footer');
$spacer = template_extract_block($template_thumbnail_view, 'spacer');
}
$cat_link = is_numeric($aid) ? '' : '&cat=' . $cat;
$uid_link = (isset($_GET['uid']) && is_numeric($_GET['uid'])) ? '&uid=' . $_GET['uid'] : '';
$theme_thumb_tab_tmpl = $template_tab_display;
if ($mode == 'thumb') {
$theme_thumb_tab_tmpl['left_text'] = strtr($theme_thumb_tab_tmpl['left_text'], array('{LEFT_TEXT}' => $aid == 'lastalb' ? $lang_album_list['album_on_page'] : $lang_thumb_view['pic_on_page']));
$theme_thumb_tab_tmpl['inactive_tab'] = strtr($theme_thumb_tab_tmpl['inactive_tab'], array('{LINK}' => 'thumbnails.php?album=' . $aid . $cat_link . $uid_link . '&page=%d'));
$theme_thumb_tab_tmpl['inactive_next_tab'] = strtr($theme_thumb_tab_tmpl['inactive_next_tab'], array('{LINK}' => 'thumbnails.php?album=' . $aid . $cat_link . $uid_link . '&page=%d'));
$theme_thumb_tab_tmpl['inactive_prev_tab'] = strtr($theme_thumb_tab_tmpl['inactive_prev_tab'], array('{LINK}' => 'thumbnails.php?album=' . $aid . $cat_link . $uid_link . '&page=%d'));
} else {
$theme_thumb_tab_tmpl['left_text'] = strtr($theme_thumb_tab_tmpl['left_text'], array('{LEFT_TEXT}' => $lang_thumb_view['user_on_page']));
$theme_thumb_tab_tmpl['inactive_tab'] = strtr($theme_thumb_tab_tmpl['inactive_tab'], array('{LINK}' => 'index.php?cat=' . $cat . '&page=%d'));
$theme_thumb_tab_tmpl['inactive_next_tab'] = strtr($theme_thumb_tab_tmpl['inactive_next_tab'], array('{LINK}' => 'index.php?cat=' . $cat . '&page=%d'));
$theme_thumb_tab_tmpl['inactive_prev_tab'] = strtr($theme_thumb_tab_tmpl['inactive_prev_tab'], array('{LINK}' => 'index.php?cat=' . $cat . '&page=%d'));
}
$thumbcols = $CONFIG['thumbcols'];
$cell_width = ceil(100 / $CONFIG['thumbcols']) . '%';
$tabs_html = $display_tabs ? create_tabs($nbThumb, $page, $total_pages, $theme_thumb_tab_tmpl) : '';
// The sort order options are not available for meta albums
if ($sort_options) {
$param = array('{ALBUM_NAME}' => $album_name,
'{AID}' => $aid,
'{PAGE}' => $page,
'{NAME}' => $lang_thumb_view['name'],
'{TITLE}' => $lang_thumb_view['title'],
'{DATE}' => $lang_thumb_view['date'],
'{SORT_TA}' => $lang_thumb_view['sort_ta'],
'{SORT_TD}' => $lang_thumb_view['sort_td'],
'{SORT_NA}' => $lang_thumb_view['sort_na'],
'{SORT_ND}' => $lang_thumb_view['sort_nd'],
'{SORT_DA}' => $lang_thumb_view['sort_da'],
'{SORT_DD}' => $lang_thumb_view['sort_dd'],
'{POSITION}' => $lang_thumb_view['position'],
'{SORT_PA}' => $lang_thumb_view['sort_pa'],
'{SORT_PD}' => $lang_thumb_view['sort_pd'],
);
$title = template_eval($template_thumb_view_title_row, $param);
} else if ($aid == 'favpics' && $CONFIG['enable_zipdownload'] == 1) { //Lots of stuff can be added here later
$param = array('{ALBUM_NAME}' => $album_name,
'{DOWNLOAD_ZIP}'=>$lang_thumb_view['download_zip']
);
$title = template_eval($template_fav_thumb_view_title_row, $param);
}else{
$title = $album_name;
}
if ($mode == 'thumb') {
starttable('100%', $title, $thumbcols);
} else {
starttable('100%');
}
echo $header;
$i = 0;
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&pos={$thumb['pos']}$uid_link",
'{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;
}
}
for (;($i % $thumbcols); $i++) {
echo $empty_cell;
}
echo $footer;
if ($display_tabs) {
$params = array('{THUMB_COLS}' => $thumbcols,
'{TABS}' => $tabs_html
);
echo template_eval($tabs, $params);
}
endtable();
echo $spacer;
}
into your theme.
Thank you with being patient with ansdwering so far.
Coppying the sample was a suggestion og the other thread.
I coppied the code but .its not working ...still get the displayimage.php as the popup and this results in my embedded menu over the picture.
Had a look at the code i pasted in an ammended the lines to the code suggested in the first link you ever send me.....
//'{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'],
But still nojoy.
I would be even happy to have any click on a scaled down image point to a file displayimage2.php in which i can omit the added code
<body>
<!-- DO NOT MOVE! The following AllWebMenus linking code section must always be placed right AFTER the BODY tag-->
<!-- ******** BEGIN ALLWEBMENUS CODE FOR menu_start ******** -->
<span id='xawmMenuPathImg-menu_start' style='position:absolute;top:-50px;left:0px'><img name='awmMenuPathImg-menu_start' id='awmMenuPathImg-menu_start' src='../awmmenupath.gif' alt=''></span><script type='text/javascript'>var MenuLinkedBy='AllWebMenus [4]', awmBN='626'; awmAltUrl='';</script><script charset='UTF-8' src='../menu_start.js' language='JavaScript1.2' type='text/javascript'></script><script type='text/javascript'>awmBuildMenu();</script>
<!-- ******** END ALLWEBMENUS CODE FOR menu_start ******** -->
</body>
This code is needed in the displayimage.php as well (the scaled down images should display the menu, but not on the fullsize.
anyone any idea
I mean we were talking about the same thing not ?