forum.coppermine-gallery.net
Support => cpg1.3.x Support => Older/other versions => cpg1.3 Themes/Skins/Templates => Topic started by: protox on September 20, 2005, 04:49:44 pm
-
Stramm has just released a code to replace emoticons with a popup window ( see it there (http://forum.coppermine-gallery.net/index.php?topic=21863.0) )
But I'd like to get a cleaner way to publish the photography; without any disturbing comments under 'em :o ;D
So, the visitors will have to click on a link to unhide the comments ( or open a popup window ? don't know if it's more difficult to make it or not )
--
And the most beautiful dream @ the moment could be to have the same for the votes !
Oh yes I know I'm a dreaaaaamer :P
-
Like very much your layout and the photos which are inside Protox
What a pity you hide Powered by Coppermine with a link which has the same color than the background.
-
something that gives you an idea on how it works... not 100% (cause atm it can't show you if there are comments to see or just the comment add box) but it works (classic theme).
theme.php find function theme_display_image
a few lines below you'll see
starttable();
echo $votes;
endtable();
replace with
echo <<<EOT
<script language="JavaScript">
function expand(id)
{
var item = document.getElementById(id);
if( item.style.visibility == 'hidden' )
{
item.style.position = 'relative';
item.style.visibility = 'visible';
}
else
{
item.style.visibility = 'hidden';
item.style.position = 'absolute';
}
return false;
}
</script>
<a href="" onClick="return expand('votes');" class="link">[click to show votes]</a><br />
<table id="votes" style="position: absolute; visibility: hidden;"><tr><td>
EOT;
starttable();
echo $votes;
endtable();
echo "</td></tr></table>";
few lines below
starttable();
echo $comments;
endtable();
replace with
echo <<<EOT
<a href="" onClick="return expand('comments');" class="link">[click to show comments]</a><br />
<table id="comments" style="position: absolute; visibility: hidden;"><tr><td>
EOT;
starttable();
echo $comments;
endtable();
echo "</table></td></tr>";
-
If I can say something ... :)
it's better to show/hide layer to use DISPLAY (block/none) than VISIBILITY (visible/hidden)
Because when you have some content inside a div, the hidden layer (by visibility scheme) "keeps" the height of the content !!! But using display : none, if your layer is 10px or 3000 px, it's really "hidden".
item.style.visibility = 'hidden'; by item.style.display = 'none';
-
[...]
it can't show you if there are comments to see or just the comment add box) but it works (classic theme)
[...]
AGAIN, EXCELLENT WORK STRAMM ! ;D
( but anyway with this code we couldn't have something like :
(6) Comments <--- ALT -- click here to display all the comments in a popup window )
Edit : the code is working nicely with the "item.style.visibility = 'visible';" method,
but it might be better with a detection of the browsing method..
> Example 1 : the user is browsing the most voted, so the vote are direclty diplayed,
> Example 2 : the user is browsing the last commented, so the comments are direclty diplayed,
Do you think that it's hard to code ?
-
( but anyway with this code we couldn't have something like :
(6) Comments <--- ALT -- click here to display all the comments in a popup window )
In my signature is the link to a mod that will achieve this part. ;)