1
0

Update image block

This commit is contained in:
3nids 2009-10-26 09:27:28 +01:00
parent eec915b887
commit cffa9c75b1
5 changed files with 20 additions and 32 deletions

View File

@ -43,3 +43,12 @@
text-align: left;
margin-top: 30px;
}
.g-block-content .g-parent-album h4 span {
background: transparent url('../images/ico-album.png') no-repeat top left;
display: inline-block;
height: 16px;
margin-right: 5px;
width: 16px;
}

View File

@ -370,14 +370,6 @@ li.g-error select {
background-color: #484848;
}
#g-image-block .g-parent-album h4 span {
background: transparent url('../images/ico-album.png') no-repeat top left;
display: inline-block;
height: 16px;
margin-right: 5px;
width: 16px;
}
#g-content #g-album-grid .g-album h2 span {
background: transparent url('../images/ico-album.png') no-repeat top left;
display: inline-block;

View File

@ -1,17 +1,3 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<? $fancymodule = ""; ?>
<? if (module::is_active("exif")){$fancymodule .= "exif::" . url::site("exif/show/{$item->id}") . ";;";} ?>
<? if (module::is_active("comment") && module::is_active("3nids_theme")){$fancymodule .= "comment::" . url::site("comments_3nids?item_id={$item->id}") . ";;comment_count::" . comment_3nids::count($item) . ";;" ;} ?>
<div class="g-image-block">
<a href="<?= $item->file_url() ?>" class="fancyclass" title="<?= $item->parent()->title ?>, <?=$item->parent()->description?>" name="<?=$fancymodule?>">
<?= $item->thumb_img(array("class" => "g-thumbnail")) ?>
</a>
<div class="g-parent-album">
<a href="<?= $item->parent()->url() ?>?show=<?= $item->id?>"><h4><span></span><?= $item->parent()->title ?></h4></a>
</div>
</div>
<?= theme_3nids::fancylink($item, "dynamic", false, false, "h4") ?>

View File

@ -1 +1 @@
Context menu of videos and photos inside the Lightbox theme!
Update image block

View File

@ -25,12 +25,13 @@
*/
class theme_3nids_Core {
public function fancylink($item, $viewtype="album") {
public function fancylink($item, $viewtype="album", $groupImg = true, $displayComment = true, $parentTitleClass = "h2") {
//viewtype = album || dynamic || header
$link = "";
access::required("view", $item);
$rel = "";
if ($groupImg == true) {$rel = " rel=\"fancygroup\" ";}
if ($item->is_photo() || ($item->is_movie()) && module::is_active("theme_3nids")){
$fancymodule = "";
@ -39,9 +40,9 @@ class theme_3nids_Core {
if (module::is_active("comment") && module::is_active("theme_3nids")){
$fancymodule .= "comment::" . url::site("comments_3nids?item_id={$item->id}") . ";;comment_count::" . comment_3nids::count($item) . ";;" ;}
if ($item->is_photo()){
$link .= "<a href=\"" . url::site("photo_3nids/show/{$item->id}") ."/?w=" . $item->width . "xewx&h=" . $item->height . "xehx\" rel=\"fancygroup\" class=\"fancyclass iframe\" title=\"" . $item->parent()->title .", " . $item->parent()->description ."\" name=\"" . $fancymodule . " \">";
$link .= "<a href=\"" . url::site("photo_3nids/show/{$item->id}") ."/?w=" . $item->width . "xewx&h=" . $item->height . "xehx\" " . $rel . " class=\"fancyclass iframe\" title=\"" . $item->parent()->title .", " . $item->parent()->description ."\" name=\"" . $fancymodule . " \">";
}else{
$link .= "<a href=\"" . url::site("movie_3nids/show/{$item->id}") . "/?w=" . strval(20+($item->width)) . "xewx&h=" . strval(50+($item->height)) . "xehx\" rel=\"fancygroup\" class=\"fancyclass iframe\" title=\"" . $item->parent()->title .", " . $item->parent()->description ."\" name=\"" . $fancymodule . " \">";
$link .= "<a href=\"" . url::site("movie_3nids/show/{$item->id}") . "/?w=" . strval(20+($item->width)) . "xewx&h=" . strval(50+($item->height)) . "xehx\" " . $rel . " class=\"fancyclass iframe\" title=\"" . $item->parent()->title .", " . $item->parent()->description ."\" name=\"" . $fancymodule . " \">";
}
} elseif( $item->is_album() && $viewtype != "header"){
$link .= "<a href=\"" . $item->url() . "\">";
@ -50,13 +51,13 @@ class theme_3nids_Core {
if($viewtype != "header"){
$link .= $item->thumb_img(array("class" => "g-thumbnail")) . "</a>";
if( $item->is_album() && $viewtype == "album" ){
$link .= "<a href=\"" . $item->url() . "?show=" . $item->id . "\"><h2><span></span>" . html::clean($item->title) . "</h2></a>";
$link .= "<a href=\"" . $item->url() . "?show=" . $item->id . "\"><$parentTitleClass><span></span>" . html::clean($item->title) . "</$parentTitleClass></a>";
} elseif ( !($item->is_album()) && $viewtype == "dynamic") {
$link .= "<a href=\"" . $item->parent()->url() . "?show=" . $item->id . "\"><h2><span></span>" . html::clean($item->parent()->title) . "</h2></a>";
$link .= "<a href=\"" . $item->parent()->url() . "?show=" . $item->id . "\" class=\"g-parent-album\"><$parentTitleClass><span></span>" . html::clean($item->parent()->title) . "</$parentTitleClass></a>";
}
if (($item->is_photo() || $item->is_movie()) && module::is_active("comment") && module::is_active("theme_3nids")) {
$link .= "<ul class=\"g-metadata\"><li><a href=\"" . url::site("comments_3nids?item_id={$item->id}") ."\" class=\"iframe fancyclass\">" . comment_3nids::count($item) . t("comments") . "</a></li></ul>";
if (($item->is_photo() || $item->is_movie()) && $displayComment==true && module::is_active("comment") && module::is_active("theme_3nids")) {
$link .= "<ul class=\"g-metadata\"><li><a href=\"" . url::site("comments_3nids?item_id={$item->id}") ."\" class=\"iframe fancyclass\">" . comment_3nids::count($item) . " " . t("comments") . "</a></li></ul>";
}
}else{
$link .= "</a>";