View Full Version : Pixrlgrain question
thewayne
02-19-2007, 07:59 PM
Hello all. I recently started a photoblog using pixelpost at http:\\www.smithphotoblog.com.
My question is pertaining to the pixelgrain template which I really like.
How can I make the comment section only viewable once someone clicks on "Comments" ?
This is done on Pixelgrain's site, but not by default in the downloaded template.
Thanks in advance,
Wayne
Dkozikowski
02-20-2007, 12:39 AM
I just had a look at your blog and your template code is a disaster.
If you properly formated the code the flip function should work.
Bellow is a formated version of your current template.
Please test and validate your template.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title><SITE_TITLE> <SITE_TITLE_EXT></title>
<!-- Link for ATOM feed autodiscovery -->
<link rel="service.feed" type="application/x.atom+xml" href="<ATOM_AUTODETECT>" title="<SITE_TITLE>" />
<!-- Link for RSS feed autodiscovery -->
<link rel="alternate" type="application/rss+xml" title="<SITE_TITLE> - RSS feed" href="index.php?x=rss" />
<!-- Meta-Information -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta http-equiv="imagetoolbar" content="false" />
<meta http-equiv="content-type" name="keywords" content="PhotoBlog,<SITE_TITLE>,<IMAGE_TITLE>,Pixelpost" />
<meta http-equiv="content-type" name="description" content="<SITE_TITLE>: a photoblog.<SITE_DESC_EXT>" />
<!-- StyleSheet -->
<link rel="stylesheet" href="templates/pixelgrain/pixelgrain.css" type="text/css" />
<script language='javascript' type='text/javascript'>
//<![CDATA[
<!-- BEGIN
function flip(rid){
current=(document.getElementById(rid).style.displa y == 'none') ? 'block' : 'none';
document.getElementById(rid).style.display = current;}
// End -->
//]]>
</script>
</head>
<body>
<table cellspacing="0" cellpadding="0" id="layout">
<tr>
<td id="leftvertbar" width="15"><div class="spacer"> </div></td>
<td id="centercolumn" <BODY_WIDTH>>
<div id="logo" <BODY_WIDTH>><span class="date"><IMAGE_PREVIOUS_PG> <IMAGE_DATE> <IMAGE_NEXT_PG></span> <a href="index.php"><SITE_TITLE></a> » <a href="index.php?showimage=<IMAGE_ID>"><IMAGE_TITLE></a><br /></div>
<div style="clear:left;text-align:center;float:left;"><a href="index.php?showimage=<IMAGE_PREVIOUS_ID>" title="previous » <IMAGE_PREVIOUS_TITLE>"><img id="image" src="images/<IMAGE_NAME>" alt="<IMAGE_TITLE>" title="previous » <IMAGE_PREVIOUS_TITLE>" width="<IMAGE_WIDTH>" height="<IMAGE_HEIGHT>" /></a></div>
<div id="exif" <TEXTSTYLING>>
<div class="imagesnotes"><IMAGE_NOTES></div>
<!-- REMOVE THIS SECTION IF YOU DON'T USE IMAGES WITH EXIF DATA -->
<span class="exiftitle">Date Taken:</span> <EXIF_CAPTURE_DATE><br />
<span class="exiftitle">Camera:</span> <EXIF_CAMERA_MODEL><br />
<span class="exiftitle">Exposure Time:</span> <EXIF_EXPOSURE_TIME><br />
<span class="exiftitle">Aperature:</span> <EXIF_APERTURE><br />
<span class="exiftitle">ISO:</span> <EXIF_ISO><br /><br />
<a href="#addcomment" onclick="flip('add-comment'); gotocomments(); return false;">Comments [<IMAGE_COMMENTS_NUMBER>]</a><br /><br />
</div>
<div id="thumbrow" <THUMBSTYLING>><IMAGE_THUMBNAIL_ROW><p class="metalinks"><span style="float:right"> <a href="index.php?x=rss">RSS</a> </span><strong><a href="index.php?x=browse">Browse Archives</a></strong><br /><br /></p></div>
<!-- this will add the photoblogs.org buttons. please replace details for your own site! -->
<!--<span style="float:right;margin-bottom:4px;"><a href='http://www.photoblogs.org/'><imgsrc='http://buttons.photoblogs.org/photoblogs_gray.gif'alt='Photoblogs.org' title='Photoblogs.org'border='0' /></a><a href='http://photoblogs.org/profile/pixelgrain.org/'><imgsrc='http://buttons.photoblogs.org/listed_gray.gif'alt='View My Profile' title='View My Profile'border='0' /></a></span>-->
<div id="add-comment">
<script language='javascript' type='text/javascript'>
//<![CDATA[
<!-- BEGIN
function gotocomments(){
document.location = '#addcomment';
if (source.nodeType == 3){
source = source.parentNode;
}
var id = source.href.split('#')[1];
var elem;
for (var i = 0; (elem = et_toggleElements[i]); i++){
if (elem.id != id) {
elem.style.display = 'none';
}else{
elem.style.display = 'block';
}
}
// End -->
//]]>
</script>
<script language='javascript' type='text/javascript'>
//<![CDATA[
flip('add-comment');
//]]>
</script>
<a name="addcomment"></a>
<table width="100%">
<tr>
<td width="50%" valign="top"><div id="commentslist" style="float:left;width:380px;"><IMAGE_COMMENTS></div></td>
<td width="50%" valign="top">
<form method='post' action='index.php?x=save_comment' name='commentform' accept-charset='UTF-8'>Comment:<br />
<textarea name='message' rows='4' cols='20'></textarea><br /><br />
<label for="name">Name:</label><br />
<input type='text' name='name' class='input' value='<VINFO_NAME>' id="name" /><br /><br />
<label for="url">Website URL, if any:</label><br />
<input type='text' name='url' class='input' value='<VINFO_URL>' id="url" /><br /><br />
<label for="email">Email (not visible to others):</label><br />
<input class='input' type='text' name='email' value='<VINFO_EMAIL>' id="email" /><br /><br />
<!-- UNHIDE THIS IF YOU ARE USING THE WONDERFUL COMMENT SUBSCRIBER ADDON found at: http://pixelpost.org/v1/index.php?x=downloads&details=54Subscribe to these comments?<select name="subscribe"><option value='Y'>yes</option><option value='N'>no</option></select> -->
<br /><br />
<input type='submit' value='Add Comment' /><input type='hidden' name='parent_name' value='<IMAGE_NAME>' /><input type='hidden' name='parent_id' value='<IMAGE_ID>' /><input type='hidden' name='parent_name' value='<IMAGE_NAME>' />
</form>
</td>
</tr>
</table>
</div>
</td>
<td id="rightvertbar" width="15"><div class="spacer"> </div></td>
</tr>
</table>
</body>
</html>
thewayne
02-20-2007, 02:22 AM
Thanks for the help.
I am new to this, and am working hard to learn css. As far as it being disaster, I have only downloaded and installed it, so I am not sure what you are referring to.
I am not sure what test and verify means, but I will look into it.
Thanks again.
Dkozikowski
02-20-2007, 02:45 AM
Yes, I realize you just downloaded and installed it.
Either the developer did not properly format the code or something happened in between zipping / uploading / downloading / editing ect.
Anyway, you can use the code i posted above. It is an exact copy of your current template.
As far as verifying your code,
you can use W3C's Markup Validator (http://validator.w3.org/)
Simple follow that link and enter your photoblogs address. It will check your code and report any errors or warnings.
Errors and warnings are bad and we do not like them ;)
We always like to keep semantics in mind and validated code means you have a greater chance of your code working the way you intended it to with more browsers.
thewayne
02-20-2007, 02:58 AM
Ok, I found the firefox dev extension and validated the html and css which has passed. I also figured out that I did not have my ftp transfers set to ascii, which is what caused the mess.
Now, any idea how to hide the comment section on this Pixelgrain template?
Thanks
Dkozikowski
02-20-2007, 03:02 AM
The comment are hidden :)
Click Comments [x] to show and hide
x = the number of comments (obviously)
thewayne
02-20-2007, 12:34 PM
That is weird. It wasn't hidden at first.
When I validated, it found an error in alignment where the word "middle" was used instead of "center".
I can't believe that fixed it.
I guess I learned something new.
thanks.
Dkozikowski
02-20-2007, 12:40 PM
Ahh, you must have been using IE ;)
austriaka
02-20-2007, 01:47 PM
That is weird. It wasn't hidden at first.Seems if you had the old version in cache.
Always make a hard-reload (F5) to clear the cache
KArin
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.