Front page Themes? Front page Themes?
 

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

Main Menu

Front page Themes?

Started by troublemaker, December 15, 2003, 04:29:08 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

troublemaker

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
Site Admin's @ coppermine kick much techie @$$

Joachim Müller

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

troublemaker

that sounds hard

OK how about adding a mod upgrade thing for pay pal or other such toy
 *innocent smile*
Site Admin's @ coppermine kick much techie @$$

Joachim Müller

[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

troublemaker

I already have it in there I was just whining

Thanks for the quick reply
Site Admin's @ coppermine kick much techie @$$

troublemaker

so if I edit the content to "template.html "
will it be on the front page and all picture pages?
Site Admin's @ coppermine kick much techie @$$

Joachim Müller

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

troublemaker

I got it to work I love life at the moment

thanks for humoring my laziness
Site Admin's @ coppermine kick much techie @$$

troublemaker

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?
Site Admin's @ coppermine kick much techie @$$

Joachim Müller

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'&#93; ?>: <?php echo $lang_fullsize_popup['click_to_close'&#93;;
    
?>
</title>
<meta http-equiv="content-type" content="text/html; charset=<?php echo $CONFIG['charset'&#93; == 'language file' ? $lang_charset &#58; $CONFIG['charset'&#93; ?>" />
<link rel="stylesheet" href="<?php echo $THEME_DIR ?>style.css" />
<script type="text/javascript" src="scripts.js"></script>
</head>
<body scroll="auto" <?php if &#40;$CONFIG['disable_popup_rightclick'&#93; == 1&#41; &#123;
        
print 'onkeydown = "onKeyDown&#40;&#41;"';
    &
#125;
    
?>
>
<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 &#40;isset&#40;$HTTP_GET_VARS['picfile'&#93;&#41;&#41; &#123;
        
if &#40;!GALLERY_ADMIN_MODE&#41; cpg_die&#40;ERROR, $lang_errors['access_denied'&#93;, __FILE__, __LINE__&#41;;

        
$picfile $HTTP_GET_VARS['picfile'&#93;;
        
$picname $CONFIG['fullpath'&#93; . $picfile;
        
$imagesize = @getimagesize&#40;$picname&#41;;
        
echo "<a href=\"javascript&#58; window.close&#40;&#41;\"><img src=\"" path2url&#40;$picname&#41; . "\" $imagesize[3&#93; class=\"image\" border=\"0\" alt=\"\" title=\"$picfile\n" . $lang_fullsize_popup['click_to_close'&#93; . "\"/></a><br />\n";
    
&#125; elseif &#40;isset&#40;$HTTP_GET_VARS['pid'&#93;&#41;&#41; &#123;
        
$pid = &#40;int&#41;$HTTP_GET_VARS['pid'&#93;;
        
$sql "SELECT * " "FROM &#123;$CONFIG['TABLE_PICTURES'&#93;&#125; " "WHERE pid='$pid$ALBUM_SET";
        
$result db_query&#40;$sql&#41;;

        
if &#40;!mysql_num_rows&#40;$result&#41;&#41; cpg_die&#40;ERROR, $lang_errors['non_exist_ap'&#93;, __FILE__, __LINE__&#41;;

        
$row mysql_fetch_array&#40;$result&#41;;
        
$pic_url get_pic_url&#40;$row, 'fullsize'&#41;;
        
$geom 'width="' $row['pwidth'&#93; . '" height="' . $row['pheight'&#93; . '"';
        
echo "<a href=\"javascript&#58; window.close&#40;&#41;\"><img src=\"" $pic_url "\" $geom class=\"image\" border=\"0\" alt=\"\" title=\"" htmlspecialchars&#40;$row['filename'&#93;&#41; . "\n" . $lang_fullsize_popup['click_to_close'&#93; . "\"></a><br />\n";
    
&#125;

    
?>

   </td>
  </table>
 </td>
</table>
</body>
</html>
(this time definitely no playing around with it in frontpage, it'll break things - guaranteed :wink: )

GauGau

troublemaker

:shock: that looks alot harder  :(
Site Admin's @ coppermine kick much techie @$$

Joachim Müller

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)
Quote<!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

troublemaker

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

QuoteWarning: 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
Site Admin's @ coppermine kick much techie @$$

troublemaker

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?
Site Admin's @ coppermine kick much techie @$$

Joachim Müller

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

troublemaker

Site Admin's @ coppermine kick much techie @$$