<?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>Root Design Works! &#187; Resourceful Coding Tips</title>
	<atom:link href="http://root-design.net/category/resourceful-coding-tips/feed" rel="self" type="application/rss+xml" />
	<link>http://root-design.net</link>
	<description>Drupal, Wordpress, Joomla, Moodle, Web Site Makovers</description>
	<lastBuildDate>Wed, 21 Apr 2010 21:26:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Moodle Tips: Modify the login box</title>
		<link>http://root-design.net/resourceful-coding-tips/moodle-tips-modify-the-login-box</link>
		<comments>http://root-design.net/resourceful-coding-tips/moodle-tips-modify-the-login-box#comments</comments>
		<pubDate>Thu, 21 Jan 2010 03:59:23 +0000</pubDate>
		<dc:creator>rootdesign</dc:creator>
				<category><![CDATA[Resourceful Coding Tips]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[moodle]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[templates]]></category>

		<guid isPermaLink="false">http://root-design.net/?p=153</guid>
		<description><![CDATA[Need to modify the &#8220;Your are logged in as&#8230;(Logout)&#8221; link text&#8221; that is at the top right of your Moodle site? It usually looks like this: The parentheses are hard coded but they can be removed without any problems as far as I have seen. Find your weblib.php file. Do this for all the code [...]]]></description>
			<content:encoded><![CDATA[<p>Need to modify the &#8220;Your are logged in as&#8230;(Logout)&#8221; link text&#8221;  that is at the top right of your Moodle site?</p>
<p>It usually looks like this:<br />
<a  href="http://root-design.net/wp-content/uploads/2010/01/moodle-login-screenshot.png" class="thickbox no_icon" rel="gallery-153" title="moodle-login-screenshot"><img class="alignnone size-full wp-image-174" style="border: 1px solid black;" title="moodle-login-screenshot" src="http://root-design.net/wp-content/uploads/2010/01/moodle-login-screenshot.png" alt="" width="218" height="77" /></a></p>
<p>The parentheses are hard coded but they can be removed without any problems as far as I have seen.</p>
<p>Find your weblib.php file.</p>
<p>Do this for all the code that refers to &#8216;login,&#8217; &#8216;logout,&#8217; &#8216;switchrolereturn,&#8217; and &#8216;loggedinas&#8217;<br />
In my weblib.php this runs from lines 3477 to 3497</p>
<p>Remove the ( that occurs after the &#8221; and the ) that is just before the last &#8216;;</p>
<p>Original:</p>
<hr /><code>$loggedinas = $realuserinfo.get_string('loggedinas', 'moodle', $username).<br />
" (&amp;lt;a $CFG-&amp;gt;frametarget href=\"$CFG-&amp;gt;wwwroot/login/logout.php?sesskey=".sesskey()."\"&amp;gt;".get_string('logout').'&amp;lt;/a&amp;gt;)';</code></p>
<hr />After:</p>
<hr /><code>$loggedinas = $realuserinfo.get_string('loggedinas', 'moodle', $username).<br />
" &amp;lt;a $CFG-&amp;gt;frametarget href=\"$CFG-&amp;gt;wwwroot/login/logout.php?sesskey=".sesskey()."\"&amp;gt;".get_string('logout').'&amp;lt;/a&amp;gt;';</code></p>
<hr />2) To put a line break between login status (ie &#8220;You are logged in as&#8230;&#8221; or &#8220;You are not logged in.&#8221;) and the &#8216;login&#8217; link, you can add two br tags and appropriate php code:</p>
<p>For example, to make a line break between the &#8216;logged in as&#8217; text and the &#8216;logout&#8217; link, do the following:</p>
<p>Before:</p>
<hr /><code>$loggedinas = $realuserinfo.get_string('loggedinas', 'moodle', $username).<br />
" &amp;lt;a $CFG-&amp;gt;frametarget href=\"$CFG-&amp;gt;wwwroot/login/logout.php?sesskey=".sesskey()."\"&amp;gt;".get_string('logout').'&amp;lt;/a&amp;gt;';</code></p>
<hr />After:</p>
<hr /><code>$loggedinas = get_string('loggedinnot', 'moodle').<br />
'&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;' . " &amp;lt;a $CFG-&amp;gt;frametarget href=\"$wwwroot/login/index.php\"&amp;gt;".get_string('login').'&amp;lt;/a&amp;gt;';<br />
}</code></p>
<hr />Again, you can do this to all the code that refers to &#8216;login,&#8217; &#8216;logout,&#8217; &#8216;switchrolereturn,&#8217; and &#8216;loggedinas&#8217; to keep everything looking uniform.</p>
<p><strong>BE VERY CAREFUL</strong> when editing. Remove the wrong parenthesis or forget to add a &#8216;. and you probably don&#8217;t need me to warn you of how that will mess up your site.</p>
<p>Hope this helps you!</p>
<p>I have also been able to add style tags to my theme&#8217;s css and then apply them to the php strings for &#8216;login&#8217; and &#8216;logout.&#8217;  I created a class called &#8216;loginlogout&#8217;  which I applied to the login/logout link strings &#8211; a background color and some padding which gives the links some &#8216;oomph.&#8217;</p>
<p><a  href="http://root-design.net/wp-content/uploads/2010/01/moodle-login-screenshot21.jpg" class="thickbox no_icon" rel="gallery-153" title="moodle-login-screenshot2"><img class="alignleft size-medium wp-image-268" style="margin-left: 5px; margin-right: 5px;" title="moodle-login-screenshot2" src="http://root-design.net/wp-content/uploads/2010/01/moodle-login-screenshot21-200x70.jpg" alt="" width="200" height="70" /></a></p>
<p>Wondering what &#8220;Moodle&#8221; is?  Go to <a  href="http://moodle.org">moodle.org</a> for a primer and a friendly user community. When I get some more time, I will post more tips and tricks I have learned in my experiences working with Moodle.</p>
<p>Note that the modification to the login works with Moodle 1.8 and 1.9. I can&#8217;t vouch for other versions.</p>
]]></content:encoded>
			<wfw:commentRss>http://root-design.net/resourceful-coding-tips/moodle-tips-modify-the-login-box/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress: Category Custom Styling</title>
		<link>http://root-design.net/resourceful-coding-tips/wordpress-category-custom-styling</link>
		<comments>http://root-design.net/resourceful-coding-tips/wordpress-category-custom-styling#comments</comments>
		<pubDate>Thu, 14 Jan 2010 01:47:12 +0000</pubDate>
		<dc:creator>rootdesign</dc:creator>
				<category><![CDATA[Resourceful Coding Tips]]></category>

		<guid isPermaLink="false">http://root-design.net/?p=75</guid>
		<description><![CDATA[If you want to do some sophisticated styling of WordPress categories, this is a must-read: Include the Category ID via postclass For added goodness, here is a plugin that will show post, page, and category ID&#8217;s in your WordPress admin. Plus, you can designate what user levels are allowed to see them. It&#8217;s called (drumroll&#8230;):  [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to do some sophisticated styling of WordPress categories, this is a must-read:<a  href="http://digwp.com/2010/01/include-the-category-id-via-post_class/" target="_blank"><br />
Include the Category ID via postclass </a></p>
<p>For added goodness, here is a plugin that will show post, page, and category ID&#8217;s in your WordPress admin. Plus, you can designate what user levels are allowed to see them.</p>
<p>It&#8217;s called (drumroll&#8230;):  <a  href="http://www.schloebe.de/wordpress/reveal-ids-for-wp-admin-25-plugin/" target="_blank">Reveal IDs for WP-Admin</a></p>
<p>A code snippet/tidbit for WordPress: You can have &#8216;current&#8217; highlighted states for page items in a menu  (&#8220;current_page_item&#8221;), but did you know there is a class in WordPress that you can use for current category items?  It is called &#8220;current-cat&#8221; and here is an example of how to use it.</p>
<p><code>&lt;?php if (is_category('CATEGORY-NAME') || in_category('#') &amp;&amp; !is_home()) : ?&gt; class="current-cat"&lt;?php endif; ?&gt;&gt;</code></p>
<p>Translation:  if this is the current category (referenced by name), and/or the current post belongs to that category (referenced by number), AND,(deep breath) it is NOT the home page, then highlight the link using the &#8216;current category&#8217; class. </p>
<p>You can add  the &#8216;current-cat&#8217; class to your stylesheet and give it whatever color and background styling is appropriate for your theme.</p>
<p>There is a great plugin that will do this for you:  <a  href="http://kahi.cz/wordpress/highlight-used-categories-plugin/#comment-37437" target="_blank">Kahi&#8217;s Used Categories Plugin</a>  </p>
<p>I must be not getting enough sleep because I first thought it said &#8220;used cars plugin.&#8221;  I am sure there is a plugin for that too. If not, I guess I should start writing it!</p>
]]></content:encoded>
			<wfw:commentRss>http://root-design.net/resourceful-coding-tips/wordpress-category-custom-styling/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Resources</title>
		<link>http://root-design.net/resourceful-coding-tips/resources</link>
		<comments>http://root-design.net/resourceful-coding-tips/resources#comments</comments>
		<pubDate>Tue, 12 Jan 2010 16:18:27 +0000</pubDate>
		<dc:creator>rootdesign</dc:creator>
				<category><![CDATA[Resourceful Coding Tips]]></category>
		<category><![CDATA[categories]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[id]]></category>
		<category><![CDATA[style]]></category>
		<category><![CDATA[WORDPRESS]]></category>

		<guid isPermaLink="false">http://root-design.net/?p=62</guid>
		<description><![CDATA[WordPress, Joomla, Drupal, blogging, and general internet tips and goodies will be here.]]></description>
			<content:encoded><![CDATA[<p>WordPress, Joomla, Drupal, blogging, and general internet tips and goodies will be here.</p>
]]></content:encoded>
			<wfw:commentRss>http://root-design.net/resourceful-coding-tips/resources/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
