1
0

Admin config for item title

This commit is contained in:
3nids 2009-11-10 08:39:03 +01:00
parent 2fc2fe5521
commit b512961504
3 changed files with 14 additions and 2 deletions

View File

@ -1 +1 @@
Update to last github version
Admin config for item title

View File

@ -39,6 +39,9 @@ class Admin_theme_3nids_Controller extends Admin_Controller {
array("id" => "gTagsMapAdminForm"));
// Input box for the Maps API Key
$form->input("title")
->label(t("item title : parent or item."))
->value(module::get_var("theme_3nids", "title"));
$form->input("description")
->label(t("item description : tags or item or parent or nothing. If item description chosen and not available, then parent description is used."))
->value(module::get_var("theme_3nids", "description"));
@ -61,10 +64,12 @@ class Admin_theme_3nids_Controller extends Admin_Controller {
// Figure out the values of the text boxes
$description = Input::instance()->post("description");
$title = Input::instance()->post("title");
$photo_size = Input::instance()->post("photo_size");
// Save Settings.
module::set_var("theme_3nids", "description", $description);
module::set_var("theme_3nids", "title", $title);
module::set_var("theme_3nids", "photo_size", $photo_size);
// Display a success message and redirect back to the TagsMap admin page.

View File

@ -50,6 +50,13 @@ class theme_3nids_Core {
$description = " || " . str_replace("\"",""",$item->parent()->description);
}
$titleMode = module::get_var("theme_3nids", "title");
if ($titleMode == "parent"){
$title = html::clean($item->parent()->title);
}else{
$title = html::clean($item->title);
}
$rel = "";
if ($groupImg == true) {$rel = " rel=\"fancygroup\" ";}
@ -60,7 +67,7 @@ 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=" . $width . "xewx&h=" . $height . "xehx\" " . $rel . " class=\"fancyclass iframe\" title=\"" . $item->parent()->title . $description ."\" name=\"" . $fancymodule . " \">";
$link .= "<a href=\"" . url::site("photo_3nids/show/{$item->id}") ."/?w=" . $width . "xewx&h=" . $height . "xehx\" " . $rel . " class=\"fancyclass iframe\" title=\"" . $title . $description ."\" name=\"" . $fancymodule . " \">";
}else{
$link .= "<a href=\"" . url::site("movie_3nids/show/{$item->id}") . "/?w=" . strval(20+($width)) . "xewx&h=" . strval(50+($height)) . "xehx\" " . $rel . " class=\"fancyclass iframe\" title=\"" . $item->parent()->title . $description ."\" name=\"" . $fancymodule . " \">";
}