<?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>Atalaya Studio &#187; Tips/Hints</title>
	<atom:link href="http://atalayastudio.com/archives/category/tipshints/feed" rel="self" type="application/rss+xml" />
	<link>http://atalayastudio.com</link>
	<description></description>
	<lastBuildDate>Mon, 08 Feb 2010 19:21:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>NAVT Update 1.0.33</title>
		<link>http://atalayastudio.com/archives/134</link>
		<comments>http://atalayastudio.com/archives/134#comments</comments>
		<pubDate>Sun, 12 Jul 2009 14:26:34 +0000</pubDate>
		<dc:creator>Greg</dc:creator>
				<category><![CDATA[NAVT]]></category>
		<category><![CDATA[Tips/Hints]]></category>
		<category><![CDATA[problems]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://atalayastudio.com/?p=134</guid>
		<description><![CDATA[Contains a minor change for user roles and was tested against wp 2.8.1. If you are having trouble finding the NAVT List menu item once the plugin is activated I suggest you do the following:

 Temporarily change the permissions on the NAVT directory to 777.
 Reactivate the NAVT plugin.
 Change the NAVT directory permissions to [...]]]></description>
			<content:encoded><![CDATA[<p>Contains a minor change for user roles and was tested against wp 2.8.1. If you are having trouble finding the NAVT List menu item once the plugin is activated I suggest you do the following:</p>
<ul>
<li> Temporarily change the permissions on the NAVT directory to 777.</li>
<li> Reactivate the NAVT plugin.</li>
<li> Change the NAVT directory permissions to 755</li>
</ul>
<p>As of version 1.0.29, NAVT needs to create a file in it&#8217;s own installation directory &#8211; the file is only created once. If it can&#8217;t create the file then it will not display the NAVT List menu item.</p>
<p>You may find that the Word Press automatic plugin upgrade routine removes all files from the previous version and you may have to temporarily change the permissions on the NAVT directory after upgrading. Make sure you change the permissions back to 755 after activating the plugin.</p>
]]></content:encoded>
			<wfw:commentRss>http://atalayastudio.com/archives/134/feed</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Visually Controlling Menus using CSS Body Classes</title>
		<link>http://atalayastudio.com/archives/61</link>
		<comments>http://atalayastudio.com/archives/61#comments</comments>
		<pubDate>Mon, 30 Mar 2009 18:21:52 +0000</pubDate>
		<dc:creator>Greg</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Themes]]></category>
		<category><![CDATA[Tips/Hints]]></category>
		<category><![CDATA[classes]]></category>
		<category><![CDATA[conditional tags]]></category>
		<category><![CDATA[CSS tips]]></category>
		<category><![CDATA[theme integration]]></category>

		<guid isPermaLink="false">http://atalayastudio.com/?p=61</guid>
		<description><![CDATA[This was written in response to a discussion on the topic of conditionally managing menus&#8230; To control the visual presence of various menu levels, a fairly simple theme modification can be made using a php function written as a WordPress action and used in conjunction with a few CSS rules.

WordPress knows which type of query [...]]]></description>
			<content:encoded><![CDATA[<p>This was written in response to a discussion on the topic of conditionally managing menus&#8230; To control the visual presence of various menu levels, a fairly simple theme modification can be made using a php function written as a <a title="WordPress Actions API" href="http://codex.wordpress.org/Plugin_API" target="_blank">WordPress action</a> and used in conjunction with a few CSS rules.</p>
<p><span id="more-61"></span></p>
<p>WordPress knows which type of query has been requested and as a result, it sets one of the is_* conditional tags. For example, is_page(), is_single(), is_category(), etc. <a title="Word Press conditional tags" href="http://codex.wordpress.org/Conditional_Tags" target="_blank">(An explanation of the topic is provided here)</a></p>
<p>If I want to modify the contents or behavior of a menu I simply add a couple of things to the theme.</p>
<p>In the theme&#8217;s functions.php file, create a function that can determine which conditional tag is active; assign a php variable to a CSS class that corresponds to the current conditional tag. Here I have named a function <strong>setBodyClass</strong></p>
<pre class="brush: php">

/**
 * This function echos a CSS class statement
* that corresponds to the current conditional tag
 */
function setBodyClass() {

    /* Home page or front page ? */
    $class = (is_home() ? &quot;homepage&quot; : is_front_page() ? &quot;frontpage&quot; : &#039;&#039;);

   /* single page ? */
   $class = (is_single() ? &quot;single-page&quot; : $class);

   /* any category ? */
   $class = (is_category() ? &quot;category&quot; : $class):

   /* A specific category ? */
   if( is_category() ) {
      $cat_id = get_category_by_slug(&quot;news-category&quot;);
      if($cat_id) {
         $class = (is_category($cat_id) ? &quot;news-category&quot;: $class);
      }
   }

   if( &#039;&#039; != $class ) {
      echo &#039; class=&quot;&#039; . $class . &#039;&quot;&#039;;
   }
}// end function

/**
 * add this action
 */
add_action(&#039;setBodyClass&#039;);
</pre>
<p>Now that we have the function written we want to use the routine in the template file where the <strong>BODY tag</strong> is created. The BODY tag can typically be found in the <strong>header.php</strong> or <strong>index.php</strong> file of your theme. After locating the BODY tag modify the tag as follows:</p>
<pre class="brush: php">
&lt;body &lt;?php do_action(&#039;setBodyClass&#039;); ?&gt; &gt;
</pre>
<h3>What have we done here?</h3>
<p>We&#8217;ve just provided a method for dynamically adding a CSS class to the body tag of the page based on a set of conditional tags. The <strong>do_action </strong>call is an <em>action hook </em>that is exclusively provided by the theme&#8217;s <strong>functions.php</strong> file. <em>Theme&#8217;s can act as their own plugin functionality provider and mine often do</em>. This technique is a preferred (<em>by me</em>) over a direct php call to the <strong>setBodyClass </strong>function. The action will add the semantic class to the BODY tag if one of the conditions I care about is true. If the none of the conditions are met, then a CSS class is not added to the BODY tag. If the <strong>setBodyClass</strong> function was <span style="text-decoration: underline;">not present</span> in the theme&#8217;s <strong>functions.php</strong> file then nothing would happen.</p>
<h3>Body Class</h3>
<p>To visually control navigation menus I can now create CSS rules that determine what the web site visitor can see when specific content is displayed on the site. This works in conjunction with the applied BODY class. For example, NAVT applies specific classes to various types of menu items. The class <strong>page_item</strong> is applied to the unordered list tag that encapsulates an anchor to a page. It also applies the class <strong>cat_item</strong> to the unordered list tag that encapsulates an anchor to a category. More specific classes are also applied by NAVT for pages, categories and other list assets that are contained in the menus. There are too many to enumerate here.</p>
<h3>Example Menu with CSS</h3>
<p>Here is a simple menu that was generated by NAVT.</p>
<pre class="brush: html">

  &lt;ul class=&#039;menu samplemenu firefox en-US&#039;&gt;
    &lt;li class=&#039;erow samplemenu_item current_page_item hometab&#039;&gt;
      &lt;a href=&#039;http://wp.local&#039; title=&#039;Home&#039; class=&#039;navt_ilink current_item&#039;&gt;Home&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&#039;orow samplemenu_item page_item about-page pagetab&#039;&gt;
      &lt;a href=&#039;http://wp.local/?page_id=2&#039; title=&#039;About&#039; class=&#039;navt_plink&#039;&gt;About&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=&#039;orow samplemenu_item page_item local-news-cat categorytab&#039;&gt;
      &lt;a href=&#039;http://wp.local/?cat=1&#039; title=&#039;Local News&#039; class=&#039;navt_clink&#039;&gt;Local News&lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
</pre>
<p>If, for example, I did <span style="text-decoration: underline;">not want</span> to display the &#8220;Local News&#8221; category on the homepage or the front page I can easily write a CSS rule to hide the category when the visitor is on the home page or the front page:</p>
<pre class="brush: css">
body.frontpage ul.samplemenu li.local-news-cat,
body.homepage ul.samplemenu li.local-news-cat {
    display: none;
}
</pre>
<p>The CSS rule above <span style="text-decoration: underline;">hides the display</span> of the LI tag assigned the class <strong>local-news-cat</strong> that is a descendant of the UL tag with the class <strong>samplemenu</strong> that is a descendant of the BODY tag assigned the class <strong>frontpage </strong>or <strong>homepage</strong>.</p>
<h3>Conclusion</h3>
<p>This is an easy technique to apply (<em>your milage may vary</em>). Create the menus you want with NAVT, examine the tags created by the plugin and decide what you want to control and under what conditions then write the CSS rules accordingly.</p>
<p>I hope this was helpful, have fun&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://atalayastudio.com/archives/61/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Notes on NAVT 1.0.28 and 1.0.29</title>
		<link>http://atalayastudio.com/archives/48</link>
		<comments>http://atalayastudio.com/archives/48#comments</comments>
		<pubDate>Fri, 27 Mar 2009 18:38:35 +0000</pubDate>
		<dc:creator>Greg</dc:creator>
				<category><![CDATA[NAVT]]></category>
		<category><![CDATA[Tips/Hints]]></category>

		<guid isPermaLink="false">http://atalayastudio.com/?p=48</guid>
		<description><![CDATA[Since the release of WordPress 2.7, people now have the ability to install WordPress in ways that make it difficult for the NAVT plugin to determine the location of the WordPress file wp-config.php. The ajax portion of NAVT includes the wp-config.php file so it can use all of the features and functions provided by the [...]]]></description>
			<content:encoded><![CDATA[<p>Since the release of WordPress 2.7, people now have the ability to install WordPress in ways that make it difficult for the NAVT plugin to determine the location of the WordPress file <strong>wp-config.php</strong>. The ajax portion of NAVT includes the wp-config.php file so it can use all of the features and functions provided by the WordPress core code. If NAVT can&#8217;t find the file because the WordPress installation isn&#8217;t where it would normally be located (<em>in the root directory</em>) OR the WordPress <strong>wp-content</strong> directory is NOT located inside the WordPress installation directory then NAVT has no chance of working correctly. <span id="more-48"></span> </p>
<p>Several people have offered solutions for the PHP include statement that is used to include the wp-config.php file and some of the code has been published in comments on this site. I didn&#8217;t make change to the plugin until recently&#8230; I just haven&#8217;t had the time. In version 1.0.28, I decided that instead of attempting to include the <em>wp-config.php</em> using a <em>relative path</em> from the location of the NAVT installtion directory &#8211; I would simply create a file on the fly that contained the name of the Word Press installation directory. NAVT knows the name of the installation directory but the ajax code in the plugin does not. The new file is called <em>wp-root.php </em>and it is created/located in the directory where NAVT is installed. The file is created only once and only when NAVT realizes it doesn&#8217;t exist. The ajax portion of NAVT includes the wp-root.php file to obtain the name of the WordPress installation directory.</p>
<h3>Version 1.0.29</h3>
<p>In version 1.0.29, I decided to add a code to ensure the NAVT installation directory had writable permissions and then change the permissions back to 0755 after the file was created. If the file cannot be created for some reason, the plugin will not work. If you do not see the NAVT Lists Tool item in your WordPress dashboard try changing the NAVT installation directory permissions to 0777 using your favorite FTP program or your web site dashboard application. Go to your web site using your browser then using your FTP program or web site file manager, look for the <strong>wp-root.php</strong> file in the NAVT installation directory. If it exists then change the directory permissions to 0755. If it doesn&#8217;t exist then the directory did not have the correct permission settings &#8211; try it again.</p>
]]></content:encoded>
			<wfw:commentRss>http://atalayastudio.com/archives/48/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Working with CSS Collapsing Menus and NAVT</title>
		<link>http://atalayastudio.com/archives/36</link>
		<comments>http://atalayastudio.com/archives/36#comments</comments>
		<pubDate>Tue, 13 May 2008 07:37:54 +0000</pubDate>
		<dc:creator>Greg</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[General Info]]></category>
		<category><![CDATA[NAVT]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Themes]]></category>
		<category><![CDATA[Tips/Hints]]></category>
		<category><![CDATA[code insertion]]></category>
		<category><![CDATA[flyout menu]]></category>
		<category><![CDATA[IE6]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://atalayastudio.com/?p=36</guid>
		<description><![CDATA[A discussion in the NAVT forum has promoted me to sit down and explain how you can use CSS collapsing menus with the NAVT plugin. This article assumes you have some working knowledge of Cascaded Style Sheets used to style your Word Press theme and some experience with NAVT.  The article explains where and [...]]]></description>
			<content:encoded><![CDATA[<p>A discussion in the NAVT forum has promoted me to sit down and explain how you can use CSS collapsing menus with the NAVT plugin. This article assumes you have some working knowledge of Cascaded Style Sheets used to style your Word Press theme and some experience with NAVT.  The article explains where and how to begin integrating a collapsing menu into your web site using NAVT to construct the correct tag structure.  This article applies to NAVT version 1.0.23 and above. <span id="more-36"></span></p>
<h3>Example Menu</h3>
<p>Below is an example of the type of menu we&#8217;re going to create using NAVT and two cascaded style sheets. The navigation elements shown in the menu are arbitrary items I put together from this web site.</p>
<div style="margin-left:40%;margin-bottom:40px;"></div>
<p>These types of menus are relatively easy to construct. However, the tricky part is making them work with IE6 and most of this article deals with the IE6 solution.</p>
<h3>Getting Started</h3>
<p>Examples of CSS style sheets that contain rules for formatting horizontal, vertical, fly-out, drop-down, and cascading menus can be found all over the Internet. When asked, I usually send people to <a title="CCS Play" rel="nofollow external" href="http://www.cssplay.co.uk/index" target="_blank">CSS Play</a> which is owned by Stuart Nicholls. CSS Play has dozens of examples of pure CSS menus that you can freely use on your non-commercial web site provided you leave the copyright statements intact that appear in the CSS file. These can also be used on Commercial web site&#8217;s provided you <a title="Copyright Permissions" rel="nofollow external" href="http://www.cssplay.co.uk/menus/drop_examples.html" target="_blank">obtain permission</a> from CSS Play.  For this tutorial, I&#8217;m going to use <a title="CSS Play Flyout menu" href="http://www.cssplay.co.uk/menus/flyoutt.html" target="_blank">this CSS Play flyout menu</a> to demonstrate the process of integrating the CSS into your web site in concert with NAVT.</p>
<p>You will, of course, need to change the menu text and background colors, adjust the menu width and heights and make any other style alterations to make the menu look right with the theme you intend to use the menu with.</p>
<h3>The !DOCTYPE</h3>
<p>Before I begin, it&#8217;s important to understand that your Word Press theme MUST use a <a title="!DOCTYPE" rel="nofollow" href="http://www.w3.org/QA/2002/04/valid-dtd-list.html" target="_blank">standards compliant !DOCTYPE</a>, and for Internet Explorer this MUST be the first line of your (x)html. Using <code> &lt;?xml version="1.0" encoding="UTF-8"?&gt;</code> will switch IE into quirks mode and your menu will not work correctly.</p>
]]></content:encoded>
			<wfw:commentRss>http://atalayastudio.com/archives/36/feed</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>
