From: Reini U. <ru...@x-...> - 2005-09-11 19:02:26
|
Thomas Harding schrieb: > Hello, > I added thumbnails support for PhotoAlbum plugin in my installation > this weekend, and fixed few bugs. > ImageTile.php is at top-level of wiki tree. > > It's quick and dirty :) Well, too dirty for me. HtmlElement is no good place for img_tile(). The WikiUserNew PearDB patch was already applied some time ago. But I like the idea and will implement it. Thanks! > ------------------------------------------------------------------------ > > diff -rc phpwiki-1.3.11/lib/HtmlElement.php public_html/image_materiels/materiel/phpwiki/lib/HtmlElement.php > *** phpwiki-1.3.11/lib/HtmlElement.php 2005-02-12 18:08:18.000000000 +0100 > --- public_html/image_materiels/materiel/phpwiki/lib/HtmlElement.php 2005-09-11 18:34:15.945336736 +0200 > *************** > *** 184,189 **** > --- 184,207 ---- > $el = new HtmlElement('img'); > return $el->_init2(func_get_args()); > } > + function img_tile (/*...*/) { > + $el = new HTML ('img'); > + $tag = func_get_args(); > + $params = "<img src='../ImageTile.php?url=" > + .$tag[0]['src'] > + ."&width=" > + .$tag[0]['width'] > + ."&height=" > + .$tag[0]['height'] > + ."' width='" > + .$tag[0]['width'] > + ."' height='" > + .$tag[0]['height'] > + ."' alt='" > + .$tag[0]['alt'] > + ."' />"; > + return $el->raw ($params); > + } > function br (/*...*/) { > $el = new HtmlElement('br'); > return $el->_init2(func_get_args()); > diff -rc phpwiki-1.3.11/lib/plugin/PhotoAlbum.php public_html/image_materiels/materiel/phpwiki/lib/plugin/PhotoAlbum.php > *** phpwiki-1.3.11/lib/plugin/PhotoAlbum.php 2004-12-06 20:50:05.000000000 +0100 > --- public_html/image_materiels/materiel/phpwiki/lib/plugin/PhotoAlbum.php 2005-09-11 20:01:54.221957184 +0200 > *************** > *** 217,223 **** > } > > $newwidth = $this->newSize($size[0], $width); > ! $newheight = $this->newSize($size[1], $height); > > if ($width != 'auto' && $newwidth > 0) { > $params = array_merge($params, array("width" => $newwidth)); > --- 217,226 ---- > } > > $newwidth = $this->newSize($size[0], $width); > ! if ($mode == 'thumbs' || $mode == 'tiles') > ! $newheight = round (50 * $size[1] / $size[0]); > ! else > ! $newheight = $this->newSize($size[1], $height); > > if ($width != 'auto' && $newwidth > 0) { > $params = array_merge($params, array("width" => $newwidth)); > *************** > *** 246,251 **** > --- 249,255 ---- > //create url to display single larger version of image on page > $url = WikiURL($request->getPage(), > array("p" => basename($value["name"]))); > + > $b_url = WikiURL($request->getPage(), > array("h" => basename($value["name"]))). > "#". > *************** > *** 255,261 **** > basename($value["name"]); > if (! $p) { > $url_image = $link ? HTML::a(array("href" => "$url"), > ! HTML::img($params)) : > HTML::img($params); > } else { > $url_image = $link ? HTML::a(array("href" => "$b_url"), > --- 259,265 ---- > basename($value["name"]); > if (! $p) { > $url_image = $link ? HTML::a(array("href" => "$url"), > ! HTML::img_tile($params)) : > HTML::img($params); > } else { > $url_image = $link ? HTML::a(array("href" => "$b_url"), > *************** > *** 425,430 **** > --- 429,435 ---- > } > return; > } > + $src = $src_bak; > @$fp = fopen ($src, "r"); > if (!$fp) { > return $this->error(fmt("Unable to read src='%s'", $src)); > diff -rc phpwiki-1.3.11/lib/WikiUserNew.php public_html/image_materiels/materiel/phpwiki/lib/WikiUserNew.php > *** phpwiki-1.3.11/lib/WikiUserNew.php 2005-04-03 12:11:10.000000000 +0200 > --- public_html/image_materiels/materiel/phpwiki/lib/WikiUserNew.php 2005-09-09 23:40:31.000000000 +0200 > *************** > *** 1098,1103 **** > --- 1098,1105 ---- > return _AdoDbPassUser::setPreferences($prefs, $id_only); > } > elseif ($this->_prefs->_method == 'SQL') { > + include_once("lib/WikiUser/Db.php"); > + include_once("lib/WikiUser/PearDb.php"); > _PearDbPassUser::_PearDbPassUser($this->_userid, $prefs); > return _PearDbPassUser::setPreferences($prefs, $id_only); > } -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ http://phpwiki.org/ |
From: Saskia M. <s.m...@he...> - 2005-09-11 19:13:45
|
Please get me of this mailinglist!! ----- Original Message ----- From: "Reini Urban" <ru...@x-...> To: "Thomas Harding" <tho...@la...> Cc: "phpwiki" <php...@li...> Sent: Sunday, September 11, 2005 9:02 PM Subject: [Phpwiki-talk] Re: [phpwiki] patch adding thumbnails in photo album + few bugfixes > Thomas Harding schrieb: > > Hello, > > I added thumbnails support for PhotoAlbum plugin in my installation > > this weekend, and fixed few bugs. > > ImageTile.php is at top-level of wiki tree. > > > > It's quick and dirty :) > > Well, too dirty for me. > HtmlElement is no good place for img_tile(). > The WikiUserNew PearDB patch was already applied some time ago. > > But I like the idea and will implement it. Thanks! > > > ------------------------------------------------------------------------ > > > > diff -rc phpwiki-1.3.11/lib/HtmlElement.php public_html/image_materiels/materiel/phpwiki/lib/HtmlElement.php > > *** phpwiki-1.3.11/lib/HtmlElement.php 2005-02-12 18:08:18.000000000 +0100 > > --- public_html/image_materiels/materiel/phpwiki/lib/HtmlElement.php 2005-09-11 18:34:15.945336736 +0200 > > *************** > > *** 184,189 **** > > --- 184,207 ---- > > $el = new HtmlElement('img'); > > return $el->_init2(func_get_args()); > > } > > + function img_tile (/*...*/) { > > + $el = new HTML ('img'); > > + $tag = func_get_args(); > > + $params = "<img src='../ImageTile.php?url=" > > + .$tag[0]['src'] > > + ."&width=" > > + .$tag[0]['width'] > > + ."&height=" > > + .$tag[0]['height'] > > + ."' width='" > > + .$tag[0]['width'] > > + ."' height='" > > + .$tag[0]['height'] > > + ."' alt='" > > + .$tag[0]['alt'] > > + ."' />"; > > + return $el->raw ($params); > > + } > > function br (/*...*/) { > > $el = new HtmlElement('br'); > > return $el->_init2(func_get_args()); > > diff -rc phpwiki-1.3.11/lib/plugin/PhotoAlbum.php public_html/image_materiels/materiel/phpwiki/lib/plugin/PhotoAlbum.php > > *** phpwiki-1.3.11/lib/plugin/PhotoAlbum.php 2004-12-06 20:50:05.000000000 +0100 > > --- public_html/image_materiels/materiel/phpwiki/lib/plugin/PhotoAlbum.php 2005-09-11 20:01:54.221957184 +0200 > > *************** > > *** 217,223 **** > > } > > > > $newwidth = $this->newSize($size[0], $width); > > ! $newheight = $this->newSize($size[1], $height); > > > > if ($width != 'auto' && $newwidth > 0) { > > $params = array_merge($params, array("width" => $newwidth)); > > --- 217,226 ---- > > } > > > > $newwidth = $this->newSize($size[0], $width); > > ! if ($mode == 'thumbs' || $mode == 'tiles') > > ! $newheight = round (50 * $size[1] / $size[0]); > > ! else > > ! $newheight = $this->newSize($size[1], $height); > > > > if ($width != 'auto' && $newwidth > 0) { > > $params = array_merge($params, array("width" => $newwidth)); > > *************** > > *** 246,251 **** > > --- 249,255 ---- > > //create url to display single larger version of image on page > > $url = WikiURL($request->getPage(), > > array("p" => basename($value["name"]))); > > + > > $b_url = WikiURL($request->getPage(), > > array("h" => basename($value["name"]))). > > "#". > > *************** > > *** 255,261 **** > > basename($value["name"]); > > if (! $p) { > > $url_image = $link ? HTML::a(array("href" => "$url"), > > ! HTML::img($params)) : > > HTML::img($params); > > } else { > > $url_image = $link ? HTML::a(array("href" => "$b_url"), > > --- 259,265 ---- > > basename($value["name"]); > > if (! $p) { > > $url_image = $link ? HTML::a(array("href" => "$url"), > > ! HTML::img_tile($params)) : > > HTML::img($params); > > } else { > > $url_image = $link ? HTML::a(array("href" => "$b_url"), > > *************** > > *** 425,430 **** > > --- 429,435 ---- > > } > > return; > > } > > + $src = $src_bak; > > @$fp = fopen ($src, "r"); > > if (!$fp) { > > return $this->error(fmt("Unable to read src='%s'", $src)); > > diff -rc phpwiki-1.3.11/lib/WikiUserNew.php public_html/image_materiels/materiel/phpwiki/lib/WikiUserNew.php > > *** phpwiki-1.3.11/lib/WikiUserNew.php 2005-04-03 12:11:10.000000000 +0200 > > --- public_html/image_materiels/materiel/phpwiki/lib/WikiUserNew.php 2005-09-09 23:40:31.000000000 +0200 > > *************** > > *** 1098,1103 **** > > --- 1098,1105 ---- > > return _AdoDbPassUser::setPreferences($prefs, $id_only); > > } > > elseif ($this->_prefs->_method == 'SQL') { > > + include_once("lib/WikiUser/Db.php"); > > + include_once("lib/WikiUser/PearDb.php"); > > _PearDbPassUser::_PearDbPassUser($this->_userid, $prefs); > > return _PearDbPassUser::setPreferences($prefs, $id_only); > > } > > > -- > Reini Urban > http://xarch.tu-graz.ac.at/home/rurban/ > http://phpwiki.org/ > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > Phpwiki-talk mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwiki-talk > |
From: Reini U. <ru...@x-...> - 2005-09-11 19:18:02
|
Saskia Marges schrieb: > Please get me of this mailinglist!! Sorry, steve is not around. you have to do that by yourself. https://lists.sourceforge.net/lists/listinfo/phpwiki-talk -- Reini Urban http://phpwiki.org/ |
From: Oliver B. <ob...@de...> - 2005-09-12 14:32:12
|
Reini Urban wrote: > > Please get me of this mailinglist!! > > Sorry, steve is not around. you have to do that by yourself. > > https://lists.sourceforge.net/lists/listinfo/phpwiki-talk Even simpler is to look at the "List-Unsubscribe" header in each list mail. And many (?) mail clients offer a "unsubscribe" button using this information. Oliver |