Changing font of -Sent by Jur from IP at Friday, August,33,2004 11- Changing font of -Sent by Jur from IP at Friday, August,33,2004 11-
 

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

Changing font of -Sent by Jur from IP at Friday, August,33,2004 11-

Started by Jur010, August 14, 2004, 02:11:09 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Jur010

Hi,

CPG is my first contact with php.

Starting to get it a little bit.

have been updating my ecards layout to fit my theme.

Have changed the " $message .= "Sent by etc " in ecard.php

But how can I change the font size and name of this line, so it appears like I want it to appear in an Ecard?

Do I add

'<font size="1" face="Arial">' before "Sent by etc"
and close with '</font>' after " [GMT]"   ?

I dont wanna screw up things...

Thanx,

Jur010

www.breaktru.info/gallery


skybax

If you're wanting to make a quick change and know where you make your code changes - then you're right on track. Play with it, break it; just remember to make a backup (i make one about twice a day with all the mod's i'm working on)... and then if you break it - well just replace it. Like they say: "there's no replacement for displacement..." you loose out on backups and well that's the whole fun of pulling hair. Welcome to the board and php.... you've got the hange of it.

-T 8)
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.skybax.com%2FhotImage%2Fpost_footer.gif&hash=338b65c57a59f0b06311094e697c87794e43d945)
Don't contact me for support over PM or email unless I requested you to do so. Instead: post on the proper board.

Jur010

Thanx Skybax,

I've been trying to get this font changed but no luck.
I tried this:
$message .= '<font size="1" face="Arial">'"Sent by $sender_name from {$_SERVER["HTTP_HOST"]} at ".gmstrftime("%A,  %B,%d,%Y %I:%M %p ", time())." [GMT]"'</font>';

But then I can't sent anything.

Tried different options but still no luck...

And it's not changeble in the html part for ecards in Theme.php....

Lost here......

Nibbler

$message .= "<font size=\"1\" face=\"Arial\">Sent by $sender_name from {$_SERVER['HTTP_HOST']} at ".gmstrftime("%A,  %B,%d,%Y %I:%M %p ", time())." [GMT]</font>";

skybax

Just remember: in PHP whenever you have a variable being set with quotes (") or (') use either the oppisite quotation style or escape the character with a \. That'll help with any mods you do.
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.skybax.com%2FhotImage%2Fpost_footer.gif&hash=338b65c57a59f0b06311094e697c87794e43d945)
Don't contact me for support over PM or email unless I requested you to do so. Instead: post on the proper board.

Jur010

Skybax Thanx!!! :D

Working like a dream!!

Thanx for the lesson!!

CPG RULES!!!

Love it!!!

Joachim Müller

as a sidenote: you can't be sure that a certain font will be installed on a recipient's pc, that's why it's usefull to provide some fonts as alternatives that closely look the font you're using. Instead of<font size="1" face="Arial">foo bar</font>you should use something like<font size="1" face="Arial, Verdana,sans-serif">foo bar</font>. By using this code, the client pc will try to display the words "foo bar" using Arial - if it's not available, it will try "Verdana". If it isn't there as well, it will default to the font the user has set as font with serifs in his browser. When using font names that have spaces in their names, you will have to use another notation that puts the names into quotes, using css:<span style="font-size:small;font-family: 'Arial Narrow','Arial','sans-serif'">foo bar</span>

GauGau

skybax

If you're sending emails then use what GauGau suggested (I recommend the last code block with css). And if you plan on making changes like this site wide - i would recommend just modifing style.css with a new class. Then just call that class in the html tag surrounding the text you want to style...

(example)

insert @ the bottom of style.css

.sentBY {
       font-family :  Arial, Verdana, Helvetica, sans-serif;
       font-size: 10px;
}


Then surround your text with <span class=sentBY> </span> or just insert class=sentBY into any html tag to change the text to style.
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.skybax.com%2FhotImage%2Fpost_footer.gif&hash=338b65c57a59f0b06311094e697c87794e43d945)
Don't contact me for support over PM or email unless I requested you to do so. Instead: post on the proper board.

Joachim Müller

When sending ecards, the recipient will only see the format applied to the style on your page if he's reading his emails while being connetced to the internet. If you want ecard emails to be looking nice when looked at offline, you will have to manipulate the html template for ecards - edit displayimage.php, find<!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" marginwidth="0" marginheight="0">
<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_MODEcpg_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>


GauGau