forum.coppermine-gallery.net
Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: troublemaker on December 15, 2003, 04:29:08 pm
-
Can I edit themes in front page
I'll tell you right now I'm not the fastest processor in the socket
So how can I easily edit a theme (what few pages do I add text too so that every page is affected) and make everything look uniformed and pretty
-
do not use a wysiwyg-editor like frontpage, use a text editor - notepad is fine. Take a look at /themes/yourtheme/template.html - there's plenty of room you can add static content there.
GauGau
-
that sounds hard
OK how about adding a mod upgrade thing for pay pal or other such toy
*innocent smile*
-
[list=1]
- feature requests go into the board which is labelled "feature requests"
- has been requested/asked/answered before, do a search
- stick to one topic per thread, to avoid thread drift
- there may be someone some day doing a paypal mod, I won't be that someone
- putting a static paypal button on your page is easy, a true/secure ecommerce/micropayment implementation is hard to build[/list:o]GauGau
-
I already have it in there I was just whining
Thanks for the quick reply
-
so if I edit the content to "template.html "
will it be on the front page and all picture pages?
-
yes :evil:
Look, why don't you just try? That's the way to find out about the magic and wonders of running your own site: read some stuff on the internet, go back to your source code, play with it, upload it and check if it works as expected...
GauGau
-
I got it to work I love life at the moment
thanks for humoring my laziness
-
OK so I got everything pretty but wondering whats the large view page properties
I figured out how to edit template.HTML but is there a HTML file for the large view?
-
I guess you mean the fullsize-popup: yes, you can configure it's look as well: edit dsiplayimage.php and look for
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title><?php echo $CONFIG['gallery_name'] ?>: <?php echo $lang_fullsize_popup['click_to_close'];
?></title>
<meta http-equiv="content-type" content="text/html; charset=<?php echo $CONFIG['charset'] == 'language file' ? $lang_charset : $CONFIG['charset'] ?>" />
<link rel="stylesheet" href="<?php echo $THEME_DIR ?>style.css" />
<script type="text/javascript" src="scripts.js"></script>
</head>
<body scroll="auto" <?php if ($CONFIG['disable_popup_rightclick'] == 1) {
print 'onkeydown = "onKeyDown()"';
}
?>>
<script language="JavaScript" type="text/JavaScript">
adjust_popup();
</script>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="2">
<td align="center" valign="middle">
<table cellspacing="2" cellpadding="0" style="border: 1px solid #000000; background-color: #FFFFFF;">
<td>
<?php
if (isset($HTTP_GET_VARS['picfile'])) {
if (!GALLERY_ADMIN_MODE) cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
$picfile = $HTTP_GET_VARS['picfile'];
$picname = $CONFIG['fullpath'] . $picfile;
$imagesize = @getimagesize($picname);
echo "<a href=\"javascript: window.close()\"><img src=\"" . path2url($picname) . "\" $imagesize[3] class=\"image\" border=\"0\" alt=\"\" title=\"$picfile\n" . $lang_fullsize_popup['click_to_close'] . "\"/></a><br />\n";
} elseif (isset($HTTP_GET_VARS['pid'])) {
$pid = (int)$HTTP_GET_VARS['pid'];
$sql = "SELECT * " . "FROM {$CONFIG['TABLE_PICTURES']} " . "WHERE pid='$pid' $ALBUM_SET";
$result = db_query($sql);
if (!mysql_num_rows($result)) cpg_die(ERROR, $lang_errors['non_exist_ap'], __FILE__, __LINE__);
$row = mysql_fetch_array($result);
$pic_url = get_pic_url($row, 'fullsize');
$geom = 'width="' . $row['pwidth'] . '" height="' . $row['pheight'] . '"';
echo "<a href=\"javascript: window.close()\"><img src=\"" . $pic_url . "\" $geom class=\"image\" border=\"0\" alt=\"\" title=\"" . htmlspecialchars($row['filename']) . "\n" . $lang_fullsize_popup['click_to_close'] . "\"></a><br />\n";
}
?>
</td>
</table>
</td>
</table>
</body>
</html>
(this time definitely no playing around with it in frontpage, it'll break things - guaranteed :wink: )
GauGau
-
:shock: that looks alot harder :(
-
I'll show you with some colors which parts to touch and which should be left alone (green=can be modified;red=don't touch)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title><?php echo $CONFIG['gallery_name'] ?>: <?php echo $lang_fullsize_popup['click_to_close'];
?></title>
<meta http-equiv="content-type" content="text/html; charset=<?php echo $CONFIG['charset'] == 'language file' ? $lang_charset : $CONFIG['charset'] ?>" />
<link rel="stylesheet" href="<?php echo $THEME_DIR ?>style.css" />
<script type="text/javascript" src="scripts.js"></script>
</head>
<body scroll="auto">
<script language="JavaScript" type="text/JavaScript">
adjust_popup();
</script>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="2">
<td align="center" valign="middle">
<table cellspacing="2" cellpadding="0" style="border: 1px solid #000000; background-color: #FFFFFF;">
<td>
<?php
if (isset($HTTP_GET_VARS['picfile'])) {
if (!GALLERY_ADMIN_MODE) cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
$picfile = $HTTP_GET_VARS['picfile'];
$picname = $CONFIG['fullpath'] . $picfile;
$imagesize = @getimagesize($picname);
echo "<a href=\"javascript: window.close()\"><img src=\"" . path2url($picname) . "\" $imagesize[3] class=\"image\" border=\"0\" alt=\"\" title=\"$picfile\n" . $lang_fullsize_popup['click_to_close'] . "\"/></a><br />\n";
} elseif (isset($HTTP_GET_VARS['pid'])) {
$pid = (int)$HTTP_GET_VARS['pid'];
$sql = "SELECT * " . "FROM {$CONFIG['TABLE_PICTURES']} " . "WHERE pid='$pid' $ALBUM_SET";
$result = db_query($sql);
if (!mysql_num_rows($result)) cpg_die(ERROR, $lang_errors['non_exist_ap'], __FILE__, __LINE__);
$row = mysql_fetch_array($result);
$pic_url = get_pic_url($row, 'fullsize');
$geom = 'width="' . $row['pwidth'] . '" height="' . $row['pheight'] . '"';
echo "<a href=\"javascript: window.close()\"><img src=\"" . $pic_url . "\" $geom class=\"image\" border=\"0\" alt=\"\" title=\"" . htmlspecialchars($row['filename']) . "\n" . $lang_fullsize_popup['click_to_close'] . "\"></a><br />\n";
}
?>
</td>
</table>
</td>
</table>
</body>
</html>
Makes the coice easier, doesn't it :wink:
GauGau
-
so it worked on the large pop-up
but I got
Warning: Cannot modify header information - headers already sent by (output started at /home/clynefan/public_html/displayimage.php:19) in /home/clynefan/public_html/themes/fruity/theme.php on line 773
Warning: Cannot modify header information - headers already sent by (output started at /home/clynefan/public_html/displayimage.php:19) in /home/clynefan/public_html/include/functions.inc.php on line 51
on the normal view http://www.clynefan.com/displayimage.php?album=random&cat=6&pos=-1958
-
all I did was take space out of the top of the file before the code even stated and now its ok?
does space reall harm the code?
-
spaces are being sent as well - if they are sent before the header was sent, you'll get the error you mentioned - this is not coppermine-related but php-related (or even more generally: that's the way communication between a server and a browser works).
GauGau
-
you kick butt