<?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>Notes of a Developer &#187; Wordpress</title>
	<atom:link href="http://www.developers-life.com/category/php/wordpress/feed" rel="self" type="application/rss+xml" />
	<link>http://www.developers-life.com</link>
	<description>Develop on Objective-C, UIKit, C, OpenGL for  iPhone, iPad, Mac OS X</description>
	<lastBuildDate>Fri, 03 Feb 2012 11:49:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Using jQuery thickbox built in WordPress</title>
		<link>http://www.developers-life.com/using-jquery-thickbox-built-in-wordpress.html</link>
		<comments>http://www.developers-life.com/using-jquery-thickbox-built-in-wordpress.html#comments</comments>
		<pubDate>Fri, 17 Oct 2008 10:00:45 +0000</pubDate>
		<dc:creator>Vladimir Boychentsov</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.developers-life.com/?p=204</guid>
		<description><![CDATA[To cite an example of how to use the built-in thickbox wordpress when you write a plug-in. First step: Create a folder &#8220;wp_plugin&#8221; in the folder &#8220;plugins&#8221; Second step: Create a file with the following code ajax.php 12345678910111213&#60;?php &#160; &#160; &#160;define&#40;&#34;VP&#34;,&#34;wp_plugin&#34;&#41;; &#160; &#160; &#160;define&#40;&#34;ABSPATH&#34;, str_replace&#40;&#34;wp-content/plugins/&#34;.VP, &#34;&#34;, dirname&#40;__FILE__&#41;&#41;&#41;; &#160; &#160; &#160; &#160; //The inclusion of these [...]]]></description>
			<content:encoded><![CDATA[<p>To cite an example of how to use the built-in thickbox wordpress when you write a plug-in.</p>
<p>First step: Create a folder &#8220;wp_plugin&#8221; in the folder &#8220;plugins&#8221;</p>
<p>Second step: Create a file with the following code ajax.php</p>
<div class="codecolorer-container php geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <br />
&nbsp; &nbsp; &nbsp;<a href="http://www.php.net/define"><span style="color: #990000;">define</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;VP&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;wp_plugin&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp;<a href="http://www.php.net/define"><span style="color: #990000;">define</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;ABSPATH&quot;</span><span style="color: #339933;">,</span> <a href="http://www.php.net/str_replace"><span style="color: #990000;">str_replace</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;wp-content/plugins/&quot;</span><span style="color: #339933;">.</span>VP<span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span> <a href="http://www.php.net/dirname"><span style="color: #990000;">dirname</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">__FILE__</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//The inclusion of these files allows full use of all functions of wordpress</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span>ABSPATH<span style="color: #339933;">.</span><span style="color: #0000ff;">'wp-load.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span>ABSPATH<span style="color: #339933;">.</span><span style="color: #0000ff;">'wp-admin/includes/admin.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'options'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'options'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p>Go next step<br />
<span id="more-204"></span><br />
Third step: Create a file with the following code plugin_example.php</p>
<div class="codecolorer-container php geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<span style="color: #666666; font-style: italic;">/*<br />
Plugin Name: WP plugin example<br />
Plugin URI: http://www.developers-life.com<br />
Description: Example using thickbox<br />
Author: www.developers-life.com<br />
Version: 0.1<br />
Author URI: Vladimir Boichentsov<br />
*/</span><br />
<br />
<a href="http://www.php.net/define"><span style="color: #990000;">define</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;VP&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;wp_plugin&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<a href="http://www.php.net/define"><span style="color: #990000;">define</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;VP_URL&quot;</span><span style="color: #339933;">,</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'home'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;/wp-content/plugins/&quot;</span><span style="color: #339933;">.</span>VP <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
include_js<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'admin_menu'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'wp_add_page'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;">//Add page to menu </span><br />
<span style="color: #000000; font-weight: bold;">function</span> wp_add_page<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; add_options_page<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Admin &nbsp;Menu'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Plugin'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'manage_options'</span><span style="color: #339933;">,</span> VP<span style="color: #339933;">,</span> <span style="color: #0000ff;">'wp_vp_adminmenu_options_page_includes'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #666666; font-style: italic;">//Include javascript </span><br />
<span style="color: #000000; font-weight: bold;">function</span> include_js<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;page&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> VP<span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; wp_enqueue_script<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'thickbox'</span><span style="color: #339933;">,</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'home'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/wp-includes/js/thickbox/thickbox.js'</span><span style="color: #339933;">,</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'thickbox'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'3.1-20080430'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; add_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'admin_head'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'helperCSS'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp;<br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #666666; font-style: italic;">// CSS style for thickbox</span><br />
<span style="color: #000000; font-weight: bold;">function</span> helperCSS<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;link rel='stylesheet' href='&quot;</span><span style="color: #339933;">.</span>get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'home'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;/wp-includes/js/thickbox/thickbox.css?ver=20080613' type='text/css' media='all' /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp;<br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #666666; font-style: italic;">//Main function</span><br />
<span style="color: #000000; font-weight: bold;">function</span> wp_vp_adminmenu_options_page_includes<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;a href=<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #339933;">.</span>VP_URL<span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;/ajax.php?options=ok&amp;amp;type=image&amp;amp;TB_iframe=true<span style="color: #000099; font-weight: bold;">\&quot;</span> class=<span style="color: #000099; font-weight: bold;">\&quot;</span>thickbox<span style="color: #000099; font-weight: bold;">\&quot;</span> &nbsp; &nbsp;title='Example'&gt;Example&lt;/a&gt;&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p>It&#8217;s easy:)</p>
<p>P.S.: Пишу статью на английском т.к. сам не ищу помощи на русских сайтах, а если нахожу, то в основном все на английском :) Заранее извиняюсь за свой english.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.developers-life.com/using-jquery-thickbox-built-in-wordpress.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress tags for/in wp_pages</title>
		<link>http://www.developers-life.com/wordpress-tags-forin-wp_pages.html</link>
		<comments>http://www.developers-life.com/wordpress-tags-forin-wp_pages.html#comments</comments>
		<pubDate>Fri, 05 Sep 2008 21:47:33 +0000</pubDate>
		<dc:creator>Vladimir Boychentsov</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://developers-life.com/?p=126</guid>
		<description><![CDATA[Была задача прикрутить к страницам(wp_pages) теги, но на сегодняшний день они не групируются и не добавляются в облако и т.д.. Пришлось ковыряться в кривой административной части движка wordpress, где нет понятия разделяй и властвуй! Стерпев безобразие все же сделал, то что требовалось! Во первых вставляем код в фаил wp-includes/script-loader.php 123456789$this-&#62;add&#40; 'page', '/wp-admin/js/post.js', array&#40;'suggest', 'jquery-ui-tabs', 'wp-lists', [...]]]></description>
			<content:encoded><![CDATA[<p>Была задача прикрутить к страницам(wp_pages) теги, но на сегодняшний день они не групируются и не добавляются в облако и т.д.. Пришлось ковыряться в кривой административной части движка wordpress, где нет понятия разделяй и властвуй!</p>
<p>Стерпев безобразие все же сделал, то что требовалось!</p>
<p>Во первых вставляем код в фаил <strong>wp-includes/script-loader.php</strong></p>
<div class="codecolorer-container php geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">add</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'page'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'/wp-admin/js/post.js'</span><span style="color: #339933;">,</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'suggest'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'jquery-ui-tabs'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'wp-lists'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'postbox'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'slug'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'20080318'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">localize</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'page'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'postL10n'</span><span style="color: #339933;">,</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><br />
<span style="color: #0000ff;">'tagsUsed'</span> <span style="color: #339933;">=&gt;</span>  __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Tags used on this post:'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><br />
<span style="color: #0000ff;">'add'</span> <span style="color: #339933;">=&gt;</span> attribute_escape<span style="color: #009900;">&#40;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Add'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><br />
<span style="color: #0000ff;">'addTag'</span> <span style="color: #339933;">=&gt;</span> attribute_escape<span style="color: #009900;">&#40;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Add new tag'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><br />
<span style="color: #0000ff;">'separate'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Separate tags with commas'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><br />
<span style="color: #0000ff;">'cancel'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Cancel'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><br />
<span style="color: #0000ff;">'edit'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Edit'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><br />
<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>вместо :<br />
<span id="more-126"></span></p>
<div class="codecolorer-container php geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">add</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'page'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'/wp-admin/js/page.js'</span><span style="color: #339933;">,</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'suggest'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'slug'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'20080318'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">localize</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'page'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'postL10n'</span><span style="color: #339933;">,</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><br />
<span style="color: #0000ff;">'cancel'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Cancel'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><br />
<span style="color: #0000ff;">'edit'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Edit'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><br />
<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>В файле вставим формочку wp-admin/edit-page-form.php после  &lt;h2&gt;&lt;?php _e(&#8216;Advanced Options&#8217;); ?&gt;&lt;/h2&gt;</p>
<div class="codecolorer-container html4strict geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;tagsdiv&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;postbox &lt;?php echo postbox_classes('tagsdiv', 'post'); ?&gt;</span></span>&quot;&gt;<br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/h3.html"><span style="color: #000000; font-weight: bold;">h3</span></a>&gt;&lt;?php _e<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'Tags'</span><span style="color: #66cc66;">&#41;</span>; ?&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/h3.html"><span style="color: #000000; font-weight: bold;">h3</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;inside&quot;</span>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;jaxtag&quot;</span>&gt;&lt;<a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">input</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;tags_input&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;tags-input&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;tags-input&quot;</span> <span style="color: #000066;">size</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;40&quot;</span> <span style="color: #000066;">tabindex</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;3&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&lt;?php echo get_tags_to_edit( $post_ID ); ?&gt;</span></span>&quot; /&gt;<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;tagchecklist&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span></div></td></tr></tbody></table></div>
<p>А так их можно отобразить:</p>
<div class="codecolorer-container php geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$tags</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 t.name as tag FROM <span style="color: #006699; font-weight: bold;">$wpdb-&gt;terms</span> as t, <span style="color: #006699; font-weight: bold;">$wpdb-&gt;term_relationships</span> as tr, <span style="color: #006699; font-weight: bold;">$wpdb-&gt;term_taxonomy</span> as tt,<br />
<span style="color: #006699; font-weight: bold;">$wpdb-&gt;posts</span> as p WHERE t.term_id=tt.term_id and tr.term_taxonomy_id=tt.term_taxonomy_id and<br />
tr.object_id=p.ID and tt.taxonomy='post_tag' and p.post_type='page' and p.ID=&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tags</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$tag</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000088;">$t</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;b&gt;&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$tag</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">tag</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/b&gt;, &quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">echo</span> <a href="http://www.php.net/substr"><span style="color: #990000;">substr</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$t</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <a href="http://www.php.net/strlen"><span style="color: #990000;">strlen</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$t</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>Спасибо за внимание, чуть позже допишу эти таги и обязательно запостю вторую часть.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.developers-life.com/wordpress-tags-forin-wp_pages.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress управляем контентом часть 1</title>
		<link>http://www.developers-life.com/wordpress-manage-content-part-1.html</link>
		<comments>http://www.developers-life.com/wordpress-manage-content-part-1.html#comments</comments>
		<pubDate>Thu, 04 Sep 2008 21:41:09 +0000</pubDate>
		<dc:creator>Vladimir Boychentsov</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://developers-life.com/?p=80</guid>
		<description><![CDATA[Это не значит, что в этой статье будет рассказываться о том как правильно выстраивать контент в блоге, подразумевается управление контентом средствами языка PHP Есть одна замечательная функция add_filter с помощью которой можно делать чудеса! Мне приходилось на некоторых страницах/постах менять к примеру title или content Делается это так (пример для постов и страниц): Пишется функция [...]]]></description>
			<content:encoded><![CDATA[<p>Это не значит, что в этой статье будет рассказываться о том как правильно выстраивать контент в блоге, подразумевается управление контентом средствами языка PHP</p>
<p>Есть одна замечательная функция <strong>add_filter</strong> с помощью которой можно делать чудеса! Мне приходилось на некоторых страницах/постах менять к примеру title или content</p>
<p>Делается это так (пример для постов и страниц):</p>
<p>Пишется функция с глобальной переменной $post в которой описывается что вы хотите сделать и вставляется в фильтер, к примеру возьмем основную часть контента<br />
add_filter(&#8216;the_content&#8217;,ваша функция) , так можно переоформить многие элементы wordpress</p>
]]></content:encoded>
			<wfw:commentRss>http://www.developers-life.com/wordpress-manage-content-part-1.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Решение проблемы работы wordpress-mu с tdomf (tdo-mini-forms) plugin</title>
		<link>http://www.developers-life.com/addressing-work-wordpress-mu-with-tdomf-tdo-mini-forms-plugin.html</link>
		<comments>http://www.developers-life.com/addressing-work-wordpress-mu-with-tdomf-tdo-mini-forms-plugin.html#comments</comments>
		<pubDate>Thu, 04 Sep 2008 06:10:37 +0000</pubDate>
		<dc:creator>Vladimir Boychentsov</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://developers-life.com/?p=79</guid>
		<description><![CDATA[Однажды я столкнулся с проблемой работы wordpress-mu и tdomf (tdo-mini-forms), это было при первых знакомствах с wordpress :) Так что не судите сильно :) Актуально ли это сейчас не могу утверждать, но может пригодиться. 1. В файле wp-config.php, после всего кода добавить 1include&#40;get_option&#40;'home'&#41;.&#34;/wp-content/plugins/tdo-mini-forms/tdomf.php&#34;&#41;; 2. В файле capabilities.php, после всего кода добавить 1include&#40;get_option&#40;'home'&#41;.&#34;/wp-includes/pluggable.php&#34;&#41;; 3. После 463 [...]]]></description>
			<content:encoded><![CDATA[<p>Однажды я столкнулся с проблемой работы wordpress-mu и tdomf (tdo-mini-forms), это было при первых знакомствах с wordpress :) Так что не судите сильно :)</p>
<p>Актуально ли это сейчас не могу утверждать, но может пригодиться.</p>
<p>1. В файле wp-config.php, после всего кода добавить</p>
<div class="codecolorer-container php geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span>get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'home'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;/wp-content/plugins/tdo-mini-forms/tdomf.php&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>2. В файле capabilities.php, после всего кода добавить</p>
<div class="codecolorer-container php geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span>get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'home'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;/wp-includes/pluggable.php&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p><span id="more-79"></span><br />
3. После 463 строки, в файле tdomf.php добавить</p>
<div class="codecolorer-container php geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><a href="http://www.php.net/function_exists"><span style="color: #990000;">function_exists</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'tdomf_add_menus'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span></div></td></tr></tbody></table></div>
<p>и сделать закрытие после описания функции, тоесть до<br />
//////////////////////////////////<br />
// Load the rest of the plugin! //<br />
//////////////////////////////////</p>
<p>4. После<br />
/////////////////////////<br />
// Start/Init/Upgrade //<br />
////////////////////////<br />
Вставить:</p>
<div class="codecolorer-container php geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><a href="http://www.php.net/function_exists"><span style="color: #990000;">function_exists</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'tdomf_init'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span></div></td></tr></tbody></table></div>
<p>и закрыть после описания функции, тоесть перед строкой: tdomf_db_create_tables();</p>
<p>5. В файле plugins/tdo-mini-forms/include/tdomf-form.php расскоментить строку 159 и в строке 157 вместо draft вписать publish</p>
]]></content:encoded>
			<wfw:commentRss>http://www.developers-life.com/addressing-work-wordpress-mu-with-tdomf-tdo-mini-forms-plugin.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

