<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/rss2full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
<channel>
	<title>Comments for Alex Jones</title>
	
	<link>http://www.silverspider.com</link>
	<description>The Web site of Alex S. Jones, community catalyst, user advocate, Web technologist, barbecue acolyte &amp; information junkie</description>
	<pubDate>Wed, 19 Nov 2008 21:30:53 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/SilverSpiderComments" type="application/rss+xml" /><item>
		<title>Comment on Y’all Vs. Ya’ll by Charlie from TX</title>
		<link>http://feeds.feedburner.com/~r/SilverSpiderComments/~3/458846397/</link>
		<dc:creator>Charlie from TX</dc:creator>
		<pubDate>Wed, 19 Nov 2008 17:53:47 +0000</pubDate>
		<guid isPermaLink="false">/?p=136#comment-46177</guid>
		<description>There both right just depends on whether your Southern Speaker or a Northern speaker</description>
		<content:encoded><![CDATA[<p>There both right just depends on whether your Southern Speaker or a Northern speaker</p>
]]></content:encoded>
	<feedburner:origLink>http://www.silverspider.com/2003/yall-vs-yall/#comment-46177</feedburner:origLink></item>
	<item>
		<title>Comment on Meanwhile, Back at the Tech Ranch by Kevin Koym</title>
		<link>http://feeds.feedburner.com/~r/SilverSpiderComments/~3/439633852/</link>
		<dc:creator>Kevin Koym</dc:creator>
		<pubDate>Sun, 02 Nov 2008 01:22:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.silverspider.com/?p=1331#comment-45294</guid>
		<description>Alex,
Thank you for the shout out- and thank you as well for making our Austin community stronger through your work with Refresh Austin.  Here's to the future that we are creating together!

Thanks.
Kevin</description>
		<content:encoded><![CDATA[<p>Alex,<br />
Thank you for the shout out- and thank you as well for making our Austin community stronger through your work with Refresh Austin.  Here&#8217;s to the future that we are creating together!</p>
<p>Thanks.<br />
Kevin</p>
]]></content:encoded>
	<feedburner:origLink>http://www.silverspider.com/2008/meanwhile-back-at-the-tech-ranch/#comment-45294</feedburner:origLink></item>
	<item>
		<title>Comment on PHP Progress Bar by Alex</title>
		<link>http://feeds.feedburner.com/~r/SilverSpiderComments/~3/433612407/</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Mon, 27 Oct 2008 13:52:25 +0000</pubDate>
		<guid isPermaLink="false">/?p=657#comment-44973</guid>
		<description>Hi Begreat, there is a link to code in addition to the example given above. Check the link in Update 2 or Zack M's comment above..</description>
		<content:encoded><![CDATA[<p>Hi Begreat, there is a link to code in addition to the example given above. Check the link in Update 2 or Zack M&#8217;s comment above..</p>
]]></content:encoded>
	<feedburner:origLink>http://www.silverspider.com/2005/php-progress-bar/#comment-44973</feedburner:origLink></item>
	<item>
		<title>Comment on PHP Progress Bar by Begreat</title>
		<link>http://feeds.feedburner.com/~r/SilverSpiderComments/~3/433612408/</link>
		<dc:creator>Begreat</dc:creator>
		<pubDate>Mon, 27 Oct 2008 13:02:14 +0000</pubDate>
		<guid isPermaLink="false">/?p=657#comment-44970</guid>
		<description>hi guys need assistance.. post me some code for a progress bar. i want to implement it on my pages..thanks in advance</description>
		<content:encoded><![CDATA[<p>hi guys need assistance.. post me some code for a progress bar. i want to implement it on my pages..thanks in advance</p>
]]></content:encoded>
	<feedburner:origLink>http://www.silverspider.com/2005/php-progress-bar/#comment-44970</feedburner:origLink></item>
	<item>
		<title>Comment on Dynamic CSS A.K.A. CSS Variables by micharo</title>
		<link>http://feeds.feedburner.com/~r/SilverSpiderComments/~3/430152881/</link>
		<dc:creator>micharo</dc:creator>
		<pubDate>Wed, 22 Oct 2008 04:42:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.silverspider.com/2007/dynamic-css/#comment-44569</guid>
		<description>thanks so much for writing back!

Here is a little bit more info:


What I want to do:
I have website with a few main pages and sub pages and sub sub pages. Each area (each main page is an area with some sub pages) has a different color background. In other words a main page and the children (sub pages) have the same background, but each area is different. The color value of the area's background is stored in a custom field in each main page.

So I wrote a style_dynamic.php with the following blocks in it.
- first I require wp-blog-header.php
- then with a function I get the color value from the custom field of the main page or if it is a child from the top parent (main page)
- then I declare this php file as a css header('Content-type: text/css');
- then I write the css style with the variable

The problem:
It seems the color value is retrieved from the custom field but somehow not read by the css.



&amp;lt?php
require('../../../wp-blog-header.php');

function get_color_value(){
global $post;
	if(is_page() &amp;&amp; $post-&amp;gtpost_parent){//if the current post is a page and has a parent, then: 
	
		$parent_id = $post-&amp;gtpost_parent; // assign the id of the parent
		$parent_post = get_post($parent_id); //get the parent post
		
		// if current page is in the sub sub level or deeper nested											
		while($parent_post-&amp;gtpost_parent){ // if the parent post has a parent, then
			$parent_id = $parent_post-&amp;gtpost_parent;
			$parent_post = get_post($parent_id);
		}
	
	}else{
		$parent_id = $post-&amp;gtID; //if it doesn't have a parent, it must be a parent, so its own ID gets stored as $parent.
	}
	
	$key = "bg_color";
	$single = true;
	$post_id = $parent_id;
	$color_value .= get_post_meta($post_id, $key, $single);
		
	return $color_value;
}
$color = get_color_value();

	
// declare the output of the file as CSS
header('Content-type: text/css'); 

?&amp;gt
#headerBg {
background-color: &amp;lt?=$color?&gt;
}</description>
		<content:encoded><![CDATA[<p>thanks so much for writing back!</p>
<p>Here is a little bit more info:</p>
<p>What I want to do:<br />
I have website with a few main pages and sub pages and sub sub pages. Each area (each main page is an area with some sub pages) has a different color background. In other words a main page and the children (sub pages) have the same background, but each area is different. The color value of the area&#8217;s background is stored in a custom field in each main page.</p>
<p>So I wrote a style_dynamic.php with the following blocks in it.<br />
- first I require wp-blog-header.php<br />
- then with a function I get the color value from the custom field of the main page or if it is a child from the top parent (main page)<br />
- then I declare this php file as a css header(&#8217;Content-type: text/css&#8217;);<br />
- then I write the css style with the variable</p>
<p>The problem:<br />
It seems the color value is retrieved from the custom field but somehow not read by the css.</p>
<p>&amp;lt?php<br />
require(&#8217;../../../wp-blog-header.php&#8217;);</p>
<p>function get_color_value(){<br />
global $post;<br />
	if(is_page() &amp;&amp; $post-&amp;gtpost_parent){//if the current post is a page and has a parent, then: </p>
<p>		$parent_id = $post-&amp;gtpost_parent; // assign the id of the parent<br />
		$parent_post = get_post($parent_id); //get the parent post</p>
<p>		// if current page is in the sub sub level or deeper nested<br />
		while($parent_post-&amp;gtpost_parent){ // if the parent post has a parent, then<br />
			$parent_id = $parent_post-&amp;gtpost_parent;<br />
			$parent_post = get_post($parent_id);<br />
		}</p>
<p>	}else{<br />
		$parent_id = $post-&gtID; //if it doesn&#8217;t have a parent, it must be a parent, so its own ID gets stored as $parent.<br />
	}</p>
<p>	$key = &#8220;bg_color&#8221;;<br />
	$single = true;<br />
	$post_id = $parent_id;<br />
	$color_value .= get_post_meta($post_id, $key, $single);</p>
<p>	return $color_value;<br />
}<br />
$color = get_color_value();</p>
<p>// declare the output of the file as CSS<br />
header(&#8217;Content-type: text/css&#8217;); </p>
<p>?&amp;gt<br />
#headerBg {<br />
background-color: &amp;lt?=$color?&gt;<br />
}</p>
]]></content:encoded>
	<feedburner:origLink>http://www.silverspider.com/2007/dynamic-css/#comment-44569</feedburner:origLink></item>
	<item>
		<title>Comment on Dynamic CSS A.K.A. CSS Variables by Alex</title>
		<link>http://feeds.feedburner.com/~r/SilverSpiderComments/~3/426421079/</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Mon, 20 Oct 2008 13:15:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.silverspider.com/2007/dynamic-css/#comment-44376</guid>
		<description>Hi Micharo, can you provide a little more information what isn't working right? 

Also, it looks like some of the code you entered here was stripped by WordPress for security. Please make sure that you escape all less than and greater than signs (&amp;lt; and &amp;gt;) to ensure the code stays whole.</description>
		<content:encoded><![CDATA[<p>Hi Micharo, can you provide a little more information what isn&#8217;t working right? </p>
<p>Also, it looks like some of the code you entered here was stripped by WordPress for security. Please make sure that you escape all less than and greater than signs (&amp;lt; and &amp;gt;) to ensure the code stays whole.</p>
]]></content:encoded>
	<feedburner:origLink>http://www.silverspider.com/2007/dynamic-css/#comment-44376</feedburner:origLink></item>
	<item>
		<title>Comment on Dynamic CSS A.K.A. CSS Variables by micharo</title>
		<link>http://feeds.feedburner.com/~r/SilverSpiderComments/~3/426421080/</link>
		<dc:creator>micharo</dc:creator>
		<pubDate>Sun, 19 Oct 2008 16:34:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.silverspider.com/2007/dynamic-css/#comment-44317</guid>
		<description>Sorry, here is the full code

&lt;code&gt;post_parent){//if the current post is a page and has a parent, then: 
	
		$parent_id = $post-&gt;post_parent; // assign the id of the parent
		$parent_post = get_post($parent_id); //get the parent post
		
		// if current page is in the sub sub level or deeper nested											
		while($parent_post-&gt;post_parent){ // if the parent post has a parent, then
			$parent_id = $parent_post-&gt;post_parent;
			$parent_post = get_post($parent_id);
		}
	
	}else{
		$parent_id = $post-&gt;ID; //if it doesn't have a parent, it must be a parent, so its own ID gets stored as $parent.
	}
	
	$key = "bg_color";
	$single = true;
	$post_id = $parent_id;
	$color_value .= get_post_meta($post_id, $key, $single);
		
	return $color_value;
}
$color = get_color_value();

	
// declare the output of the file as CSS
header('Content-type: text/css'); 

?&gt;
#headerBg {
background-color: ;
}&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Sorry, here is the full code</p>
<p><code>post_parent){//if the current post is a page and has a parent, then: </p>
<p>		$parent_id = $post-&gt;post_parent; // assign the id of the parent<br />
		$parent_post = get_post($parent_id); //get the parent post</p>
<p>		// if current page is in the sub sub level or deeper nested<br />
		while($parent_post-&gt;post_parent){ // if the parent post has a parent, then<br />
			$parent_id = $parent_post-&gt;post_parent;<br />
			$parent_post = get_post($parent_id);<br />
		}</p>
<p>	}else{<br />
		$parent_id = $post-&gt;ID; //if it doesn't have a parent, it must be a parent, so its own ID gets stored as $parent.<br />
	}</p>
<p>	$key = "bg_color";<br />
	$single = true;<br />
	$post_id = $parent_id;<br />
	$color_value .= get_post_meta($post_id, $key, $single);</p>
<p>	return $color_value;<br />
}<br />
$color = get_color_value();</p>
<p>// declare the output of the file as CSS<br />
header('Content-type: text/css'); </p>
<p>?&gt;<br />
#headerBg {<br />
background-color: ;<br />
}</code></p>
]]></content:encoded>
	<feedburner:origLink>http://www.silverspider.com/2007/dynamic-css/#comment-44317</feedburner:origLink></item>
	<item>
		<title>Comment on Dynamic CSS A.K.A. CSS Variables by micharo</title>
		<link>http://feeds.feedburner.com/~r/SilverSpiderComments/~3/426421081/</link>
		<dc:creator>micharo</dc:creator>
		<pubDate>Sun, 19 Oct 2008 16:32:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.silverspider.com/2007/dynamic-css/#comment-44316</guid>
		<description>I got the template functions to work, but still something is not doing right.

&lt;code&gt;post_parent){//if the current post is a page and has a parent, then: 
	
		$parent_id = $post-&gt;post_parent; // assign the id of the parent
		$parent_post = get_post($parent_id); //get the parent post
		
		// if current page is in the sub sub level or deeper nested											
		while($parent_post-&gt;post_parent){ // if the parent post has a parent, then
			$parent_id = $parent_post-&gt;post_parent;
			$parent_post = get_post($parent_id);
		}
	
	}else{
		$parent_id = $post-&gt;ID; //if it doesn't have a parent, it must be a parent, so its own ID gets stored as $parent.
	}
	
	$key = "bg_color";
	$single = true;
	$post_id = $parent_id;
	$color_value .= get_post_meta($post_id, $key, $single);
		
	return $color_value;
}
$color = get_color_value();

	
// declare the output of the file as CSS
header('Content-type: text/css'); 

?&gt;
#headerBg {
background-color: ;
}
&lt;/code&gt;

Help appreciated!</description>
		<content:encoded><![CDATA[<p>I got the template functions to work, but still something is not doing right.</p>
<p><code>post_parent){//if the current post is a page and has a parent, then: </p>
<p>		$parent_id = $post-&gt;post_parent; // assign the id of the parent<br />
		$parent_post = get_post($parent_id); //get the parent post</p>
<p>		// if current page is in the sub sub level or deeper nested<br />
		while($parent_post-&gt;post_parent){ // if the parent post has a parent, then<br />
			$parent_id = $parent_post-&gt;post_parent;<br />
			$parent_post = get_post($parent_id);<br />
		}</p>
<p>	}else{<br />
		$parent_id = $post-&gt;ID; //if it doesn't have a parent, it must be a parent, so its own ID gets stored as $parent.<br />
	}</p>
<p>	$key = "bg_color";<br />
	$single = true;<br />
	$post_id = $parent_id;<br />
	$color_value .= get_post_meta($post_id, $key, $single);</p>
<p>	return $color_value;<br />
}<br />
$color = get_color_value();</p>
<p>// declare the output of the file as CSS<br />
header('Content-type: text/css'); </p>
<p>?&gt;<br />
#headerBg {<br />
background-color: ;<br />
}<br />
</code></p>
<p>Help appreciated!</p>
]]></content:encoded>
	<feedburner:origLink>http://www.silverspider.com/2007/dynamic-css/#comment-44316</feedburner:origLink></item>
	<item>
		<title>Comment on Dynamic CSS A.K.A. CSS Variables by micharo</title>
		<link>http://feeds.feedburner.com/~r/SilverSpiderComments/~3/426421082/</link>
		<dc:creator>micharo</dc:creator>
		<pubDate>Sun, 19 Oct 2008 16:05:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.silverspider.com/2007/dynamic-css/#comment-44315</guid>
		<description>Hi,

I try read a custom field (background color) from a page and use that value in a dynamic cssStyle.php.

But if I add a template function in the cssStyle.php like get_post() it does not work.
I assume the problem is that the cssStyle.php is called in the header and template functions are not available.

Any help appreciated!</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I try read a custom field (background color) from a page and use that value in a dynamic cssStyle.php.</p>
<p>But if I add a template function in the cssStyle.php like get_post() it does not work.<br />
I assume the problem is that the cssStyle.php is called in the header and template functions are not available.</p>
<p>Any help appreciated!</p>
]]></content:encoded>
	<feedburner:origLink>http://www.silverspider.com/2007/dynamic-css/#comment-44315</feedburner:origLink></item>
	<item>
		<title>Comment on Define then Solve by D. Hayes</title>
		<link>http://feeds.feedburner.com/~r/SilverSpiderComments/~3/423811644/</link>
		<dc:creator>D. Hayes</dc:creator>
		<pubDate>Fri, 17 Oct 2008 15:23:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.silverspider.com/?p=1321#comment-44209</guid>
		<description>A *dead* sexy solution, indeed. This is awesome, I'd never heard that quote before.</description>
		<content:encoded><![CDATA[<p>A *dead* sexy solution, indeed. This is awesome, I&#8217;d never heard that quote before.</p>
]]></content:encoded>
	<feedburner:origLink>http://www.silverspider.com/2008/define-then-solve/#comment-44209</feedburner:origLink></item>
</channel>
</rss>
