<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" > <channel><title>Comments on: Add Random Gallery Photo Block</title> <atom:link href="http://www.liewcf.com/archives/2005/02/add-random-gallery-photo-block/feed/" rel="self" type="application/rss+xml" /><link>http://www.liewcf.com/archives/2005/02/add-random-gallery-photo-block/</link> <description>Tech, Web, How to, Reviews, Tips, Downloads, and Make Money Online</description> <lastBuildDate>Sun, 22 Nov 2009 06:09:58 +0800</lastBuildDate> <generator>http://wordpress.org/?v=2.8.5</generator> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>By: Blog bằng Tiếng Việt &#187; Create a new plug in: &#8220;Photo at SideBar&#8221; to show a 75X75 photo</title><link>http://www.liewcf.com/archives/2005/02/add-random-gallery-photo-block/comment-page-1/#comment-9589</link> <dc:creator>Blog bằng Tiếng Việt &#187; Create a new plug in: &#8220;Photo at SideBar&#8221; to show a 75X75 photo</dc:creator> <pubDate>Wed, 25 May 2005 14:30:27 +0000</pubDate> <guid isPermaLink="false">http://www.liewcf.com/wp/archives/2005/02/add-random-gallery-photo-block/#comment-9589</guid> <description>[...]  	The example that is closest to what I want: size of photo and description on th ebottom is this: 	http://www.liewcf.com/blog/archives/2005/02/add-random-gallery-photo-block/ 	Research the method to create a plug in from the beginning.  	  	  	  	   [...]</description> <content:encoded><![CDATA[<p>[...]  	The example that is closest to what I want: size of photo and description on th ebottom is this: <a href="http://www.liewcf.com/blog/archives/2005/02/add-random-gallery-photo-block/" rel="nofollow">http://www.liewcf.com/blog/archives/2005/02/add-random-gallery-photo-block/</a> Research the method to create a plug in from the beginning.</p><p> [...]</p> ]]></content:encoded> </item> <item><title>By: Allan</title><link>http://www.liewcf.com/archives/2005/02/add-random-gallery-photo-block/comment-page-1/#comment-7615</link> <dc:creator>Allan</dc:creator> <pubDate>Mon, 21 Mar 2005 03:26:49 +0000</pubDate> <guid isPermaLink="false">http://www.liewcf.com/wp/archives/2005/02/add-random-gallery-photo-block/#comment-7615</guid> <description>To all other friends who might be looking for the answer to this issue:The problem is that Gallery *requires* the random block to be included via HTTP. It can&#039;t be included as a direct file.include(&quot;http://your.site/path/to/gallery/block-random.php&quot;)That way gallery works as an external system to WP. No worries about definition overlapping at code level.</description> <content:encoded><![CDATA[<p>To all other friends who might be looking for the answer to this issue:</p><p>The problem is that Gallery *requires* the random block to be included via HTTP. It can&#8217;t be included as a direct file.</p><p>include(&#8221;http://your.site/path/to/gallery/block-random.php&#8221;)</p><p>That way gallery works as an external system to WP. No worries about definition overlapping at code level.</p> ]]></content:encoded> </item> <item><title>By: LcF</title><link>http://www.liewcf.com/archives/2005/02/add-random-gallery-photo-block/comment-page-1/#comment-7612</link> <dc:creator>LcF</dc:creator> <pubDate>Mon, 21 Mar 2005 01:09:16 +0000</pubDate> <guid isPermaLink="false">http://www.liewcf.com/wp/archives/2005/02/add-random-gallery-photo-block/#comment-7612</guid> <description>I would advice you to make a new installation and do as I recommended.</description> <content:encoded><![CDATA[<p>I would advice you to make a new installation and do as I recommended.</p> ]]></content:encoded> </item> <item><title>By: Allan</title><link>http://www.liewcf.com/archives/2005/02/add-random-gallery-photo-block/comment-page-1/#comment-7609</link> <dc:creator>Allan</dc:creator> <pubDate>Sun, 20 Mar 2005 19:51:24 +0000</pubDate> <guid isPermaLink="false">http://www.liewcf.com/wp/archives/2005/02/add-random-gallery-photo-block/#comment-7609</guid> <description>I fixed &quot;PHP Warning: Cannot modify header information - headers already sent&quot; by turning on the &quot;output buffering&quot;. It speeded up my page loading speed as well. That was a surprise.These error in original code remains: Fatal error: Cannot redeclare _() (previously declared in D:\root\dynamic\wp-includes\functions.php:6) in D:\root\dynamic\gallery\lib\lang.php on line 465</description> <content:encoded><![CDATA[<p>I fixed<br /> &#8220;PHP Warning: Cannot modify header information &#8211; headers already sent&#8221;<br /> by turning on the &#8220;output buffering&#8221;. It speeded up my page loading speed as well. That was a surprise.</p><p>These error in original code remains:<br /> Fatal error: Cannot redeclare _() (previously declared in D:\root\dynamic\wp-includes\functions.php:6) in D:\root\dynamic\gallery\lib\lang.php on line 465</p> ]]></content:encoded> </item> <item><title>By: Allan</title><link>http://www.liewcf.com/archives/2005/02/add-random-gallery-photo-block/comment-page-1/#comment-7608</link> <dc:creator>Allan</dc:creator> <pubDate>Sun, 20 Mar 2005 19:06:22 +0000</pubDate> <guid isPermaLink="false">http://www.liewcf.com/wp/archives/2005/02/add-random-gallery-photo-block/#comment-7608</guid> <description>Hey man, guess I did my changes in different way since the very beginning. Whenever I need to refine something, I use Dreamweaver MX instead. But results are the same as template editor. System prints out the error message above. I have found no spaces, new lines, or other garbage before an opening &lt;?php tag or after a closing ?&gt; tag.It&#039;s interesting that the &quot;block-random.php&quot; worked on your system out of the box with any error.Best.</description> <content:encoded><![CDATA[<p>Hey man, guess I did my changes in different way since the very beginning. Whenever I need to refine something, I use Dreamweaver MX instead. But results are the same as template editor. System prints out the error message above. I have found no spaces, new lines, or other garbage before an opening < ?php tag or after a closing ?> tag.</p><p>It&#8217;s interesting that the &#8220;block-random.php&#8221; worked on your system out of the box with any error.</p><p>Best.</p> ]]></content:encoded> </item> <item><title>By: LcF</title><link>http://www.liewcf.com/archives/2005/02/add-random-gallery-photo-block/comment-page-1/#comment-7604</link> <dc:creator>LcF</dc:creator> <pubDate>Sun, 20 Mar 2005 11:36:25 +0000</pubDate> <guid isPermaLink="false">http://www.liewcf.com/wp/archives/2005/02/add-random-gallery-photo-block/#comment-7604</guid> <description>I don&#039;t understand why do you need to call a function in Gallery?! Login Wordpress admin, goto Presentation &gt; Theme Editor. From there, select your template and click &quot;Sidebar Template&quot; and add the following code to include random gallery block: &lt;code&gt;&lt;?php include(&quot;http://www.YOURDOMAIN.com/gallery/block-random-enhanced.php&quot;); ?&gt;&lt;/code&gt;</description> <content:encoded><![CDATA[<p>I don&#8217;t understand why do you need to call a function in Gallery?!<br /> Login Wordpress admin, goto Presentation > Theme Editor. From there, select your template and click &#8220;Sidebar Template&#8221; and add the following code to include random gallery block:<br /> <code>&lt;?php include("http://www.YOURDOMAIN.com/gallery/block-random-enhanced.php"); ?&gt;</code></p> ]]></content:encoded> </item> <item><title>By: Anonymous</title><link>http://www.liewcf.com/archives/2005/02/add-random-gallery-photo-block/comment-page-1/#comment-7601</link> <dc:creator>Anonymous</dc:creator> <pubDate>Sun, 20 Mar 2005 05:14:31 +0000</pubDate> <guid isPermaLink="false">http://www.liewcf.com/wp/archives/2005/02/add-random-gallery-photo-block/#comment-7601</guid> <description>Hey LcF, thanks for the quick response.I am running Gallery 1.4 and WP 1.5. The match seems problematic. Whenever I call a function in Gallery, system prints:PHP Warning: Cannot modify header information - headers already sent by (output started at D:\root\dynamic\wp-content\themes\default\index.php:5) in D:\root\dynamic\gallery\lib\lang.php on line 342 PHP Fatal error: Cannot redeclare _() (previously declared in D:\root\dynamic\wp-includes\functions.php:6) in D:\root\dynamic\gallery\lib\lang.php on line 465It seems some hacking of the original code is needed to get these two program to work together.Cheers.</description> <content:encoded><![CDATA[<p>Hey LcF, thanks for the quick response.</p><p>I am running Gallery 1.4 and WP 1.5. The match seems problematic. Whenever I call a function in Gallery, system prints:</p><p>PHP Warning: Cannot modify header information &#8211; headers already sent by (output started at D:\root\dynamic\wp-content\themes\default\index.php:5) in D:\root\dynamic\gallery\lib\lang.php on line 342 PHP Fatal error: Cannot redeclare _() (previously declared in D:\root\dynamic\wp-includes\functions.php:6) in D:\root\dynamic\gallery\lib\lang.php on line 465</p><p>It seems some hacking of the original code is needed to get these two program to work together.</p><p>Cheers.</p> ]]></content:encoded> </item> <item><title>By: LcF</title><link>http://www.liewcf.com/archives/2005/02/add-random-gallery-photo-block/comment-page-1/#comment-7596</link> <dc:creator>LcF</dc:creator> <pubDate>Sat, 19 Mar 2005 06:11:40 +0000</pubDate> <guid isPermaLink="false">http://www.liewcf.com/wp/archives/2005/02/add-random-gallery-photo-block/#comment-7596</guid> <description>@allan: I am not using block-random-enhanced. I use the block-random comes with Gallery.No, you do not add the include code into function.php, add the code into your wordpress template(sidebar) instead.Example: &lt;code&gt;&lt;?php include(&quot;/gallery/block-random-enhanced.php&quot;); ?&gt;&lt;/code&gt;</description> <content:encoded><![CDATA[<p>@allan: I am not using block-random-enhanced. I use the block-random comes with Gallery.</p><p>No, you do not add the include code into function.php, add the code into your wordpress template(sidebar) instead.</p><p>Example:<br /> <code>&lt;?php include("/gallery/block-random-enhanced.php"); ?&gt;</code></p> ]]></content:encoded> </item> <item><title>By: Allan</title><link>http://www.liewcf.com/archives/2005/02/add-random-gallery-photo-block/comment-page-1/#comment-7595</link> <dc:creator>Allan</dc:creator> <pubDate>Sat, 19 Mar 2005 04:41:53 +0000</pubDate> <guid isPermaLink="false">http://www.liewcf.com/wp/archives/2005/02/add-random-gallery-photo-block/#comment-7595</guid> <description>Hi LcF, how did you get the block-random-enhanced to work? As soon as I put &quot;include(&#039;gallery/block-random-enhanced.php&#039;);&quot; into function.php, the block_image shows up on top of the page. I tried to locate to my sidebar. Nothing works.I added a div ID in block-random-enhanced.php, echo &quot;&lt;div div=&quot;block-random&quot; align=&quot;center&quot;&gt;&quot;. That did not help neither.It seems like the &quot;include&quot; can only be added to the beginning of function.php.Using:function get_header() { if ( file_exists( TEMPLATEPATH . &#039;/block-random-enhanced.php&#039;) ) load_template( TEMPLATEPATH . &#039;/block-random-enhanced.php&#039;); else load_template( ABSPATH . &#039;gallery/block-random-enhanced.php&#039;); }does not work neither.Cheers.</description> <content:encoded><![CDATA[<p>Hi LcF, how did you get the block-random-enhanced to work?<br /> As soon as I put &#8220;include(&#8217;gallery/block-random-enhanced.php&#8217;);&#8221; into function.php, the block_image shows up on top of the page. I tried to locate to my sidebar. Nothing works.</p><p>I added a div ID in block-random-enhanced.php, echo &#8220;<div div="block-random" align="center">&#8220;. That did not help neither.</p><p>It seems like the &#8220;include&#8221; can only be added to the beginning of function.php.</p><p>Using:</p><p>function get_header() {<br /> if ( file_exists( TEMPLATEPATH . &#8216;/block-random-enhanced.php&#8217;) )<br /> load_template( TEMPLATEPATH . &#8216;/block-random-enhanced.php&#8217;);<br /> else<br /> load_template( ABSPATH . &#8216;gallery/block-random-enhanced.php&#8217;);<br /> }</p><p>does not work neither.</p><p>Cheers.</p></div> ]]></content:encoded> </item> <item><title>By: David</title><link>http://www.liewcf.com/archives/2005/02/add-random-gallery-photo-block/comment-page-1/#comment-5870</link> <dc:creator>David</dc:creator> <pubDate>Wed, 02 Feb 2005 08:39:03 +0000</pubDate> <guid isPermaLink="false">http://www.liewcf.com/wp/archives/2005/02/add-random-gallery-photo-block/#comment-5870</guid> <description>Yup true, unless you can give an &lt;code&gt;id&lt;/code&gt; or &lt;code&gt;class&lt;/code&gt; to your &lt;code&gt;li&lt;/code&gt; tag, e.g. &lt;code&gt;&lt;li id=&quot;rand-photo&quot;&gt;&lt;/code&gt;. Then for your CSS you do&lt;code&gt;div#sidebar li#rand-photo img { padding: 3px; border: 1px solid #CCCCCC; }&lt;/code&gt;</description> <content:encoded><![CDATA[<p>Yup true, unless you can give an <code>id</code> or <code>class</code> to your <code>li</code> tag, e.g. <code><li id="rand-photo"></li><p></code>. Then for your CSS you do</p><p><code>div#sidebar li#rand-photo img {<br /> padding: 3px;<br /> border: 1px solid #CCCCCC;<br /> }</code></p> ]]></content:encoded> </item> <item><title>By: LcF</title><link>http://www.liewcf.com/archives/2005/02/add-random-gallery-photo-block/comment-page-1/#comment-5860</link> <dc:creator>LcF</dc:creator> <pubDate>Tue, 01 Feb 2005 15:15:52 +0000</pubDate> <guid isPermaLink="false">http://www.liewcf.com/wp/archives/2005/02/add-random-gallery-photo-block/#comment-5860</guid> <description>Thank you, David. :) But now all images in sidebar have border..</description> <content:encoded><![CDATA[<p>Thank you, David. <img src='http://www.liewcf.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br /> But now all images in sidebar have border..</p> ]]></content:encoded> </item> <item><title>By: David</title><link>http://www.liewcf.com/archives/2005/02/add-random-gallery-photo-block/comment-page-1/#comment-5859</link> <dc:creator>David</dc:creator> <pubDate>Tue, 01 Feb 2005 08:37:21 +0000</pubDate> <guid isPermaLink="false">http://www.liewcf.com/wp/archives/2005/02/add-random-gallery-photo-block/#comment-5859</guid> <description>Actually I think you don&#039;t need to assign a class to the &lt;code&gt;img&lt;/code&gt; tag. All you need to do is to add the following CSS:&lt;code&gt;div#sidebar li img { padding: 3px; border: 1px solid #CCCCCC; }&lt;/code&gt;That should add a gray border around the photo. Just change the padding, border width and colour to suit. Just a small warning - results may be funny if your code is not valid XHTML</description> <content:encoded><![CDATA[<p>Actually I think you don&#8217;t need to assign a class to the <code>img</code> tag. All you need to do is to add the following CSS:</p><p><code>div#sidebar li img {<br /> padding: 3px;<br /> border: 1px solid #CCCCCC;<br /> }</code></p><p>That should add a gray border around the photo. Just change the padding, border width and colour to suit. Just a small warning &#8211; results may be funny if your code is not valid XHTML</p> ]]></content:encoded> </item> </channel> </rss><!--
This site's performance optimized by W3 Total Cache:

W3 Total Cache improves the user experience of your blog by caching
frequent operations, reducing the weight of various files and providing
transparent content delivery network integration.

Learn more about our WordPress Plugins: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk

Served from: server.frens.net @ 2009-11-22 03:50:31 -->