<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
<channel>
	<title>Comments for Yet another blog about PHP, HTML and CSS</title>
	
	<link>http://blog.pepa.info</link>
	<description>Petr 'PePa' Pavel</description>
	<lastBuildDate>Fri, 23 Mar 2012 10:47:28 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/CommentsForYetAnotherBlogAboutPhpHtmlAndCss" /><feedburner:info uri="commentsforyetanotherblogaboutphphtmlandcss" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Comment on Converting hexadecimal RGB code to decimal with a bookmarklet by T.J. Crowder</title>
		<link>http://feedproxy.google.com/~r/CommentsForYetAnotherBlogAboutPhpHtmlAndCss/~3/r8P9Z4A5NYg/</link>
		<dc:creator>T.J. Crowder</dc:creator>
		<pubDate>Fri, 23 Mar 2012 10:47:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.pepa.info/?p=331#comment-35396</guid>
		<description>Neat! Maybe handle three-character versions as well, and allow repeated use, e.g. (&lt;a href="http://jsbin.com/agahac" rel="nofollow"&gt;live copy&lt;/a&gt; | &lt;a href="http://jsbin.com/agahac/edit" rel="nofollow"&gt;source&lt;/a&gt;):
&lt;pre lang="javascript"&gt;
var hexa, rgb;

hexa = prompt('Enter a hexadecimal RGB code (# optional):');
while (hexa) {
  if (hexa.charAt(0) === '#') {
    hexa = hexa.substring(1);
  }
  if (hexa.length === 3) {
    hexa = hexa.charAt(0) + hexa.charAt(0) +
           hexa.charAt(1) + hexa.charAt(1) +
           hexa.charAt(2) + hexa.charAt(2);
  }
  if (hexa.length !== 6) {
    rgb = "(Invalid, must be 3 or 6 characters.)";
  }
  else {
    rgb = [
      parseInt(hexa.substring(0,2), 16),
      parseInt(hexa.substring(2,4), 16),
      parseInt(hexa.substring(4,6), 16)
    ].join(' ');
  }
      
  hexa = prompt(hexa + ' converts to the RGB below.\n' +
                'Enter another or Cancel to stop',
                rgb);
}&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Neat! Maybe handle three-character versions as well, and allow repeated use, e.g. (<a href="http://jsbin.com/agahac" rel="nofollow">live copy</a> | <a href="http://jsbin.com/agahac/edit" rel="nofollow">source</a>):</p>
<pre lang="javascript">
var hexa, rgb;

hexa = prompt('Enter a hexadecimal RGB code (# optional):');
while (hexa) {
  if (hexa.charAt(0) === '#') {
    hexa = hexa.substring(1);
  }
  if (hexa.length === 3) {
    hexa = hexa.charAt(0) + hexa.charAt(0) +
           hexa.charAt(1) + hexa.charAt(1) +
           hexa.charAt(2) + hexa.charAt(2);
  }
  if (hexa.length !== 6) {
    rgb = "(Invalid, must be 3 or 6 characters.)";
  }
  else {
    rgb = [
      parseInt(hexa.substring(0,2), 16),
      parseInt(hexa.substring(2,4), 16),
      parseInt(hexa.substring(4,6), 16)
    ].join(' ');
  }

  hexa = prompt(hexa + ' converts to the RGB below.\n' +
                'Enter another or Cancel to stop',
                rgb);
}</pre>
]]></content:encoded>
	<feedburner:origLink>http://blog.pepa.info/php-html-css/tools/converting-hexadecimal-rgb-code-to-decimal-with-a-bookmarklet/#comment-35396</feedburner:origLink></item>
	<item>
		<title>Comment on Repeated forms on the same page by Petr 'PePa' Pavel</title>
		<link>http://feedproxy.google.com/~r/CommentsForYetAnotherBlogAboutPhpHtmlAndCss/~3/1CwEATn-MKQ/</link>
		<dc:creator>Petr 'PePa' Pavel</dc:creator>
		<pubDate>Thu, 05 Jan 2012 08:29:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.pepa.info/?p=312#comment-29465</guid>
		<description>Thanks! I really wish this stuff was in the documentation.

A note for everyone: Please don't suggest that I add it to the docs myself. These guys have their own funny rules for what should be included and what shouldn't.</description>
		<content:encoded><![CDATA[<p>Thanks! I really wish this stuff was in the documentation.</p>
<p>A note for everyone: Please don&#8217;t suggest that I add it to the docs myself. These guys have their own funny rules for what should be included and what shouldn&#8217;t.</p>
]]></content:encoded>
	<feedburner:origLink>http://blog.pepa.info/php-html-css/nette/repeated-forms-on-the-same-page/#comment-29465</feedburner:origLink></item>
	<item>
		<title>Comment on Absolute positioning in HTML e-mails for Outlook 2007 by Greg Bulmash</title>
		<link>http://feedproxy.google.com/~r/CommentsForYetAnotherBlogAboutPhpHtmlAndCss/~3/HbCOsLnYGDE/</link>
		<dc:creator>Greg Bulmash</dc:creator>
		<pubDate>Thu, 01 Dec 2011 23:14:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.pepa.info/?p=21#comment-27799</guid>
		<description>Dude, thanks. This worked great. One bit to note for people needing to do this for multiple table cells... use different names AND different z-indexes for each cell's shapes. I needed to fill 2 cells and did the backgrounds both at -1 with the foregrounds both at 1, the background wouldn't show on the second cell. When I changed the background to 2 and the foreground to 3 on the second cell, both displayed nicely.</description>
		<content:encoded><![CDATA[<p>Dude, thanks. This worked great. One bit to note for people needing to do this for multiple table cells&#8230; use different names AND different z-indexes for each cell&#8217;s shapes. I needed to fill 2 cells and did the backgrounds both at -1 with the foregrounds both at 1, the background wouldn&#8217;t show on the second cell. When I changed the background to 2 and the foreground to 3 on the second cell, both displayed nicely.</p>
]]></content:encoded>
	<feedburner:origLink>http://blog.pepa.info/php-html-css/html-e-mail/absolute-positioning-outlook-2007/#comment-27799</feedburner:origLink></item>
	<item>
		<title>Comment on Tweaking your forms by Yet another blog about PHP, HTML and CSS » Blog Archive » n:src – the missing twin brother of n:href</title>
		<link>http://feedproxy.google.com/~r/CommentsForYetAnotherBlogAboutPhpHtmlAndCss/~3/-p0fyh940gI/</link>
		<dc:creator>Yet another blog about PHP, HTML and CSS » Blog Archive » n:src – the missing twin brother of n:href</dc:creator>
		<pubDate>Wed, 23 Nov 2011 08:56:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.pepa.info/?p=243#comment-27347</guid>
		<description>[...] cookbook and the built-in n:href macro. You can also take a peek an another post of mine on how to tweak your forms using macros. As always, hopefully it’ll save you some [...]</description>
		<content:encoded><![CDATA[<p>[...] cookbook and the built-in n:href macro. You can also take a peek an another post of mine on how to tweak your forms using macros. As always, hopefully it&#8217;ll save you some [...]</p>
]]></content:encoded>
	<feedburner:origLink>http://blog.pepa.info/php-html-css/nette/tweaking-your-forms/#comment-27347</feedburner:origLink></item>
	<item>
		<title>Comment on Repeated forms on the same page by Filip Procházka (@HosipLan)</title>
		<link>http://feedproxy.google.com/~r/CommentsForYetAnotherBlogAboutPhpHtmlAndCss/~3/_Yy1jEVohug/</link>
		<dc:creator>Filip Procházka (@HosipLan)</dc:creator>
		<pubDate>Tue, 22 Nov 2011 11:12:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.pepa.info/?p=312#comment-27291</guid>
		<description>var $parent; ?? You can always call $this-&gt;getParent() in components, or even better, you can call $this-&gt;getPresenter().

And the whole foreach thing and name composition is unnecessary. You can filter components by type http://pastebin.com/TYr9nUjB</description>
		<content:encoded><![CDATA[<p>var $parent; ?? You can always call $this-&gt;getParent() in components, or even better, you can call $this-&gt;getPresenter().</p>
<p>And the whole foreach thing and name composition is unnecessary. You can filter components by type <a href="http://pastebin.com/TYr9nUjB" rel="nofollow">http://pastebin.com/TYr9nUjB</a></p>
]]></content:encoded>
	<feedburner:origLink>http://blog.pepa.info/php-html-css/nette/repeated-forms-on-the-same-page/#comment-27291</feedburner:origLink></item>
	<item>
		<title>Comment on Testing for unique value during form validation by Petr 'PePa' Pavel</title>
		<link>http://feedproxy.google.com/~r/CommentsForYetAnotherBlogAboutPhpHtmlAndCss/~3/2MWImFXCv88/</link>
		<dc:creator>Petr 'PePa' Pavel</dc:creator>
		<pubDate>Tue, 08 Nov 2011 11:43:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.pepa.info/?p=292#comment-26767</guid>
		<description>True. It can be in any model/class. In my case, I used this validation for more than one model (not visible in the code above) so I placed it in a shared BaseModel.

Thanks for the example of using callback with an instance of some class. If you happen to need an instance anyway, in your component/form factory then you can use it for the callback and get rid of instantiating the object in the method itself ($me = new self).</description>
		<content:encoded><![CDATA[<p>True. It can be in any model/class. In my case, I used this validation for more than one model (not visible in the code above) so I placed it in a shared BaseModel.</p>
<p>Thanks for the example of using callback with an instance of some class. If you happen to need an instance anyway, in your component/form factory then you can use it for the callback and get rid of instantiating the object in the method itself ($me = new self).</p>
]]></content:encoded>
	<feedburner:origLink>http://blog.pepa.info/php-html-css/nette/testing-for-unique-value-during-form-validation/#comment-26767</feedburner:origLink></item>
	<item>
		<title>Comment on Testing for unique value during form validation by Filip Procházka (@HosipLan)</title>
		<link>http://feedproxy.google.com/~r/CommentsForYetAnotherBlogAboutPhpHtmlAndCss/~3/hxSXmpTeADw/</link>
		<dc:creator>Filip Procházka (@HosipLan)</dc:creator>
		<pubDate>Tue, 08 Nov 2011 07:19:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.pepa.info/?p=292#comment-26761</guid>
		<description>Why is the `uniqueEmail` method in class BaseModel? I'd like more

-&gt;addRule(callback($usersModel, 'uniqueEmail'), ‘This e-mail is already registered.’);</description>
		<content:encoded><![CDATA[<p>Why is the `uniqueEmail` method in class BaseModel? I&#8217;d like more</p>
<p>-&gt;addRule(callback($usersModel, &#8216;uniqueEmail&#8217;), ‘This e-mail is already registered.’);</p>
]]></content:encoded>
	<feedburner:origLink>http://blog.pepa.info/php-html-css/nette/testing-for-unique-value-during-form-validation/#comment-26761</feedburner:origLink></item>
	<item>
		<title>Comment on Populating a SELECT box with distinct values by philthathril</title>
		<link>http://feedproxy.google.com/~r/CommentsForYetAnotherBlogAboutPhpHtmlAndCss/~3/-b4DlaO82Cc/</link>
		<dc:creator>philthathril</dc:creator>
		<pubDate>Wed, 25 Aug 2010 20:46:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.pepa.info/?p=90#comment-10551</guid>
		<description>If you don't care about the ids, just the value, then you can do something like this...

$list = $this-&gt;Item-&gt;find('list', array('fields'=&gt;array('Model.field')));
foreach ($list as $item) {
    $items[$item] = true;
}
$this-&gt;set('something', array_keys ($items));

This may not be ideal, but it'll get the job done. Hope this helps!

~Philip</description>
		<content:encoded><![CDATA[<p>If you don&#8217;t care about the ids, just the value, then you can do something like this&#8230;</p>
<p>$list = $this-&gt;Item-&gt;find(&#8216;list&#8217;, array(&#8216;fields&#8217;=&gt;array(&#8216;Model.field&#8217;)));<br />
foreach ($list as $item) {<br />
    $items[$item] = true;<br />
}<br />
$this-&gt;set(&#8216;something&#8217;, array_keys ($items));</p>
<p>This may not be ideal, but it&#8217;ll get the job done. Hope this helps!</p>
<p>~Philip</p>
]]></content:encoded>
	<feedburner:origLink>http://blog.pepa.info/php-html-css/cakephp/populating-a-select-box-with-distinct-values/#comment-10551</feedburner:origLink></item>
	<item>
		<title>Comment on Strong random password with a bookmarklet by T.J. Crowder</title>
		<link>http://feedproxy.google.com/~r/CommentsForYetAnotherBlogAboutPhpHtmlAndCss/~3/TN4htKG8uTM/</link>
		<dc:creator>T.J. Crowder</dc:creator>
		<pubDate>Tue, 24 Aug 2010 07:13:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.pepa.info/?p=169#comment-10531</guid>
		<description>Works in Chrome, Opera, and Safari (all on Windows). Works in IE7 if you allow the "scripted window".</description>
		<content:encoded><![CDATA[<p>Works in Chrome, Opera, and Safari (all on Windows). Works in IE7 if you allow the &#8220;scripted window&#8221;.</p>
]]></content:encoded>
	<feedburner:origLink>http://blog.pepa.info/php-html-css/tools/strong-random-password-with-a-bookmarklet/#comment-10531</feedburner:origLink></item>
	<item>
		<title>Comment on Strong random password with a bookmarklet by T.J. Crowder</title>
		<link>http://feedproxy.google.com/~r/CommentsForYetAnotherBlogAboutPhpHtmlAndCss/~3/M7NZQgkzQTg/</link>
		<dc:creator>T.J. Crowder</dc:creator>
		<pubDate>Tue, 24 Aug 2010 07:06:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.pepa.info/?p=169#comment-10530</guid>
		<description>Cool! I'm really starting to enjoy bookmarklets.

And Firefox isn't the &lt;em&gt;only&lt;/em&gt; browser. There's also Chrome. ;-) And Safari, for our iOS friends...</description>
		<content:encoded><![CDATA[<p>Cool! I&#8217;m really starting to enjoy bookmarklets.</p>
<p>And Firefox isn&#8217;t the <em>only</em> browser. There&#8217;s also Chrome. ;-) And Safari, for our iOS friends&#8230;</p>
]]></content:encoded>
	<feedburner:origLink>http://blog.pepa.info/php-html-css/tools/strong-random-password-with-a-bookmarklet/#comment-10530</feedburner:origLink></item>
</channel>
</rss>

