Browse Source

* Added themes class from Flavor (Converted to PHP4).

Victor De la Rocha 16 years ago
parent
commit
d4f4e72049

+ 27 - 22
classes/pagination.class.php View File

@@ -13,7 +13,7 @@ Author URI: http://www.mis-algoritmos.com
13 13
 		/*Default values*/
14 14
 		var $total_pages = null;
15 15
 		var $limit = null;
16
-		var $target = ""; 
16
+		var $target = "";
17 17
 		var $page = 1;
18 18
 		var $adjacents = 2;
19 19
 		var $showCounter = false;
@@ -29,22 +29,22 @@ Author URI: http://www.mis-algoritmos.com
29 29
 
30 30
 		/*****/
31 31
 		var $calculate = false;
32
-		
32
+
33 33
 		#Total items
34 34
 		function items($value){$this->total_pages = intval($value);}
35
-		
35
+
36 36
 		#how many items to show per page
37 37
 		function limit($value){$this->limit = intval($value);}
38
-		
38
+
39 39
 		#Page to sent the page value
40 40
 		function target($value){$this->target = $value;}
41
-		
41
+
42 42
 		#Current page
43 43
 		function currentPage($value){$this->page = intval($value);}
44
-		
44
+
45 45
 		#How many adjacent pages should be shown on each side of the current page?
46 46
 		function adjacents($value){$this->adjacents = intval($value);}
47
-		
47
+
48 48
 		#show counter?
49 49
 		function showCounter($value=""){$this->showCounter=($value===true)?true:false;}
50 50
 
@@ -67,7 +67,7 @@ Author URI: http://www.mis-algoritmos.com
67 67
 					}
68 68
 				$this->urlF=$value;
69 69
 			}
70
-		
70
+
71 71
 		var $pagination;
72 72
 
73 73
 		function pagination(){}
@@ -76,18 +76,23 @@ Author URI: http://www.mis-algoritmos.com
76 76
 					if($this->calculate())
77 77
 						echo "<div class=\"$this->className\">$this->pagination</div>";
78 78
 			}
79
+		function getPagination(){
80
+				if(!$this->calculate)
81
+					if($this->calculate())
82
+						return "<div class=\"$this->className\">$this->pagination</div>";
83
+			}
79 84
 		function get_pagenum_link($id){
80 85
 				//if(strpos($this->target,'?')===false)
81 86
 						if($this->urlF)
82 87
 								return str_replace($this->urlF,$id,$this->target);
83
-								
88
+
84 89
 							else
85 90
 								return "$this->target?$this->parameterName=$id";
86
-					//else 
91
+					//else
87 92
 						//return "$this->target&$this->parameterName=$id";
88
-						
93
+
89 94
 			}
90
-		
95
+
91 96
 		function calculate(){
92 97
 				$this->pagination = "";
93 98
 				$this->calculate == true;
@@ -97,7 +102,7 @@ Author URI: http://www.mis-algoritmos.com
97 102
 						echo "Especificaste un wildcard para sustituir, pero no existe en el target<br />";
98 103
 						$error = true;
99 104
 					}elseif($this->urlF and $this->urlF == '%' and strpos($this->target,$this->urlF)===false){
100
-						echo "Es necesario especificar en el target el comodin % para sustituir el número de página<br />";
105
+						echo "Es necesario especificar en el target el comodin % para sustituir el n�mero de p�gina<br />";
101 106
 						$error = true;
102 107
 					}
103 108
 				if($this->total_pages == null){
@@ -109,35 +114,35 @@ Author URI: http://www.mis-algoritmos.com
109 114
 						$error = true;
110 115
 					}
111 116
 				if($error)return false;
112
-				
117
+
113 118
 				$n = trim($this->nextT.' '.$this->nextI);
114 119
 				$p = trim($this->prevI.' '.$this->prevT);
115
-				
120
+
116 121
 				/* Setup vars for query. */
117
-				if($this->page) 
122
+				if($this->page)
118 123
 					$start = ($this->page - 1) * $this->limit;             //first item to display on this page
119 124
 				else
120 125
 					$start = 0;                                //if no page var is given, set start to 0
121
-			
126
+
122 127
 				/* Setup page vars for display. */
123 128
 				if ($this->page == 0) $this->page = 1;                    //if no page var is given, default to 1.
124 129
 				$prev = $this->page - 1;                            //previous page is page - 1
125 130
 				$next = $this->page + 1;                            //next page is page + 1
126 131
 				$lastpage = ceil($this->total_pages/$this->limit);        //lastpage is = total pages / items per page, rounded up.
127 132
 				$lpm1 = $lastpage - 1;                        //last page minus 1
128
-				
129
-				/* 
130
-					Now we apply our rules and draw the pagination object. 
133
+
134
+				/*
135
+					Now we apply our rules and draw the pagination object.
131 136
 					We're actually saving the code to a variable in case we want to draw it more than once.
132 137
 				*/
133
-				
138
+
134 139
 				if($lastpage > 1){
135 140
 						//anterior button
136 141
 						if($this->page > 1)
137 142
 								$this->pagination .= "<a href=\"".$this->get_pagenum_link($prev)."\">$p</a>";
138 143
 							else
139 144
 								$this->pagination .= "<span class=\"disabled\">$p</span>";
140
-						//pages	
145
+						//pages
141 146
 						if ($lastpage < 7 + ($this->adjacents * 2)){//not enough pages to bother breaking it up
142 147
 								for ($counter = 1; $counter <= $lastpage; $counter++){
143 148
 										if ($counter == $this->page)

+ 114 - 0
classes/themes.class.php View File

@@ -0,0 +1,114 @@
1
+<?php
2
+/*
3
+	Class name: Themes
4
+	Class autor: Victor De la Rocha http//mis-algoritmos.com/themes-class
5
+	Email: vyk2rr [at] gmail [dot] com
6
+*/
7
+class themes{
8
+	var $registry;
9
+	var $path;
10
+	var $l10n;
11
+
12
+	var $output;
13
+	var $vars=array(); //variable para apilar las variables que se asignan a la plantilla
14
+
15
+	function themes(){
16
+		#$this->l10n = l10n::getInstance();
17
+	}
18
+
19
+	function set($name, $value){
20
+		$this->vars[$name] = $value;
21
+		return true;
22
+	}
23
+
24
+	function remove($name) {
25
+		unset($this->vars[$name]);
26
+		return true;
27
+	}
28
+
29
+	//obtiene el contenido del tema ya con todos los valores sutituidos en las variables.
30
+	function fetch($file){
31
+		$this->exec($file);
32
+		return $this->output;
33
+	}
34
+
35
+	//muestra el contenido del tema ya con todos los valroes sustituidos en las variables.
36
+	function display($file){
37
+		$this->exec($file);
38
+		echo $this->output;
39
+	}
40
+
41
+	//corre el proceso de sustitucion de valores en las variables del theme y retorna todo en la variable $this->output para ser devuelto por: fetch o display
42
+	function exec($file){
43
+		$this->file = $file;
44
+		$output = file_get_contents($file);
45
+		$this->output = $output;
46
+		$this->registrar_vars();
47
+		$this->__();
48
+		$this->eval_control_structures();
49
+
50
+		//evaluate All as PHP code
51
+		ob_start();eval($this->output);
52
+		$this->output = ob_get_clean();
53
+	}
54
+
55
+	function eval_control_structures(){
56
+		//finding IFs sentences and converting to php code
57
+		$this->output = "echo \"".addslashes($this->output)."\";";
58
+		$this->output = preg_replace_callback("/{if ([^}]+)}/",create_function('$arr','return "\";if(".stripslashes($arr[1])."){echo\"";'),$this->output);
59
+		$this->output = preg_replace("/{else}/","\";}else{echo\"",$this->output);
60
+		$this->output = preg_replace_callback("/{elseif ([^}]+)}/",create_function('$arr','return "\";}elseif(".stripslashes($arr[1])."){echo\"";'),$this->output);
61
+		$this->output = preg_replace("/{\/if}/","\";} echo \"",$this->output);
62
+
63
+		//finding FOREACHs or BLOCKs sentences and converting to php code
64
+		$this->output = preg_replace_callback("/{block ([^}]+) as ([^}]+)=>[\$]([^}]+)}/",create_function('$arr','return "\";foreach(".stripslashes($arr[1])." as ".stripslashes($arr[2])."=>\$this->vars[\'".stripslashes($arr[3])."\']){echo\"";'),$this->output);
65
+		$this->output = preg_replace_callback("/{block ([^}]+) as ([^}]+)}/",create_function('$arr','return "\";foreach(".stripslashes($arr[1])." as ".stripslashes($arr[2])."){echo\"";'),$this->output);
66
+		$this->output = preg_replace("/{\/block}/","\";} echo \"",$this->output);
67
+
68
+		//Converting the $this->vars[\'variable\'] format to {$this->vars['variable']}
69
+		$this->output = preg_replace("/[\$]this->vars\[\\\'([^ \.\\\]+)\\\'\]\[\\\'([^ \.\\\]+)\\\'\]/","{\$this->vars['$1']['$2']}",$this->output);
70
+		$this->output = preg_replace("/[\$]this->vars\[\\\'([^ \.\\\]+)\\\'\]/","{\$this->vars['$1']}",$this->output);
71
+
72
+		//Converting the {__(\'word\')} format to {__('word')}
73
+		#$this->output = preg_replace("/[\$]this->vars\[\\\'([^ \.\\\]+)\\\'\]/","{\$this->vars['$1']}",$this->output);
74
+	}
75
+
76
+	//sustituye las variables en el output del template
77
+	function registrar_vars(){
78
+		foreach($this->vars as $k=>$v){
79
+			//pre($this->vars);
80
+			if(is_array($v)){
81
+				//Si es un arreglo, se intenta procesar un nivel mas adentro para sustituir en el theme por lo que tenga: nombredearreglo.dato
82
+				foreach($v as $_k=>$_v)
83
+					if(!is_array($_v))
84
+						$this->output = str_replace('{'.$k.'.'.$_k.'}',$_v,$this->output);
85
+			}else{
86
+				// sustituimos directamente las variables {$variable}
87
+				$this->output = str_replace('{'.$k.'}',$v,$this->output);
88
+			}
89
+		}
90
+
91
+		//replacing {$key} format by $this->vars['key']
92
+		//replacing  {$array.key} format by $this->vars['array']['key']
93
+		$patrones = array(
94
+			'/{\$([^ \.}]+)}/s',
95
+			'/{\$([^ \.}]+)\.([^ \.}]+)}/s'
96
+		);
97
+		$reemplazos = array(
98
+			"\$this->vars['$1']",
99
+			"\$this->vars['$1']['$2']"
100
+		);
101
+		$this->output = preg_replace($patrones, $reemplazos, $this->output);
102
+	}
103
+
104
+	//Utiliza gettext
105
+	function __(){
106
+		$patron = "/{__\((?:'|\")([^\)]+?)(?:'|\")\)}/s";
107
+		preg_match_all($patron,$this->output,$out);
108
+
109
+		foreach($out[1] as $k=>$v){
110
+				$this->output = str_replace("{__('$v')}",$this->l10n->__($v),$this->output);
111
+			}
112
+	}
113
+}
114
+?>

+ 9 - 8
entry.php View File

@@ -55,14 +55,15 @@ if($installed) {
55 55
 	require_once($configFile);
56 56
 }
57 57
 
58
-require_once("classes/configuration.class.php");
59
-require_once("classes/textile.class.php");
60
-require_once("classes/gelato.class.php");
61
-require_once("classes/templates.class.php");
62
-require_once("classes/pagination.class.php");
63
-require_once("classes/user.class.php");
64
-require_once("classes/comments.class.php");
65
-require_once("classes/feeds.class.php");
58
+require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'configuration.class.php');
59
+require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'textile.class.php');
60
+require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'gelato.class.php');
61
+require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'templates.class.php');
62
+require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'themes.class.php');
63
+require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'pagination.class.php');
64
+require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'user.class.php');
65
+require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'comments.class.php');
66
+require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'feeds.class.php');
66 67
 require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'mysql_connection.class.php');
67 68
 require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'streams.class.php');
68 69
 require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'gettext.class.php');

+ 145 - 162
index.php View File

@@ -17,10 +17,9 @@ if(!defined('entry'))define('entry', true);
17 17
 require_once('entry.php');
18 18
 global $user, $tumble, $conf;
19 19
 
20
-$template = new plantillas($conf->template);
20
+$theme = new themes;
21 21
         // My approach to MVC
22 22
 
23
-
24 23
         if(isset($_SERVER['PATH_INFO'])) $param_url = explode("/",$_SERVER['PATH_INFO']);
25 24
 
26 25
         if (isset($_GET["post"])) {
@@ -34,8 +33,10 @@ $template = new plantillas($conf->template);
34 33
                 } else {
35 34
                         $id_post = NULL;
36 35
                 }
37
-        }		
38
-        
36
+        }
37
+
38
+        $theme->set('id_post',$id_post);
39
+
39 40
         if (isset($_GET["page"])) {
40 41
                 $page_num = $_GET["page"];
41 42
         } else {
@@ -45,16 +46,16 @@ $template = new plantillas($conf->template);
45 46
                         $page_num = NULL;
46 47
                 }
47 48
         }
48
-        
49
+
49 50
         $gelato_includes = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>\n";
50 51
         $gelato_includes .= "\t<meta name=\"generator\" content=\"gelato  ".codeName()." (".version().")\" />\n";
51 52
         $gelato_includes .= "\t<link rel=\"shortcut icon\" href=\"".$conf->urlGelato."/images/favicon.ico\" />\n";
52 53
         $gelato_includes .= "\t<link rel=\"alternate\" type=\"application/rss+xml\" title=\"RSS\" href=\"".$conf->urlGelato.($conf->urlFriendly?"/rss/":"/rss.php")."\"/>\n";
53 54
         $gelato_includes .= "\t<link rel=\"stylesheet\" type=\"text/css\" href=\"".$conf->urlGelato."/themes/".$conf->template."/style.css\"/>\n";
54
-        $gelato_includes .= "\t<link rel=\"stylesheet\" type=\"text/css\" href=\"".$conf->urlGelato."/admin/css/lightbox.css\" />\n";    
55
+        $gelato_includes .= "\t<link rel=\"stylesheet\" type=\"text/css\" href=\"".$conf->urlGelato."/admin/css/lightbox.css\" />\n";
55 56
         $gelato_includes .= "\t<script language=\"javascript\" type=\"text/javascript\" src=\"".$conf->urlGelato."/admin/scripts/jquery.js\"></script>\n";
56 57
         $gelato_includes .= "\t<script language=\"javascript\" type=\"text/javascript\" src=\"".$conf->urlGelato."/admin/scripts/lightbox.js\"></script>";
57
-		
58
+
58 59
 		$page_title = $conf->title;
59 60
 		$page_title_divisor = " &raquo; "; // it should be set in configuration
60 61
 		$page_title_len = 50; // it should be set in configuration
@@ -71,236 +72,212 @@ $template = new plantillas($conf->template);
71 72
 				$page_title_data = $register["title"];
72 73
 			}
73 74
 			$page_title_data = strip_tags($textile->TextileThis($page_title_data));
74
-			if (!empty($page_title_data)) {				
75
+			if (!empty($page_title_data)) {
75 76
 				$page_title .= $page_title_divisor.stripslashes($page_title_data);
76 77
 			}
77 78
 		}
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);
81
-        
82
-        $template->cargarPlantilla($input, $output, "template_header");
83
-        $template->mostrarPlantilla();
84
-        
85
-        if ($user->isAuthenticated()) { 
86
-                $input = array("{User}", "{URL_Tumble}");
87
-                $output = array($_SESSION["user_login"], $conf->urlGelato);
88
-                
89
-                $template->cargarPlantilla($input, $output, "template_isadmin");
90
-                $template->mostrarPlantilla();
79
+
80
+		$theme->set('Gelato_includes',$gelato_includes);
81
+		$theme->set('Title',$conf->title);
82
+		$theme->set('Page_Title',$page_title);
83
+		$theme->set('Description',$conf->description);
84
+		$theme->set('URL_Tumble',$conf->urlGelato);
85
+		$theme->set('Template_name',$conf->template);
86
+
87
+		$theme->set('isAuthenticated',$user->isAuthenticated());
88
+        if($user->isAuthenticated()){
89
+			$theme->set('User',$_SESSION["user_login"]);
90
+			$theme->set('URL_Tumble',$conf->urlGelato);
91 91
         }
92
-        
93
-        if (!$id_post) {
94 92
 
93
+		$rows = array();
94
+        if(!$id_post){
95 95
                 $limit=$conf->postLimit;
96
-        
96
+
97 97
                 if(isset($page_num) && is_numeric($page_num) && $page_num>0) { // Is defined the page and is numeric?
98 98
                         $from = (($page_num-1) * $limit);
99 99
                 } else {
100 100
                         $from = 0;
101 101
                 }
102
-        
102
+
103 103
                 $rs = $tumble->getPosts($limit, $from);
104 104
 
105 105
                 if ($tumble->contarRegistros()>0) {
106
-                        $dateTmp = null;          
107
-                        while($register = mysql_fetch_array($rs)) {
106
+                        $dateTmp = null;
107
+                        while($register = mysql_fetch_assoc($rs)) {
108 108
 								$formatedDate = gmdate("M d", strtotime($register["date"])+transform_offset($conf->offsetTime));
109 109
                                 if ( $dateTmp != null && $formatedDate == $dateTmp ) { $formatedDate = ""; } else { $dateTmp = $formatedDate; }
110 110
 								$strEnd=($conf->urlFriendly) ? "/" : "";
111 111
 								$permalink = $conf->urlGelato.($conf->urlFriendly?"/post/":"/index.php?post=").$register["id_post"].$strEnd;
112
-                                
112
+
113 113
 								$conversation = $register["description"];
114
-								
114
+
115 115
 								$register["description"] = $register["description"];
116 116
 
117 117
                                 $register["title"] = stripslashes($register["title"]);
118
-                                $register["description"] = stripslashes($register["description"]);								
119
-								
120
-                                switch ($tumble->getType($register["id_post"])) {
118
+                                $register["description"] = stripslashes($register["description"]);
119
+
120
+								$postType = $tumble->getType($register["id_post"]);
121
+
122
+								$row['Date_Added'] = $formatedDate;
123
+								$row['Permalink'] = $permalink;
124
+								$theme->set('postType',$postType);
125
+
126
+                                switch ($postType){
121 127
                                         case "1":
122
-                                                $input = array("{Date_Added}", "{Permalink}", "{Title}", "{Body}", "{URL_Tumble}");
123
-                                                $output = array($formatedDate, $permalink, $register["title"], $register["description"], $conf->urlGelato, );
124
-                                                                                        
125
-                                                $template->cargarPlantilla($input, $output, "template_regular_post");
126
-                                                $template->mostrarPlantilla();
128
+                                        		$row['Title'] = $register["title"];
129
+                                        		$row['Body'] = $register["description"];
127 130
                                                 break;
128
-                                        case "2":                                               
131
+                                        case "2":
129 132
                                                 $fileName = "uploads/".getFileName($register["url"]);
130
-                                                
131
-                                                $x = @getimagesize($fileName);                                          
132
-                                                if ($x[0] > 500) {                                                      
133
+
134
+                                                $x = @getimagesize($fileName);
135
+                                                if ($x[0] > 500) {
133 136
 													$photoPath = $conf->urlGelato."/classes/imgsize.php?w=500&img=".$register["url"];
134
-                                                } else {													
137
+                                                } else {
135 138
 													$photoPath = str_replace("../", $conf->urlGelato."/", $register["url"]);
136 139
                                                 }
137 140
 
138 141
 												$effect = " href=\"".str_replace("../", $conf->urlGelato."/", $register["url"])."\" rel=\"lightbox\"";
139
-                                                
140
-                                                $input = array("{Date_Added}", "{Permalink}", "{PhotoURL}", "{PhotoAlt}", "{Caption}", "{Effect}", "{URL_Tumble}");
141
-                                                $output = array($formatedDate, $permalink, $photoPath, strip_tags($register["description"]), $register["description"], $effect, $conf->urlGelato);
142
-                                                
143
-                                                $template->cargarPlantilla($input, $output, "template_photo");
144
-                                                $template->mostrarPlantilla();                                                     
142
+
143
+												$row['PhotoURL'] = $photoPath;
144
+												$row['PhotoAlt'] = strip_tags($register["description"]);
145
+												$row['Caption'] = $register["description"];
146
+												$row['Effect'] = $effect;
145 147
                                                 break;
146 148
                                         case "3":
147
-                                                $input = array("{Date_Added}", "{Permalink}", "{Quote}", "{Source}", "{URL_Tumble}");
148
-                                                $output = array($formatedDate, $permalink, $register["description"], $register["title"], $conf->urlGelato);
149
-                                                
150
-                                                $template->cargarPlantilla($input, $output, "template_quote");
151
-                                                $template->mostrarPlantilla();
149
+                                        		$row['Quote'] = $register["description"];
150
+                                        		$row['Source'] = $register["title"];
152 151
                                                 break;
153 152
                                         case "4":
154 153
                                                 if($conf->shorten_links){
155 154
 													$register["url"] = _file_get_contents("http://api.abbrr.com/api.php?out=link&url=".$register["url"]);
156 155
 												}
157 156
 												$register["title"] = ($register["title"]=="")? $register["url"] : $register["title"];
158
-												$input = array("{Date_Added}", "{Permalink}", "{URL}", "{Name}", "{Description}", "{URL_Tumble}");
159
-                                                $output = array($formatedDate, $permalink, $register["url"], $register["title"], $register["description"], $conf->urlGelato);
160
-                                                
161
-                                                $template->cargarPlantilla($input, $output, "template_url");
162
-                                                $template->mostrarPlantilla();
157
+
158
+												$row['URL'] = $register["url"];
159
+												$row['Name'] = $register["title"];
160
+												$row['Description'] = $register["description"];
163 161
                                                 break;
164 162
                                         case "5":
165
-                                                $input = array("{Date_Added}", "{Permalink}", "{Title}", "{Conversation}", "{URL_Tumble}");
166
-												$output = array($formatedDate, $permalink, $register["title"], $tumble->formatConversation($conversation), $conf->urlGelato);
167
-                                                
168
-                                                $template->cargarPlantilla($input, $output, "template_conversation");
169
-                                                $template->mostrarPlantilla();
163
+                                        		$row['Title'] = $register["title"];
164
+                                        		$row['Conversation'] = $tumble->formatConversation($conversation);
170 165
                                                 break;
171 166
                                         case "6":
172
-                                                $input = array("{Date_Added}", "{Permalink}", "{Video}", "{Caption}", "{URL_Tumble}");
173
-                                                $output = array($formatedDate, $permalink, $tumble->getVideoPlayer($register["url"]), $register["description"], $conf->urlGelato);
174
-                                                
175
-                                                $template->cargarPlantilla($input, $output, "template_video");
176
-                                                $template->mostrarPlantilla();
167
+                                        		$row['Video'] = $tumble->getVideoPlayer($register["url"]);
168
+                                        		$row['Caption'] = $register["description"];
177 169
                                                 break;
178 170
                                         case "7":
179
-                                                $input = array("{Date_Added}", "{Permalink}", "{Mp3}", "{Caption}", "{URL_Tumble}");
180
-                                                $output = array($formatedDate, $permalink, $tumble->getMp3Player($register["url"]), $register["description"], $conf->urlGelato);
181
-                                                
182
-                                                $template->cargarPlantilla($input, $output, "template_mp3");
183
-                                                $template->mostrarPlantilla();
171
+                                        		$row['Mp3'] = $tumble->getMp3Player($register["url"]);
172
+                                        		$row['Caption'] = $register["description"];
184 173
                                                 break;
185 174
                                 }
186
-								
187
-								
175
+
188 176
 								$comment = new comments();
189 177
 								$noComments = $comment->countComments($register["id_post"]);
190
-								
178
+
191 179
 								$user = new user();
192 180
 								$username = $user->getUserByID($register["id_user"]);
193
-								
194
-								
195
-								$input = array("{Permalink}", "{User}", "{Comments_Number}");
196
-								$output = array($permalink, $username["name"], $noComments);
197
-																		
198
-								$template->cargarPlantilla($input, $output, "template_details");
199
-								$template->mostrarPlantilla();
181
+
182
+								$row['User'] = $username["name"];
183
+								$row['Comments_Number'] = $noComments;
184
+
185
+								$rows[] = $row;
200 186
                         }
201 187
 
188
+						$theme->set('rows',$rows);
189
+
202 190
                         $p = new pagination;
203 191
                         $p->Items($tumble->getPostsNumber());
204 192
                         $p->limit($limit);
205
-                        
206 193
 						if($conf->urlFriendly){
207 194
 								$p->urlFriendly('[...]');
208 195
 								$p->target($conf->urlGelato."/page/[...]");
209 196
 							}else
210 197
 								$p->target($conf->urlGelato);
211
-                        
212
-                        $p->currentPage(isset($page_num) ? $page_num : 1);
213
-                        $p->show();
214 198
 
199
+                        $p->currentPage(isset($page_num) ? $page_num : 1);
215 200
 
201
+                        $theme->set('pagination',$p->getPagination());
216 202
                 } else {
217 203
                         $template->renderizaEtiqueta("No posts in this tumblelog.", "div","error");
218 204
                 }
219 205
         } else {
220 206
                 $register = $tumble->getPost($id_post);
221
-                
207
+
222 208
 				$formatedDate = gmdate("M d", strtotime($register["date"])+transform_offset($conf->offsetTime));
223 209
 				$strEnd=($conf->urlFriendly) ? "/" : "";
224 210
 				$permalink = $conf->urlGelato.($conf->urlFriendly?"/post/":"/index.php?post=").$register["id_post"].$strEnd;
225
-                
211
+
226 212
 				$conversation = $register["description"];
227
-				
213
+
228 214
 				$register["description"] = $register["description"];
229
-				
215
+
230 216
 				$register["title"] = stripslashes($register["title"]);
231 217
                 $register["description"] = stripslashes($register["description"]);
232
-                
233
-                switch ($tumble->getType($register["id_post"])) {
218
+
219
+				$row['Date_Added'] = $formatedDate;
220
+				$row['Permalink'] = $permalink;
221
+				$postType = $tumble->getType($register["id_post"]);
222
+				$theme->set('postType',$postType);
223
+                switch ($postType) {
234 224
                         case "1":
235
-                                $input = array("{Date_Added}", "{Permalink}", "{Title}", "{Body}", "{URL_Tumble}");
236
-                                $output = array($formatedDate, $permalink, $register["title"], $register["description"], $conf->urlGelato);
237
-                                                                        
238
-                                $template->cargarPlantilla($input, $output, "template_regular_post");
239
-                                $template->mostrarPlantilla();
225
+								$row['Title'] = $register["title"];
226
+								$row['Body'] = $register["description"];
240 227
                                 break;
241 228
                         case "2":
242 229
                                 $fileName = "uploads/".getFileName($register["url"]);
243
-                                                
244
-                                $x = @getimagesize($fileName);                                          
245
-                                if ($x[0] > 500) {                                      
230
+
231
+                                $x = @getimagesize($fileName);
232
+                                if ($x[0] > 500) {
246 233
                                         $photoPath = $conf->urlGelato."/classes/imgsize.php?w=500&img=".$register["url"];
247 234
                                 } else {
248 235
 										$photoPath = str_replace("../", $conf->urlGelato."/", $register["url"]);
249 236
                                 }
250 237
 
251 238
 								$effect = " href=\"".str_replace("../", $conf->urlGelato."/", $register["url"])."\" rel=\"lightbox\"";
252
-                                $input = array("{Date_Added}", "{Permalink}", "{PhotoURL}", "{PhotoAlt}", "{Caption}", "{Effect}", "{URL_Tumble}");
253
-                                $output = array($formatedDate, $permalink, $photoPath, strip_tags($register["description"]), $register["description"], $effect, $conf->urlGelato);
254
-                                
255
-                                $template->cargarPlantilla($input, $output, "template_photo");
256
-                                $template->mostrarPlantilla();                                                     
239
+
240
+								$row['PhotoURL'] = $photoPath;
241
+								$row['PhotoAlt'] = strip_tags($register["description"]);
242
+								$row['Caption'] = $register["description"];
243
+								$row['Effect'] = $effect;
257 244
                                 break;
258 245
                         case "3":
259
-                                $input = array("{Date_Added}", "{Permalink}", "{Quote}", "{Source}", "{URL_Tumble}");
260
-                                $output = array($formatedDate, $permalink, $register["description"], $register["title"], $conf->urlGelato);
261
-                                
262
-                                $template->cargarPlantilla($input, $output, "template_quote");
263
-                                $template->mostrarPlantilla();
246
+								$row['Quote'] = $register["description"];
247
+                                $row['Source'] = $register["title"];
264 248
                                 break;
265 249
                         case "4":
266 250
                                 if($conf->shorten_links){
267 251
 									$register["url"] = _file_get_contents("http://api.abbrr.com/api.php?out=link&url=".$register["url"]);
268 252
 								}
269
-								$register["title"] = ($register["title"]=="")? $register["url"] : $register["title"];
270
-								$input = array("{Date_Added}", "{Permalink}", "{URL}", "{Name}", "{Description}", "{URL_Tumble}");
271
-                                $output = array($formatedDate, $permalink, $register["url"], $register["title"], $register["description"], $conf->urlGelato);
272
-                                
273
-                                $template->cargarPlantilla($input, $output, "template_url");
274
-                                $template->mostrarPlantilla();
253
+								$row['URL'] = $register["url"];
254
+								$row['Name'] = $register["title"];
255
+								$row['Description'] = $register["description"];
275 256
                                 break;
276 257
                         case "5":
277
-                                $input = array("{Date_Added}", "{Permalink}", "{Title}", "{Conversation}", "{URL_Tumble}");
278
-                                $output = array($formatedDate, $permalink, $register["title"], $tumble->formatConversation($conversation), $conf->urlGelato);
279
-                                
280
-                                $template->cargarPlantilla($input, $output, "template_conversation");
281
-                                $template->mostrarPlantilla();
282
-                                break;
283
-                        case "6":
284
-                                $input = array("{Date_Added}", "{Permalink}", "{Video}", "{Caption}", "{URL_Tumble}");
285
-                                $output = array($formatedDate, $permalink, $tumble->getVideoPlayer($register["url"]), $register["description"], $conf->urlGelato);
286
-                                
287
-                                $template->cargarPlantilla($input, $output, "template_video");
288
-                                $template->mostrarPlantilla();
289
-                                break;
290
-                        case "7":
291
-                                $input = array("{Date_Added}", "{Permalink}", "{Mp3}", "{Caption}", "{URL_Tumble}");
292
-                                $output = array($formatedDate, $permalink, $tumble->getMp3Player($register["url"]), $register["description"], $conf->urlGelato);
293
-                                
294
-                                $template->cargarPlantilla($input, $output, "template_mp3");
295
-                                $template->mostrarPlantilla();
296
-                                break;
258
+								$row['Title'] = $register["title"];
259
+								$row['Conversation'] = $tumble->formatConversation($conversation);
260
+								break;
261
+						case "6":
262
+								$row['Video'] = $tumble->getVideoPlayer($register["url"]);
263
+								$row['Caption'] = $register["description"];
264
+								break;
265
+						case "7":
266
+								$row['Mp3'] = $tumble->getMp3Player($register["url"]);
267
+								$row['Caption'] = $register["description"];
268
+								break;
297 269
                 }
298
-				
270
+
299 271
 				if ($conf->allowComments) {
300
-					
272
+
301 273
 					$comment = new comments();
302 274
 					$rsComments = $comment->getComments($register["id_post"]);
303
-					
275
+
276
+					$user = new user();
277
+					$username = $user->getUserByID($register["id_user"]);
278
+
279
+					$row['User'] = $username["name"];
280
+
304 281
 					$textile = new Textile();
305 282
 					if (empty($register["title"])) {
306 283
 						if (!empty($register["description"])) {
@@ -312,31 +289,37 @@ $template = new plantillas($conf->template);
312 289
 						$postTitle = $register["title"];
313 290
 					}
314 291
 					$postTitle = strip_tags($textile->TextileThis($postTitle));
315
-					
316
-					$input = array("{Comments_Number}", "{Post_Title}");				
317
-					$output = array($comment->countComments($register["id_post"]), $postTitle);
318
-					$template->precargarPlantillaConBloque($input, $output, "template_comments", "comments");
319 292
 
293
+					$row['Post_Title'] = $postTitle;
294
+					$row['Comments_Number'] = $comment->countComments($register["id_post"]);
295
+
296
+					$rows[] = $row;
297
+					$theme->set('rows',$rows);
298
+
299
+					$comments = array();
320 300
 					while($rowComment = mysql_fetch_assoc($rsComments)) {
321 301
 						$commentAuthor = ($rowComment["web"]=="") ? $rowComment["username"] : "<a href=\"".$rowComment["web"]."\" rel=\"external\">".$rowComment["username"]."</a>";
322
-						$input = array("{Id_Comment}", "{Comment_Author}", "{Date}", "{Comment}");
323
-						$output = array($rowComment["id_comment"], $commentAuthor, gmdate("d.m.y", strtotime($rowComment["comment_date"])+transform_offset($conf->offsetTime)), $rowComment["content"]);
324
-						$template->cargarPlantillaConBloque($input, $output, "template_comments", "comments");
302
+
303
+						$answers['Id_Comment'] = $rowComment["id_comment"];
304
+						$answers['Comment_Author'] = $commentAuthor;
305
+						$answers['Date'] = gmdate("d.m.y", strtotime($rowComment["comment_date"])+transform_offset($conf->offsetTime));
306
+						$answers['Comment'] = $rowComment["content"];
307
+
308
+						$comments[] = $answers;
325 309
 					}
326
-					$template->mostrarPlantillaConBloque();
327
-										
328
-					$input = array("{User_Cookie}", "{Email_Cookie}", "{Web_Cookie}", "{Id_Post}", "{Form_Action}", "{Date_Added}");
329
-					$output = array(isset($_COOKIE['cookie_gel_user'])?$_COOKIE['cookie_gel_user']:'', isset($_COOKIE['cookie_gel_email'])?$_COOKIE['cookie_gel_email']:'', isset($_COOKIE['cookie_gel_web'])?$_COOKIE['cookie_gel_web']:'', $register["id_post"], $conf->urlGelato."/admin/comments.php", gmmktime());
330
-					
331
-					$template->cargarPlantilla($input, $output, "template_comment_post");
332
-					$template->mostrarPlantilla(); 
333
-					
310
+					$theme->set('comments',$comments);
311
+
312
+					$whois['User_Cookie'] = isset($_COOKIE['cookie_gel_user'])?$_COOKIE['cookie_gel_user']:'';
313
+					$whois['Email_Cookie'] = isset($_COOKIE['cookie_gel_email'])?$_COOKIE['cookie_gel_email']:'';
314
+					$whois['Web_Cookie'] = isset($_COOKIE['cookie_gel_web'])?$_COOKIE['cookie_gel_web']:'';
315
+					$whois['Id_Post'] = $register["id_post"];
316
+
317
+					$theme->set('Date_Added',gmmktime());
318
+					$theme->set('Form_Action',$conf->urlGelato."/admin/comments.php");
319
+					$theme->set('whois',$whois);
334 320
 				}
335 321
         }
336
-        
337
-        $input = array("{URL_Tumble}");
338
-        $output = array($conf->urlGelato);
339
-        
340
-        $template->cargarPlantilla($input, $output, "template_footer");
341
-        $template->mostrarPlantilla();
342
-?> 
322
+
323
+        $theme->set('URL_Tumble',$conf->urlGelato);
324
+		$theme->display(Absolute_Path.'themes/'.$conf->template.'/index.htm');
325
+?>

+ 166 - 0
themes/tumblr/index.htm View File

@@ -0,0 +1,166 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+<head>
5
+	{Gelato_includes}
6
+    <title>{Page_Title}</title>
7
+    <!--[if IE]>
8
+        <style type="text/css">
9
+            div.post div.quote span.quote big.quote {
10
+                line-height: 40px;
11
+            }
12
+        </style>
13
+    <![endif]-->
14
+</head>
15
+<body>
16
+    <div id="container">
17
+        <a href="{URL_Tumble}/rss.php"><img src="{URL_Tumble}/themes/{Template_name}/img/rss.gif" id="rss" alt="RSS" title="RSS" /></a>
18
+
19
+        <h1><a href="{URL_Tumble}/">{Title}</a></h1>
20
+
21
+            <div id="description">
22
+                {Description}
23
+            </div>
24
+
25
+		{if {$isAuthenticated}}
26
+			<div style="padding:4px; border:solid 2px #bbb; display:inline; background-color:#ddd; position:absolute; top:3px; right:3px;">
27
+				<b>Hi, {User}.</b>&nbsp;&nbsp;
28
+				<a target="_top" href="{URL_Tumble}/admin/index.php">Add/Edit my posts</a>&nbsp;&nbsp;
29
+				<a target="_top" href="{URL_Tumble}/admin/close.php">Sign out</a>
30
+			</div>
31
+		{/if}
32
+
33
+		{block {$rows} as {$row}}
34
+			<div class="date">
35
+				{$row.Date_Added}
36
+			</div>
37
+			{if {$postType}==1}
38
+				<div class="post">
39
+					<a href="{$row.Permalink}"><img src="{URL_Tumble}/themes/tumblr/img/link.gif" class="permalink" alt="Permalink"/></a>
40
+
41
+					<div class="regular">
42
+						<h2><a href="{$row.Permalink}">{$row.Title}</a></h2>
43
+						{$row.Body}
44
+					</div>
45
+				</div>
46
+			{elseif {$postType}==2}
47
+				<div class="post">
48
+					<a href="{$row.Permalink}"><img src="{URL_Tumble}/themes/tumblr/img/link.gif" class="permalink" alt="Permalink"/></a>
49
+					<div class="photo">
50
+						<a {$row.Effect}><img src="{$row.PhotoURL}" alt="{$row.PhotoAlt}" /></a><br/>
51
+						<div class="caption">{$row.Caption}</div>
52
+					</div>
53
+				</div>
54
+			{elseif {$postType}==3}
55
+				<div class="post">
56
+					<a href="{$row.Permalink}"><img src="{URL_Tumble}/themes/tumblr/img/link.gif" class="permalink" alt="Permalink"/></a>
57
+					<div class="quote">
58
+						<span class="quote"><big class="quote"><a href="{$row.Permalink}">&#147;</a></big> {$row.Quote}</span>
59
+						<div class="source">&mdash; {$row.Source}</div>
60
+					</div>
61
+				</div>
62
+			{elseif {$postType}==4}
63
+				<div class="post">
64
+					<a href="{$row.Permalink}"><img src="{URL_Tumble}/themes/tumblr/img/link.gif" class="permalink" alt="Permalink"/></a>
65
+						<div class="link">
66
+							&#187; <a href="{$row.URL}">{$row.Name}</a>
67
+						<div class="description">{$row.Description}</div>
68
+					</div>
69
+				</div>
70
+			{elseif {$postType}==5}
71
+				<div class="post">
72
+					<a href="{$row.Permalink}"><img src="{URL_Tumble}/themes/tumblr/img/link.gif" class="permalink" alt="Permalink"/></a>
73
+					<div class="conversation">
74
+							...<h2><a href="{$row.Permalink}">{$row.Title}</a></h2>
75
+						{$row.Conversation}
76
+					</div>
77
+				</div>
78
+			{elseif {$postType}==6}
79
+				<div class="post">
80
+					<a href="{$row.Permalink}"><img src="{URL_Tumble}/themes/tumblr/img/link.gif" class="permalink" alt="Permalink"/></a>
81
+					<div class="video">
82
+						{$row.Video}
83
+						<div class="caption">{$row.Caption}</div>
84
+					</div>
85
+				</div>
86
+			{elseif {$postType}==7}
87
+				<div class="post">
88
+					<a href="{$row.Permalink}"><img src="{URL_Tumble}/themes/tumblr/img/link.gif" class="permalink" alt="Permalink"/></a>
89
+					<div class="video">
90
+						{$row.Mp3}
91
+						<div class="caption">{$row.Caption}</div>
92
+					</div>
93
+				</div>
94
+			{/if}
95
+
96
+		<div class="totalComments">
97
+			<h3>Posted by {$row.User} - <a href="{$row.Permalink}#comments">( {$row.Comments_Number} ) comments</a></h3>
98
+		</div>
99
+	{/block}
100
+
101
+	{if {$id_post}}
102
+		<div class="containerComments">
103
+			<h3 id="comments">{$row.Comments_Number} answers to &#8220;{$row.Post_Title}&#8221;</h3>
104
+			<ol class="commentlist">
105
+				{block {$comments} as {$comment}}
106
+				<li class="alt" id="comment-{$comment.Id_Comment}">
107
+					<cite>
108
+						<a href="#comment-{$comment.Id_Comment}" title="Comment permalink">#</a>&nbsp;&nbsp;
109
+						{$comment.Comment_Author} said:
110
+					</cite>
111
+					<br />
112
+					<span class="timestampComment"> at {$comment.Date}</span><br /><br />
113
+					{$comment.Comment}
114
+					<br /><br />
115
+				</li>
116
+				{/block}
117
+			</ol>
118
+		</div>
119
+
120
+		<div class="containerFormComments">
121
+		<h3 id="respond">Add your comment</h3>
122
+
123
+		<form action="{Form_Action}" method="post" name="commentForm" id="commentForm">
124
+			<p>
125
+				<label for="username">
126
+					<small>Name:</small>
127
+				</label>
128
+				<input name="username" id="username" value="{whois.User_Cookie}" size="22" tabindex="1" type="text" />
129
+			</p>
130
+			<p>
131
+				<label for="email">
132
+					<small>E-mail:</small>
133
+				</label>
134
+				<input name="email" id="email" value="{whois.Email_Cookie}" size="22" tabindex="2" type="text" />
135
+			</p>
136
+			<p>
137
+				<label for="web">
138
+					<small>Website:</small>
139
+				</label>
140
+				<input name="web" id="web" value="{whois.Web_Cookie}" size="22" tabindex="3" type="text" />
141
+			</p>
142
+			<p>
143
+				<textarea name="content" id="content" cols="100" rows="10" tabindex="4"></textarea>
144
+			</p>
145
+			<p>
146
+				<span style="color: rgb(136, 136, 136); margin-bottom: 10px; font-size: 10px;"><a href="http://hobix.com/textile/">Textile</a> syntax is supported.</span>
147
+			<p>
148
+				<input type="submit" value="Add comment" name="btnAdd" id="btnAdd" tabindex="5" />
149
+			</p>
150
+			<p>
151
+				<input name="id_post" id="id_post" value="{id_post}" type="hidden" />
152
+				<input name="comment_date" id="comment_date" value="{Date_Added}" type="hidden" />
153
+			</p>
154
+		</form>
155
+	</div>
156
+	{else}
157
+		{pagination}
158
+	{/if}
159
+
160
+	</div>
161
+	<div id="footer">
162
+		subscribe via <a href="{URL_Tumble}/rss.php">rss</a> &nbsp;/&nbsp;
163
+		powered by <a href="http://www.gelatocms.com/">gelato cms</a>
164
+	</div>
165
+</body>
166
+</html>

+ 0 - 36
themes/tumblr/template_comment_post.htm View File

@@ -1,36 +0,0 @@
1
-	<div class="containerFormComments">
2
-		<h3 id="respond">Add your comment</h3>
3
-		
4
-		<form action="{Form_Action}" method="post" name="commentForm" id="commentForm">
5
-			<p>
6
-				<label for="username">
7
-					<small>Name:</small>
8
-				</label>
9
-				<input name="username" id="username" value="{User_Cookie}" size="22" tabindex="1" type="text" />				
10
-			</p>
11
-			<p>
12
-				<label for="email">
13
-					<small>E-mail:</small>
14
-				</label>
15
-				<input name="email" id="email" value="{Email_Cookie}" size="22" tabindex="2" type="text" />				
16
-			</p>
17
-			<p>
18
-				<label for="web">
19
-					<small>Website:</small>
20
-				</label>
21
-				<input name="web" id="web" value="{Web_Cookie}" size="22" tabindex="3" type="text" />				
22
-			</p>			
23
-			<p>
24
-				<textarea name="content" id="content" cols="100" rows="10" tabindex="4"></textarea>
25
-			</p>
26
-			<p>
27
-				<span style="color: rgb(136, 136, 136); margin-bottom: 10px; font-size: 10px;"><a href="http://hobix.com/textile/">Textile</a> syntax is supported.</span>
28
-			<p>
29
-				<input type="submit" value="Add comment" name="btnAdd" id="btnAdd" tabindex="5" />
30
-			</p>
31
-			<p>
32
-				<input name="id_post" id="id_post" value="{Id_Post}" type="hidden" />
33
-				<input name="comment_date" id="comment_date" value="{Date_Added}" type="hidden" />
34
-			</p>
35
-		</form>	
36
-	</div>

+ 0 - 17
themes/tumblr/template_comments.htm View File

@@ -1,17 +0,0 @@
1
-	<div class="containerComments">
2
-		<h3 id="comments">{Comments_Number} answers to &#8220;{Post_Title}&#8221;</h3>
3
-		<ol class="commentlist">
4
-			[bloque: comments]
5
-			<li class="alt" id="comment-{Id_Comment}">
6
-				<cite>
7
-					<a href="#comment-{Id_Comment}" title="Comment permalink">#</a>&nbsp;&nbsp;					
8
-					{Comment_Author} said:
9
-				</cite>
10
-				<br />
11
-				<span class="timestampComment"> at {Date}</span><br /><br />
12
-				{Comment}
13
-				<br /><br />
14
-			</li>
15
-			[/bloque: comments]
16
-		</ol>
17
-	</div>

+ 0 - 16
themes/tumblr/template_conversation.htm View File

@@ -1,16 +0,0 @@
1
-
2
-                <div class="date">
3
-                    {Date_Added}
4
-                </div>
5
-
6
-        
7
-            <div class="post">
8
-                <a href="{Permalink}"><img src="{URL_Tumble}/themes/tumblr/img/link.gif" class="permalink" alt="Permalink"/></a>
9
-
10
-                
11
-                    <div class="conversation">
12
-                        <h2><a href="{Permalink}">{Title}</a></h2>
13
-                        {Conversation}
14
-                    </div>               
15
-				
16
-			</div>

+ 0 - 3
themes/tumblr/template_details.htm View File

@@ -1,3 +0,0 @@
1
-	<div class="totalComments">
2
-        <h3>Posted by {User} - <a href="{Permalink}#comments">( {Comments_Number} ) comments</a></h3>
3
-    </div>	

+ 0 - 8
themes/tumblr/template_footer.htm View File

@@ -1,8 +0,0 @@
1
-		
2
-    </div>
3
-    <div id="footer">
4
-        subscribe via <a href="{URL_Tumble}/rss.php">rss</a> &nbsp;/&nbsp;
5
-        powered by <a href="http://www.gelatocms.com/">gelato cms</a>
6
-    </div>
7
-</body>
8
-</html>

+ 0 - 23
themes/tumblr/template_header.htm View File

@@ -1,23 +0,0 @@
1
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
-	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
-<head>	
5
-	{Gelato_includes}	
6
-    <title>{Page_Title}</title>
7
-    <!--[if IE]>
8
-        <style type="text/css">
9
-            div.post div.quote span.quote big.quote {
10
-                line-height: 40px;
11
-            }
12
-        </style>
13
-    <![endif]-->
14
-</head>
15
-<body>
16
-    <div id="container">
17
-        <a href="{URL_Tumble}/rss.php"><img src="{URL_Tumble}/themes/{Template_name}/img/rss.gif" id="rss" alt="RSS" title="RSS" /></a>
18
-
19
-        <h1><a href="{URL_Tumble}/">{Title}</a></h1>        
20
-        
21
-            <div id="description">
22
-                {Description}
23
-            </div>

+ 0 - 5
themes/tumblr/template_isadmin.htm View File

@@ -1,5 +0,0 @@
1
-	<div style="padding:4px; border:solid 2px #bbb; display:inline; background-color:#ddd; position:absolute; top:3px; right:3px;">
2
-		<b>Hi, {User}.</b>&nbsp;&nbsp;
3
-		<a target="_top" href="{URL_Tumble}/admin/index.php">Add/Edit my posts</a>&nbsp;&nbsp;
4
-		<a target="_top" href="{URL_Tumble}/admin/close.php">Sign out</a>
5
-	</div>

+ 0 - 16
themes/tumblr/template_mp3.htm View File

@@ -1,16 +0,0 @@
1
-
2
-                <div class="date">
3
-                    {Date_Added}
4
-                </div>
5
-
6
-        
7
-            <div class="post">
8
-                <a href="{Permalink}"><img src="{URL_Tumble}/themes/tumblr/img/link.gif" class="permalink" alt="Permalink"/></a>
9
-
10
-                
11
-                    <div class="video">
12
-                        {Mp3}
13
-                        <div class="caption">{Caption}</div>
14
-                    </div>               
15
-				
16
-			</div>

+ 0 - 20
themes/tumblr/template_photo.htm View File

@@ -1,20 +0,0 @@
1
-
2
-                <div class="date">
3
-                    {Date_Added}
4
-                </div>
5
-
6
-        
7
-            <div class="post">
8
-                <a href="{Permalink}"><img src="{URL_Tumble}/themes/tumblr/img/link.gif" class="permalink" alt="Permalink"/></a>
9
-
10
-                
11
-			   
12
-                    <div class="photo">
13
-                        <a {Effect}><img src="{PhotoURL}" alt="{PhotoAlt}" /></a><br/>
14
-                       
15
-                            <div class="caption">{Caption}</div>
16
-                        
17
-                    </div>
18
-               
19
-				
20
-			</div>

+ 0 - 18
themes/tumblr/template_quote.htm View File

@@ -1,18 +0,0 @@
1
-
2
-                <div class="date">
3
-                    {Date_Added}
4
-                </div>
5
-
6
-        
7
-            <div class="post">
8
-                <a href="{Permalink}"><img src="{URL_Tumble}/themes/tumblr/img/link.gif" class="permalink" alt="Permalink"/></a>
9
-
10
-                
11
-                   <div class="quote">
12
-                        <span class="quote">
13
-                            <big class="quote"><a href="{Permalink}">&#147;</a></big> {Quote}
14
-                        </span>
15
-                        <div class="source">&mdash; {Source}</div>
16
-                    </div>              
17
-				
18
-			</div>

+ 0 - 13
themes/tumblr/template_regular_post.htm View File

@@ -1,13 +0,0 @@
1
-
2
-                <div class="date">
3
-                    {Date_Added}
4
-                </div>
5
-						
6
-            <div class="post">
7
-                <a href="{Permalink}"><img src="{URL_Tumble}/themes/tumblr/img/link.gif" class="permalink" alt="Permalink"/></a>
8
-                
9
-				<div class="regular">
10
-					<h2><a href="{Permalink}">{Title}</a></h2>
11
-					{Body}
12
-				</div>					
13
-			</div>

+ 0 - 16
themes/tumblr/template_url.htm View File

@@ -1,16 +0,0 @@
1
-
2
-                <div class="date">
3
-                    {Date_Added}
4
-                </div>
5
-
6
-        
7
-            <div class="post">
8
-                <a href="{Permalink}"><img src="{URL_Tumble}/themes/tumblr/img/link.gif" class="permalink" alt="Permalink"/></a>
9
-
10
-                
11
-                    <div class="link">
12
-                        &#187; <a href="{URL}">{Name}</a>
13
-                            <div class="description">{Description}</div>
14
-                    </div>             
15
-				
16
-			</div>

+ 0 - 16
themes/tumblr/template_video.htm View File

@@ -1,16 +0,0 @@
1
-
2
-                <div class="date">
3
-                    {Date_Added}
4
-                </div>
5
-
6
-        
7
-            <div class="post">
8
-                <a href="{Permalink}"><img src="{URL_Tumble}/themes/tumblr/img/link.gif" class="permalink" alt="Permalink"/></a>
9
-
10
-                
11
-                    <div class="video">
12
-                        {Video}
13
-                        <div class="caption">{Caption}</div>
14
-                    </div>             
15
-				
16
-			</div>