Changeset 546232
- Timestamp:
- 05/19/2012 04:17:24 PM (14 years ago)
- Location:
- cs-shop/trunk
- Files:
-
- 3 edited
-
cs-shop.css (modified) (1 diff)
-
cs-shop.php (modified) (11 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cs-shop/trunk/cs-shop.css
r538922 r546232 109 109 110 110 div.csshop-service-credits { 111 clear: both; 111 112 text-align: left; 112 113 vertical-align: middle; -
cs-shop/trunk/cs-shop.php
r538922 r546232 4 4 Plugin URI: http://www.csync.net/category/blog/wp-plugin/cs-shop/ 5 5 Description: You can easily create a product search page from the affiliate services of Japan. 6 Version: 0.9. 86 Version: 0.9.9 7 7 Author: cottonspace 8 8 Author URI: http://www.csync.net/ … … 28 28 * プラグインのバージョン 29 29 */ 30 define('CS_SHOP_VER', '0.9. 8');30 define('CS_SHOP_VER', '0.9.9'); 31 31 32 32 /** … … 63 63 "keyword" => "", 64 64 "category" => "", 65 "sort" => ""), 65 "sort" => "", 66 "mode" => ""), 66 67 $atts); 67 68 … … 76 77 // アフィリエイトサービス選択(WordPress プラグイン設定を取得してサービス別のインスタンスを生成) 77 78 switch ($params["service"]) { 79 80 // 楽天アフィリエイト 78 81 case "rakuten": 79 80 // 楽天アフィリエイト81 82 require_once 'service-rakuten.php'; 82 83 $service = new Rakuten(array( … … 87 88 )); 88 89 break; 90 91 // Amazon 89 92 case "amazon": 90 91 // Amazon92 93 require_once 'service-amazon.php'; 93 94 $service = new Amazon(array( … … 100 101 )); 101 102 break; 103 104 // Yahoo!ショッピング 102 105 case "yahoo": 103 104 // Yahoo!ショッピング105 106 require_once 'service-yahoo.php'; 106 107 $service = new Yahoo(array( … … 111 112 )); 112 113 break; 114 115 // LinkShare 113 116 case "linkshare": 114 115 // LinkShare116 117 require_once 'service-linkshare.php'; 117 118 $service = new LinkShare(array( … … 120 121 )); 121 122 break; 123 124 // ValueCommerce 122 125 case "valuecommerce": 123 124 // ValueCommerce125 126 require_once 'service-valuecommerce.php'; 126 127 $service = new ValueCommerce(array( … … 129 130 )); 130 131 break; 132 133 // 定義されていないサービスの場合(何も出力しない) 131 134 default: 132 133 // 定義されていないサービスの場合(何も出力しない)134 135 return $output; 135 136 break; … … 143 144 // ページサイズ値の補正 144 145 if (!isset($params["pagesize"]) || empty($params["pagesize"])) { 145 $params["pagesize"] = "10"; 146 147 // 表示モード別デフォルト値 148 switch ($params["mode"]) { 149 150 // 埋め込みモード 151 case "embed": 152 $params["pagesize"] = "1"; 153 break; 154 155 // 標準モード 156 default: 157 $params["pagesize"] = "10"; 158 break; 159 } 146 160 } 147 161 … … 149 163 $service->setRequestParams($params); 150 164 151 // 検索フォーム表示152 $output .= showSearchForm($service, $params);153 154 165 // 商品検索実行 155 166 $items = $service->getItems(); 156 167 157 // 検索結果の存在確認 158 if (0 < count($items)) { 159 160 // ページナビゲータ生成 161 $pagelinks = showPageLinks($service, $params); 162 163 // 上部ページナビゲータ表示 164 $output .= $pagelinks; 165 166 // 商品一覧表示 167 $output .= showItems($params, $items); 168 169 // 下部ページナビゲータ表示 170 $output .= $pagelinks; 171 172 } else { 173 174 // 検索結果が 0 件の場合(キーワードが指定されている場合のみ) 175 if (!empty($params["keyword"])) { 176 177 // 検索結果が無いメッセージ 178 $output .= "<p>検索条件に該当する商品はありませんでした。</p>"; 179 } 180 181 // 最上位カテゴリ一覧を表示 182 $output .= showRootCategories($service, $params); 183 } 184 185 // サービスクレジット表示 186 $output .= showServiceCredits($service); 168 // 表示モード別結果表示 169 switch ($params["mode"]) { 170 171 // 埋め込みモード(検索結果のみ表示) 172 case "embed": 173 174 // 検索結果の存在確認 175 if (0 < count($items)) { 176 177 // ページサイズ値の再適用 178 array_splice($items, $params["pagesize"]); 179 180 // 商品一覧表示 181 $output .= showItems($params, $items); 182 } 183 break; 184 185 // 標準モード 186 default: 187 188 // 検索フォーム表示 189 $output .= showSearchForm($service, $params); 190 191 // 検索結果の存在確認 192 if (0 < count($items)) { 193 194 // ページナビゲータ生成 195 $pagelinks = showPageLinks($service, $params); 196 197 // 上部ページナビゲータ表示 198 $output .= $pagelinks; 199 200 // 商品一覧表示 201 $output .= showItems($params, $items); 202 203 // 下部ページナビゲータ表示 204 $output .= $pagelinks; 205 206 } else { 207 208 // 検索結果が 0 件の場合(キーワードが指定されている場合のみ) 209 if (!empty($params["keyword"])) { 210 211 // 検索結果が無いメッセージ 212 $output .= "<p>検索条件に該当する商品はありませんでした。</p>"; 213 } 214 215 // 最上位カテゴリ一覧を表示 216 $output .= showRootCategories($service, $params); 217 } 218 break; 219 } 220 221 // サービスクレジット表示(出力コンテンツが存在する場合) 222 if (!empty($output)) { 223 $output .= showServiceCredits($service); 224 } 187 225 188 226 // コンテンツの返却 -
cs-shop/trunk/readme.txt
r538922 r546232 4 4 Requires at least: 3.0 5 5 Tested up to: 3.0 6 Stable tag: 0.9. 86 Stable tag: 0.9.9 7 7 8 8 You can easily create a product search page from the affiliate services of Japan. … … 29 29 30 30 == Changelog == 31 32 = 0.9.9 = 33 * Add "embed" mode. 31 34 32 35 = 0.9.8 = … … 76 79 77 80 == Upgrade Notice == 81 82 = 0.9.9 = 83 Add "embed" mode. 78 84 79 85 = 0.9.8 =
Note: See TracChangeset
for help on using the changeset viewer.