<?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>corePHP Blog</title>
	<atom:link href="http://www.corephp.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.corephp.com/blog/</link>
	<description>Keep up to date on what&#039;s happening at &#039;corePHP&#039;</description>
	<lastBuildDate>Wed, 01 Sep 2010 15:06:11 +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>Control HTML without javascript</title>
		<link>http://www.corephp.com/blog/control-html-without-javascript/</link>
		<comments>http://www.corephp.com/blog/control-html-without-javascript/#comments</comments>
		<pubDate>Wed, 01 Sep 2010 15:05:42 +0000</pubDate>
		<dc:creator>Rafael Corral</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.corephp.com/blog/control-html-without-javascript/</guid>
		<description><![CDATA[This is something I have known about for a long time. It is advanced and can mostly be used for Cross Site Request Forgeries (CSRF). Not that I condone these, but the best way to defend yourself against hackers is by knowing as much as they do.
In some cases users turn javascript off in their [...]]]></description>
			<content:encoded><![CDATA[<p>This is something I have known about for a long time. It is advanced and can mostly be used for <a title="Cross site request forgery" href="http://en.wikipedia.org/wiki/Cross-site_request_forgery" target="_blank">Cross Site Request Forgeries</a> (CSRF). Not that I condone these, but the best way to defend yourself against hackers is by knowing as much as they do.</p>
<p>In some cases users turn javascript off in their browsers (I do) for security reasons. HTML has just about no scripting capabilities if you discard the FOR attribute on the LABEL tag. It is possible to trick a user into submitting a form by them simply highlighting text on a page. The FOR attribute binds a label to another element, which is some sort of scripting, I guess.</p>
<p><span id="more-2030"></span>Well, by simply wrapping the BODY of a page in a LABEL tag, which contains text and HTML, the LABEL and its contents become a button through binding of the FOR. This all happens behind the scenes. This means that whenever you select text or click on the body of the page, the binding becomes active, and it is possible to submit a form without any scripting at all!</p>
<p><strong>Example:</strong></p>
<pre>&lt;label for="action"&gt;
&lt;body&gt;
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore
eu fugiat nulla pariatur.
&lt;/body&gt;
&lt;/label&gt;

&lt;form action="http://twitter.com/logout" method="get"&gt;
 &lt;input type="submit" id="action" style="display:none;"&gt;
&lt;/form&gt;</pre>
<p>On my example I show a POC on how you could automatically log someone out of twitter by them simply clicking on a page. Twitter has fixed this CSRF by simply checking the referrer on the browser: If it doesn&#8217;t match twitter.com, it sends you to another logout page for you to confirm your action.</p>
<p>This is good knowledge. Use it to protect yourself and not to harm others.</p>
<p>I use a plugin for FireFox called <a title="NoScript" href="http://noscript.net/" target="_blank">NoScript</a>. This plugin will block all scripts on a per-domain basis. If you trust the domain, then you can enable those scripts. This is extremely helpful because I visit many hacked packages on a weekly basis and I do not want my computer to get a virus. This plugin will protect you from at least 70% of web attacks. I highly encourage you to use it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.corephp.com/blog/control-html-without-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Controlling Joomla! templates depending on menu you use</title>
		<link>http://www.corephp.com/blog/controlling-joomla-templates-depending-on-the-menu-you-use/</link>
		<comments>http://www.corephp.com/blog/controlling-joomla-templates-depending-on-the-menu-you-use/#comments</comments>
		<pubDate>Thu, 26 Aug 2010 20:42:26 +0000</pubDate>
		<dc:creator>Jonathan Shroyer</dc:creator>
				<category><![CDATA[Joomla]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Templates]]></category>
		<category><![CDATA[XHTML+CSS]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[snippets]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.corephp.com/blog/controlling-joomla-templates-depending-on-the-menu-you-use/</guid>
		<description><![CDATA[We have been working on building a multi-school Joomla! website and there have been many hurdles to overcome since Joomla! isn&#8217;t a multi-site CMS. After searching for anything that&#8217;s common across each school, I realized the menu for each school could be used as a common denominator. If I could set a variable depending on [...]]]></description>
			<content:encoded><![CDATA[<p>We have been working on building a multi-school Joomla! website and there have been many hurdles to overcome since Joomla! isn&#8217;t a multi-site CMS. After searching for anything that&#8217;s common across each school, I realized the menu for each school could be used as a common denominator. If I could set a variable depending on which menu is loaded on the page then I can do just about anything I want, such as change the logo, set a unique CSS class, etc. After meeting with our developers we figured out how to do this and I&#8217;ll share it with all of you in case you ever need to do the same.<br />
<span id="more-2013"></span><br />
To start we need to pull in the information of which menus are being used on the page. Place this code in the head of your template:</p>
<pre>jimport('joomla.application.menu');
$menus = JSite::getMenu();
$m = $menus-&gt;getActive();
</pre>
<p>This checks for the active menus on the page and sets it into the variable $m so we can manipulate it. Next, you need to look at the menutype in the administrator Menu Manager (under Type). This is what we will use to determine which school is being viewed. I want to take this information and set a new variable named $school:</p>
<pre>if($m-&gt;menutype == 'district-information') { $school = 'district-info'; }
if($m-&gt;menutype == 'cityname-elementary-school') { $school = 'cityname-elementary'; }
if($m-&gt;menutype == 'cityname-middle-school') { $school = 'cityname-middle'; }
if($m-&gt;menutype == 'cityname-high-school') { $school = 'cityname-high'; }
</pre>
<p>The first thing I did was echo the variable $school into an ID on the body tag.</p>
<pre>body id="&lt; ?php echo $school; ?&gt;"
</pre>
<p>This allows me to style the CSS uniquely according to the school being viewed which gives you a lot of style control. To change the logo I can just call it by the school.</p>
<pre>#cityname-high .logo {background: url(../images/logo-highschool.jpg);}
</pre>
<p>Another thing I did was load a unique module position according to the school so I could publish modules in all pages the menu shows up on. I did this by doing the following:</p>
<pre>if($school == 'district-info') {
    echo '&lt;jdoc :include type="modules" name="district_module" style="raw" /&gt;';
};
if($school == 'cityname-elementary') {
    echo '&lt;jdoc :include type="modules" name="elementary_module" style="raw" /&gt;';
};
if($school == 'cityname-middle') {
    echo '&lt;jdoc :include type="modules" name="middle_module" style="raw" /&gt;';
};
if($school == 'cityname-high') {
    echo '&lt;jdoc :include type="modules" name="high_module" style="raw" /&gt;';
};</pre>
<p>As you can see this can give you the ability to do things you may not have been able to do before in Joomla!. I know it saved me from a major headache!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.corephp.com/blog/controlling-joomla-templates-depending-on-the-menu-you-use/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Wordpress for Joomla! Training now available in Joomlashack University</title>
		<link>http://www.corephp.com/blog/wordpress-for-joomla-training-now-available-in-joomlashack-university/</link>
		<comments>http://www.corephp.com/blog/wordpress-for-joomla-training-now-available-in-joomlashack-university/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 22:24:09 +0000</pubDate>
		<dc:creator>Michael Pignataro</dc:creator>
				<category><![CDATA['corePHP' Products]]></category>
		<category><![CDATA[Joomla]]></category>
		<category><![CDATA[Recommended Software]]></category>
		<category><![CDATA[wordpress for Joomla]]></category>

		<guid isPermaLink="false">http://www.corephp.com/blog/wordpress-for-joomla-training-now-available-in-joomlashack-university/</guid>
		<description><![CDATA[JoomlaShack recently released a very informative, in-depth training lesson in their Joomlashack University on how to set up and use the Wordpress for Joomla! extension by corePHP. Wordpress for Joomla! is a powerful new Joomla extension that allows you to use Wordpress blogging software inside your Joomla website. With Wordpress for Joomla, you can enjoy [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.joomlashack.com/images/stories/wp4joomla.jpg" alt="Wordpress for Joomla" width="326" height="84" style="float: left; margin: 0 10px 5px 0;" />JoomlaShack recently released a very informative, in-depth <a title="Joomlashack University Wordpress for Joomla Lesson" href="http://www.joomlashack.com/products/joomla-training" target="_blank">training lesson</a> in their Joomlashack University on how to set up and use the <strong><a title="Wordpress for Joomla by corePHP" href="http://www.corephp.com/joomla-products/wordpress-blog-for-joomla.html" target="_blank">Wordpress for Joomla!</a></strong> extension by corePHP. <a href="http://www.corephp.com/joomla-products/wordpress-blog-for-joomla.html"><strong>Wordpress for Joomla!</strong></a> is a powerful new Joomla extension that allows you to use Wordpress blogging software <em>inside</em> your Joomla website. With Wordpress for Joomla, you can enjoy the best  blogging platform integrated with the best content management system  available. You can even use Wordpress plugins and <a href="http://www.joomlashack.com/joomla-modules">Joomla modules</a> all at the same time, on the same blog.  It&#8217;s amazing!</p>
<p>In this new Quickshot preview of <strong>Wordpress for Joomla</strong>, JSU instructor Forest Linden gives you a very brief overview of just a few of the many cool features that <strong>Wordpress for Joomla</strong>! has to offer.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="600" height="450" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="data" value="http://content.screencast.com/users/joomlashackvideo/folders/Quick%20Shots/media/9527bc63-7f82-43c0-89c2-d4a4ab8fd6d9/mp4h264player.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#FFFFFF" /><param name="flashvars" value="thumb=http://content.screencast.com/users/joomlashackvideo/folders/Quick%20Shots/media/9527bc63-7f82-43c0-89c2-d4a4ab8fd6d9/FirstFrame.jpg&amp;containerwidth=1280&amp;containerheight=960&amp;content=http://content.screencast.com/users/joomlashackvideo/folders/Quick%20Shots/media/9527bc63-7f82-43c0-89c2-d4a4ab8fd6d9/Wordpress_for_joomla_quick_shot.mp4&amp;blurover=false" /><param name="allowfullscreen" value="true" /><param name="scale" value="showall" /><param name="allowscriptaccess" value="always" /><param name="base" value="http://content.screencast.com/users/joomlashackvideo/folders/Quick%20Shots/media/9527bc63-7f82-43c0-89c2-d4a4ab8fd6d9/" /><param name="src" value="http://content.screencast.com/users/joomlashackvideo/folders/Quick%20Shots/media/9527bc63-7f82-43c0-89c2-d4a4ab8fd6d9/mp4h264player.swf" /><embed type="application/x-shockwave-flash" width="600" height="450" src="http://content.screencast.com/users/joomlashackvideo/folders/Quick%20Shots/media/9527bc63-7f82-43c0-89c2-d4a4ab8fd6d9/mp4h264player.swf" base="http://content.screencast.com/users/joomlashackvideo/folders/Quick%20Shots/media/9527bc63-7f82-43c0-89c2-d4a4ab8fd6d9/" allowscriptaccess="always" scale="showall" allowfullscreen="true" flashvars="thumb=http://content.screencast.com/users/joomlashackvideo/folders/Quick%20Shots/media/9527bc63-7f82-43c0-89c2-d4a4ab8fd6d9/FirstFrame.jpg&amp;containerwidth=1280&amp;containerheight=960&amp;content=http://content.screencast.com/users/joomlashackvideo/folders/Quick%20Shots/media/9527bc63-7f82-43c0-89c2-d4a4ab8fd6d9/Wordpress_for_joomla_quick_shot.mp4&amp;blurover=false" bgcolor="#FFFFFF" quality="high" data="http://content.screencast.com/users/joomlashackvideo/folders/Quick%20Shots/media/9527bc63-7f82-43c0-89c2-d4a4ab8fd6d9/mp4h264player.swf"></embed></object></p>
<p>If you liked this Quickshot preview and want to know more about <strong>Wordpress  for Joomla!</strong>, please visit the official <a title="Wordpress for Joomla " href="www.corephp.com/joomla-products/wordpress-blog-for-joomla.html">Wordpress for Joomla product  page</a>.  If you decide to purchase it and want to  know all the cool shortcuts,  secret tips &amp; tricks we found, please consider joining our <a title="Joomlashack University" href=" 	https://joomlashack.infusionsoft.com/go/shacku/corephp/" target="_blank">Joomlashack University</a> to get access to the complete 35 minute Wordpress for Joomla! <a title="Joomla training" href="http://www.joomlashack.com/joomla-training">training</a> video AND dozens more <a title="Joomla Training" href="http://www.joomlashack.com/joomla-training">Joomla training</a> tutorials &amp; videos.</p>
<blockquote>
<h3>Want to learn more about how to build professional websites with Joomla? Then check out Joomlashack University, the #1 <a title="Joomla online training" href=" 	https://joomlashack.infusionsoft.com/go/shacku/corephp/" target="_blank">Joomla online training</a> program in the world.</h3>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.corephp.com/blog/wordpress-for-joomla-training-now-available-in-joomlashack-university/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://content.screencast.com/users/joomlashackvideo/folders/Quick%20Shots/media/9527bc63-7f82-43c0-89c2-d4a4ab8fd6d9/Wordpress_for_joomla_quick_shot.mp4&amp;amp" length="76449742" type="video/mp4" />
		</item>
		<item>
		<title>The if() Control Structure</title>
		<link>http://www.corephp.com/blog/the-if-control-structure/</link>
		<comments>http://www.corephp.com/blog/the-if-control-structure/#comments</comments>
		<pubDate>Fri, 20 Aug 2010 20:38:26 +0000</pubDate>
		<dc:creator>Bernard Robbins</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.corephp.com/blog/the-if-control-structure/</guid>
		<description><![CDATA[if() gives you a choice between outcomes you choose yourself. This gives you the most flexibility out of your projects.
Out of all the control structures, if() is probably one of the most used and has the most flexible ways of being written. Readability should be taken into account when you decide which way to write [...]]]></description>
			<content:encoded><![CDATA[<p>if() gives you a choice between outcomes you choose yourself. This gives you the most flexibility out of your projects.</p>
<p>Out of all the control structures, if() is probably one of the most used and has the most flexible ways of being written. Readability should be taken into account when you decide which way to write it. Using braces is the wisest since it doesn&#8217;t leave any room for error in what the author meant to include in the statement. if() statements may be written inside functions / methods, inside and outside most other control structures, procedural PHP, and HTML files.</p>
<p><span id="more-1912"></span></p>
<pre>if ( expr )
    statement</pre>
<p>-or-</p>
<pre>if ( expr ) {
    statement;
} elseif ( expr ) {
    statement;
} else {
    statement;
}</pre>
<p>The brace-less semicolon way is best for intermingling PHP with HTML. (i.e. view scripts from your MVC layout.) This way you can naturally write your HTML in your statements without having to use any quotes.</p>
<pre>&lt;?php if(expr) : ?&gt;
    HTML Code 1
&lt;?php else: ?&gt;
    HTML Code 2
&lt;?php endif; ?&gt;</pre>
<p>The Ternary (ter•na•ry) Operator is a special if() statement for small expressions. You can nest the ternary as many times as you would like, but more than once is usually frowned upon since your intentions will be unclear for other developers.</p>
<pre>(expr1) ? (expr2) : (expr3);
(test for true) ? (do this if true) : (do this if false);
echo TRUE ? 'Yes, I am true' : 'I am not true';</pre>
<p>prints: Yes, I am true</p>
<pre>$value = FALSE ? 'Yes, I am true' : 'I am not true';
echo $value;</pre>
<p>prints: I am not true</p>
]]></content:encoded>
			<wfw:commentRss>http://www.corephp.com/blog/the-if-control-structure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up a Joomla! Development Environment</title>
		<link>http://www.corephp.com/blog/setting-up-a-joomla-development-environment/</link>
		<comments>http://www.corephp.com/blog/setting-up-a-joomla-development-environment/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 16:14:12 +0000</pubDate>
		<dc:creator>Dustin Clute</dc:creator>
				<category><![CDATA[Joomla]]></category>
		<category><![CDATA[Lighttpd]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.corephp.com/blog/setting-up-a-joomla-development-environment/</guid>
		<description><![CDATA[If you are new to web development and are interested in using Joomla!, you may have used Google to try and find info to help you out. You may have done a search for &#8220;joomla development&#8221; or &#8220;joomla development tools&#8221; and got Setting up your workstation for Joomla! development as one of the results. This [...]]]></description>
			<content:encoded><![CDATA[<p>If you are new to web development and are interested in using Joomla!, you may have used Google to try and find info to help you out. You may have done a search for &#8220;joomla development&#8221; or &#8220;joomla development tools&#8221; and got <a title="Setting up your workstation for Joomla! Developtment" href="http://docs.joomla.org/Setting_up_your_workstation_for_Joomla!_development">Setting up your workstation for Joomla! development</a> as one of the results. This explains how to set up XAMPP and Eclipse on Windows, Linux and OS X. Now this document has some extremely useful information for people looking to get started. They even state that there are many possible configurations of environments for developing for Joomla!. I&#8217;m going to talk about how I have my environment setup for web development.</p>
<p><span id="more-1849"></span></p>
<p>My workstation is setup with Ubuntu 10.04 running lighttpd/PHP 5.3/MySQL 5.1. I&#8217;m not going to go into details on how to install Ubuntu because there are already a few articles and blog posts out there explaining how to do this. <a href="http://www.lighttpd.net/">Lighttpd</a> is a web server like apache which aims to be fast and efficient with your system resources. You can use Apache if you like but I&#8217;m going to go over how I have lighttpd/PHP/MySQL set up.</p>
<p>Since I am using Ubuntu, I can just install everything needed from the Ubuntu repositories. All the commands below require you to open up a terminal and type in the command or copy &amp; paste for them to run.</p>
<p>The following command will install lighttpd, PHP 5 with some extra packages, and MySQL.</p>
<pre>$ sudo apt-get install lighttpd php5 php-pear php5-cgi php5-xdebug php5-curl \
php5-gd php5-mcrypt mysql-client mysql-server</pre>
<p>During the install you will be prompted to insert a MySQL root password. This password is not the root password to your computer.</p>
<p>Note that you can see what other extra PHP packages are available by doing the following command in a terminal window :</p>
<pre>$ sudo apt-cache search php5</pre>
<p>Now that everything is installed, let&#8217;s begin setting it up.</p>
<p>By default, lighttpd runs under its own user and serves documents out of /var/www. While I&#8217;m working I don&#8217;t really like to leave my home directory. I also don&#8217;t want to deal with a problem because of permissions. So I prefer to have the web server running as my user and the web root sitting in my home directory. Now we will go over how to accomplish this.</p>
<p>You can name any of the directories below the way you want and organize them how you want. You just need to make sure you put the correct paths for the directories you create in the configuration file.</p>
<p>On my system, I put everything under ~/work (the &#8220;~&#8221; is a shortcut to the full path of your home directory). First, we are going to create the web root directory where all the code will reside.</p>
<pre>$ mkdir -p ~/work/webhome</pre>
<p>The -p flag of mkdir makes sure all parent directories are created. If none of the directories are there, it will first create the work directory, then the webhome directory.</p>
<p>We need to create the log directory, upload directory, and compress directory (if you enable mod_compress) into the home directory. I do this so I don&#8217;t have to mess around with changing a bunch of permissions.</p>
<pre>$ mkdir -p ~/work/lighttpd/upload
$ mkdir -p ~/work/lighttpd/log
$ mkdir -p ~/work/lighttpd/compress</pre>
<p>Now it&#8217;s time to change the paths and setup lighttpd. You can use whatever editor you like -  just replace vim below with the name of the editor you want to use.</p>
<pre>$ sudo vim /etc/lighttpd/lighttpd.conf</pre>
<p>We need to first make sure some modules are enabled for lighttpd to work. By default everything we need is there but mod_fastcgi, which will allow lighttpd to parse PHP files. Below is the server.modules section of my lighttpd.conf file.</p>
<pre>server.modules              = (
            "mod_access",
            "mod_alias",
            "mod_accesslog",
            "mod_compress",
            "mod_fastcgi",  # this needs to be added as it is not there by default
#           "mod_rewrite",
#           "mod_redirect",
#           "mod_evhost",
#           "mod_usertrack",
#           "mod_rrdtool",
#           "mod_webdav",
#           "mod_expire",
#           "mod_flv_streaming",
#           "mod_evasive"
)</pre>
<p>Now we change the following options in the lighttpd.conf file. Make sure you use the full path of the folders you created above along with the user:group you want the server to run as. Below are the options that are changed in my lighttpd.conf file.</p>
<pre>server.document-root = "/home/dustin/work/webhome"

server.upload-dirs = ( "/home/dustin/work/lighttpd/upload" )

server.errorlog = "/home/dustin/work/lighttpd/log/error.log"

accesslog.filename = "/home/dustin/work/lighttpd/log/access.log"

# size in kbytes - this is optional if you want to be able to upload big files
server.max-request-size = 20000

server.username = "dustin"

server.groupname = "dustin"

# if you have mod_compress enabled
compress.cache-dir = "/home/dustin/work/lighttpd/compress/"</pre>
<p>Once done, save and close the file.</p>
<p>We enabled the module for fastcgi in the lighttpd configuration file. We need to enable the configuration for fastcgi. The following command accomplishes that.</p>
<pre>$ sudo lighty-enable-mod fastcgi</pre>
<p>Now we need to change the /etc/init.d/lighttpd file which controls starting/stopping/restarting of lighttpd. Since we changed the user:group that lighttpd runs as, and its init script makes sure that the directory /var/run/lighttpd is there with the correct user:group, we need to change the user and group.</p>
<p>Open /etc/init.d/lighttpd with your editor from the command line.</p>
<pre>$ sudo vim /etc/init.d/lighttpd</pre>
<p>We need to change the following line. Make sure you change www-data:www-data to the user:group you set in the /etc/lighttpd/lighttpd.conf file. Below is the original line and how I changed it:</p>
<pre>chown www-data:www-data /var/run/lighttpd</pre>
<p>changed to:</p>
<pre>chown dustin:dustin /var/run/lighttpd</pre>
<p>Once done, save and close the file.</p>
<p>There is one more change we need to make so paths work correctly in PHP. We need to open /etc/php5/cgi/php.ini and make sure cgi.fix_pathinfo=1 is uncommented. So open /etc/php/cgi/php.ini in your favorite editor.</p>
<pre>$ sudo vim /etc/php5/cgi/php.ini</pre>
<p>Search for cgi.fix_pathinfo=1 which is on line 842 on my machine and uncomment it by removing the ; at the beginning of the line.</p>
<p>Now lets restart lighttpd for all the changes to take affect.</p>
<pre>$ sudo /etc/init.d/lighttpd restart</pre>
<p>You should now be able to browse to http://localhost/ and see an empty directory listing. Now you can create different directories with installs of Joomla! or whatever you please and access them via http://localhost/directory_name or http://localhost/file_name.php.</p>
<p>One last thing we need to do is create a MySQL user to use. Now since this is more than likely your development machine using, the MySQL root user isn&#8217;t a huge problem. Just don&#8217;t ever use the MySQL root user for your scripts on a production server. This can lead to a lot of problems.</p>
<p>To create a new user:</p>
<pre>$ mysql -u root -p
# you will be prompted for the password you entered during install
mysql&gt; CREATE USER 'USER_NAME_YOU_WANT'@'localhost' identified by 'SOME_PASS_YOU_WANT';
mysql&gt; GRANT ALL PRIVILEGES ON *.* TO 'USER_NAME_YOU_WANT'@'localhost' WITH GRANT OPTION;
mysql&gt; FLUSH PRIVILEGES;</pre>
<p>Reference: <a href="http://dev.mysql.com/doc/refman/5.1/en/adding-users.html">MySQL Adding Users</a></p>
<p>At the very least, I hope this post gave you some ideas for playing around and setting up a development environment that is comfortable for you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.corephp.com/blog/setting-up-a-joomla-development-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lifestream for Joomla! from JoomlaShack</title>
		<link>http://www.corephp.com/blog/lifestream-for-joomla-from-joomlashack/</link>
		<comments>http://www.corephp.com/blog/lifestream-for-joomla-from-joomlashack/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 20:09:14 +0000</pubDate>
		<dc:creator>Michael Pignataro</dc:creator>
				<category><![CDATA[Recommended Software]]></category>
		<category><![CDATA[joomla products]]></category>

		<guid isPermaLink="false">http://www.corephp.com/blog/lifestream-for-joomla-from-joomlashack/</guid>
		<description><![CDATA[Need  an easy way to keep your friends, family and business associates  updated on all your activities; across multiple social networks; at any  time of the day and in one convenient place?
Sound impossible? Well, now you can!
Introducing Lifestream for Joomla, an exciting new social media extension from our friends at Joomlashack!
Lifestream for [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://gallery.mailchimp.com/d81d152c2d6ffacbb8eced459/images/lil_lifestream.png" border="0" alt="" hspace="3px" vspace="3px" width="110px" height="110px" align="left" />Need  an easy way to keep your friends, family and business associates  updated on all your activities; across multiple social networks; at any  time of the day and in one convenient place?</p>
<p>Sound impossible? Well, now you can!</p>
<h2><strong>Introducing <a href="https://joomlashack.infusionsoft.com/go/ext/corephp/" target="_blank">Lifestream for Joomla</a>, an exciting new social media extension from our friends at <a href="https://joomlashack.infusionsoft.com/go/plates/corephp/" target="_blank">Joomlashack!<span id="more-1978"></span></a></strong></h2>
<p><a href="https://joomlashack.infusionsoft.com/go/ext/corephp/"><strong>Lifestream for Joomla</strong></a> lets you present the social media feeds of <em>your</em> choice to <em>your</em> audience in a highly-configurable and easy-to-set up Joomla 1.5x  component &amp; module. It dynamically updates your website with your  favorite social network feeds 24/7.</p>
<p><a href="https://joomlashack.infusionsoft.com/go/ext/corephp/" target="_blank"><strong>Lifestream for Joomla</strong></a> lets you&#8230;</p>
<ul>
<li> display multiple social network feeds separately <em>or</em> together as an integrated stream</li>
<li> display in 3 different views: <strong>tab, grid (side-by-side) or integrated</strong></li>
<li> set up your streams as a component (front page, for example) or a module<strong> </strong>(throughout your site, etc)</li>
<li> add multiple accounts/users for each social network feed to create even more interesting streams</li>
<li> choose between the included Light/Silver or Charcoal/Grey themes..or create your own themes!</li>
<li> add custom formatting to each of your streams for infinite style possibilities</li>
<li> download updates/fixes and new social network integration plugins for FREE during your 6-month access period</li>
<li> get 6 months of FREE access to Joomlashack&#8217;s amazing customer support team should you need any help</li>
<li> and so much more!</li>
</ul>
<p>We LOVE this extension. It&#8217;s a great extension at an even better price!</p>
<p><strong>$24 </strong>instant download</p>
<p><a href="https://joomlashack.infusionsoft.com/go/ext/corephp/" target="_blank"><img src="../images/newsletter/buy-now.jpg" border="0" alt="Buy Now" width="250px" height="73px" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.corephp.com/blog/lifestream-for-joomla-from-joomlashack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to use countModules in any Joomla! file</title>
		<link>http://www.corephp.com/blog/how-to-use-countmodules-in-any-joomla-file/</link>
		<comments>http://www.corephp.com/blog/how-to-use-countmodules-in-any-joomla-file/#comments</comments>
		<pubDate>Fri, 06 Aug 2010 19:00:33 +0000</pubDate>
		<dc:creator>Jonathan Shroyer</dc:creator>
				<category><![CDATA[Joomla]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Templates]]></category>
		<category><![CDATA[snippets]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.corephp.com/blog/how-to-use-countmodules-in-any-joomla-file/</guid>
		<description><![CDATA[One of the core parts of creating Joomla! templates is using $this->countModules to show or hide code depending on if a module is in a particular position on the page. It is very powerful and it makes your templates very dynamic according to what is happening on the page. So what happens if you need [...]]]></description>
			<content:encoded><![CDATA[<p>One of the core parts of creating Joomla! templates is using $this->countModules to show or hide code depending on if a module is in a particular position on the page. It is very powerful and it makes your templates very dynamic according to what is happening on the page. So what happens if you need to do this outside of the template index.php file? Save yourself a huge headache and use the following code in any file to check for a module position:</p>
<pre>jimport( 'joomla.application.module.helper' );
if(count(JModuleHelper::getModules('left'))) {
	put your code here
}</pre>
<p>A very powerful addition to you Joomla! PHP library!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.corephp.com/blog/how-to-use-countmodules-in-any-joomla-file/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A sneak peek of MailChimp intergration for Joomla!</title>
		<link>http://www.corephp.com/blog/a-sneak-peek-of-mailchimp-intergration-for-joomla/</link>
		<comments>http://www.corephp.com/blog/a-sneak-peek-of-mailchimp-intergration-for-joomla/#comments</comments>
		<pubDate>Fri, 06 Aug 2010 15:34:07 +0000</pubDate>
		<dc:creator>Michael Pignataro</dc:creator>
				<category><![CDATA[Joomla]]></category>
		<category><![CDATA[Recommended Software]]></category>
		<category><![CDATA[joomla extensions]]></category>

		<guid isPermaLink="false">http://www.corephp.com/blog/a-sneak-peek-of-mailchimp-intergration-for-joomla/</guid>
		<description><![CDATA[Joomla’s popularity as one of the world’s foremost open-source content management systems is undeniable. And just got better with a complete integration of MailChimp.
But until Joomailer was released last year, the options for managing email marketing via Joomla were extremely limited. The best solutions for integrated management had nowhere near the power of hosted solutions. [...]]]></description>
			<content:encoded><![CDATA[<p>Joomla’s popularity as one of the world’s foremost open-source content management systems is undeniable. And just got better with a complete integration of <a href="http://www.mailchimp.com/signup/?pid=joomailer&amp;source=website" target="_blank">MailChimp</a>.</p>
<div id="attachment_1932" class="wp-caption aligncenter" style="width: 645px"><a href="https://www.corephp.com/images/wordpress/uploads/2010/08/splashT01.jpg"><img class="size-large wp-image-1932" title="MailChimp Intergration into Joomla!" src="https://www.corephp.com/images/wordpress/uploads/2010/08/splashT01-1024x554.jpg" alt="MailChimp Intergration into Joomla!" width="635" height="343" /></a><p class="wp-caption-text">MailChimp Integration into Joomla!</p></div>
<p>But until Joomailer was released last year, the options for managing email marketing via Joomla were extremely limited. The best solutions for integrated management had nowhere near the power of hosted solutions. Hosted solutions lacked integration &#8211; signing up for membership did not necessarily integrate with mailing lists and vice versa.<span id="more-1928"></span></p>
<p>Let’s face it &#8211; if you’re going to run a member-driven site, these things should be seamless.</p>
<p>When Joomailer was released last year, it brought the power of one of the world’s leading newsletter management apps, Campaign Monitor and merged it with Joomla. In a stroke, it was now possible to manage your site and your email marketing from one admin control panel. Brilliant!</p>
<p>More importantly for web developers, it allowed us to provide a complete solution for our clients &#8211; no more multiple logins.</p>
<p>Now Joomailer just got a whole lot better.</p>
<p>Working together with <a href="http://www.mailchimp.com/signup/?pid=joomailer&amp;source=website" target="_blank">MailChimp</a>, FreakedOut has created a new version of Joomailer which integrates with the popular, simian-styled marketing manager.</p>
<p>Best of all, the component is 100% free!</p>
<p>The advantages of <a href="http://www.mailchimp.com/signup/?pid=joomailer&amp;source=website" target="_blank">MailChimp</a> are undeniable:</p>
<ul>
<li>A ‘Free for life’ plan, including up to 500 subscribers and 3000 emails per month</li>
<li>List segmentation &#8211; target members based on known preferences to increase conversions</li>
<li>A vast array of import options</li>
<li>Powerful anti-spam features with whitelisting on many mail providers</li>
<li>Email tracking and analytics</li>
<li>Social media integration &#8211; use and track Facebook ‘Likes’ directly in your mailouts!</li>
</ul>
<div id="attachment_1933" class="wp-caption aligncenter" style="width: 644px"><a href="https://www.corephp.com/images/wordpress/uploads/2010/08/createT01.png"><img class="size-full wp-image-1933" title="Backend Interface for MailChimp for Joomla" src="https://www.corephp.com/images/wordpress/uploads/2010/08/createT01.png" alt="MailChimp for Joomla backend image" width="634" height="350" /></a><p class="wp-caption-text">Back-end Interface for MailChimp for Joomla</p></div>
<p>To be released shortly, the new <a href="http://www.mailchimp.com/signup/?pid=joomailer&amp;source=website" target="_blank">MailChimp</a> version of Joomailer will allow site owners to manage almost every aspect of their campaigns from their Joomla backend.</p>
<p>Existing site members can be synced with the <a href="http://www.mailchimp.com/signup/?pid=joomailer&amp;source=website" target="_blank">MailChimp</a> member database and with<a href="http://www.mailchimp.com/signup/?pid=joomailer&amp;source=website" target="_blank"> </a>FreakedOut’s registration injection script, new site members will be able to subscribe directly via the standard Joomla registration form, Jomsocial or Community Builder.</p>
<p>Sending out a newsletter with Joomailer is simple: just choose your template, choose your subscriber list and select which articles you’d like to include. That’s it &#8211; you’re ready to send!</p>
<p>You can even choose to send just the article intro-text and automatically include a read-more link back to the article on the site.</p>
<p>It takes enough time to generate quality content as it is &#8211; why waste more having to re-write for different media? Joomailer makes it simple to re-purpose your site’s content and use it as a powerful ongoing engagement tactic to provide continued value to your subscribers.</p>
<p>What’s stopping you? Get started with a free <a href="http://www.mailchimp.com/signup/?pid=joomailer&amp;source=website" target="_blank">MailChimp</a> account, download the free Joomailer component and start marketing today!</p>
<p>For More information -  <a href="http://www.freakedout.de/blog/77-mailchimp-meets-joomla.html">http://www.freakedout.de/blog/77-mailchimp-meets-joomla.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.corephp.com/blog/a-sneak-peek-of-mailchimp-intergration-for-joomla/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress for Joomla! 3.0 Sneak Peak!</title>
		<link>http://www.corephp.com/blog/wordpress-for-joomla-3-0-sneak-peak/</link>
		<comments>http://www.corephp.com/blog/wordpress-for-joomla-3-0-sneak-peak/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 13:30:27 +0000</pubDate>
		<dc:creator>Rafael Corral</dc:creator>
				<category><![CDATA['corePHP' Products]]></category>
		<category><![CDATA[Joomla]]></category>
		<category><![CDATA[new products]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.corephp.com/blog/wordpress-for-joomla-3-0-sneak-peak/</guid>
		<description><![CDATA[It gives us great pleasure to present one of the largest updates we have ever created for one of our products. Now presenting&#8230;Wordpress for Joomla! 3.0! (sparkle sparkle)
Wordpress for Joomla! 2.x combined the best blogging platform with the best open-source content management system available. Since its release, we&#8217;ve become aware of a few problems dealing [...]]]></description>
			<content:encoded><![CDATA[<p>It gives us great pleasure to present one of the largest updates we have ever created for one of our products. Now presenting&#8230;Wordpress for Joomla! 3.0! (sparkle sparkle)</p>
<p>Wordpress for Joomla! 2.x combined the best blogging platform with the best open-source content management system available. Since its release, we&#8217;ve become aware of a few problems dealing with plugins and occasional Wordpress templates. So we tucked ourselves away for the past month and half in a dark room and alternately drank great deal of energy drinks and coffee and set out to make Wordpress for Joomla! perfect. I think we have succeeded! Read on for some of the major enhancements in &#8220;Wordpress for Joomla! 3.0&#8243;&#8230;soon to be released!</p>
<p><span id="more-1835"></span></p>
<ul>
<li><strong>Rewritten from the ground up.</strong> We have spent a great deal of time re-tailoring our integration. Wordpress for Joomla! 3.0 is more stable, easier to use, and, of course, still just as seamless as Wordpress 2.x to the end user.</li>
<li><strong>90% of plugins for WordPress will work</strong>. This ability has been heavily requested by our users and it is now available.</li>
<li><strong>Native WordPress Theme support. </strong> WordPress for Joomla! 3.0 allows you to utilize 3rd party themes for WordPress inside of Joomla!</li>
<li><strong>Reduced pricing.</strong> Here at &#8216;corePHP&#8217; we feel it is important for everyone to have the ability to utilize our product. The new WordPress 3.0 will be available at a special pricing point of <strong>$69.99/year subscription</strong>.</li>
<li><strong>Pre-order now. </strong>We are only a few weeks away from releasing WordPress for Joomla! 3.0 and we want you all to be the first to get your hands on the product. So we are allowing pre-orders with an early bird special of <strong>$49.99 for the first year and $69.99 each year afterward. <a href="https://www.corephp.com/members/cart.php?a=add&amp;pid=21">Pre-Order now!</a><br />
</strong></li>
</ul>
<p>So without any further delay here is a sneak preview of what has been happening behind closed doors:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="651" height="366" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=13724564&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=1&amp;show_portrait=0&amp;color=ffffff&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="651" height="366" src="http://vimeo.com/moogaloop.swf?clip_id=13724564&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=1&amp;show_portrait=0&amp;color=ffffff&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>If you would like to give this version a test drive once we are ready for beta, <a title="WordPress for Joomla Sneak Peak!" href="http://www.corephp.com/blog/call-for-beta-testers/">sign up here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.corephp.com/blog/wordpress-for-joomla-3-0-sneak-peak/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Pixel Perfect Web Design</title>
		<link>http://www.corephp.com/blog/pixel-perfect-web-design/</link>
		<comments>http://www.corephp.com/blog/pixel-perfect-web-design/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 04:34:11 +0000</pubDate>
		<dc:creator>John Furrow</dc:creator>
				<category><![CDATA[Graphics]]></category>
		<category><![CDATA[graphic design]]></category>
		<category><![CDATA[photoshop]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://www.corephp.com/blog/pixel-perfect-web-design/</guid>
		<description><![CDATA[Have you ever noticed that Photoshop will anti-alias the edge of a rectangle? This is because the edge of the rectangle happens to fall in the middle of a pixel. If you follow these few simple rules when designing websites in Photoshop, you can ensure that the edges of your rectangles will fall exactly on [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever noticed that Photoshop will anti-alias the edge of a rectangle? This is because the edge of the rectangle happens to fall in the middle of a pixel. If you follow these few simple rules when designing websites in Photoshop, you can ensure that the edges of your rectangles will fall exactly on the edge of a pixel, making the shape super crisp and sharp.</p>
<p><a href="https://www.corephp.com/images/wordpress/uploads/2010/07/Screen-shot-2010-07-28-at-5.06.54-PM.png"><img class="aligncenter size-full wp-image-1826" title="Screen shot 2010-07-28 at 5.06.54 PM" src="https://www.corephp.com/images/wordpress/uploads/2010/07/Screen-shot-2010-07-28-at-5.06.54-PM.png" alt="" width="483" height="292" /></a></p>
<p><span id="more-1825"></span><br />
The first thing you want to do is make sure that you enable the option to snap rectangles to whole pixels. You can set it through a check-box in the toolbar when you have the rectangle tool selected (shortcut: U). Click the drop-down button next to the &#8220;Custom Shape&#8221; button in the shape toolbar. Then check &#8220;Snap to Pixels.&#8221; See the following screen shot:<br />
<a href="https://www.corephp.com/images/wordpress/uploads/2010/07/Screen-shot-2010-07-28-at-3.48.01-PM.png"><img class="aligncenter size-full wp-image-1827" title="Screen shot 2010-07-28 at 3.48.01 PM" src="https://www.corephp.com/images/wordpress/uploads/2010/07/Screen-shot-2010-07-28-at-3.48.01-PM.png" alt="" width="357" height="205" /></a></p>
<p>Now, whenever you draw a shape, you can be confident that you will only fill whole pixels. However, there will still be issues when you try to re-size the shape in the future. If you try to use the transform tool, all bets are off: The edges of your shapes will fall in the middle of pixels. Photoshop will try to make up for it by anti-aliasing, but we want a sharp, crisp edge. See the following screen shot:<br />
<a href="https://www.corephp.com/images/wordpress/uploads/2010/07/Screen-shot-2010-07-28-at-3.52.27-PM.png"><img class="aligncenter size-full wp-image-1828" title="Screen shot 2010-07-28 at 3.52.27 PM" src="https://www.corephp.com/images/wordpress/uploads/2010/07/Screen-shot-2010-07-28-at-3.52.27-PM.png" alt="" width="357" height="344" /></a></p>
<p>Solution: Instead of using the transform tool to re-size your shapes, use the &#8220;Direct Selection Tool&#8221; (keyboard shortcut <strong>A</strong>).<br />
<a href="https://www.corephp.com/images/wordpress/uploads/2010/07/Screen-shot-2010-07-28-at-5.07.44-PM.png"><img class="aligncenter size-full wp-image-1829" title="Screen shot 2010-07-28 at 5.07.44 PM" src="https://www.corephp.com/images/wordpress/uploads/2010/07/Screen-shot-2010-07-28-at-5.07.44-PM.png" alt="" width="36" height="98" /></a></p>
<p>With this tool, you can select individual points in your shapes and move them accordingly. Hold shift while clicking on points to select more than one at a time.<br />
<a href="https://www.corephp.com/images/wordpress/uploads/2010/07/Screen-shot-2010-07-28-at-3.50.12-PM.png"><img class="aligncenter size-full wp-image-1831" title="Screen shot 2010-07-28 at 3.50.12 PM" src="https://www.corephp.com/images/wordpress/uploads/2010/07/Screen-shot-2010-07-28-at-3.50.12-PM.png" alt="" width="306" height="266" /></a></p>
<p>When you click and drag your selected points, the line will snap to the edge of pixels. See the following screen shot:<br />
<a href="https://www.corephp.com/images/wordpress/uploads/2010/07/Screen-shot-2010-07-28-at-3.50.58-PM.png"><img class="aligncenter size-full wp-image-1830" title="Screen shot 2010-07-28 at 3.50.58 PM" src="https://www.corephp.com/images/wordpress/uploads/2010/07/Screen-shot-2010-07-28-at-3.50.58-PM.png" alt="" width="445" height="317" /></a></p>
<p>You can also use the arrow keys to move the points around. However, you must make sure you&#8217;re not &#8220;zoomed-in&#8221; or &#8220;zoomed-out&#8221; at all. You MUST view the document at 100% to make sure the points snap to whole pixels. The only exception to this rule is when you hold the shift key while pressing the arrow keys. This will move your points in 10 pixel increments exactly, regardless of how far zoomed-in or zoomed-out you are. So if your points were already on the edge of a pixel, they will remain on the edge of a pixel when you move it by 10 pixels.</p>
<p>With these simple steps, you can be confident that your shapes are as crisp and clear as possible!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.corephp.com/blog/pixel-perfect-web-design/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
