<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sosuke &#187; WordPress</title>
	<atom:link href="http://www.sosuke.com/index.php/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sosuke.com</link>
	<description>Dark music of the gods.</description>
	<lastBuildDate>Sat, 02 Feb 2013 04:06:56 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Using multiple categories in EventCalendar3 for WordPress (update 1)</title>
		<link>http://www.sosuke.com/index.php/2006/06/11/using-multiple-categories-in-eventcalendar3-for-wordpress-update-1/</link>
		<comments>http://www.sosuke.com/index.php/2006/06/11/using-multiple-categories-in-eventcalendar3-for-wordpress-update-1/#comments</comments>
		<pubDate>Mon, 12 Jun 2006 03:35:18 +0000</pubDate>
		<dc:creator>Barrett Sonntag</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.sosuke.com/?p=8</guid>
		<description><![CDATA[wp-includes/classes.php line 679-702, for the Events listed outside of the Event category 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 if &#40;mysql2date&#40;'U', $this-&#62;posts&#91;0&#93;-&#62;post_date_gmt&#41; &#62; mysql2date&#40;'U', $now&#41;&#41; &#123; //it's future dated $this-&#62;is_preview = true; &#160; /* DIRTY FUTURE-POSTS HACK FOR EC3 */ if &#40;function_exists&#40;'ec3_get_calendar'&#41;&#41; [...]]]></description>
				<content:encoded><![CDATA[<p>wp-includes/classes.php line 679-702, for the Events listed outside of the Event category</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>mysql2date<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'U'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">posts</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_date_gmt</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;</span> mysql2date<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'U'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$now</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">//it's future dated</span>
	<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">is_preview</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">/* DIRTY FUTURE-POSTS HACK FOR EC3 */</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'ec3_get_calendar'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$ec3</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$ec3_post_0_is_event</span> <span style="color: #339933;">=</span> <span style="color: #990000;">intval</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_var</span><span style="color: #009900;">&#40;</span>
            <span style="color: #0000ff;">&quot;SELECT COUNT(0) FROM <span style="color: #006699; font-weight: bold;">$wpdb-&gt;post2cat</span> WHERE post_id=&quot;</span>
            <span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">posts</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; AND category_id IN ('<span style="color: #006699; font-weight: bold;">$ec3-&gt;event_category</span>','14')&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$ec3_post_0_is_event</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">is_preview</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">is_preview</span><span style="color: #009900;">&#41;</span>
    <span style="color: #666666; font-style: italic;">/* DIRTY FUTURE-POSTS HACK FOR EC3 */</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>current_user_can<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'edit_post'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">posts</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">posts</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span> <span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>eventcalendar3.php line 1048</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$post_list</span><span style="color: #339933;">=</span><span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_results</span><span style="color: #009900;">&#40;</span>
  <span style="color: #0000ff;">&quot;SELECT DISTINCT(post_id) FROM <span style="color: #006699; font-weight: bold;">$tablepost2cat</span> &quot;</span> <span style="color: #339933;">.</span>
  <span style="color: #0000ff;">&quot;WHERE category_id IN ('<span style="color: #006699; font-weight: bold;">$ec3-&gt;event_category</span>','14')&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.sosuke.com/index.php/2006/06/11/using-multiple-categories-in-eventcalendar3-for-wordpress-update-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using multiple categories in EventCalendar3 for WordPress</title>
		<link>http://www.sosuke.com/index.php/2006/06/11/using-multiple-categories-in-eventcalendar3-for-wordpress/</link>
		<comments>http://www.sosuke.com/index.php/2006/06/11/using-multiple-categories-in-eventcalendar3-for-wordpress/#comments</comments>
		<pubDate>Sun, 11 Jun 2006 07:38:27 +0000</pubDate>
		<dc:creator>Barrett Sonntag</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.sosuke.com/?p=7</guid>
		<description><![CDATA[So I read at a few points that EventCalendar 3.1 was on its way, but I decided to start mangling some code to get multiple event categories to work! Open eventcalendar3.php near line 525; 1 2 3 4 5 6 // Which posts are we interested in? if&#40;$ec3-&#62;show_only_events&#41; &#123; // Category ID number for event [...]]]></description>
				<content:encoded><![CDATA[<p>So I read at a few points that EventCalendar 3.1 was on its way, but I decided to start mangling some code to get multiple event categories to work!</p>
<p>Open eventcalendar3.php near line 525;</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Which posts are we interested in?</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ec3</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">show_only_events</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
<span style="color: #666666; font-style: italic;">// Category ID number for event posts.</span>
<span style="color: #000088;">$where_post</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;category_id IN ('<span style="color: #006699; font-weight: bold;">$ec3-&gt;event_category</span>','14')&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>I changed $where_post to add another category, this category will show up in the calendar now!</p>
<p>Also update line 540 to incorperate the same code so the date will be colored!</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$calendar_entries</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_results</span><span style="color: #009900;">&#40;</span>
<span style="color: #0000ff;">&quot;SELECT DISTINCT
post_title,
post_date,
DAYOFMONTH(post_date) AS day,
MONTH(post_date) AS month,
YEAR(post_date) AS year,
(category_id IN ('<span style="color: #006699; font-weight: bold;">$ec3-&gt;event_category</span>','14')) AS is_event
FROM <span style="color: #006699; font-weight: bold;">$tableposts</span>,<span style="color: #006699; font-weight: bold;">$tablepost2cat</span>
WHERE post_date &gt;= '<span style="color: #006699; font-weight: bold;">$begin_date</span>'
AND post_date &lt;  '<span style="color: #006699; font-weight: bold;">$end_date</span>'
AND post_status = 'publish'
AND id = post_id
AND <span style="color: #006699; font-weight: bold;">$where_post</span>
ORDER BY post_date ASC&quot;</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Each of my Event categories I want to add will be entirely seperate categories, no sub-categories, I did this so I could exclude some categories from showing up where I did not want them.</p>
<p>To add each category to show up like the events open eventcalendar3.php again near line 1032;</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$ec3</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">is_listing</span> <span style="color: #339933;">=</span>
<span style="color: #009900;">&#40;</span><span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/\bcategory_id\s*=\s*'?(<span style="color: #006699; font-weight: bold;">$ec3-&gt;event_category</span>|3|4|14|8|9)'?\b/&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$where</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span>
<span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/\bcategory_nicename\s*=\s*'<span style="color: #006699; font-weight: bold;">$event_cat_nicename</span>'/&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$where</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>I changed preg_match(&#8220;/\bcategory_id\s*=\s*&#8217;?$ec3->event_category&#8217;?\b/&#8221;,$where) || to add the extra categories.</p>
<p>Each category I want to show up in the calendar view I make sure that they are part of the Event category as well as their own.</p>
<p>You can see this in effect at <a target="_blank" href="http://www.austinpublic.com">www.austinpublic.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sosuke.com/index.php/2006/06/11/using-multiple-categories-in-eventcalendar3-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Future post searching for WordPress</title>
		<link>http://www.sosuke.com/index.php/2006/06/07/future-post-searching-for-wordpress/</link>
		<comments>http://www.sosuke.com/index.php/2006/06/07/future-post-searching-for-wordpress/#comments</comments>
		<pubDate>Thu, 08 Jun 2006 03:32:00 +0000</pubDate>
		<dc:creator>Barrett Sonntag</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.sosuke.com/?p=6</guid>
		<description><![CDATA[I am setting up a new WordPress blog, 2.0.3, for another site. This site is using EventCalendar 3.0 and will have future scheduled posts that represent events. However WordPress doesn&#8217;t have this option built in from what I can see and a quick search yielded no results. I did a few searches and finally opened [...]]]></description>
				<content:encoded><![CDATA[<p>I am setting up a new WordPress blog, 2.0.3, for another site. This site is using EventCalendar 3.0 and will have future scheduled posts that represent events. However WordPress doesn&#8217;t have this option built in from what I can see and a quick search yielded no results.</p>
<p>I did a few searches and finally opened up classes.php, goto ~590 to find this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$pagenow</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">'post.php'</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$pagenow</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">'edit.php'</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">is_single</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$user_ID</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$where</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot; AND post_date_gmt &lt;= '<span style="color: #006699; font-weight: bold;">$now</span>'&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$distinct</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'DISTINCT'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Replace it with this code.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$pagenow</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">'post.php'</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$pagenow</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">'edit.php'</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">is_single</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$user_ID</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$q</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'s'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$where</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot; AND post_date_gmt &lt;= '<span style="color: #006699; font-weight: bold;">$now</span>'&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000088;">$distinct</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'DISTINCT'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Bingo! Now on your search pages future posts are displayed!</p>
<p>You can see this in effect at <a target="_blank" href="http://www.austinpublic.com/">www.austinpublic.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sosuke.com/index.php/2006/06/07/future-post-searching-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
