» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Online Users: 71
0 members and 71 guests
No Members online
Most users ever online was 611, 03-21-2008 at 11:10 PM.
» .::.
Web Hosting - web hosting, dedicated servers and web design services
Online Degree - search for 1000+ online degrees, online colleges & online universities.
Tattoo - we are a group of tattoo enthusiasts
Gexa Energy - your absolute best choice in electric service
Texas electricity - save on electric rates
Football Betting - best nfl betting promotions at sportsbook.com.
Oral Chelation - initial cleansing of your veins & arteries
Portatiles - Ofertas en Ordenadores y Portatiles. Increibles Ofertas DELL.

Register Now! Contact Us

About this Page
This is a discussion on How can I add Date and Time to the page header? within the Site design forums, part of the General category; How can I add the date and time to the header of my site? You know something similar to what ...


Go Back   Nukemods Forum » General » Site design

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-19-2003, 06:29 PM
Junior Member
 
Join Date: Mar 2003
Location: Seattle, WA
Posts: 9
How can I add Date and Time to the page header?
How can I add the date and time to the header of my site? You know something similar to what is displayed in the forum header here but, instead of down in the module, up in the page header.

I am using nuke 6.5 final and modified UniverseMetal theme.

http://www.freelancecoalition.com/testing/

Thanks in advance!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-19-2003, 07:05 PM
Senior Member
 
Join Date: Sep 2002
Posts: 2,905
This is wierd..I can't post the code here for some reason. It keeps bouncing me to the index page everytime I try to submit it. Maybe because it's Java script.

Here's a text file so you can get the idea.

http://www.fauxpas.org/mystuff/Time.txt
once the text file loads, Hit refresh, it may not display correctly the first time.

mikem
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-19-2003, 07:38 PM
Junior Member
 
Join Date: Mar 2003
Location: Seattle, WA
Posts: 9
mikem - this theme doesn't use html files so I tried adding the line you specified for the theme.php. This is the error that it returned

Parse error: parse error, unexpected T_ECHO, expecting ',' or ';' in /home/freelan/public_html/testing/themes/UniverseMetal/theme.php on line 209

Fatal error: Call to undefined function: themeheader() in /home/freelan/public_html/testing/header.php on line 47

Line 209 is the line that I added.

Code:
      echo "\n" ." \n";
What did I do wrong?

Thanks for the quick response.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-19-2003, 08:08 PM
Junior Member
 
Join Date: Mar 2003
Location: Seattle, WA
Posts: 9
This is the code that is in the theme.php file for the theme header:

Code:
/************************************************************/ 
/* Function themeheader()                                   */ 
/*                                                          */ 
/* Control the header for your site. You need to define the */ 
/* BODY tag and in some part of the code call the blocks    */ 
/* function for left side with: blocks(left);               */ 
/************************************************************/ 

function themeheader() {
global $user, $banners, $sitename, $slogan, $cookie, $prefix, $dbi;
    cookiedecode($user);
    $username = $cookie[1];
    if ($username == "") {
        $username = "Anonymous";
    }
    echo "<body bgcolor=\"324252\" text=\"000000\" link=\"0000ff\" vlink=\"0000ff\">";
    if ($banners) {
	include("banners.php");
    }
echo "<table width=\"100%\" align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">"
."<form action=\"modules.php?name=Search method=\"post\"><tr>"
."<td height=\"3\" background=\"themes/UniverseMetal/images/bgtop.gif\" align=\"left\" valign=\"top\"><img src=\"themes/UniverseMetal/images/logo_top.gif\" border=\"0\"></td>"
."<td height=\"3\" background=\"themes/UniverseMetal/images/bgtop.gif\" align=\"right\" class=\"content\"></td>"
."</tr>"
."</table>"
."<table height=\"1\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">"
."<tr>"
."<td align=\"left\" width=\"1\" background=\"themes/UniverseMetal/images/topbarleft_bg.gif\"><img src=\"themes/UniverseMetal/images/topbarleft_1.gif\" border=\"0\"></td>"
."<td align=\"left\" width=\"1\" class=\"topbar\" background=\"themes/UniverseMetal/images/topbarleft_bg.gif\"><nobr><font class=\"tiny\">".translate("Welcome to the")." $sitename</font></nobr></td>"
."<td align=\"left\" width=\"1\" background=\"themes/UniverseMetal/images/topbarleft_bg.gif\"><img src=\"themes/UniverseMetal/images/topbarleft_2.gif\" border=\"0\"></td>"
."<td align=\"right\" width=100% class=\"topbar\" background=\"themes/UniverseMetal/images/topbarmid_bg.gif\">&</td>"
."<td align=\"right\" width=\"1\" background=\"themes/UniverseMetal/images/topbarright_bg.gif\"><img src=\"themes/UniverseMetal/images/topbarright_1.gif\" border=\"0\"></td>"
."<td align=\"right\" width=\"1\" class=\"topbarright\" background=\"themes/UniverseMetal/images/topbarright_bg.gif\"><nobr>"

    echo "\n" ." \n";

//."<font class=\"tiny\">".translate("Search").""
//."<input type=\"text\" name=\"query\">"
//."</font></nobr>.</td>"
."<td align=\"right\" width=\"1\" background=\"themes/UniverseMetal/images/topbarright_bg.gif\"><img src=\"themes/UniverseMetal/images/topbarright_2.gif\" border=\"0\"></td>"
."</tr></form>"
."</table>
"
."</td></tr><tr><td valign=\"top\" width=\"100%\" bgcolor=\"324252\">"
."<table border=\"0\" cellspacing=\"0\" cellpadding=\"2\" width=\"100%\"><tr><td valign=\"top\" width=\"200\" bgcolor=\"324252\">";
    blocks(left);
    echo "<img src=\"images/pix.gif\" border=\"0\" width=\"150\" height=\"1\"></td><td>&&</td><td width=\"100%\" valign=\"top\">";
}
As you can see I commented out the search box that was in the header and added in the line that you gave me to replace it with the date and time, but I got the error msg stated above.

Does that help any?

By the way, how do I add the code into my post so that it doesn't wrap the text, the way it has in this reply?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-22-2003, 02:05 AM
Junior Member
 
Join Date: Mar 2003
Location: Seattle, WA
Posts: 9
Can someone please, tell me what I need to do to get the date and time showing in the header with the above code? If you need me to provide more info, ask and I will provide you with whatever I can.

Mikem - Thanks again for your response. Do you have any other ideas or know what I may be doing wrong?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-22-2003, 10:12 AM
Senior Member
 
Join Date: Sep 2002
Posts: 2,905
I would need you to send me your theme.php file.

mikem
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-22-2003, 01:20 PM
Junior Member
 
Join Date: Oct 2002
Location: France
Posts: 85
Send a message via ICQ to breakolami
Here is my code in one of my themes
I have made some changes to have french date format
But maybe this can help you
Code:
."<!--   // Array ofmonth Names\n"
        ."var monthNames = new Array( \"Janvier\",\"Février\",\"Mars\",\"Avril\",\"Mai\",\"Juin\",\"Juillet\",\"Août\",\"Septembre\",\"Octobre\",\"Novembre\",\"Décembre\");\n"
        ."var now = new Date();\n"
        ."thisYear = now.getYear();\n"
        ."if(thisYear < 1900) {thisYear += 1900}; // corrections if Y2K display problem\n"
        ."document.write(now.getDate() + \". \" + monthNames[now.getMonth()] + \" \" + thisYear);\n"
        ."// -->\n\n"
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 04-22-2003, 06:24 PM
Junior Member
 
Join Date: Mar 2003
Location: Seattle, WA
Posts: 9
Mikem - Here it is, the whole theme.php. Hope this helps as it is driving me crazy. Thank you for your efforts.

Code:
<?php 

/************************************************************/ 
/* IMPORTANT NOTE FOR THEMES DEVELOPERS!                    */ 
/*                                                          */ 
/* When you start coding your theme, if you want to         */ 
/* distribute it, please double check it to fit the HTML    */ 
/* 4.01 Transitional Standard. You can use the W3 validator */ 
/* located at http://validator.w3.org                       */ 
/* If you don't know where to start with your theme, just   */ 
/* start modifying this theme, it's validate and is cool ;) */ 
/************************************************************/ 

/************************************************************/ 
/* Theme Colors Definition                                  */ 
/*                                                          */ 
/* Define colors for your web site. $bgcolor2 is generaly   */ 
/* used for the tables border as you can see on OpenTable() */ 
/* function, $bgcolor1 is for the table background and the  */ 
/* other two bgcolor variables follows the same criteria.   */ 
/* $texcolor1 and 2 are for tables internal texts           */ 
/************************************************************/ 

$bgcolor1 = "#ABABAB";
$bgcolor2 = "#ABABAB";
$bgcolor3 = "#eeeeee";
$bgcolor4 = "#eeeeee";
$textcolor1 = "#ffffff";
$textcolor2 = "#000000"; 

/************************************************************/ 
/* OpenTable Functions                                      */ 
/*                                                          */ 
/* Define the tables look&feel for you whole site. For this */ 
/* we have two options: OpenTable and OpenTable2 functions. */ 
/* Then we have CloseTable and CloseTable2 function to      */ 
/* properly close our tables. The difference is that        */ 
/* OpenTable has a 100% width and OpenTable2 has a width    */ 
/* according with the table content                         */ 
/************************************************************/ 

function OpenTable() {
    global $tableStatus;
if ($tableStatus != "open"){

echo "<table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">"
."<tr>"
."<td width=\"1\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_corner1.gif\" border=\"0\"></td>"
."<td height=\"1\" background=\"themes/UniverseMetal/images/frame_top.gif\">"
."<table width=\"100%\" height=\"1\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\">"
."<tr>"
."<td align=\"left\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_vent.gif\" border=\"0\"></td>"
."<td align=\"right\" width=\"1\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_title_left.gif\" border=\"0\"></td>"
."<td align=\"center\" height=\"1\" background=\"themes/UniverseMetal/images/frame_title.gif\" class=\"frametitle\"></td>"
."<td align=\"left\" width=\"1\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_title_right.gif\" border=\"0\"></td>"
."<td align=\"right\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_vent.gif\" border=\"0\"></td>"
."</tr>"
."</table>"
."</td>"
."<td width=\"1\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_corner2.gif\" border=\"0\"></td>"
."</tr>"
."<tr>"
."<td width=\"1\" background=\"themes/UniverseMetal/images/frame_left.gif\"><img src=\"themes/UniverseMetal/images/blank.gif\" border=\"0\" width=1 height=1></td>"
."<td bgcolor=\"#ABABAB\" align=\"center\">"
."<table width=100% border=0 valign=\"top\" cellpadding=0 cellspacing=5>"
."<tr>"
."<td valign=\"top\" width=\"100%\" height=\"100%\">";

$tableStatus = "open";
}
else {}
}

function OpenTable2() {
    global $tableStatus;
if ($tableStatus != "open"){

echo "<table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">"
."<tr>"
."<td width=\"1\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_corner1.gif\" border=\"0\"></td>"
."<td height=\"1\" background=\"themes/UniverseMetal/images/frame_top.gif\">"
."<table width=\"100%\" height=\"1\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\">"
."<tr>"
."<td align=\"left\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_vent.gif\" border=\"0\"></td>"
."<td align=\"right\" width=\"1\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_title_left.gif\" border=\"0\"></td>"
."<td align=\"center\" height=\"1\" background=\"themes/UniverseMetal/images/frame_title.gif\" class=\"frametitle\"></td>"
."<td align=\"left\" width=\"1\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_title_right.gif\" border=\"0\"></td>"
."<td align=\"right\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_vent.gif\" border=\"0\"></td>"
."</tr>"
."</table>"
."</td>"
."<td width=\"1\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_corner2.gif\" border=\"0\"></td>"
."</tr>"
."<tr>"
."<td width=\"1\" background=\"themes/UniverseMetal/images/frame_left.gif\"><img src=\"themes/UniverseMetal/images/blank.gif\" border=\"0\" width=1 height=1></td>"
."<td bgcolor=\"#ABABAB\" align=\"center\">"
."<table width=100% border=0 valign=\"top\" cellpadding=0 cellspacing=5>"
."<tr>"
."<td valign=\"top\" width=\"100%\" height=\"100%\">";

$tableStatus = "open";
}
else {}
}

function CloseTable() {
    global $tableStatus;
if ($tableStatus == "open"){
echo "</td>"
."</tr>"
."</table>"
."</td>"
."<td width=\"1\" background=\"themes/UniverseMetal/images/frame_right.gif\"><img src=\"themes/UniverseMetal/images/blank.gif\" border=\"0\" width=1 height=1></td>"
."</tr>"
."<tr>"
."<td width=\"1\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_corner3.gif\" border=\"0\"></td>"
."<td height=\"1\" background=\"themes/UniverseMetal/images/frame_bottom.gif\"><img src=\"themes/UniverseMetal/images/blank.gif\" border=\"0\" width=1 height=1></td>"
."<td width=\"1\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_corner4.gif\" border=\"0\"></td>"
."</tr>"
."</table>";
$tableStatus = "closed";
}
else {}
}

function CloseTable2() {
    global $tableStatus;
if ($tableStatus == "open"){
echo "</td>"
."</tr>"
."</table>"
."</td>"
."<td width=\"1\" background=\"themes/UniverseMetal/images/frame_right.gif\"><img src=\"themes/UniverseMetal/images/blank.gif\" border=\"0\" width=1 height=1></td>"
."</tr>"
."<tr>"
."<td width=\"1\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_corner3.gif\" border=\"0\"></td>"
."<td height=\"1\" background=\"themes/UniverseMetal/images/frame_bottom.gif\"><img src=\"themes/UniverseMetal/images/blank.gif\" border=\"0\" width=1 height=1></td>"
."<td width=\"1\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_corner4.gif\" border=\"0\"></td>"
."</tr>"
."</table>";
$tableStatus = "closed";
}
else {}
}

/************************************************************/ 
/* FormatStory                                              */ 
/*                                                          */ 
/* Here we'll format the look of the stories in our site.   */ 
/* If you dig a little on the function you will notice that */ 
/* we set different stuff for anonymous, admin and users    */ 
/* when displaying the story.                               */ 
/************************************************************/ 

function FormatStory($thetext, $notes, $aid, $informant) {
    global $anonymous;
    if ($notes != "") {
	$notes = ""._NOTE." $notes\n";
    } else {
	$notes = "";
    }
    if ("$aid" == "$informant") {
	echo "<font class=\"content\">$thetext
$notes</font>\n";
    } else {
	if($informant != "") {
	    $boxstuff = "<a href=\"modules.php?name=Your_Account&op=userinfo&username=$informant\">$informant</a> ";
	} else {
	    $boxstuff = "$anonymous ";
	}
	$boxstuff .= ""._WRITES." \"$thetext\" $notes\n";
	echo "<font class=\"content\">$boxstuff</font>\n";
    }
}

/************************************************************/ 
/* Function themeheader()                                   */ 
/*                                                          */ 
/* Control the header for your site. You need to define the */ 
/* BODY tag and in some part of the code call the blocks    */ 
/* function for left side with: blocks(left);               */ 
/************************************************************/ 

function themeheader() {
global $user, $banners, $sitename, $slogan, $cookie, $prefix, $dbi;
    cookiedecode($user);
    $username = $cookie[1];
    if ($username == "") {
        $username = "Anonymous";
    }
    echo "<body bgcolor=\"324252\" text=\"000000\" link=\"0000ff\" vlink=\"0000ff\">";
    if ($banners) {
	include("banners.php");
    }
echo "<table width=\"100%\" align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">"
."<form action=\"modules.php?name=Search method=\"post\"><tr>"
."<td height=\"3\" background=\"themes/UniverseMetal/images/bgtop.gif\" align=\"left\" valign=\"top\"><img src=\"themes/UniverseMetal/images/logo_top.gif\" border=\"0\"></td>"
."<td height=\"3\" background=\"themes/UniverseMetal/images/bgtop.gif\" align=\"right\" class=\"content\"></td>"
."</tr>"
."</table>"
."<table height=\"1\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">"
."<tr>"
."<td align=\"left\" width=\"1\" background=\"themes/UniverseMetal/images/topbarleft_bg.gif\"><img src=\"themes/UniverseMetal/images/topbarleft_1.gif\" border=\"0\"></td>"
."<td align=\"left\" width=\"1\" class=\"topbar\" background=\"themes/UniverseMetal/images/topbarleft_bg.gif\"><nobr><font class=\"tiny\">".translate("Welcome to the")." $sitename</font></nobr></td>"
."<td align=\"left\" width=\"1\" background=\"themes/UniverseMetal/images/topbarleft_bg.gif\"><img src=\"themes/UniverseMetal/images/topbarleft_2.gif\" border=\"0\"></td>"
."<td align=\"right\" width=100% class=\"topbar\" background=\"themes/UniverseMetal/images/topbarmid_bg.gif\">&</td>"
."<td align=\"right\" width=\"1\" background=\"themes/UniverseMetal/images/topbarright_bg.gif\"><img src=\"themes/UniverseMetal/images/topbarright_1.gif\" border=\"0\"></td>"
."<td align=\"right\" width=\"1\" class=\"topbarright\" background=\"themes/UniverseMetal/images/topbarright_bg.gif\"><nobr>"

//	echo "\n" ." \n";
	 

//."<font class=\"tiny\">".translate("Search").""
//."<input type=\"text\" name=\"query\">"
//."</font></nobr>.</td>"
."<td align=\"right\" width=\"1\" background=\"themes/UniverseMetal/images/topbarright_bg.gif\"><img src=\"themes/UniverseMetal/images/topbarright_2.gif\" border=\"0\"></td>"
."</tr></form>"
."</table>
"
."</td></tr><tr><td valign=\"top\" width=\"100%\" bgcolor=\"324252\">"
."<table border=\"0\" cellspacing=\"0\" cellpadding=\"2\" width=\"100%\"><tr><td valign=\"top\" width=\"200\" bgcolor=\"324252\">";
    blocks(left);
    echo "<img src=\"images/pix.gif\" border=\"0\" width=\"150\" height=\"1\"></td><td>&&</td><td width=\"100%\" valign=\"top\">";
}

/************************************************************/ 
/* Function themefooter()                                   */ 
/*                                                          */ 
/* Control the footer for your site. You don't need to      */ 
/* close BODY and HTML tags at the end. In some part call   */ 
/* the function for right blocks with: blocks(right);       */ 
/* Also, $index variable need to be global and is used to   */ 
/* determine if the page your're viewing is the Homepage or */ 
/* and internal one.                                        */ 
/************************************************************/ 

function themefooter() {
    global $index;
    if ($index == 1) {
	echo "</td><td>&&</td><td valign=\"top\" bgcolor=\"#324252\">";
	blocks(right);
	echo "</td>";
    }
    echo "</td></tr></table></td></tr></table>";
    footmsg();
}

/************************************************************/ 
/* Function themeindex()                                    */ 
/*                                                          */ 
/* This function format the stories on the Homepage         */ 
/************************************************************/ 

function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {
    global $anonymous, $tipath;
echo "<table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">"
."<tr>"
."<td width=\"1\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_corner1.gif\" border=\"0\"></td>"
."<td height=\"1\" background=\"themes/UniverseMetal/images/frame_top.gif\">"
."<table width=\"100%\" height=\"1\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\">"
."<tr>"
."<td align=\"left\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_vent.gif\" border=\"0\"></td>"
."<td align=\"right\" width=\"1\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_title_left.gif\" border=\"0\"></td>"
."<td align=\"center\" height=\"1\" width=\"100%\" background=\"themes/UniverseMetal/images/frame_title.gif\" class=\"frametitle\">$title</td>"
."<td align=\"left\" width=\"1\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_title_right.gif\" border=\"0\"></td>"
."<td align=\"right\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_vent.gif\" border=\"0\"></td>"
."</tr>"
."</table>"
."</td>"
."<td width=\"1\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_corner2.gif\" border=\"0\"></td>"
."</tr>"
."<tr>"
."<td width=\"1\" background=\"themes/UniverseMetal/images/frame_left.gif\"><img src=\"themes/UniverseMetal/images/blank.gif\" border=\"0\" width=1 height=1></td>"
."<td bgcolor=\"#ABABAB\" align=\"center\">"
."<table width=100% border=0 valign=\"top\" cellpadding=0 cellspacing=5>"
."<tr>"
."<td valign=\"top\" width=\"100%\" height=\"100%\">"
        ."<font class=\"tiny\">"
        .""._POSTEDBY." ";
    formatAidHeader($aid);
    echo " "._ON." $time $timezone ($counter "._READS.")
"
//	.""._TOPIC." <a href=\"modules.php?name=Search&query=&topic=$topic&author=\">$topictext</a>
"
    .""._TOPIC." <a href=\"modules.php?name=Search&query=&topic=$topic&author=\"><img src=\"$tipath$topicimage\" border=\"0\" Alt=\"$topictext\" align=\"right\" hspace=\"10\" vspace=\"10\"></a></font>\n"; 
//	."</font>";
    FormatStory($thetext, $notes, $aid, $informant);
    echo "

<font class=\"content\">$morelink</font>"
."</td>"
."</tr>"
."</table>"
."</td>"
."<td width=\"1\" background=\"themes/UniverseMetal/images/frame_right.gif\"><img src=\"themes/UniverseMetal/images/blank.gif\" border=\"0\" width=1 height=1></td>"
."</tr>"
."<tr>"
."<td width=\"1\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_corner3.gif\" border=\"0\"></td>"
."<td height=\"1\" background=\"themes/UniverseMetal/images/frame_bottom.gif\"><img src=\"themes/UniverseMetal/images/blank.gif\" border=\"0\" width=1 height=1></td>"
."<td width=\"1\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_corner4.gif\" border=\"0\"></td>"
."</tr>"
."</table>";
} 

/************************************************************/ 
/* Function themearticle()                                   */ 
/*                                                          */ 
/* This function format the stories on the story page, when */ 
/* you click on that "Read More..." link in the home        */ 
/************************************************************/ 

function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext) {
    global $admin, $sid, $tipath;
    if ("$aid" == "$informant") {
echo "<table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">"
."<tr>"
."<td width=\"1\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_corner1.gif\" border=\"0\"></td>"
."<td height=\"1\" background=\"themes/UniverseMetal/images/frame_top.gif\">"
."<table width=\"100%\" height=\"1\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\">"
."<tr>"
."<td align=\"left\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_vent.gif\" border=\"0\"></td>"
."<td align=\"right\" width=\"1\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_title_left.gif\" border=\"0\"></td>"
."<td align=\"center\" height=\"1\" width=\"100%\" background=\"themes/UniverseMetal/images/frame_title.gif\" class=\"frametitle\">$title</td>"
."<td align=\"left\" width=\"1\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_title_right.gif\" border=\"0\"></td>"
."<td align=\"right\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_vent.gif\" border=\"0\"></td>"
."</tr>"
."</table>"
."</td>"
."<td width=\"1\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_corner2.gif\" border=\"0\"></td>"
."</tr>"
."<tr>"
."<td width=\"1\" background=\"themes/UniverseMetal/images/frame_left.gif\"><img src=\"themes/UniverseMetal/images/blank.gif\" border=\"0\" width=1 height=1></td>"
."<td bgcolor=\"#ABABAB\" align=\"center\">"
."<table width=100% border=0 valign=\"top\" cellpadding=0 cellspacing=5>"
."<tr>"
."<td valign=\"top\" width=\"100%\" height=\"100%\">";
	echo"
	<table border=0 cellpadding=0 cellspacing=0 align=center width=100%><tr><td>
	<table border=0 cellpadding=3 cellspacing=1 width=100%><tr><td>
	<font class=tiny>".translate("Posted on ")." $datetime";
	if ($admin) {
	    echo "&& $font2 [ <a href=admin.php?op=EditStory&sid=$sid>".translate("Edit")."</a> | <a href=admin.php?op=RemoveStory&sid=$sid>".translate("Delete")."</a> ]";
	}
	echo "
// 	
".translate("Topic").": $topictext<img src=\$tipath$topicimage\ border=\0\ Alt=\$topictext\ align=\right\ hspace=\10\ vspace=\10\></font>\n
  	</td></tr><tr><td>
 	$thetext
 	</td></tr></table></td></tr></table>";
echo "</td>"
."</tr>"
."</table>"
."</td>"
."<td width=\"1\" background=\"themes/UniverseMetal/images/frame_right.gif\"><img src=\"themes/UniverseMetal/images/blank.gif\" border=\"0\" width=1 height=1></td>"
."</tr>"
."<tr>"
."<td width=\"1\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_corner3.gif\" border=\"0\"></td>"
."<td height=\"1\" background=\"themes/UniverseMetal/images/frame_bottom.gif\"><img src=\"themes/UniverseMetal/images/blank.gif\" border=\"0\" width=1 height=1></td>"
."<td width=\"1\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_corner4.gif\" border=\"0\"></td>"
."</tr>"
."</table>";

    } 

	else {
	if($informant != "") $informant = "<a href=\"modules.php?name=Your_Account&op=userinfo&username=$informant\">$informant</a> ";
	else $boxstuff = "$anonymous ";
	$boxstuff .= "".translate("writes")." \"$thetext\" $notes";

echo "<table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">"
."<tr>"
."<td width=\"1\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_corner1.gif\" border=\"0\"></td>"
."<td height=\"1\" background=\"themes/UniverseMetal/images/frame_top.gif\">"
."<table width=\"100%\" height=\"1\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\">"
."<tr>"
."<td align=\"left\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_vent.gif\" border=\"0\"></td>"
."<td align=\"right\" width=\"1\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_title_left.gif\" border=\"0\"></td>"
."<td align=\"center\" height=\"1\" width=\"100%\" background=\"themes/UniverseMetal/images/frame_title.gif\" class=\"frametitle\">$title</td>"
."<td align=\"left\" width=\"1\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_title_right.gif\" border=\"0\"></td>"
."<td align=\"right\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_vent.gif\" border=\"0\"></td>"
."</tr>"
."</table>"
."</td>"
."<td width=\"1\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_corner2.gif\" border=\"0\"></td>"
."</tr>"
."<tr>"
."<td width=\"1\" background=\"themes/UniverseMetal/images/frame_left.gif\"><img src=\"themes/UniverseMetal/images/blank.gif\" border=\"0\" width=1 height=1></td>"
."<td bgcolor=\"#ABABAB\" align=\"center\">"
."<table width=100% border=0 valign=\"top\" cellpadding=0 cellspacing=5>"
."<tr>"
."<td valign=\"top\" width=\"100%\" height=\"100%\">";
	echo "
	<table border=0 cellpadding=0 cellspacing=0 align=center width=100%><tr><td>
	<table border=0 cellpadding=3 cellspacing=1 width=100%><tr><td>
	<font class=content>".translate("Contributed by ")." $informant ".translate("on")." $datetime</font>";
	if ($admin) {
	    echo "&& $font2 [ <a href=admin.php?op=EditStory&sid=$sid>".translate("Edit")."</a> | <a href=admin.php?op=RemoveStory&sid=$sid>".translate("Delete")."</a> ]";
	}
// 	echo "
".translate("Topic").": $topictext<img src=\"$tipath$topicimage\" border=\"0\" Alt=\"$topictext\" align=\"right\" hspace=\"10\" vspace=\"10\"></font>\n
  	</td></tr><tr><td>
 	$thetext
 	</td></tr></table></td></tr></table>
";
echo "</td>"
."</tr>"
."</table>"
."</td>"
."<td width=\"1\" background=\"themes/UniverseMetal/images/frame_right.gif\"><img src=\"themes/UniverseMetal/images/blank.gif\" border=\"0\" width=1 height=1></td>"
."</tr>"
."<tr>"
."<td width=\"1\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_corner3.gif\" border=\"0\"></td>"
."<td height=\"1\" background=\"themes/UniverseMetal/images/frame_bottom.gif\"><img src=\"themes/UniverseMetal/images/blank.gif\" border=\"0\" width=1 height=1></td>"
."<td width=\"1\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_corner4.gif\" border=\"0\"></td>"
."</tr>"
."</table>";

    }
} 

/************************************************************/ 
/* Function themesidebox()                                  */ 
/*                                                          */ 
/* Control look of your blocks. Just simple.                */ 
/************************************************************/ 

function themesidebox($title, $content) {
	echo "<table width=185 border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">"
	."<tr>"
	."<td width=\"1\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_corner1.gif\" border=\"0\"></td>"
	."<td height=\"1\" background=\"themes/UniverseMetal/images/frame_top.gif\">"
	."<table width=\"100%\" height=\"1\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\">"
	."<tr>"
	."<td align=\"left\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_vent.gif\" border=\"0\"></td>"
	."<td align=\"right\" width=\"1\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_title_left.gif\" border=\"0\"></td>"
	."<td align=\"center\" height=\"1\" background=\"themes/UniverseMetal/images/frame_title.gif\"><font class=\"frametitle\">$title</font></td>"
	."<td align=\"left\" width=\"1\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_title_right.gif\" border=\"0\"></td>"
	."<td align=\"right\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_vent.gif\" border=\"0\"></td>"
	."</tr>"
	."</table>"
	."</td>"
	."<td width=\"1\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_corner2.gif\" border=\"0\"></td>"
	."</tr>"
	."<tr>"
	."<td width=\"1\" background=\"themes/UniverseMetal/images/frame_left.gif\"><img src=\"themes/UniverseMetal/images/blank.gif\" border=\"0\" width=1 height=1></td>"
	."<td bgcolor=\"#ABABAB\" align=\"center\">"
	."<table width=\"100%\" border=0 valign=\"top\" cellpadding=0 cellspacing=3>"
	."<tr>"
	."<td align=\"center\"><font class=\"content\">$content</font></td>"
	."</tr>"
	."</table>"
	."</td>"
	."<td width=\"1\" background=\"themes/UniverseMetal/images/frame_right.gif\"><img src=\"themes/UniverseMetal/images/blank.gif\" border=\"0\" width=1 height=1></td>"
	."</tr>"
	."<tr>"
	."<td width=\"1\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_corner3.gif\" border=\"0\"></td>"
	."<td height=\"1\" background=\"themes/UniverseMetal/images/frame_bottom.gif\"><img src=\"themes/UniverseMetal/images/blank.gif\" border=\"0\" width=1 height=1></td>"
	."<td width=\"1\" height=\"1\"><img src=\"themes/UniverseMetal/images/frame_corner4.gif\" border=\"0\"></td>"
	."</tr>"
	."</table>
";
}

?>
breakolami - thanks I will give it a try.

Thanks for the assistance guys.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 04-22-2003, 07:00 PM
Junior Member
 
Join Date: Mar 2003
Location: Seattle, WA
Posts: 9
Originally Posted by breakolami
Here is my code in one of my themes
I have made some changes to have french date format
But maybe this can help you
Code:
."<!--   // Array ofmonth Names\n"
        ."var monthNames = new Array( \"Janvier\",\"Février\",\"Mars\",\"Avril\",\"Mai\",\"Juin\",\"Juillet\",\"Août\",\"Septembre\",\"Octobre\",\"Novembre\",\"Décembre\");\n"
        ."var now = new Date();\n"
        ."thisYear = now.getYear();\n"
        ."if(thisYear < 1900) {thisYear += 1900}; // corrections if Y2K display problem\n"
        ."document.write(now.getDate() + \". \" + monthNames[now.getMonth()] + \" \" + thisYear);\n"
        ."// -->\n\n"
I tried this but it didn't work either. Thanks anyway.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 04-22-2003, 07:29 PM
Moderator
 
Join Date: Jan 2003
Posts: 338
The line:
Code:
echo "\n" ." \n";
will return a parse error because it should be:
Code:
. "\n"
. "\n"
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On