<?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>Ruben Sargsyan &#187; automatically</title>
	<atom:link href="http://rubensargsyan.com/tag/automatically/feed/" rel="self" type="application/rss+xml" />
	<link>http://rubensargsyan.com</link>
	<description>Personal Website</description>
	<lastBuildDate>Thu, 01 Dec 2011 19:15:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Automatically activating theme after WordPress installation</title>
		<link>http://rubensargsyan.com/automatically-activating-theme-after-wordpress-installation/</link>
		<comments>http://rubensargsyan.com/automatically-activating-theme-after-wordpress-installation/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 16:57:35 +0000</pubDate>
		<dc:creator>Ruben Sargsyan</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[automatically]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[theme]]></category>

		<guid isPermaLink="false">http://rubensargsyan.com/?p=399</guid>
		<description><![CDATA[To activate the theme that you want to be activated automatically after WordPress (version 3.0 and more) installation, copy that theme to the /wp-content/themes/ directory, then open the file default-constants.php from the directory /wp-includes/ and in the function wp_templating_constants change the value of WP_DEFAULT_THEME to the name of the theme directory. Example: define( &#8216;WP_DEFAULT_THEME&#8217;, &#8216;mortgage&#8217; [...]]]></description>
			<content:encoded><![CDATA[<p>To activate the theme that you want to be activated automatically after WordPress (version 3.0 and more) installation, copy that theme to the /wp-content/themes/ directory, then<span id="more-399"></span> open the file default-constants.php from the directory /wp-includes/ and in the function wp_templating_constants change the value of WP_DEFAULT_THEME to the name of the theme directory.</p>
<p>Example:<br />
define( &#8216;WP_DEFAULT_THEME&#8217;, &#8216;mortgage&#8217; );</p>
]]></content:encoded>
			<wfw:commentRss>http://rubensargsyan.com/automatically-activating-theme-after-wordpress-installation/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Automatically put words for autocompleting</title>
		<link>http://rubensargsyan.com/automatically-put-words-for-autocompleting/</link>
		<comments>http://rubensargsyan.com/automatically-put-words-for-autocompleting/#comments</comments>
		<pubDate>Fri, 25 Jun 2010 11:30:27 +0000</pubDate>
		<dc:creator>Ruben Sargsyan</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[autocomplete]]></category>
		<category><![CDATA[automatically]]></category>
		<category><![CDATA[texts]]></category>

		<guid isPermaLink="false">http://rubensargsyan.com/?p=384</guid>
		<description><![CDATA[While I was looking through a site about migrate sharepoint, I saw a search field with autocompleting and the first idea I have is to develop a code that will automatically put those words for autocompleting that are more often happen in the texts. &#60;?php function get_words&#40;$texts&#41;&#123; if&#40;!empty&#40;$texts&#41;&#41;&#123; $words = array&#40;&#41;; $words_count = 0; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>While I was looking through a site about <a href="http://www.itransition.com/sharepoint/" target="_blank">migrate sharepoint</a>, I saw a search field with autocompleting and the first idea I have is to develop a code that will automatically put those words for autocompleting that are more often happen in the texts<span id="more-384"></span>.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">function</span> get_words<span style="color: #009900;">&#40;</span><span style="color: #000088;">$texts</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: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$texts</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$words</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: #000088;">$words_count</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$texts</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            <span style="color: #990000;">preg_match_all</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/\w{2,}/i&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$text</span><span style="color: #339933;">,</span> <span style="color: #000088;">$matches</span><span style="color: #339933;">,</span> PREG_SET_ORDER<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$matches</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$word</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                <span style="color: #000088;">$word_found</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
&nbsp;
                <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$words</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                    <span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">&lt;</span>count<span style="color: #009900;">&#40;</span><span style="color: #000088;">$words</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</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: #000088;">$words</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;word&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">==</span><span style="color: #000088;">$word</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                            <span style="color: #000088;">$words</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;count&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">++;</span>
                            <span style="color: #000088;">$word_found</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
                            <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
                        <span style="color: #009900;">&#125;</span>
                    <span style="color: #009900;">&#125;</span>
                <span style="color: #009900;">&#125;</span>
&nbsp;
                <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$word_found</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                    <span style="color: #000088;">$words</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$words_count</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;word&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$word</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                    <span style="color: #000088;">$words</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$words_count</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;count&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
&nbsp;
                    <span style="color: #000088;">$words_count</span><span style="color: #339933;">++;</span>
                <span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
                    <span style="color: #000088;">$word_found</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: #009900;">&#125;</span>
&nbsp;
        <span style="color: #b1b100;">return</span> <span style="color: #000088;">$words</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
      <span style="color: #b1b100;">return</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>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> sort_by_words_count<span style="color: #009900;">&#40;</span><span style="color: #000088;">$word1</span><span style="color: #339933;">,</span><span style="color: #000088;">$word2</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  <span style="color: #000088;">$word1_count</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$word1</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;count&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$word2_count</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$word2</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;count&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$word1_count</span><span style="color: #339933;">&lt;</span><span style="color: #000088;">$word2_count</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span><span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$word1_count</span><span style="color: #339933;">==</span><span style="color: #000088;">$word2_count</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000088;">$text1</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;If you would like to have your running line on your Wordpress blog, so this plugin is just for you! It gives you the possibility to show one of the posts from your chosen category by the running line. So download and enjoy!&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$text2</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;This plugin is used when there are words, words expressions or sentences to be explained in the posts or pages of your wordpress blog. This plugin will help the visitors to read the explanations of the words (words expressions,sentences) you need via tooltips.&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$text3</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Any occasion to receive greetings? So, this plugin is just for you! This Widget plugin shows a greeting image which would be uploaded for the occasion and a pop up form for receiving the greetings. It is possible to show the greetings in any post or page.&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$text4</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;This plugin adds links after the posts for subscribing to the post author's posts feed via RSS. So if there are several authors in the blog, but a visitor wishes to subscribe just an author posts feed, this plugin gives that possibility to do it.&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$text5</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;This is a widget plugin which helps to display the visitors who left the most number of comments in the Wordpress blog.&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$texts</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$text1</span><span style="color: #339933;">,</span> <span style="color: #000088;">$text2</span><span style="color: #339933;">,</span> <span style="color: #000088;">$text3</span><span style="color: #339933;">,</span> <span style="color: #000088;">$text4</span><span style="color: #339933;">,</span> <span style="color: #000088;">$text4</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$all_words</span> <span style="color: #339933;">=</span> get_words<span style="color: #009900;">&#40;</span><span style="color: #000088;">$texts</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #990000;">usort</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$all_words</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'sort_by_words_count'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$autocompleting_words_count</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">10</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Autocompleting words count</span>
&nbsp;
<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">&lt;</span><span style="color: #000088;">$autocompleting_words_count</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$autocompleting_words</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$all_words</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;word&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000088;">$autocompleting_words</span> <span style="color: #339933;">=</span> <span style="color: #990000;">implode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;,&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$autocompleting_words</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
&lt;html&gt;
&lt;head&gt;
  &lt;link href=&quot;http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;/&gt;
  &lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js&quot;&gt;&lt;/script&gt;
  &lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js&quot;&gt;&lt;/script&gt;
&nbsp;
  &lt;script&gt;
  $(document).ready(function() {
    $(&quot;input#autocomplete&quot;).autocomplete({
    source: [<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$autocompleting_words</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>]
});
  });
  &lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&nbsp;
&lt;input id=&quot;autocomplete&quot; /&gt;
&nbsp;
&lt;/body&gt;
&lt;/html&gt;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://rubensargsyan.com/automatically-put-words-for-autocompleting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automatically set permalink custom structure after WordPress installation</title>
		<link>http://rubensargsyan.com/automatically-set-permalink-custom-structure-after-wordpress-installation/</link>
		<comments>http://rubensargsyan.com/automatically-set-permalink-custom-structure-after-wordpress-installation/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 16:28:23 +0000</pubDate>
		<dc:creator>Ruben Sargsyan</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[automatically]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[permalink structure]]></category>

		<guid isPermaLink="false">http://rubensargsyan.com/?p=374</guid>
		<description><![CDATA[For setting the permalink structure that you want to be set automatically after WordPress installation, open the file schema.php from the directory /wp-admin/includes/ and set the value of permalink_structure of the array $options of the function populate_options that structure which you want to be set. Then open the file upgrade.php from the same directory and [...]]]></description>
			<content:encoded><![CDATA[<p>For setting the permalink structure that you want to be set automatically after WordPress installation, open the file<span id="more-374"></span> schema.php from the directory /wp-admin/includes/ and set the value of permalink_structure of the array $options of the function populate_options that structure which you want to be set. Then open the file upgrade.php from the same directory and add $wp_rewrite->set_permalink_structure(get_option(&#8220;permalink_structure&#8221;)); just before $wp_rewrite->flush_rules(); in the function wp_install.</p>
]]></content:encoded>
			<wfw:commentRss>http://rubensargsyan.com/automatically-set-permalink-custom-structure-after-wordpress-installation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automatic activating plugins after WordPress installation</title>
		<link>http://rubensargsyan.com/automatic-activating-plugins-after-wordpress-installation/</link>
		<comments>http://rubensargsyan.com/automatic-activating-plugins-after-wordpress-installation/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 10:15:54 +0000</pubDate>
		<dc:creator>Ruben Sargsyan</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[activate]]></category>
		<category><![CDATA[automatically]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[plugins]]></category>

		<guid isPermaLink="false">http://rubensargsyan.com/?p=334</guid>
		<description><![CDATA[To activate the plugins that you want to be activated automatically after WordPress installation, copy those plugins to the /wp-content/plugins/ directory, then open the file schema.php from the directory /wp-admin/includes/ and add the plugins main files names in the active_plugins array which is in the $options array of the function populate_options. Example: &#8230; &#8216;active_plugins&#8217; => [...]]]></description>
			<content:encoded><![CDATA[<p>To activate the plugins that you want to be activated automatically after WordPress installation, copy those plugins to the /wp-content/plugins/ directory, then<span id="more-334"></span> open the file schema.php from the directory /wp-admin/includes/ and add the plugins main files names in the active_plugins array which is in the $options array of the function populate_options.</p>
<p>Example:<br />
&#8230;<br />
&#8216;active_plugins&#8217; => array(&#8220;explanatory-dictionary/explanatory-dictionary.php&#8221;,&#8221;most-commenting-visitors/most-commenting-visitors.php&#8221;,&#8221;greetings/greetings.php&#8221;,&#8221;running-line/running-line.php&#8221;,&#8221;subscribe-to-author-posts-feed/subscribe-to-author-posts-feed.php&#8221;),<br />
&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://rubensargsyan.com/automatic-activating-plugins-after-wordpress-installation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

