|
@@ -54,9 +54,30 @@ $template = new plantillas($conf->template);
|
54
|
54
|
$gelato_includes .= "\t<link rel=\"stylesheet\" type=\"text/css\" href=\"".$conf->urlGelato."/admin/css/lightbox.css\" />\n";
|
55
|
55
|
$gelato_includes .= "\t<script language=\"javascript\" type=\"text/javascript\" src=\"".$conf->urlGelato."/admin/scripts/jquery.js\"></script>\n";
|
56
|
56
|
$gelato_includes .= "\t<script language=\"javascript\" type=\"text/javascript\" src=\"".$conf->urlGelato."/admin/scripts/lightbox.js\"></script>";
|
57
|
|
-
|
58
|
|
- $input = array("{Gelato_includes}","{Title}", "{Description}", "{URL_Tumble}", "{Template_name}");
|
59
|
|
- $output = array($gelato_includes, $conf->title, $conf->description, $conf->urlGelato, $conf->template);
|
|
57
|
+
|
|
58
|
+ $page_title = $conf->title;
|
|
59
|
+ $page_title_divisor = " » "; // it should be set in configuration
|
|
60
|
+ $page_title_len = 50; // it should be set in configuration
|
|
61
|
+ if ($id_post) {
|
|
62
|
+ $register = $tumble->getPost($id_post);
|
|
63
|
+ $textile = new Textile();
|
|
64
|
+ if (empty($register["title"])) {
|
|
65
|
+ if (!empty($register["description"])) {
|
|
66
|
+ if (strlen($register["description"]) > $page_title_len) {
|
|
67
|
+ $page_title_data = substr($register["description"], 0, $page_title_len)."...";
|
|
68
|
+ }
|
|
69
|
+ }
|
|
70
|
+ } else {
|
|
71
|
+ $page_title_data = $register["title"];
|
|
72
|
+ }
|
|
73
|
+ $page_title_data = strip_tags($textile->TextileThis($page_title_data));
|
|
74
|
+ if (!empty($page_title_data)) {
|
|
75
|
+ $page_title .= $page_title_divisor.stripslashes($page_title_data);
|
|
76
|
+ }
|
|
77
|
+ }
|
|
78
|
+
|
|
79
|
+ $input = array("{Gelato_includes}","{Title}", "{Page_Title}", "{Description}", "{URL_Tumble}", "{Template_name}");
|
|
80
|
+ $output = array($gelato_includes, $conf->title, $page_title, $conf->description, $conf->urlGelato, $conf->template);
|
60
|
81
|
|
61
|
82
|
$template->cargarPlantilla($input, $output, "template_header");
|
62
|
83
|
$template->mostrarPlantilla();
|