[pLog-svn] r6354 - templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Mon Apr 28 13:55:06 EDT 2008


Author: jondaley
Date: 2008-04-28 13:55:06 -0400 (Mon, 28 Apr 2008)
New Revision: 6354

Modified:
   templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/comments.template
   templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/footer.template
   templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/header.template
   templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/links.template
   templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/main.template
   templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/nicetitle.js
   templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/post.template
   templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/postandcomments.template
   templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/resource.template
   templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/searchresults.template
   templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/style.css
Log:
copied lots of stuff from the MinimaPlus template

Modified: templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/comments.template
===================================================================
--- templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/comments.template	2008-04-28 17:40:06 UTC (rev 6353)
+++ templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/comments.template	2008-04-28 17:55:06 UTC (rev 6354)
@@ -12,19 +12,20 @@
 			<div class="commentBox" style="background-color: #e5e5e5; padding: 5px;">
 			{/if}
 			<p>
-			{if !empty($gravatar)}
-				{if $gravatar->isEnabled()}
-					<img src="{$gravatar->gravatar($comment)}" width="{$gravatar->getSize()}" height="{$gravatar->getSize()}" align="left" hspace="10" vspace="10"/>
-				{/if}
+            {if !empty($gravatar && $gravatar->isEnabled()}
+                <img src="{$gravatar->gravatar($comment)}"
+                     width="{$gravatar->getSize()}" height="{$gravatar->getSize()}"
+                     align="left" hspace="10" vspace="10"/>
+            {/if}
+			{if $comment->IsPosterAuthenticated()}
+             {assign var=commenter value=$comment->getUser()}
+			 {if $commenter->hasPicture()}
+			   {assign var=commenterimg value=$commenter->getPicture()}
+			   <img src="{$commenterimg->getPreviewLink()}" alt="{$commenter->getUserName()}" />
+			  {/if}
 			{/if}
-			{if $comment->IsPosterAuthenticated()}
-	{assign var=poster value=$comment->getUser()}
-	{if $poster->hasPicture()}
-		{assign var=posterimg value=$poster->getPicture()}
-		<img src="{$posterimg->getPreviewLink()}" alt="{$poster->getUserName()}" align="right" class="poster_avatar"/>
-	{/if}
-{/if}
-{$comment->gettext()}
+			<br/>
+			{$comment->getText()}
 			</p>
 			<br>
 			
@@ -32,6 +33,8 @@
 			</div>
 			{assign var="counter" value="`$counter+1`"}
 		{/foreach}
+		
+		{pager style="links" anchor="#comments"}
 		</dd>
 	</dl>
 	
@@ -45,4 +48,4 @@
 	{include file="$blogtemplate/commentform.template"}
 
 	<!-- End #comments -->  
-</div>
\ No newline at end of file
+</div>

Modified: templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/footer.template
===================================================================
--- templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/footer.template	2008-04-28 17:40:06 UTC (rev 6353)
+++ templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/footer.template	2008-04-28 17:55:06 UTC (rev 6354)
@@ -3,13 +3,9 @@
 
 <!-- Begin #footer -->
 <div id="footer"><hr />
-  <P>{$blog->getBlog()} is proudly powered by <A href="http://www.lifetype.net/">LifeType</A> 
-<BR>Syndicate <A href="{$url->rssLink("rss10")}">Entries (RSS)</A> <A class=alignright href="#top">Back to the top.</A></p>
-
+  <p>Powered by <a href="http://www.lifetype.net/">Lifetype</a></p>
 </div>
 <!-- End #footer -->
 
-
-
 </body>
 </html>
\ No newline at end of file

Modified: templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/header.template
===================================================================
--- templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/header.template	2008-04-28 17:40:06 UTC (rev 6353)
+++ templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/header.template	2008-04-28 17:55:06 UTC (rev 6354)
@@ -11,14 +11,14 @@
  <link rel="alternate" type="text/xml" title="RSS 1.0" href="{$url->rssLink("rss10")}" />
  <link rel="alternate" type="text/xml" title="RSS 0.90" href="{$url->rssLink("rss090")}" />
  <link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="{$url->rssLink("atom")}" />
+ <link rel="shortcut icon" type="image/x-icon" href="{$url->getTemplateFile("favicon.ico")}" />
  <script type="text/javascript" src="{$url->getTemplateFile("nicetitle.js")}"></script>
  <link rel="stylesheet" href="{$url->getTemplateFile("nicetitle.css")}" />
- <link rel="shortcut icon" type="image/x-icon" href="{$url->getTemplateFile("favicon.ico")}" />
 {if $badbehavior}
    {$badbehavior->showBB2JavaScript()}
 {/if}
 </head>
-<BODY>
+<body>
 
 <div id="menu">
 <br />
@@ -27,7 +27,7 @@
 <a href="{$url->blogLink()}" title="Go home">{$locale->tr("main")}</a> &nbsp;&nbsp; 
 <A title="{$locale->tr("admin")}" href="{$url->getAdminUrl()}">{$locale->tr("admin")}</a> &nbsp;&nbsp; 
 <A title="{$locale->tr("albums")}" href="{$url->albumLink()}">{$locale->tr("albums")}</a> &nbsp;&nbsp; 
-<a title="{$locale->tr("summary")}" href="{$url->getBaseUrl()}/summary.php">{$locale->tr("summary")}</a></p>
+<a title="{$locale->tr("summary")}" href="{$url->getUrl("/summary.php")}">{$locale->tr("summary")}</a></p>
 </div>
 
 <div id="masthead"></div>

Modified: templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/links.template
===================================================================
--- templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/links.template	2008-04-28 17:40:06 UTC (rev 6353)
+++ templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/links.template	2008-04-28 17:55:06 UTC (rev 6354)
@@ -4,69 +4,72 @@
 </div></div>
 
 <!-- Begin #sidebar -->
-{assign var=blogOwner value=$blog->getOwnerInfo()}
-{assign var=AboutMyself value=$blogOwner->getAboutMyself()}
-{if $blogOwner->hasPicture() && $AboutMyself}
-<div id="sidebar"><div id="sidebar2">  
-  	<H2 class="sidebar-title">{$locale->tr("about_myself")}</h2>
-  	<div id="AboutMyself">
-  	{assign var=picture value=$blogOwner->getPicture()}
-  	<p><img id="UserPicture" src="{$picture->getPreviewLink()}" alt="{$blogOwner->getUsername()}" /></p>
-  	<p>{$AboutMyself}</p>
-  	</div>
-{/if}
+	<div id="sidebar"><div id="sidebar2">
+	<!-- Begin #profile-container -->
 
+	{assign var=blogOwner value=$blog->getOwnerInfo()}
+	{assign var=AboutMyself value=$blogOwner->getAboutMyself()}
+	{if $blogOwner->hasPicture() && $AboutMyself}  
+	  	<h2 class="sidebar-title">{$locale->tr("about_myself")}</h2>
+	  	{assign var=picture value=$blogOwner->getPicture()}
+	  	<img id="UserPicture" src="{$picture->getPreviewLink()}" alt="{$blogOwner->getUsername()}" />
+	  	<p>{$AboutMyself}</p>
+	{/if}	
+	
+	
+
 	<!-- End #profile -->
 	<ul><li></li></ul> 
 	
-	<h2 class="sidebar-title">Search</h2>
+	<h2 class="sidebar-title">{$locale->tr("search")}</h2>
 		   <form style="padding: 0px; margin-top: 0px; margin-bottom: 0px;" method="post" action="{$url->getIndexUrl()}">
 			  <input class =input type="text" name="searchTerms" value="" size="15" />
 			  <input type="hidden" name="op" value="Search" />
 			  <input type="hidden" name="blogId" value="{$blog->getId()}"/>   
-			  <input type="submit" name="Search" value="Go" />
+			  <input type="submit" name="Search" value="{$locale->tr("search")}" />
 		   </form>
 
-	<ul><li></li></ul>
-	
-	<H2>{$locale->tr("recently")}</H2>
-	
-	{foreach from=$recentposts item=recentpost}
-		<A title="{$recentpost->getText()|truncate:150:"..."|strip_tags|escape}" href="{$url->postLink($recentpost)}">{$recentpost->getTopic()}</a><br/>
-	{/foreach}<BR>
+        {if !empty($recentcomments)}
+                {if $recentcomments->isEnabled()}
+                <H2>Recent Comments</H2>
+                        {assign var=comments
+                value=$recentcomments->getRecentComments()}
+                        {foreach from=$post->getComments()
+                item=comment}
+                                {assign var=commentpostid
+                value=$comment->getArticleId()}
+                                {assign var=commentpost
+                value=$recentcomments->getArticle($commentpostid)}
+                                        <b>{$comment->getUsername()}<EF><BC><9A></b><a
+                title="View comments by {$comment->getUsername()}"
+                href="{$url->postPermalink($commentpost)}#{$comment->getId()}">{if
+                $comment->IsPosterAuthenticated()}
+        {assign var=poster value=$comment->getUser()}
+        {if $poster->hasPicture()}
+                {assign var=posterimg value=$poster->getPicture()}
+                <img src="{$posterimg->getPreviewLink()}"
+                alt="{$poster->getUserName()}" align="right"
+                class="poster_avatar"/>
+        {/if}
+{/if}
+{$comment->gettext()|truncate:100:"..."|strip_tags}</a><br />
+                        {/foreach}
+                {/if}
+        {/if}
 
 
-	{if !empty($recentcomments)} 
-		{if $recentcomments->isEnabled()}
-		<H2>Recent Comments</H2>
-			{assign var=comments value=$recentcomments->getRecentComments()}
-			{foreach from=$post->getComments() item=comment}
-				{assign var=commentpostid value=$comment->getArticleId()}
-				{assign var=commentpost value=$recentcomments->getArticle($commentpostid)}
-					<b>{$comment->getUsername()}:</b><a title="View comments by {$comment->getUsername()}" href="{$url->postPermalink($commentpost)}#{$comment->getId()}">{if $comment->IsPosterAuthenticated()}
-	{assign var=poster value=$comment->getUser()}
-	{if $poster->hasPicture()}
-		{assign var=posterimg value=$poster->getPicture()}
-		<img src="{$posterimg->getPreviewLink()}" alt="{$poster->getUserName()}" align="right" class="poster_avatar"/>
-	{/if}
-{/if}
-{$comment->gettext()|truncate:100:"..."|strip_tags}</a><br />
-			{/foreach}
-		{/if} 
-	{/if} 
+	<ul><li></li></ul>
 	
-	<ul><li></li></ul>
-
-	<h2 class="sidebar-title">Categories</h2>
+	<h2 class="sidebar-title">{$locale->tr("categories")}</h2>
 		{foreach from=$articlecategories item=articleCategory}
 			<A href="{$url->categoryLink($articleCategory)}">{$articleCategory->getName()}</A> ({$articleCategory->getNumArticles()})<br>
 		{/foreach}<BR>
 
-	<h2 class="sidebar-title">Archives</h2>
+	<h2 class="sidebar-title">{$locale->tr("archives")}</h2>
 		<form id="archiveform" action="" method="post">
 			<p style="margin: 0px; padding: 0px;">
 			<select id="archive_chrono">
-				<option value="">Archives by Month</option>
+				<option value="">-- {$locale->tr("select")|capitalize} --</option>
 				{foreach from=$archives item=month}
 					<option value='{$month->getUrl()}'>{$month->getName()} [{$month->getNumArticles()}]</option>
 				{/foreach}
@@ -74,7 +77,7 @@
 			<input type="button" value="Go" onclick="window.location = (document.forms.archiveform.archive_chrono[document.forms.archiveform.archive_chrono.selectedIndex].value);" /></p>
 		</form>
 
-	<h2 class="sidebar-title">Links</h2>
+	<h2 class="sidebar-title">{$locale->tr("my_links")}</h2>
 	{foreach from=$mylinkscategories item=linkcategory}
 	<b>{$linkcategory->getName()}</b><br>
 		{foreach from=$linkcategory->getLinks() item=link}
@@ -85,18 +88,20 @@
 
 
 	<ul><li></li></ul>
-
+  
+	<h2 class="sidebar-title">{$locale->tr("syndicate")}</h2>
 	<p class="post-footer">
-		<em><a href="http://www.thoughtmechanics.com/blog/2005/02/18/not-so-minima/">Minima Plus</a> is based on blogger template <a href="http://www.stopdesign.com/portfolio/web_interface/blogger_templates.html?fs=1">Minima</a>, originally by <a href="http://www.stopdesign.com">Douglas Bowman</a>. Enhanced and ported to Wordpress by Theron Parlin.
+		<em>
+			<a href="{$url->rssLink("rss10")}" title="RSS 1.0">RSS 1.0</a><br/>
+			<a href="{$url->rssLink("rss20")}" title="RSS 2.0">RSS 2.0</a><br/>			
+			<a href="{$url->rssLink("atom")}" title="Atom">Atom</a><br/>			
+			<a href="http://validator.w3.org/check/referer">XHTML</a><br/>
+			<a class="footerLink" href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a>
 		</em>
 	</p>
-
-	<ul><li></li></ul>
   
-	<p class="post-footer"><em><a href="{$url->rssLink("rss10")}" title="Syndicate this site using RSS">RSS</a> <a href="http://validator.w3.org/check/referer">XHTML</a> <a class="footerLink" href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a> <a href="http://www.contentquality.com/mynewtester/cynthia.exe?Url1=http://phys.idv.tw/wp">508</a></em></p>
-  
 	<ul><li></li></ul>
 
 
 </div></div>
-<!-- End #sidebar -->
\ No newline at end of file
+<!-- End #sidebar -->

Modified: templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/main.template
===================================================================
--- templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/main.template	2008-04-28 17:40:06 UTC (rev 6353)
+++ templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/main.template	2008-04-28 17:55:06 UTC (rev 6354)
@@ -3,6 +3,6 @@
 		{foreach from=$posts item=post}
 			{include file="$blogtemplate/post.template"}
 		{/foreach}
- {pager style="links"}
+{pager style="links"}
 {include file="$blogtemplate/links.template"}
 {include file="$blogtemplate/footer.template"}
\ No newline at end of file

Modified: templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/nicetitle.js
===================================================================
--- templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/nicetitle.js	2008-04-28 17:40:06 UTC (rev 6353)
+++ templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/nicetitle.js	2008-04-28 17:55:06 UTC (rev 6354)
@@ -1,346 +1,346 @@
-// original code by Stuart Langridge 2003-11
-// with additions to the code by other good people
-// http://www.kryogenix.org/code/browser/nicetitle/
-// thank you, sir
-
-// modified by Peter Janes 2003-03-25
-// http://peterjanes.ca/blog/archives/2003/03/25/nicetitles-for-ins-and-del
-// added in ins and del tags
-
-// modified by Dunstan Orchard 2003-11-18
-// http://1976design.com/blog/
-// added in accesskey information
-// tried ever-so-hard, but couldn't work out how to do what Ethan did
-
-// final genius touch by by Ethan Marcotte 2003-11-18
-// http://www.sidesh0w.com/
-// worked out how to delay showing the popups to make them more like the browser's own
-
-
-// set the namespace
-var XHTMLNS = 'http://www.w3.org/1999/xhtml';
-var CURRENT_NICE_TITLE;
-
-// browser sniff
-var browser = new Browser();
-
-
-
-// determine browser and version.
-function Browser()
-	{
-	var ua, s, i;
-
-	this.isIE = false;
-	this.isNS = false;
-	this.version = null;
-
-	ua = navigator.userAgent;
-
-	s = 'MSIE';
-	if ((i = ua.indexOf(s)) >= 0)
-		{
-		this.isIE = true;
-		this.version = parseFloat(ua.substr(i + s.length));
-		return;
-		}
-
-	s = 'Netscape6/';
-	if ((i = ua.indexOf(s)) >= 0)
-		{
-		this.isNS = true;
-		this.version = parseFloat(ua.substr(i + s.length));
-		return;
-		}
-
-	// treat any other 'Gecko' browser as NS 6.1.
-	s = 'Gecko';
-	if ((i = ua.indexOf(s)) >= 0)
-		{
-		this.isNS = true;
-		this.version = 6.1;
-		return;
-		}
-	}
-
-
-
-// 2003-11-19 sidesh0w
-// set delay vars to emulate normal hover delay
-var delay;
-var interval = 0.20;
-
-
-
-// this function runs on window load
-// it runs through all the links on the page as starts listening for actions
-function makeNiceTitles()
-	{
-	if (!document.createElement || !document.getElementsByTagName) return;
-	if (!document.createElementNS)
-		{
-		document.createElementNS = function(ns, elt)
-			{
-			return document.createElement(elt);
-			}
-		}
-
-	// do regular links
-	if (!document.links)
-		{
-		document.links = document.getElementsByTagName('a');
-		}
-	for (var ti=0; ti<document.links.length; ti++)
-		{
-		var lnk = document.links[ti];
-		if (lnk.title)
-			{
-			lnk.setAttribute('nicetitle', lnk.title);
-			lnk.removeAttribute('title');
-			addEvent(lnk, 'mouseover', showDelay);
-			addEvent(lnk, 'mouseout', hideNiceTitle);
-			addEvent(lnk, 'focus', showDelay);
-			addEvent(lnk, 'blur', hideNiceTitle);
-			}
-		}
-
-	// 2003-03-25 Peter Janes
-	// do ins and del tags
-	var tags = new Array(2);
-	tags[0] = document.getElementsByTagName('ins');
-	tags[1] = document.getElementsByTagName('del');
-	for (var tt=0; tt<tags.length; tt++)
-		{
-		if (tags[tt])
-			{
-			for (var ti=0; ti<tags[tt].length; ti++)
-				{
-				var tag = tags[tt][ti];
-				if (tag.dateTime)
-					{
-					var strDate = tag.dateTime;
-					// HTML/ISO8601 date: yyyy-mm-ddThh:mm:ssTZD (Z, -hh:mm, +hh:mm)
-					var month = strDate.substring(5,7);
-					var day = strDate.substring(8,10);
-					if (month[0] == '0')
-						{
-						month = month[1];
-						}
-					if (day[0] == '0')
-						{
-						day = day[1];
-						}
-					var dtIns = new Date(strDate.substring(0,4), month-1, day, strDate.substring(11,13), strDate.substring(14,16), strDate.substring(17,19));
-					tag.setAttribute('nicetitle', (tt == 0 ? 'Added' : 'Deleted') + ' on ' + dtIns.toString());
-					addEvent(tag, 'mouseover', showDelay);
-					addEvent(tag, 'mouseout', hideNiceTitle);
-					addEvent(tag, 'focus', showDelay);
-					addEvent(tag, 'blur', hideNiceTitle);
-					}
-				}
-			}
-		}
-	}
-
-
-
-// by Scott Andrew
-// add an eventlistener to browsers that can do it somehow.
-function addEvent(obj, evType, fn)
-	{
-	if (obj.addEventListener)
-		{
-		obj.addEventListener(evType, fn, true);
-		return true;
-		}
-	else if (obj.attachEvent)
-		{
-		var r = obj.attachEvent('on'+evType, fn);
-		return r;
-		}
-	else
-		{
-		return false;
-		}
-	}
-
-
-
-function findPosition(oLink)
-	{
-	if (oLink.offsetParent)
-		{
-		for (var posX = 0, posY = 0; oLink.offsetParent; oLink = oLink.offsetParent)
-			{
-			posX += oLink.offsetLeft;
-			posY += oLink.offsetTop;
-			}
-		return [posX, posY];
-		}
-	else
-		{
-		return [oLink.x, oLink.y];
-		}
-	}
-
-
-
-function getParent(el, pTagName)
-	{
-	if (el == null)
-		{
-		return null;
-		}
-	// gecko bug, supposed to be uppercase
-	else if (el.nodeType == 1 && el.tagName.toLowerCase() == pTagName.toLowerCase())
-		{
-		return el;
-		}
-	else
-		{
-		return getParent(el.parentNode, pTagName);
-		}
-	}
-
-
-
-// 2003-11-19 sidesh0w
-// trailerpark wrapper function
-function showDelay(e)
-	{
-    if (window.event && window.event.srcElement)
-		{
-        lnk = window.event.srcElement
-		}
-	else if (e && e.target)
-		{
-        lnk = e.target
-		}
-    if (!lnk) return;
-
-	// lnk is a textnode or an elementnode that's not ins/del
-    if (lnk.nodeType == 3 || (lnk.nodeType == 1 && lnk.tagName.toLowerCase() != 'ins' && lnk.tagName.toLowerCase() != 'del'))
-		{
-		// ascend parents until we hit a link
-		lnk = getParent(lnk, 'a');
-		}
-	
-	delay = setTimeout("showNiceTitle(lnk)", interval * 1000);
-	}
-
-
-
-// build and show the nice titles
-function showNiceTitle(link)
-	{
-    if (CURRENT_NICE_TITLE) hideNiceTitle(CURRENT_NICE_TITLE);
-    if (!document.getElementsByTagName) return;
-
-    nicetitle = lnk.getAttribute('nicetitle');
-    
-    var d = document.createElementNS(XHTMLNS, 'div');
-    d.className = 'nicetitle';
-    tnt = document.createTextNode(nicetitle);
-    pat = document.createElementNS(XHTMLNS, 'p');
-    pat.className = 'titletext';
-    pat.appendChild(tnt);
-
-	// 2003-11-18 Dunstan Orchard
-	// added in accesskey info
-	if (lnk.accessKey)
-		{
-        axs = document.createTextNode(' [' + lnk.accessKey + ']');
-		axsk = document.createElementNS(XHTMLNS, 'span');
-        axsk.className = 'accesskey';
-        axsk.appendChild(axs);
-		pat.appendChild(axsk);
-		}
-    d.appendChild(pat);
-
-    if (lnk.href)
-		{
-        tnd = document.createTextNode(lnk.href);
-        pad = document.createElementNS(XHTMLNS, 'p');
-        pad.className = 'destination';
-        pad.appendChild(tnd);
-        d.appendChild(pad);
-		}
-    
-    STD_WIDTH = 300;
-
-	if (lnk.href)
-		{
-        h = lnk.href.length;
-		}
-	else
-		{
-		h = nicetitle.length;
-		}
-	
-    if (nicetitle.length)
-		{
-		t = nicetitle.length;
-		}
-	
-    h_pixels = h*6;
-	t_pixels = t*10;
-    
-    if (h_pixels > STD_WIDTH)
-		{
-        w = h_pixels;
-		}
-	else if ((STD_WIDTH>t_pixels) && (t_pixels>h_pixels))
-		{
-        w = t_pixels;
-		}
-	else if ((STD_WIDTH>t_pixels) && (h_pixels>t_pixels))
-		{
-        w = h_pixels;
-		}
-	else
-		{
-        w = STD_WIDTH;
-		}
-        
-    d.style.width = w + 'px';    
-
-    mpos = findPosition(lnk);
-    mx = mpos[0];
-    my = mpos[1];
-    
-    d.style.left = (mx+15) + 'px';
-    d.style.top = (my+35) + 'px';
-
-    if (window.innerWidth && ((mx+w) > window.innerWidth))
-		{
-        d.style.left = (window.innerWidth - w - 25) + 'px';
-		}
-    if (document.body.scrollWidth && ((mx+w) > document.body.scrollWidth))
-		{
-        d.style.left = (document.body.scrollWidth - w - 25) + 'px';
-		}
-    
-    document.getElementsByTagName('body')[0].appendChild(d);
-
-    CURRENT_NICE_TITLE = d;
-	}
-
-
-
-
-function hideNiceTitle(e)
-	{
-	// 2003-11-19 sidesh0w
-	// clearTimeout 
-	if (delay) clearTimeout(delay);
-	if (!document.getElementsByTagName) return;
-	if (CURRENT_NICE_TITLE)
-		{
-		document.getElementsByTagName('body')[0].removeChild(CURRENT_NICE_TITLE);
-		CURRENT_NICE_TITLE = null;
-		}
-	}
-
-window.onload = function(e) {
-makeNiceTitles();
-}
+// original code by Stuart Langridge 2003-11
+// with additions to the code by other good people
+// http://www.kryogenix.org/code/browser/nicetitle/
+// thank you, sir
+
+// modified by Peter Janes 2003-03-25
+// http://peterjanes.ca/blog/archives/2003/03/25/nicetitles-for-ins-and-del
+// added in ins and del tags
+
+// modified by Dunstan Orchard 2003-11-18
+// http://1976design.com/blog/
+// added in accesskey information
+// tried ever-so-hard, but couldn't work out how to do what Ethan did
+
+// final genius touch by by Ethan Marcotte 2003-11-18
+// http://www.sidesh0w.com/
+// worked out how to delay showing the popups to make them more like the browser's own
+
+
+// set the namespace
+var XHTMLNS = 'http://www.w3.org/1999/xhtml';
+var CURRENT_NICE_TITLE;
+
+// browser sniff
+var browser = new Browser();
+
+
+
+// determine browser and version.
+function Browser()
+	{
+	var ua, s, i;
+
+	this.isIE = false;
+	this.isNS = false;
+	this.version = null;
+
+	ua = navigator.userAgent;
+
+	s = 'MSIE';
+	if ((i = ua.indexOf(s)) >= 0)
+		{
+		this.isIE = true;
+		this.version = parseFloat(ua.substr(i + s.length));
+		return;
+		}
+
+	s = 'Netscape6/';
+	if ((i = ua.indexOf(s)) >= 0)
+		{
+		this.isNS = true;
+		this.version = parseFloat(ua.substr(i + s.length));
+		return;
+		}
+
+	// treat any other 'Gecko' browser as NS 6.1.
+	s = 'Gecko';
+	if ((i = ua.indexOf(s)) >= 0)
+		{
+		this.isNS = true;
+		this.version = 6.1;
+		return;
+		}
+	}
+
+
+
+// 2003-11-19 sidesh0w
+// set delay vars to emulate normal hover delay
+var delay;
+var interval = 0.20;
+
+
+
+// this function runs on window load
+// it runs through all the links on the page as starts listening for actions
+function makeNiceTitles()
+	{
+	if (!document.createElement || !document.getElementsByTagName) return;
+	if (!document.createElementNS)
+		{
+		document.createElementNS = function(ns, elt)
+			{
+			return document.createElement(elt);
+			}
+		}
+
+	// do regular links
+	if (!document.links)
+		{
+		document.links = document.getElementsByTagName('a');
+		}
+	for (var ti=0; ti<document.links.length; ti++)
+		{
+		var lnk = document.links[ti];
+		if (lnk.title)
+			{
+			lnk.setAttribute('nicetitle', lnk.title);
+			lnk.removeAttribute('title');
+			addEvent(lnk, 'mouseover', showDelay);
+			addEvent(lnk, 'mouseout', hideNiceTitle);
+			addEvent(lnk, 'focus', showDelay);
+			addEvent(lnk, 'blur', hideNiceTitle);
+			}
+		}
+
+	// 2003-03-25 Peter Janes
+	// do ins and del tags
+	var tags = new Array(2);
+	tags[0] = document.getElementsByTagName('ins');
+	tags[1] = document.getElementsByTagName('del');
+	for (var tt=0; tt<tags.length; tt++)
+		{
+		if (tags[tt])
+			{
+			for (var ti=0; ti<tags[tt].length; ti++)
+				{
+				var tag = tags[tt][ti];
+				if (tag.dateTime)
+					{
+					var strDate = tag.dateTime;
+					// HTML/ISO8601 date: yyyy-mm-ddThh:mm:ssTZD (Z, -hh:mm, +hh:mm)
+					var month = strDate.substring(5,7);
+					var day = strDate.substring(8,10);
+					if (month[0] == '0')
+						{
+						month = month[1];
+						}
+					if (day[0] == '0')
+						{
+						day = day[1];
+						}
+					var dtIns = new Date(strDate.substring(0,4), month-1, day, strDate.substring(11,13), strDate.substring(14,16), strDate.substring(17,19));
+					tag.setAttribute('nicetitle', (tt == 0 ? 'Added' : 'Deleted') + ' on ' + dtIns.toString());
+					addEvent(tag, 'mouseover', showDelay);
+					addEvent(tag, 'mouseout', hideNiceTitle);
+					addEvent(tag, 'focus', showDelay);
+					addEvent(tag, 'blur', hideNiceTitle);
+					}
+				}
+			}
+		}
+	}
+
+
+
+// by Scott Andrew
+// add an eventlistener to browsers that can do it somehow.
+function addEvent(obj, evType, fn)
+	{
+	if (obj.addEventListener)
+		{
+		obj.addEventListener(evType, fn, true);
+		return true;
+		}
+	else if (obj.attachEvent)
+		{
+		var r = obj.attachEvent('on'+evType, fn);
+		return r;
+		}
+	else
+		{
+		return false;
+		}
+	}
+
+
+
+function findPosition(oLink)
+	{
+	if (oLink.offsetParent)
+		{
+		for (var posX = 0, posY = 0; oLink.offsetParent; oLink = oLink.offsetParent)
+			{
+			posX += oLink.offsetLeft;
+			posY += oLink.offsetTop;
+			}
+		return [posX, posY];
+		}
+	else
+		{
+		return [oLink.x, oLink.y];
+		}
+	}
+
+
+
+function getParent(el, pTagName)
+	{
+	if (el == null)
+		{
+		return null;
+		}
+	// gecko bug, supposed to be uppercase
+	else if (el.nodeType == 1 && el.tagName.toLowerCase() == pTagName.toLowerCase())
+		{
+		return el;
+		}
+	else
+		{
+		return getParent(el.parentNode, pTagName);
+		}
+	}
+
+
+
+// 2003-11-19 sidesh0w
+// trailerpark wrapper function
+function showDelay(e)
+	{
+    if (window.event && window.event.srcElement)
+		{
+        lnk = window.event.srcElement
+		}
+	else if (e && e.target)
+		{
+        lnk = e.target
+		}
+    if (!lnk) return;
+
+	// lnk is a textnode or an elementnode that's not ins/del
+    if (lnk.nodeType == 3 || (lnk.nodeType == 1 && lnk.tagName.toLowerCase() != 'ins' && lnk.tagName.toLowerCase() != 'del'))
+		{
+		// ascend parents until we hit a link
+		lnk = getParent(lnk, 'a');
+		}
+	
+	delay = setTimeout("showNiceTitle(lnk)", interval * 1000);
+	}
+
+
+
+// build and show the nice titles
+function showNiceTitle(link)
+	{
+    if (CURRENT_NICE_TITLE) hideNiceTitle(CURRENT_NICE_TITLE);
+    if (!document.getElementsByTagName) return;
+
+    nicetitle = lnk.getAttribute('nicetitle');
+    
+    var d = document.createElementNS(XHTMLNS, 'div');
+    d.className = 'nicetitle';
+    tnt = document.createTextNode(nicetitle);
+    pat = document.createElementNS(XHTMLNS, 'p');
+    pat.className = 'titletext';
+    pat.appendChild(tnt);
+
+	// 2003-11-18 Dunstan Orchard
+	// added in accesskey info
+	if (lnk.accessKey)
+		{
+        axs = document.createTextNode(' [' + lnk.accessKey + ']');
+		axsk = document.createElementNS(XHTMLNS, 'span');
+        axsk.className = 'accesskey';
+        axsk.appendChild(axs);
+		pat.appendChild(axsk);
+		}
+    d.appendChild(pat);
+
+    if (lnk.href)
+		{
+        tnd = document.createTextNode(lnk.href);
+        pad = document.createElementNS(XHTMLNS, 'p');
+        pad.className = 'destination';
+        pad.appendChild(tnd);
+        d.appendChild(pad);
+		}
+    
+    STD_WIDTH = 300;
+
+	if (lnk.href)
+		{
+        h = lnk.href.length;
+		}
+	else
+		{
+		h = nicetitle.length;
+		}
+	
+    if (nicetitle.length)
+		{
+		t = nicetitle.length;
+		}
+	
+    h_pixels = h*6;
+	t_pixels = t*10;
+    
+    if (h_pixels > STD_WIDTH)
+		{
+        w = h_pixels;
+		}
+	else if ((STD_WIDTH>t_pixels) && (t_pixels>h_pixels))
+		{
+        w = t_pixels;
+		}
+	else if ((STD_WIDTH>t_pixels) && (h_pixels>t_pixels))
+		{
+        w = h_pixels;
+		}
+	else
+		{
+        w = STD_WIDTH;
+		}
+        
+    d.style.width = w + 'px';    
+
+    mpos = findPosition(lnk);
+    mx = mpos[0];
+    my = mpos[1];
+    
+    d.style.left = (mx+15) + 'px';
+    d.style.top = (my+35) + 'px';
+
+    if (window.innerWidth && ((mx+w) > window.innerWidth))
+		{
+        d.style.left = (window.innerWidth - w - 25) + 'px';
+		}
+    if (document.body.scrollWidth && ((mx+w) > document.body.scrollWidth))
+		{
+        d.style.left = (document.body.scrollWidth - w - 25) + 'px';
+		}
+    
+    document.getElementsByTagName('body')[0].appendChild(d);
+
+    CURRENT_NICE_TITLE = d;
+	}
+
+
+
+
+function hideNiceTitle(e)
+	{
+	// 2003-11-19 sidesh0w
+	// clearTimeout 
+	if (delay) clearTimeout(delay);
+	if (!document.getElementsByTagName) return;
+	if (CURRENT_NICE_TITLE)
+		{
+		document.getElementsByTagName('body')[0].removeChild(CURRENT_NICE_TITLE);
+		CURRENT_NICE_TITLE = null;
+		}
+	}
+
+window.onload = function(e) {
+makeNiceTitles();
+}

Modified: templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/post.template
===================================================================
--- templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/post.template	2008-04-28 17:40:06 UTC (rev 6353)
+++ templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/post.template	2008-04-28 17:55:06 UTC (rev 6354)
@@ -1,4 +1,3 @@
-<!-- {$url->postTrackbackLink($post)} -->
 {assign var="postDate" value=$post->getDateObject()}
 {assign var="postOwner" value=$post->getUserInfo()}
 	<!-- Begin .post -->
@@ -11,9 +10,11 @@
 		</div>
 		
 		<p class="post-footer">
-			<em>posted by {$postOwner->getUsername()} on 
-			<a href="{$url->postPermalink($post)}" title="permanent link">{$locale->formatDate($postDate,"%m/%d,%Y")}</a> @ {$locale->formatDate($postDate,"%H:%M")}</em> | <a class="comment-link" href="http://phys.idv.tw/wp/?p=1#comments"><em><a href="{$url->postPermalink($post)}#comments">{$post->getNumComments()} Comments</a></em></a>
+			<em>{$locale->tr("posted_by")} {$postOwner->getUsername()}, 
+			<a href="{$url->postPermalink($post)}" title="permanent link">{$locale->formatDate($postDate,"%m/%d,%Y")}</a> @ 
+            {$locale->formatDate($postDate,"%H:%M")}</em> | 
+            <em><a href="{$url->postPermalink($post)}#comments">{$post->getNumComments()} {$locale->tr("comments")}</a></em>
 		</p>
 	</div>
 
-<!-- End .post -->
\ No newline at end of file
+<!-- End .post -->

Modified: templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/postandcomments.template
===================================================================
--- templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/postandcomments.template	2008-04-28 17:40:06 UTC (rev 6353)
+++ templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/postandcomments.template	2008-04-28 17:55:06 UTC (rev 6354)
@@ -1,8 +1,9 @@
-{assign var="postPageTitle" value=$post->getTopic()}
-{assign var="postPageTitle" value=" | $postPageTitle"}
 {include file="$blogtemplate/header.template"}
 {assign var="postDate" value=$post->getDateObject()}
 {assign var="postOwner" value=$post->getUserInfo()}
+
+<!-- {$url->postTrackbackLink($post)} -->
+
 	<!-- Begin .post -->
 	<div class="post">
 		<h3 class="post-title"><a href="{$url->postPermalink($post)}" style="text-decoration:none;" rel="bookmark" title="Permanent Link: {$post->getTopic()}">{$post->getTopic()}</a></h3>
@@ -30,8 +31,5 @@
 <!-- Show All Comments -->
 {include file="$blogtemplate/comments.template"}
 
-<!-- Article referers Plugin -->
-{include file="$blogtemplate/articlereferers.template"}
-
 {include file="$blogtemplate/links.template"}
-{include file="$blogtemplate/footer.template"}
\ No newline at end of file
+{include file="$blogtemplate/footer.template"}

Modified: templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/resource.template
===================================================================
--- templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/resource.template	2008-04-28 17:40:06 UTC (rev 6353)
+++ templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/resource.template	2008-04-28 17:55:06 UTC (rev 6354)
@@ -50,7 +50,7 @@
 		{assign var=album value=$resource->getAlbum()}
    		{if $prevresource}<a href="{$url->resourceLink($prevresource)}">&laquo;</a> | {/if}
    		<a href="{$url->albumLink($album)}">{$locale->tr("back")}</a>
-   		{if $nextresource}| <a href="{$url->resourceLink($nextresource)}">&raquo;</a>{/if}    
+   		{if $nextresource}| <a href="{$url->resourceLink($nextresource)}">&raquo;</a>{/if}   
 	</p>
 
 

Modified: templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/searchresults.template
===================================================================
--- templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/searchresults.template	2008-04-28 17:40:06 UTC (rev 6353)
+++ templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/searchresults.template	2008-04-28 17:55:06 UTC (rev 6354)
@@ -4,11 +4,13 @@
 	<div class="post">
 		<h3 class="post-title">{$locale->tr("search_results")}: {foreach from=$searchterms item=term}{$term} {/foreach}</h3>
 						<br>
-						<OL>
+						<ul>
 						{foreach from=$searchresults item=result}
 							{assign var=article value=$result->getArticle()}
 							<LI><a href="{$url->postPermalink($article)}">{$article->getTopic()}</a><br/>
-						{/foreach}</OL>
+						{/foreach}
+						{pager style="links"}
+						</ul>
 		</div>
 {include file="$blogtemplate/links.template"}				
 {include file="$blogtemplate/footer.template"}

Modified: templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/style.css
===================================================================
--- templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/style.css	2008-04-28 17:40:06 UTC (rev 6353)
+++ templates/branches/lifetype-1.2/unported/MinimaPlusWithPlugins/style.css	2008-04-28 17:55:06 UTC (rev 6354)
@@ -387,3 +387,44 @@
 	background: #fff; 
 	color: #FF0084;	
 }
+
+/* comment form */
+
+#CommentForm fieldset {
+	border:2px solid #d4d0cd; 
+	padding-top:10px; 
+	margin-top:10px; 
+	padding-left:10px; 
+	padding-bottom:10px;
+}
+
+#CommentForm legend {
+	color:#000;
+	padding:2px 4px 2px 4px;
+	background-color: #ffffff;
+	font-weight : bold;
+}
+
+#CommentForm label {
+	width:13em;
+	float:left;
+	display:block;
+	clear:both; 
+	margin-top:8px;
+	margin-bottom:0px;
+}
+	
+#CommentForm div {
+    clear:both;
+	margin-top:8px;
+	margin-bottom:8px;
+}
+#CommentForm input, textarea {
+    width: 200px;
+}	
+#Submit {
+	margin-top:8px;
+	margin-bottom:8px;
+	margin-left:6em;
+}
+	



More information about the pLog-svn mailing list