Changeset 7315 for extensions
- Timestamp:
- Oct 21, 2010, 10:11:57 AM (14 years ago)
- Location:
- extensions/photoWidget
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/photoWidget/CHANGELOG
r7282 r7315 1 photoWidget 0.2.3 - 2010-10-21 2 ================================ 3 * Fix issue 1932 : photoWidget is not compatible with id-name category url style 4 1 5 photoWidget 0.2.2 - 2010-10-19 2 6 ================================ -
extensions/photoWidget/include/photoWidgetContent.class.php
r6850 r7315 71 71 72 72 $template->set_filename('index_thumbnails', PW_TEMPLATE . '/animation.tpl'); 73 if (!empty($page['category']['permalink'])) { 74 $template->assign('PW_XML', sprintf($this->fmt_xml, $page['category']['permalink'])); 75 } else { 76 $template->assign('PW_XML', sprintf($this->fmt_xml, $page['category']['id'])); 77 } 73 $template->assign('PW_XML', $this->getXmlPath($page['category'])); 78 74 $template->assign('PW_BGCOLOR', $this->plugin_config->pw_bgcolor); 79 75 $template->assign('PW_WIDTH', $this->plugin_config->pw_width); … … 103 99 ;'; 104 100 $result = pwg_query($query); 105 while ($row = pwg_db_fetch_assoc($result)) 106 { 101 while ($row = pwg_db_fetch_assoc($result)) { 107 102 $thumbnail_src_of[$row['id']] = get_thumbnail_url($row); 108 103 } … … 116 111 117 112 $template->set_filename('index_category_thumbnails', PW_TEMPLATE . '/animation.tpl'); 118 $template->assign('PW_XML', sprintf($this->fmt_xml, $page['category']['id']));113 $template->assign('PW_XML', $this->getXmlPath($page['category'])); 119 114 $template->assign('PW_BGCOLOR', $this->plugin_config->pw_bgcolor); 120 115 $template->assign('PW_WIDTH', $this->plugin_config->pw_width); 121 116 $template->assign('PW_HEIGHT', $this->plugin_config->pw_height); 122 117 $template->assign('PW_SWF_ANIMATION', PW_SWF . '/photowidget.swf'); 118 } 119 120 private function getXmlPath($category) { 121 if (!empty($category['permalink'])) { 122 return sprintf($this->fmt_xml, $category['permalink']); 123 } elseif ( $GLOBALS['conf']['category_url_style']=='id-name' ) { 124 $id_name = $category['id'] . '-' . str2url($category['name']); 125 return sprintf($this->fmt_xml, $id_name); 126 } else { 127 return sprintf($this->fmt_xml, $category['id']); 128 } 123 129 } 124 130 -
extensions/photoWidget/main.inc.php
r7282 r7315 22 22 /* 23 23 Plugin Name: photoWidget 24 Version: 0.2. 224 Version: 0.2.3 25 25 Description: add an amazing 3D animation for pictures 26 26 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=370
Note: See TracChangeset
for help on using the changeset viewer.