• R/O
  • SSH
  • HTTPS

jeanscms: コミット


コミットメタ情報

リビジョン253 (tree)
日時2010-08-23 13:58:24
作者kmorimatsu

ログメッセージ

Item page done.

変更サマリ

差分

--- plugins/Nucleus/trunk/nucleus/jp_Nucleus_skin.php (revision 252)
+++ plugins/Nucleus/trunk/nucleus/jp_Nucleus_skin.php (revision 253)
@@ -5,6 +5,9 @@
55 * The template must be stored in skin directry as follows.
66 * For example, 'default/index' will be changed to 'templates/default_index_item.inc' etc.
77 */
8+ /*
9+ * commentform
10+ */
811
912 class jp_Nucleus_skin extends jeans {
1013 static private function convert_template($skin,$type){
@@ -256,18 +259,9 @@
256259 }
257260 static public function tag_commentform(&$data){
258261 /*Skinvar: commentform
259- Adds a commentform to an item page.
260- Arguments
261- Optional:
262-
263- destinationurl: sets the URL to where Nucleus needs to redirect after adding the comment (by default, Nucleus redirects to the item detail page for the item)
264-
265- Skintypes
266- item
267- Examples
268- <%commentform%>
269- <%commentform(http://host/thanks.html)%>*/
270- self::p("<%commentform%>","hsc");
262+ * destinationurl is not supported
263+ */
264+ view::tag_parse($data,'/jeans/forms/commentform.inc');
271265 }
272266 static public function tag_comments(&$data,$skin_or_maxtoshow=false){
273267 /*Skinvar: comments
@@ -279,7 +273,7 @@
279273 Examples
280274 <%comments(mytemplate)%>*/
281275 if (self::usetemplate($data)) return jp_Nucleus_template::tag_comments($data,$skin_or_maxtoshow);
282- self::p("<%comments%>","hsc");
276+ comments::tag_comments($data,self::convert_template($skin_or_maxtoshow,'comment'));
283277 }
284278 static public function tag_else(&$data){
285279 /*Skinvars: if/ifnot/else/elseif/elseifnot/endif
@@ -759,7 +753,7 @@
759753 }
760754 static public function tag_index(&$data){
761755 }
762- static public function tag_item(&$data){
756+ static public function tag_item(&$data,$template){
763757 /*Skinvar: item
764758 Shows the currently selected item (without comments) using a given template
765759 Arguments
@@ -768,7 +762,10 @@
768762 item
769763 Examples
770764 <%item(mytemplate)%>*/
771- self::p("<%index%>","hsc");
765+ $usetemplate=!empty($data['jp']['nucleus']['usetemplate']);
766+ $data['jp']['nucleus']['usetemplate']=true;
767+ item::tag_item($data,self::convert_template($template,'item'));
768+ $data['jp']['nucleus']['usetemplate']=$usetemplate;
772769 }
773770 static public function tag_itemid(&$data){
774771 /*Skinvar: itemid
@@ -797,16 +794,8 @@
797794 self::p("<%itemlink%>","hsc");
798795 }
799796 static public function tag_itemtitle(&$data){
800- /*Skinvar: itemtitle
801- Inserts the title of the item, with HTML-stripped off and entities encoded
802- Arguments
803- None
804- Skintypes
805- item
806- Examples
807- <%itemtitle%>*/
808797 if (self::usetemplate($data)) return jp_Nucleus_template::tag_itemtitle($data);
809- self::p("<%itemtitle%>","hsc");
798+ item::tag_data($data,'title');
810799 }
811800 static public function tag_loginform(&$data){
812801 view::tag_parse($data,'/jeans/forms/loginform.inc');
@@ -895,20 +884,10 @@
895884 <%nextitemtitle%>*/
896885 self::p("<%nextitemtitle%>","hsc");
897886 }
898- static public function tag_nextlink(&$data){
899- /*Skinvar: nextlink
900- Inserts a link to the next item (on item pages) or to the next archive (on archive pages)
901- Arguments
902- Optional
903-
904- linktext: when present, a full <a href... tag will be outputted, rather than a raw link
905- amount: for search and index skins: the amount of items to go forward/backward
906-
907- Skintypes
908- item, archive, search, index
909- Examples
910- <%nextlink%>*/
911- self::p("<%nextlink%>","hsc");
887+ static public function tag_nextlink(&$data,$linktext=false){
888+ if ($linktext!==false) self::echo_html('<a href="');
889+ item::tag_newer($data,'link');
890+ if ($linktext!==false) self::echo_html('"><%0%></a>',$linktext);
912891 }
913892 static public function tag_nucleusbutton(&$data,$file='/jeans/images/jeans.gif',$width=85,$height=31){
914893 $array=array('file'=>view::skinfile($data,$file), 'width'=>$width, 'height'=>$height);
@@ -1140,20 +1119,10 @@
11401119 <%previtemtitle%>*/
11411120 self::p("<%previtemtitle%>","hsc");
11421121 }
1143- static public function tag_prevlink(&$data){
1144- /*Skinvar: prevlink
1145- Inserts a link to the previous item (on item pages) or to the previous archive (on archive pages). For search and index pages
1146- Arguments
1147- Optional
1148-
1149- linktext: when present, a full <a href... tag will be outputted, rather than a raw link
1150- amount: for search and index skins: the amount of items to go forward/backward
1151-
1152- Skintypes
1153- item, archive, search, index
1154- Examples
1155- <%prevlink%>*/
1156- self::p("<%prevlink%>","hsc");
1122+ static public function tag_prevlink(&$data,$linktext=false){
1123+ if ($linktext!==false) self::echo_html('<a href="');
1124+ item::tag_older($data,'link');
1125+ if ($linktext!==false) self::echo_html('"><%0%></a>',$linktext);
11571126 }
11581127 static public function tag_query(&$data){
11591128 /*Skinvar: query
@@ -1228,24 +1197,15 @@
12281197 <%set(IncludePrefix,somedir/)%>*/
12291198 self::p("<%set%>","hsc");
12301199 }
1231- static public function tag_sitevar(&$data){
1232- /*Skinvar: sitevar
1233- Includes a site variable
1234- Arguments
1235- type: name of the variable to show:
1236-
1237- url: URL of the site
1238- name: Name of the site
1239- admin: E-mail address of the administrator
1240-
1241-
1242- Skintypes
1243- all
1244- Examples
1245- <%sitevar(name)%>
1246- <%sitevar(url)%>
1247- <a href="mailto:<%sitevar(email)%>">Admin</a>*/
1248- self::p("<%sitevar%>","hsc");
1200+ static public function tag_sitevar(&$data,$type){
1201+ switch($type){
1202+ case 'url':
1203+ return self::p(_CONF_URL_INDEX);
1204+ case 'name':
1205+ return self::p(_CONF_SITE_NAME);
1206+ case 'admin':
1207+ return self::p(_CONF_ADMIN_EMAIL);
1208+ }
12491209 }
12501210 static public function tag_skinfile(&$data,$filename){
12511211 /*Skin/Templatevar: skinfile
--- plugins/Nucleus/trunk/nucleus/jp_Nucleus_template.php (revision 252)
+++ plugins/Nucleus/trunk/nucleus/jp_Nucleus_template.php (revision 253)
@@ -145,9 +145,9 @@
145145 media other media object from media dir
146146 relevance Includes the 'search hit relevance' in templates that display search results
147147 */
148- /*
149- * <%morelink%>
150- */
148+ public static function tag_more(&$data){
149+ self::echo_html($data['more']);
150+ }
151151 public static function tag_editlink(&$data){
152152 self::p(_CONF_URL_ADMIN.'?page=edititem&itemid='.$data['id']);
153153 }
@@ -240,6 +240,21 @@
240240 skinfile includes the correct URL for a file belonging to an imported skin
241241 set sets a parser property
242242 */
243+ /*
244+ *
245+ */
246+ static public function tag_memberid(&$data){
247+ self::p($data['author']);
248+ }
249+ static public function tag_userlinkraw(&$data){
250+ self::p($data['link']);
251+ }
252+ static public function tag_ip(&$data){
253+ self::p($data['ip']);
254+ }
255+ static public function tag_user(&$data){
256+ self::p($data['user']);
257+ }
243258 static public function tag_commentcount(&$data){
244259 self::p($data['comments']);
245260 }
旧リポジトリブラウザで表示