<?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>CSSJockey.com &#187; Tips &amp; Tricks</title>
	<atom:link href="http://www.cssjockey.com/topics/tips-tricks/feed" rel="self" type="application/rss+xml" />
	<link>http://www.cssjockey.com</link>
	<description>Unique &#38; Practical Web Presence</description>
	<lastBuildDate>Thu, 19 Aug 2010 16:09:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>An easy way to create light-box with jQuery &amp; CSS</title>
		<link>http://www.cssjockey.com/web-development/tips-tricks/an-easy-way-to-create-light-box-with-jquery-css</link>
		<comments>http://www.cssjockey.com/web-development/tips-tricks/an-easy-way-to-create-light-box-with-jquery-css#comments</comments>
		<pubDate>Fri, 23 Oct 2009 18:30:52 +0000</pubDate>
		<dc:creator>CSSJockey</dc:creator>
				<category><![CDATA[HTML & CSS]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[free stuff]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[web-design-tips]]></category>
		<category><![CDATA[webdesign-tips]]></category>
		<category><![CDATA[xHTML]]></category>

		<guid isPermaLink="false">http://www.cssjockey.com/?p=768</guid>
		<description><![CDATA[As you already know that I've been working on improving the performance of my website and I needed a simple solution to create light-box effect for Live-Chat on this website. I could have used one of the available jQuery plug-ins out there however, the idea was to optimize the code with minimal use of heavy third-party scripts and CSS.]]></description>
			<content:encoded><![CDATA[<div id="attachment_768" class="wp-caption aligncenter" style="width: 597px"><a href="http://www.cssjockey.com/files/downloads/code/jquery_css_lightbox/index.htm" target="_blank"><img class="aligncenter size-full wp-image-782" title="how-to-create-light-box-with-css-jquery" src="http://www.cssjockey.com/wp-content/uploads/2009/10/how-to-create-light-box-with-css-jquery.jpg" alt="how-to-create-light-box-with-css-jquery" width="587" height="220" /></a><p class="wp-caption-text">Simple light-box effect with jQuery and CSS</p></div>
<p>As you already know that I&#8217;ve been working on <a title="Recent Performance Updates on CSSJockey.com" href="http://www.cssjockey.com/general-news/performance-upgrade">improving the performance</a> of my website and I needed a simple solution to create light-box effect for <a title="Live Chat" href="http://www.cssjockey.com/live-chat">Live-Chat</a> on this website. I had many options to choose from available <a title="Google Search for light-box" href="http://www.google.com/#hl=en&amp;source=hp&amp;q=jquery+lightbox&amp;aq=f&amp;aqi=g10&amp;oq=&amp;fp=a70abe15f561671b" target="_blank">jQuery plug-ins</a> however, the idea was to optimize the code with minimal use of heavy third-party scripts and CSS. Moreover, Only thing I needed was a light-box effect without any other functionality.</p>
<p>So I created the light-box effect with a few lines of code using CSS and jQuery.</p>
<p><a title="View Live Demo" href="http://www.cssjockey.com/files/downloads/code/jquery_css_lightbox/index.htm" target="_blank"><strong>View Live Demo</strong></a></p>
<p>Let&#8217;s start coding <img src='http://www.cssjockey.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h2>xHTML Code</h2>
<p>Place this code within &lt;body&gt;&lt;/body&gt; tags where ever you like.</p>
<pre name="code" class="html">&lt;a id="show-panel" href="#"&gt;Show Panel&lt;/a&gt;

&lt;div id="lightbox-panel"&gt;
&lt;h2&gt;Lightbox Panel&lt;/h2&gt;
&lt;p&gt;You can add any valid content here.&lt;/p&gt;
&lt;p align="center"&gt;
&lt;a id="close-panel" href="#"&gt;Close this window&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;&lt;!-- /lightbox-panel --&gt;

&lt;div id="lightbox"&gt; &lt;/div&gt;&lt;!-- /lightbox --&gt;</pre>
<p>First line of the above code is a link with id &#8220;show-panel&#8221; which will display the &#8220;light-box&#8221; and the &#8220;lightbox-panel&#8221; DIVs, similarly on line 7 we have a link with ID &#8220;close-panel&#8221; to hide these DIVs. This will be handled by jQuery of course.</p>
<p><strong class="red">#lightbox-panel</strong> will hold the content to be dispalyed and <strong class="red">#lightbox</strong> will add a transparent background behind our content panel.  Let&#8217;s write some CSS code to stylize these two DIVs before we add the functionality to our links with jQuery.</p>
<h2>CSS Code</h2>
<p>You can add this code within the document&#8217;s &lt;head&gt;&lt;/head&gt; tag or in any linked style sheet.</p>
<pre name="code" class="css">* /Lightbox background */
#lightbox {
 display:none;
 background:#000000;
 opacity:0.9;
 filter:alpha(opacity=90);
 position:absolute;
 top:0px;
 left:0px;
 min-width:100%;
 min-height:100%;
 z-index:1000;
}
/* Lightbox panel with some content */
#lightbox-panel {
 display:none;
 position:fixed;
 top:100px;
 left:50%;
 margin-left:-200px;
 width:400px;
 background:#FFFFFF;
 padding:10px 15px 10px 15px;
 border:2px solid #CCCCCC;
 z-index:1001;
}</pre>
<p><strong>Note:</strong> The z-index value for #lightbox-panel should be greater than z-index value of #lightbox to display it above the transparent background and both should have the property display as none so they should not show up by default or if the users have Javascript disabled in their browsers.</p>
<p>Let&#8217;s put some life to our code with jQuery.</p>
<h2>jQuery Code</h2>
<p>You can add this code within the document&#8217;s &lt;head&gt;&lt;/head&gt; tag and we are done.</p>
<pre name="code" class="javascript">&lt;script type="text/javascript" src="PATH_TO/jquery.min.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
 $(document).ready(function(){
 $("a#show-panel").click(function(){
 $("#lightbox, #lightbox-panel").fadeIn(300);
 })
 $("a#close-panel").click(function(){
 $("#lightbox, #lightbox-panel").fadeOut(300);
 })
 })
&lt;/script&gt;</pre>
<h4>Pretty simple, huh!!</h4>
<p>Could it get easier than this?</p>
<p>Once you click the link with ID <strong class="red">&#8220;show-panel&#8221;</strong> it will display both the DIVs with some nice fade effect and if you click the link with ID <strong class="red">&#8220;close-panel&#8221;</strong> it will hide these DIVs.</p>
<p>I hope you enjoyed this little trick to create simple light-box effect with CSS and jQuery and You are most welcome to share your inputs and code in the comments below.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cssjockey.com/web-development/tips-tricks/an-easy-way-to-create-light-box-with-jquery-css/feed</wfw:commentRss>
		<slash:comments>41</slash:comments>
		</item>
		<item>
		<title>How to read minified CSS with ease?</title>
		<link>http://www.cssjockey.com/web-development/tips-tricks/uncompress-minified-css</link>
		<comments>http://www.cssjockey.com/web-development/tips-tricks/uncompress-minified-css#comments</comments>
		<pubDate>Mon, 12 Oct 2009 14:07:54 +0000</pubDate>
		<dc:creator>CSSJockey</dc:creator>
				<category><![CDATA[HTML & CSS]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Tools & Apps]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.cssjockey.com/?p=766</guid>
		<description><![CDATA[Today we have a quick tip for those who feel depressed and cry when they see the holy grail of CSS in one single line in their themes. Recently I started hearing from a lot of people complaining about their theme developers using minified CSS in their themes for maximizing performance without any consideration for their ease of use or customization...]]></description>
			<content:encoded><![CDATA[<p>Today we have a quick tip for those who feel depressed and cry when they see the holy grail of CSS in one single line in their website / theme stylesheets.</p>
<p>Recently I started hearing from a lot of people complaining about their theme developers using minified CSS in their themes for maximizing performance without any consideration for their ease of use / customization. People keep asking me if there are tools that convert minified CSS back to normal human-readable form and recently someone even asked me to do a job – normalize some minified stylesheets (of course I didn’t do it and rob him off!)</p>
<p>Whether or not developers should minify CSS when giving out themes / websites has been a subject of debate for a long time but why developers choose to minify some parts of their stylesheets has often been overlooked. Performance issues for larger projects, minifying the reset styles (you don’t have to change them anyway!) and non-developer license are just some of the reasons!</p>
<p>Anyway, coming back to the subject of this post – How can you read minified CSS with ease?<br />
(No, we are not going to install any 3rd party software!)</p>
<p>Simply validate the CSS (only the minified part if you have other files attached as well) in question using the <a title="W3C.org CSS Validator" href="http://jigsaw.w3.org/css-validator/">W3C’s CSS Validation</a> service!</p>
<p>The output of the validation check is:</p>
<ol>
<li>whether or not, your CSS validates to standards set by W3C.</li>
<li>Normal, Properly Formatted and Easily Readable version of your minified / compressed CSS</li>
</ol>
<p>You need to keep the formatted and decompressed CSS? Just copy it from the validation output and replace your version. Voila!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cssjockey.com/web-development/tips-tricks/uncompress-minified-css/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Deep Integrating WordPress 2.7.1 and bbPress 0.9.0.4</title>
		<link>http://www.cssjockey.com/web-development/deep-integrating-wordpress-271-and-bbpress-0904</link>
		<comments>http://www.cssjockey.com/web-development/deep-integrating-wordpress-271-and-bbpress-0904#comments</comments>
		<pubDate>Sat, 11 Apr 2009 19:21:25 +0000</pubDate>
		<dc:creator>Abhinav Sood</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[bbPress]]></category>
		<category><![CDATA[deep-integration]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.cssjockey.com/?p=674</guid>
		<description><![CDATA[As WordPress and bbPress both come from the same camp, successfully integrating both of them to share logins as well as template functions has been a buzzing issue for developers. In this guide, we’ll explain the process of integrating the latest stable versions of both WordPress (2.7.1) and bbPress (0.9.0.4) step by step in a comprehensive way.]]></description>
			<content:encoded><![CDATA[<p>As <strong>WordPress</strong> and <strong>bbPress</strong> both come from the same camp, successfully integrating both of them to share logins as well as template functions has been a buzzing issue for developers. In fact, because both WordPress and bbPress have an almost similar file management structure, it makes all the more sense to integrate bbPress as forums into WordPress rather than using phpBB or SMF or any other boards.</p>
<p>Various resources over the web are trying to explain the process of (deep) integrating WordPress and bbPress without any issues, but mostly they are broken or outdated. In this guide, we’ll explain the process of integrating the latest stable versions of both <strong>WordPress (2.7.1)</strong> and <strong>bbPress (0.9.0.4)</strong> step by step in a comprehensive way.</p>
<h3>Step 1: Downloading the Latest Stable Versions</h3>
<p>Download the latest stable version of WordPress from <a title="WordPress Latest Version" href="http://wordpress.org" target="_blank">WordPress.org</a> and the latest version of bbPress from <a title="bbPress Latest Version" href="http://bbpress.org" target="_blank">bbPress.org</a></p>
<h3>Step 2: Extracting the files</h3>
<p>Extract the WordPress files into the root directory of your web server (or where you want to install it). Create a new database on your host using your phpMyAdmin or host’s cPanel.</p>
<p>Now, create a folder named forums inside the WordPress directory so that it forms a sub-directory of your WordPress website (for example www.<strong>YourDomain</strong>.com/forums). Now your FTP directory listing should look somewhat like this:</p>
<div style="padding-left:100px;">
<div id="attachment_687" class="wp-caption aligncenter" style="width: 426px"><a href="http://www.cssjockey.com/wp-content/uploads/2009/04/ftp_structure.jpg"><img class="size-full wp-image-687" title="FTP Structure after creating the Forums Folder" src="http://www.cssjockey.com/wp-content/uploads/2009/04/ftp_structure.jpg" alt="FTP Structure after creating the Forums Folder" width="416" height="295" /></a><p class="wp-caption-text">FTP Structure after creating the Forums Folder</p></div>
</div>
<p>Extract the bbPress files into this forums directory.</p>
<h3>Step 3: Installing WordPress and bbPress</h3>
<p>Now install WordPress by visiting your website URL in your favorite browser (www.YourDomain.com) and Create a Configuration File using the name of the freshly created database and database username and password. You’ll be done through, quite easily.</p>
<p>To install bbPress as your forums software go to www.YourDomain.com/forums. When the installation page appears click on the Let’s Get Started link to begin with the configuration. Enter the same database name, user name and password as you used for your WordPress install. Don’t check the advanced settings. Just save your database configuration settings.</p>
<h3>Step 4: Integrating WordPress into bbPress</h3>
<p>The next option is basically where the integration process actually starts. Place a check against the add integration settings. Then place a check against the add cookie integration settings. This enables you to use shared logins.</p>
<blockquote><p>This is also where the complication comes in, in the integration of WordPress 2.7.1 and bbPress 0.9.0.4. Cookie generation and management mechanism in WordPress 2.7.1 is very different from WordPress 2.5. However bbPress still uses the cookies compatible with previous versions of WordPress. We’ll use a plugin as a work around to downgrade the cookies generated by WordPress to sync with bbPress. Follow the steps below.</p></blockquote>
<h3>Step 5: Filling in the WordPress integration details</h3>
<p>In WordPress address, enter http://www.YourDomain.com</p>
<p>In Blog address, enter http://www.YourDomain.com</p>
<p>Now go to https://api.wordpress.org/secret-key/1.1/ to generate WordPress Cookie secret keys. They’ll look somewhat like this:</p>
<pre name="code" class="PHP">
define('AUTH_KEY', '3{=J|rF]CLK3XNzzKc+*Bn@2yeMh#y{c$PqfAgmW*WgPevIOEAi6Gl{b1');
define('SECURE_AUTH_KEY', '-P`&amp;G!_+5|1uu`&gt;8y9!$f;.T&lt;6-Oa');
define('LOGGED_IN_KEY', '3xIsD$9TmGg;FAu.[V,nqb%lE/`N~)h4rE&gt;cO`]@h vkN?`&gt;fA0w;|FFb|_3NW40');
define('NONCE_KEY', '{qBV?O[wCsW5 Y+1^ ].%Y-Mp[0*m`$A@M3:;OHm=&gt;&amp;R*$I4Zlv7^n*+G`ib.#?a');
</pre>
<p>In your root directory, open the wp-config.php file. Look for 4 lines starting similarly… Replace them with the generated keys. Perform this step carefully.</p>
<p>Now copy the value of '<strong>AUTH_KEY</strong>' that is</p>
<pre name="code" class="PHP">
3{=J|rF]CLK3XNz&lt;DGr|K&gt;zKc+*Bn@2yeMh#y{c$PqfAgmW*WgPevIOEAi6Gl{b1
</pre>
<p style="text-lign: center;">(whatever is generated for you) and go back to your browser. Paste it into the WordPress Cookie Secret Key field.</p>
<p>Now go to http://www.YourDomain.com/wp-admin/options.php and look for a field named secret. Copy the value of this field and paste it into the next field of bbPress configuration – WordPress Database Secret. Finally place a check mark against the Add user database integration settings. You don’t need to use the advanced settings. Just Save WordPress Integration Settings and proceed to the next step.</p>
<h3>Step 6: Finishing bbPress install with Site Settings</h3>
<p>Enter the Site Name and Site Address (mostly, it’ll be automatically guessed for you). Select admin in the username drop-down to map it as the Key Master. Type the name for your first forum and save site settings to finish setting up the forums.</p>
<blockquote><p><strong>Registration – Setting up User Roles</strong></p>
<p>When a user registers on your bbPress forum, your WordPress blog doesn’t know about it (and vice versa). The user will be created, but WordPress won’t know what user role to apply.</p>
<p>In the “WordPress Integration” section of the “Settings” area in your bbPress admin you will find a “User Role Map” where you can set which roles will be applied to users who register on your forums. Users who register on your WordPress blog will have the appropriate role applied to their account when they first login to bbPress.</p>
<div id="attachment_688" class="wp-caption aligncenter" style="width: 597px"><a href="http://www.cssjockey.com/wp-content/uploads/2009/04/bbpress_user_role_map.jpg"><img class="size-full wp-image-688" title="Setting Up User Roles When Integrating WordPress With bbPress" src="http://www.cssjockey.com/wp-content/uploads/2009/04/bbpress_user_role_map.jpg" alt="Setting Up User Roles When Integrating WordPress With bbPress" width="587" height="260" /></a><p class="wp-caption-text">Setting Up User Roles When Integrating WordPress With bbPress</p></div>
<p>If you don’t setup a role map, then this will not work. When you do setup a role map (or change it) any users who are missing either role will be updated, but existing roles will not be affected.</p></blockquote>
<h3>Step 7: Modifying the wp-config.php file</h3>
<p>Add these lines of code</p>
<pre name="code" class="PHP">
define('COOKIE_DOMAIN', '');
define('COOKIEPATH', '/');
</pre>
<p>Just before this line:</p>
<pre name="code" class="PHP">
// ** MySQL settings - You can get this info from your web host ** //
</pre>
<p>This would generally be near the top of the wp-config.php file at around lines 16 to 18.</p>
<h3>Step 8: Modifying the bb-config.php file</h3>
<p>Create a new blank file path.php and insert the following lines of code into it:</p>
<pre name="code" class="php">
&lt;?php
$p = getcwd();
echo $p;
?>
</pre>
<p>Upload it into your root directory and access it from your browser at www.YourDomain.com/path.php. It would show you the absolute path to your website and would be something like this: <strong>/home/xyz/public_html/sitename/</strong></p>
<p>Copy this path as we will paste this in the bb-config.php file.</p>
<p>In the forums directory, edit the bb-config.php file and insert these lines of code in line 2 immediately after the opening PHP tag ( &lt;?php )</p>
<pre name="code" class="PHP">
if ( !defined('ABSPATH') &#038; !defined('XMLRPC_REQUEST')) {
define('WP_USE_THEMES', false);
include_once( 'PASTE ABSOLUTE PATH HERE/wp-blog-header.php' );
header("HTTP/1.1 200 OK");
header("Status: 200 All rosy");
}
</pre>
<p>Then, near the bottom of the file – add these 2 lines of code just before the /* Stop editing */ line</p>
<pre name="code" class="PHP">
$bb-&gt;custom_user_table = 'wp_users';
$bb-&gt;custom_user_meta_table = 'wp_usermeta';
</pre>
<p>Save your bb-config.php file and exit.</p>
<h3>Step 9: Installing a magical plugin</h3>
<p><a title="Ann Oyama" href="http://superann.com/2009/02/26/wordpress-26-27-bbpress-09-cookie-integration-plugin/" target="_blank">Ann Oyama</a> developed a WordPress plugin that enables WordPress to generate cookies that work with bbPress 0.9 so that a single shared sign in can be accomplished between the two! <a title="Ann Oyama" href="http://wordpress.org/extend/plugins/wordpress-26-and-bbpress-09-integration/" target="_blank"><strong>Download</strong></a> this plugin at WordPress.org</p>
<p>Basically the cookies generated by the latest version of WordPress are downgraded to the cookies generated by previous versions of WordPress. Upload the plugin to <strong>wp-content\plugins\</strong> and activate it from your WordPress admin dashboard.</p>
<p>After you activate the plugin, you’ll be asked to log in again into your WordPress admin dashboard. Instead of logging in once again – type</p>
<p><strong>www.YourDomain.com/wp-login.php?action=logout</strong></p>
<p>When you’re logged out, clear your browser’s cache and cookies.  Restart your browser.</p>
<h3>Step 10: There’s no step 10. Bingo!</h3>
<p>You’ve successfully <strong>deep</strong> <strong>integrated your WordPress 2.7.1 with bbPress 0.9.0.4</strong>. You can now use WordPress template tags in your bbPress theme and style it similar to your WordPress theme… and you’ve a single sign-on shared login set up and running! I hope you find this guide helpful. If you face any problems, feel free to drop us a comment. We&#8217;ll try our level best to help you out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cssjockey.com/web-development/deep-integrating-wordpress-271-and-bbpress-0904/feed</wfw:commentRss>
		<slash:comments>61</slash:comments>
		</item>
	</channel>
</rss>
