<?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/"
	xmlns:series="http://unfoldingneurons.com/"
	>

<channel>
	<title>Brock Angelo &#187; HTML</title>
	<atom:link href="http://brockangelo.com/category/code/html-programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://brockangelo.com</link>
	<description>cool little projects</description>
	<lastBuildDate>Wed, 01 Sep 2010 17:07:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Redirect Users Back to Page They Were On</title>
		<link>http://brockangelo.com/2009/12/17/redirect-users-back-to-page-they-were-on/</link>
		<comments>http://brockangelo.com/2009/12/17/redirect-users-back-to-page-they-were-on/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 14:09:59 +0000</pubDate>
		<dc:creator>brockangelo</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[back]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[intranet]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[redirect]]></category>

		<guid isPermaLink="false">http://brockangelo.com/?p=1312</guid>
		<description><![CDATA[How to redirect users back to the page they were on when they clicked "login".


Related posts:<ol><li><a href='http://brockangelo.com/2008/09/06/using-php-code-in-posts-pages/' rel='bookmark' title='Permanent Link: Using PHP code in Posts &#038; Pages'>Using PHP code in Posts &#038; Pages</a></li><li><a href='http://brockangelo.com/2008/09/21/removing-categories-from-your-rss-feed/' rel='bookmark' title='Permanent Link: Removing Categories from your RSS feed'>Removing Categories from your RSS feed</a></li><li><a href='http://brockangelo.com/2008/09/10/aligning-navbar-to-both-left-and-right/' rel='bookmark' title='Permanent Link: Aligning Navbar to both Left and Right'>Aligning Navbar to both Left and Right</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>I am a fan of most things WordPress, but one thing I am not a fan of is the way that everyone gets sent to the Dashboard whenever they log in. Not everyone who logs into your site will write posts or administer the site. And for an intranet, this is a drag.</p>
<p>What I&#8217;ve always wanted was a way to reload the current page after I have logged in. So if I&#8217;m on the &#8220;Search&#8221; page, I just want to go to the login page, then go back to the page I was on when I clicked the &#8220;Login&#8221; link. Finally &#8211; a solution!</p>
<p>Thanks to <a href="http://davidchambersdesign.com/wordpress-login-redirect/">David Chambers</a> &#8211; it is as easy as changing the url that the &#8220;login&#8221; link points to. </p>
<pre class="brush: php;">&lt;a href=&quot;&lt;?php echo get_option('siteurl'); ?&gt;/wp-login.php?redirect_to=&lt;?php echo urlencode($_SERVER['REQUEST_URI']); ?&gt;&quot;&gt;log in&lt;/a&gt;</pre>
<p>He calls it WordPress Login Redirect. I would imagine that this would be a handy plugin for a lot of people. On an intranet, you may want to provide a link to the dashboard if they are an admin, or a link to logout if they are not. I have been using a very simple conditional statement that determines what to put in place of the login link after you are logged in.</p>
<pre class="brush: php;">&lt;?php
	global $current_user;
	get_currentuserinfo();

	if (!(is_user_logged_in())) { ?&gt;
		&lt;a href=&quot;&lt;?php echo get_option('siteurl'); ?&gt;/wp-login.php?redirect_to=&lt;?php echo urlencode($_SERVER['REQUEST_URI']); ?&gt;&quot;&gt;Log in&lt;/a&gt;
	&lt;?php } elseif
		(
		(($current_user-&gt;user_login) == &quot;brock&quot;) 	||
		(($current_user-&gt;user_login) == &quot;admin&quot;)
		)
		{
			echo &quot;&lt;a href=\&quot;&quot;;
			echo get_option('siteurl');
			echo &quot;/wp-admin/\&quot;&gt;Dashboard&lt;/a&gt;&quot;;
			} else { ?&gt;
			&lt;a href=&quot;&lt;?php echo wp_logout_url( get_permalink() ); ?&gt;&quot; title=&quot;Logout&quot;&gt;Logout&lt;/a&gt;
			&lt;?php
		}
?&gt;
</pre>


<p>Related posts:<ol><li><a href='http://brockangelo.com/2008/09/06/using-php-code-in-posts-pages/' rel='bookmark' title='Permanent Link: Using PHP code in Posts &#038; Pages'>Using PHP code in Posts &#038; Pages</a></li><li><a href='http://brockangelo.com/2008/09/21/removing-categories-from-your-rss-feed/' rel='bookmark' title='Permanent Link: Removing Categories from your RSS feed'>Removing Categories from your RSS feed</a></li><li><a href='http://brockangelo.com/2008/09/10/aligning-navbar-to-both-left-and-right/' rel='bookmark' title='Permanent Link: Aligning Navbar to both Left and Right'>Aligning Navbar to both Left and Right</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://brockangelo.com/2009/12/17/redirect-users-back-to-page-they-were-on/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Aligning Navbar to both Left and Right</title>
		<link>http://brockangelo.com/2008/09/10/aligning-navbar-to-both-left-and-right/</link>
		<comments>http://brockangelo.com/2008/09/10/aligning-navbar-to-both-left-and-right/#comments</comments>
		<pubDate>Wed, 10 Sep 2008 21:07:08 +0000</pubDate>
		<dc:creator>brockangelo</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[navbar]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tables]]></category>

		<guid isPermaLink="false">http://brockangelo.com/?p=239</guid>
		<description><![CDATA[Aligning a Navigation Bar to both the Left side and the Right sides:
I have always thought it would be nice to have a navigation bar that aligns text to both the left and the right, so I finally took the time to get this working. Once I figured it out, it was very simple to [...]


Related posts:<ol><li><a href='http://brockangelo.com/2008/09/06/using-php-code-in-posts-pages/' rel='bookmark' title='Permanent Link: Using PHP code in Posts &#038; Pages'>Using PHP code in Posts &#038; Pages</a></li><li><a href='http://brockangelo.com/2009/04/27/how-to-bulk-import-into-a-mysql-database/' rel='bookmark' title='Permanent Link: How to Bulk Import into a MySQL Database'>How to Bulk Import into a MySQL Database</a></li><li><a href='http://brockangelo.com/2009/12/17/redirect-users-back-to-page-they-were-on/' rel='bookmark' title='Permanent Link: Redirect Users Back to Page They Were On'>Redirect Users Back to Page They Were On</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p><strong>Aligning a Navigation Bar to both the Left side and the Right sides</strong>:</p>
<p>I have always thought it would be nice to have a navigation bar that aligns text to both the left and the right, so I finally took the time to get this working. Once I figured it out, it was very simple to setup. </p>
<p>So on the left you&#8217;ll have this:<br />
<center><br />
<blockquote><img src="http://brockangelo.com/wp-content/uploads/2008/09/left.jpg" alt="" title="left" width="366" height="54" class="aligncenter size-full wp-image-242" /></p></blockquote>
<p></center></p>
<p>And on the right you&#8217;ll have this:<br />
<center><br />
<blockquote><img src="http://brockangelo.com/wp-content/uploads/2008/09/right.jpg" alt="" title="right" width="281" height="66" class="aligncenter size-full wp-image-241" /></p></blockquote>
<p></center></p>
<p>It is as simple as an html table. Yep. Just think about it. Your navigation bar is a single row, with two columns. I set my left column to 70% and my right column to 30%. Then I can align each table to the left or right. </p>
<p>I set the entire table inside an unordered list, then each page link is just an <code>li</code> or a <em>list item</em>. Your header.php file will probably look similar to mine, but without the table. What you choose to do with your newly-balanced right side is up to you. I am displaying the current time with a greeting depending on the time of day. At my office we are displaying the visitors IP address (very handy on a LAN).</p>
<pre class="brush: php;">
&lt;div id=&quot;navbar&quot;&gt;
	&lt;ul&gt;
		&lt;table width=&quot;100%&quot;&gt;
			&lt;tr&gt;
		&lt;td width=&quot;80%&quot;&gt;&lt;li&gt;&lt;a href=&quot;&lt;?php echo get_settings('home'); ?&gt;&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;
		&lt;?php wp_list_pages(); ?&gt;
		&lt;?php wp_list_categories(); ?&gt;
		&lt;/td&gt;
		&lt;td width=&quot;20%&quot; align=&quot;right&quot;&gt;&lt;div id=&quot;txt&quot;&gt;&lt;/div&gt;&lt;/td&gt;
			&lt;/tr&gt;
		&lt;/table&gt;
	&lt;/ul&gt;
&lt;/div&gt;
</pre>


<p>Related posts:<ol><li><a href='http://brockangelo.com/2008/09/06/using-php-code-in-posts-pages/' rel='bookmark' title='Permanent Link: Using PHP code in Posts &#038; Pages'>Using PHP code in Posts &#038; Pages</a></li><li><a href='http://brockangelo.com/2009/04/27/how-to-bulk-import-into-a-mysql-database/' rel='bookmark' title='Permanent Link: How to Bulk Import into a MySQL Database'>How to Bulk Import into a MySQL Database</a></li><li><a href='http://brockangelo.com/2009/12/17/redirect-users-back-to-page-they-were-on/' rel='bookmark' title='Permanent Link: Redirect Users Back to Page They Were On'>Redirect Users Back to Page They Were On</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://brockangelo.com/2008/09/10/aligning-navbar-to-both-left-and-right/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
