Changeset 565
- Timestamp:
- 04/23/05 23:40:00 (8 years ago)
- Location:
- trunk/wifidog-auth
- Files:
-
- 5 modified
-
ChangeLog (modified) (1 diff)
-
wifidog/classes/Content/EmbeddedContent.php (modified) (1 diff)
-
wifidog/classes/Content/FlickrPhotostream.php (modified) (6 diffs)
-
wifidog/include/schema_validate.php (modified) (1 diff)
-
wifidog/local_content/default/stylesheet.css (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wifidog-auth/ChangeLog
r564 r565 1 2005-04-23 François Proulx <francois.proulx@gmail.com> 2 * Added Preferred Size support for Flickr pictures 3 1 4 2005-04-23 François Proulx <francois.proulx@gmail.com> 2 5 * Completed missing translations -
trunk/wifidog-auth/wifidog/classes/Content/EmbeddedContent.php
r563 r565 220 220 221 221 /* 222 * 223 * <object classid="clsid:A12BCD3F-GH4I-56JK-xyz" 224 codebase="http://example.com/content.cab" 225 width="100" height="80"> 226 <param name="Movie" value="moviename.swf" /> 227 <embed src="moviename.swf" width="100" height="80" 228 pluginspage="http://example.com/shockwave/download/" /> 229 <noembed> 230 <img alt="Still from Movie" src="moviename.gif" 231 width="100" height="80" /> 232 </noembed> 233 </object> 234 * 235 * 222 * Example 236 223 * <object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="400" height="316" codebase="http://www.apple.com/qtactivex/qtplugin.cab"> 237 <param name="SRC" value="/sponsors/airborne/400.mov">238 239 <param name="QTNEXT1" value="<http://stream.qtv.apple.com/qtv/endorphin/http/hydrogen3_ref.mov> T<myself>">240 <param name="AUTOPLAY" value="true">241 <param name="CONTROLLER" value="true">242 <embed src="/sponsors/airborne/400.mov" qtnext1="<http://stream.qtv.apple.com/qtv/endorphin/http/hydrogen3_ref.mov> T<myself>" width="400" height="316" align="left" autoplay="true" controller="true" pluginspage="http://www.apple.com/quicktime/download/">243 </embed>244 </object>224 <param name="SRC" value="/sponsors/airborne/400.mov"> 225 226 <param name="QTNEXT1" value="<http://stream.qtv.apple.com/qtv/endorphin/http/hydrogen3_ref.mov> T<myself>"> 227 <param name="AUTOPLAY" value="true"> 228 <param name="CONTROLLER" value="true"> 229 <embed src="/sponsors/airborne/400.mov" qtnext1="<http://stream.qtv.apple.com/qtv/endorphin/http/hydrogen3_ref.mov> T<myself>" width="400" height="316" align="left" autoplay="true" controller="true" pluginspage="http://www.apple.com/quicktime/download/"> 230 </embed> 231 </object> 245 232 * 246 233 */ -
trunk/wifidog-auth/wifidog/classes/Content/FlickrPhotostream.php
r563 r565 54 54 const TAG_MODE_ALL = 'ALL_TAGS'; 55 55 56 /* Sizes */ 57 const SIZE_SQUARED_75x75 = 's'; 58 const SIZE_THUMB_100x75 = 't'; 59 const SIZE_SMALL_240x180 = 'm'; 60 const SIZE_MEDIUM_500x375 = ''; 61 const SIZE_ORIGINAL = 'o'; 62 56 63 private $flickr_api; 57 64 … … 67 74 { 68 75 /*Since the parent Content exists, the necessary data in content_group had not yet been created */ 69 $sql = "INSERT INTO flickr_photostream (flickr_photostream_id ) VALUES ('$content_id')";76 $sql = "INSERT INTO flickr_photostream (flickr_photostream_id, preferred_size) VALUES ('$content_id', '".self :: SIZE_SMALL_240x180."')"; 70 77 $db->ExecSqlUpdate($sql, false); 71 78 … … 255 262 default : 256 263 throw new Exception("Illegal tag matching mode."); 264 } 265 } 266 267 public function getPreferredSize() 268 { 269 return $this->flickr_photostream_row['preferred_size']; 270 } 271 272 public function setPreferredSize($size) 273 { 274 switch ($size) 275 { 276 case self :: SIZE_SQUARED_75x75 : 277 case self :: SIZE_THUMB_100x75 : 278 case self :: SIZE_SMALL_240x180 : 279 case self :: SIZE_MEDIUM_500x375 : 280 case self :: SIZE_ORIGINAL : 281 $size = $this->mBd->EscapeString($size); 282 $this->mBd->ExecSqlUpdate("UPDATE flickr_photostream SET preferred_size = '$size' WHERE flickr_photostream_id = '".$this->getId()."'"); 283 $this->refresh(); 284 break; 285 default : 286 throw new Exception("Illegal size."); 257 287 } 258 288 } … … 416 446 $this->shouldDisplayDescription() ? $checked = 'CHECKED' : $checked = ''; 417 447 $html .= "<input type='checkbox' name='$name' $checked>\n"; 448 $html .= "</div>\n"; 449 $html .= "</div>\n"; 450 451 $html .= "<div class='admin_section_container'>\n"; 452 $html .= "<div class='admin_section_title'>"._("Preferred size")." : </div>\n"; 453 $html .= "<div class='admin_section_data'>\n"; 454 $preferred_sizes = array (array (0 => self :: SIZE_SQUARED_75x75, 1 => _("Squared 75x75")), array (0 => self :: SIZE_THUMB_100x75, 1 => _("Thumbnail 100x75")), array (0 => self :: SIZE_SMALL_240x180, 1 => _("Small 240x180")), array (0 => self :: SIZE_MEDIUM_500x375, 1 => _("Medium 500x375")), array (0 => self :: SIZE_ORIGINAL, 1 => _("Original size"))); 455 $html .= $generator->generateFromArray($preferred_sizes, $this->getPreferredSize(), "PreferredSize".$this->getID(), "FlickrPhotostream", false, null, "onChange='submit()'"); 418 456 $html .= "</div>\n"; 419 457 $html .= "</div>\n"; … … 514 552 $name = "flickr_photostream_".$this->id."_display_description"; 515 553 !empty ($_REQUEST[$name]) ? $this->setDisplayDescription(true) : $this->setDisplayDescription(false); 516 } 517 554 555 if ($generator->isPresent("PreferredSize".$this->getID(), "FlickrPhotostream")) 556 $this->setPreferredSize($generator->getResult("PreferredSize".$this->getID(), "FlickrPhotostream")); 557 } 518 558 } 519 559 … … 567 607 if ($this->shouldDisplayTitle()) 568 608 $html .= '<div class="flickr_title"><h3>'.$photo->getTitle().'</h3></div>'."\n"; 569 $html .= '<div class="flickr_photo"><a href="'.$photo->buildUrl().'"><img src="'.$photo->buildImgUrl().'"></a></div>'."\n"; 609 $size = $this->getPreferredSize(); 610 if(empty($size)) 611 $size = null; 612 $html .= '<div class="flickr_photo"><a href="'.$photo->buildUrl().'"><img src="'.$photo->buildImgUrl($size).'"></a></div>'."\n"; 570 613 if ($this->shouldDisplayTags()) 571 614 { -
trunk/wifidog-auth/wifidog/include/schema_validate.php
r562 r565 339 339 $sql .= "\n\nUPDATE schema_info SET value='$new_schema_version' WHERE tag='schema_version';\n"; 340 340 $sql .= "ALTER TABLE files ADD COLUMN url text;"; 341 $sql .= "ALTER TABLE flickr_photostream ADD COLUMN preferred_size text;"; 341 342 $sql .= "CREATE TABLE embedded_content ( 342 343 embedded_content_id text NOT NULL, -
trunk/wifidog-auth/wifidog/local_content/default/stylesheet.css
r562 r565 255 255 background-color: #696969; 256 256 color: white; 257 margin-left: 260px;257 width: 140px; 258 258 } 259 259 .flickr_tags h3 {
