<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0" xml:base="http://www.netingredient.com/blog">
  <channel>
    <title />
    <link>http://www.netingredient.com/blog</link>
    <description />
    <language>en</language>
          <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/netingredient/JsWx" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="netingredient/jswx" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
    <title>PHP mail class that send html+attached PDF and works on Gmail (browser)</title>
    <link>http://www.netingredient.com/blog/php-mail-class-send-htmlattached-pdf-and-works-gmail-browser</link>
    <description>&lt;div class="field field-type-text field-field-subtitle"&gt;
    &lt;div class="field-items"&gt;
            &lt;div class="field-item odd"&gt;
                    PHP mail class that send html+attached PDF and works on Gmail (browser)        &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;It resolves the Gmail in browser issue where the mail contains only a noname file or the mail code not parsed .&lt;/p&gt;
&lt;p&gt;This is a class found on phpclasses.org but modified a bit to fix that issue. &lt;/p&gt;
&lt;pre class="brush: php"&gt;
&amp;lt;?php
/*
Attachment Mailer class - version 1.01
PHP class handles multiple attachment e-mails using the miIt resolves the Gmail in browser issue where the mail contains only a noname file or the mail code not parsed .
&lt;br /&gt;&lt;br /&gt;
This is a class found on phpclasses.org but modified a bit to fix that issue. 
&lt;br /&gt;&lt;br /&gt;
&lt;pre class="brush: php"&gt;
&amp;lt;?php
/*
Attachment Mailer class - version 1.01
PHP class handles multiple attachment e-mails using the mime mail standard

Copyright (c) 2006, Olaf Lederer
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

&lt;p&gt;&lt;a href="http://www.netingredient.com/blog/php-mail-class-send-htmlattached-pdf-and-works-gmail-browser" target="_blank"&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
     <comments>http://www.netingredient.com/blog/php-mail-class-send-htmlattached-pdf-and-works-gmail-browser#comments</comments>
 <category domain="http://www.netingredient.com/category/blog/attachment">attachment</category>
 <category domain="http://www.netingredient.com/category/blog/html">html</category>
 <category domain="http://www.netingredient.com/category/blog/mail">mail</category>
 <category domain="http://www.netingredient.com/category/blog/php-0">php</category>
 <pubDate>Thu, 20 Oct 2011 08:23:39 +0000</pubDate>
 <dc:creator>Mihai</dc:creator>
 <guid isPermaLink="false">90 at http://www.netingredient.com</guid>
  </item>
  <item>
    <title>PHP Array Pagination</title>
    <link>http://www.netingredient.com/blog/php-array-pagination</link>
    <description>&lt;div class="field field-type-text field-field-subtitle"&gt;
    &lt;div class="field-items"&gt;
            &lt;div class="field-item odd"&gt;
                    PHP Array Pagination        &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;I found this class on snipplr.com and used it a few times on some projects. Thanks to the developer. &lt;/p&gt;
&lt;p&gt;I'll post it here for reference&lt;/p&gt;
&lt;p&gt;The class:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.netingredient.com/blog/php-array-pagination" target="_blank"&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
     <comments>http://www.netingredient.com/blog/php-array-pagination#comments</comments>
 <category domain="http://www.netingredient.com/category/blog/arrays">arrays</category>
 <category domain="http://www.netingredient.com/category/blog/class">class</category>
 <category domain="http://www.netingredient.com/category/blog/php-0">php</category>
 <pubDate>Thu, 06 Oct 2011 09:56:45 +0000</pubDate>
 <dc:creator>Mihai</dc:creator>
 <guid isPermaLink="false">89 at http://www.netingredient.com</guid>
  </item>
  <item>
    <title>Sort a multidimensional array in PHP</title>
    <link>http://www.netingredient.com/blog/sort-multidimensional-array-php</link>
    <description>&lt;div class="field field-type-text field-field-subtitle"&gt;
    &lt;div class="field-items"&gt;
            &lt;div class="field-item odd"&gt;
                    Sort a multidimensional array in PHP        &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;
&lt;pre class="brush: php"&gt;
echo '&amp;lt;pre&amp;gt;';
print_r($arrayToSort );
echo '&amp;lt;/pre&amp;gt;';
&lt;/pre&gt;&lt;p&gt;
prints:&lt;br /&gt;
&lt;/p&gt;
&lt;pre class="brush: php"&gt;
Array
(
    [1] =&amp;gt; Array
        (
            [id] =&amp;gt; 1
            [name] =&amp;gt; Seafood
        )

    [2] =&amp;gt; Array
        (
            [id] =&amp;gt; 2
            [name] =&amp;gt; Beef
        )

    [3] =&amp;gt; Array
        (
            [id] =&amp;gt; 3
            [name] =&amp;gt; Chicken
        )

    [4] =&amp;gt; Array
        (
            [id] =&amp;gt; 4
            [name] =&amp;gt; Sausages
        )
&lt;/pre&gt;&lt;p&gt;&lt;a href="http://www.netingredient.com/blog/sort-multidimensional-array-php" target="_blank"&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
     <comments>http://www.netingredient.com/blog/sort-multidimensional-array-php#comments</comments>
 <category domain="http://www.netingredient.com/category/blog/php-0">php</category>
 <pubDate>Sat, 18 Jun 2011 07:54:09 +0000</pubDate>
 <dc:creator>Mihai</dc:creator>
 <guid isPermaLink="false">87 at http://www.netingredient.com</guid>
  </item>
  <item>
    <title>CubeCart empty cart issue</title>
    <link>http://www.netingredient.com/blog/cubecart-empty-cart-issue</link>
    <description>&lt;div class="field field-type-text field-field-subtitle"&gt;
    &lt;div class="field-items"&gt;
            &lt;div class="field-item odd"&gt;
                    CubeCart empty cart issue        &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;
&lt;div class="field field-type-filefield field-field-image"&gt;
    &lt;div class="field-items"&gt;
            &lt;div class="field-item odd"&gt;
                    &lt;img  class="imagefield imagefield-field_image" width="280" height="55" alt="" src="http://www.netingredient.com/sites/default/files/cclogo.gif?1297257866" /&gt;        &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;While working on a CubeCart (4.3.8) a weird issue appeared (customers add an items to their cart and then go to checkout and the items have disappeared).&lt;/p&gt;
&lt;p&gt;The solutions posted on the CubeCart forums didn't work on my case so i analyzed a bit the problem and found out that on the process of adding a product to the cart a third party module was setting another value to the "CC_SESSION_NAME" cookie, so practically the user was sending the product to another session id while he was still using the old cookie.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.netingredient.com/blog/cubecart-empty-cart-issue" target="_blank"&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
     <comments>http://www.netingredient.com/blog/cubecart-empty-cart-issue#comments</comments>
 <category domain="http://www.netingredient.com/category/blog/cubecart">CubeCart</category>
 <category domain="http://www.netingredient.com/category/blog/php-0">php</category>
 <pubDate>Wed, 09 Feb 2011 13:39:44 +0000</pubDate>
 <dc:creator>Mihai</dc:creator>
 <guid isPermaLink="false">25 at http://www.netingredient.com</guid>
  </item>
  <item>
    <title>Load images after DOM is loaded with Lazy Load Plugin for jQuery</title>
    <link>http://www.netingredient.com/blog/load-images-after-dom-loaded-lazy-load-plugin-jquery</link>
    <description>&lt;div class="field field-type-text field-field-subtitle"&gt;
    &lt;div class="field-items"&gt;
            &lt;div class="field-item odd"&gt;
                    Load images after DOM is loaded with Lazy Load Plugin for jQuery        &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;
&lt;div class="field field-type-filefield field-field-image"&gt;
    &lt;div class="field-items"&gt;
            &lt;div class="field-item odd"&gt;
                    &lt;img  class="imagefield imagefield-field_image" width="579" height="80" alt="" src="http://www.netingredient.com/sites/default/files/jquery2_0.jpg?1272874268" /&gt;        &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;As the title say, this plugin loads images after the DOM is ready. &lt;/p&gt;
&lt;p&gt;Load the jquery and the plugin. &lt;/p&gt;
&lt;p&gt;&lt;code type="html"&gt;&lt;/p&gt;
&lt;script src="jquery.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script src="jquery.lazyload.js" type="text/javascript"&gt;&lt;/script&gt;&lt;p&gt;&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
The simplest use is to put &lt;i&gt;$("img").lazyload();&lt;/i&gt; inside document ready event. &lt;/p&gt;
&lt;pre class="brush: javascript"&gt;
$(document).ready(function() {
    $("img").lazyload();
});
&lt;/pre&gt;&lt;p&gt;&lt;a href="http://www.netingredient.com/blog/load-images-after-dom-loaded-lazy-load-plugin-jquery" target="_blank"&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
     <comments>http://www.netingredient.com/blog/load-images-after-dom-loaded-lazy-load-plugin-jquery#comments</comments>
 <category domain="http://www.netingredient.com/category/blog/javascript">javaScript</category>
 <category domain="http://www.netingredient.com/category/blog/jquery">jquery</category>
 <pubDate>Mon, 03 May 2010 08:11:12 +0000</pubDate>
 <dc:creator>Mihai</dc:creator>
 <guid isPermaLink="false">22 at http://www.netingredient.com</guid>
  </item>
  <item>
    <title>Joomla 1.5 - Make an "if" statement based on the component loading at one time</title>
    <link>http://www.netingredient.com/blog/joomla-15-make-if-statement-based-component-loading-one-time</link>
    <description>&lt;div class="field field-type-text field-field-subtitle"&gt;
    &lt;div class="field-items"&gt;
            &lt;div class="field-item odd"&gt;
                    if component..        &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;For some reason, selecting on what pages to show a block from admin doesn't work all the times. &lt;/p&gt;
&lt;/p&gt;
&lt;p&gt;Example, i wanted the breadcrumb module to show only on the gallery(rsgallery2), but selecting the gallery from "Menu Assignment" in mod_breadcrumbs settings worked only for the first page of the gallery, and not for the rest of the pages in gallery. &lt;/p&gt;
&lt;p&gt;This is what i have done in the index file of the theme: &lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.netingredient.com/blog/joomla-15-make-if-statement-based-component-loading-one-time" target="_blank"&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
     <comments>http://www.netingredient.com/blog/joomla-15-make-if-statement-based-component-loading-one-time#comments</comments>
 <category domain="http://www.netingredient.com/category/blog/joomla-15">joomla 1.5</category>
 <category domain="http://www.netingredient.com/category/blog/php-0">php</category>
 <pubDate>Mon, 27 Oct 2008 13:00:00 +0000</pubDate>
 <dc:creator>Mihai</dc:creator>
 <guid isPermaLink="false">8 at http://www.netingredient.com</guid>
  </item>
  <item>
    <title>Make jQuery work on the same page with Mootools and or Prototype</title>
    <link>http://www.netingredient.com/blog/make-jquery-work-same-page-mootools-and-or-prototype</link>
    <description>&lt;div class="field field-type-text field-field-subtitle"&gt;
    &lt;div class="field-items"&gt;
            &lt;div class="field-item odd"&gt;
                    javascript, jQuery, Mootools, Prototype        &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;
&lt;div class="field field-type-filefield field-field-image"&gt;
    &lt;div class="field-items"&gt;
            &lt;div class="field-item odd"&gt;
                    &lt;img  class="imagefield imagefield-field_image" width="579" height="80" alt="" src="http://www.netingredient.com/sites/default/files/jquery2.jpg?1258113944" /&gt;        &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Some conflicts appear when using jQuery javascript library with Motools or Prototype on the same page. A workaround is using noConflict mode for jQuery. &lt;/p&gt;
&lt;p&gt;Follow these steps: &lt;/p&gt;
&lt;p&gt;1. Download the &lt;a href="http://docs.jquery.com/Downloading_jQuery"&gt;latest version of jQuery&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;2. Download &lt;a href="http://dev.jquery.com/browser/trunk/plugins/compat-1.0"&gt;jQuery compat&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;3. Open jquery.js, go to the end of the file and add this line &lt;strong&gt;&lt;code&gt;jQuery.noConflict();&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.netingredient.com/blog/make-jquery-work-same-page-mootools-and-or-prototype" target="_blank"&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
     <comments>http://www.netingredient.com/blog/make-jquery-work-same-page-mootools-and-or-prototype#comments</comments>
 <category domain="http://www.netingredient.com/category/blog/javascript">javaScript</category>
 <category domain="http://www.netingredient.com/category/blog/jquery">jquery</category>
 <category domain="http://www.netingredient.com/category/blog/mootools">Mootools</category>
 <category domain="http://www.netingredient.com/category/blog/prototype">Prototype</category>
 <pubDate>Tue, 24 Jun 2008 22:23:13 +0000</pubDate>
 <dc:creator>Mihai</dc:creator>
 <guid isPermaLink="false">9 at http://www.netingredient.com</guid>
  </item>
  <item>
    <title>CSS hack for Safari</title>
    <link>http://www.netingredient.com/blog/css-hack-safari</link>
    <description>&lt;div class="field field-type-text field-field-subtitle"&gt;
    &lt;div class="field-items"&gt;
            &lt;div class="field-item odd"&gt;
                    Safari ways        &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Generally Safari browser print a website layout the way i want. Some times thou, it won't do it as Firefox do. &lt;/p&gt;
&lt;p&gt;This is an example hack for Safari.  The css class inside &lt;code&gt;@media screen and (-webkit-min-device-pixel-ratio:0){}&lt;/code&gt; will be read only by Safari.  So, in Firefox the object that user this class will have a padding-left of 10px and in Safari i canceled the 10px padding by defining a new value (padding-left: 0px;)&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.netingredient.com/blog/css-hack-safari" target="_blank"&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
     <comments>http://www.netingredient.com/blog/css-hack-safari#comments</comments>
 <category domain="http://www.netingredient.com/category/blog/css">css</category>
 <category domain="http://www.netingredient.com/category/blog/safari">Safari</category>
 <pubDate>Sun, 08 Jun 2008 16:28:31 +0000</pubDate>
 <dc:creator>Mihai</dc:creator>
 <guid isPermaLink="false">10 at http://www.netingredient.com</guid>
  </item>
  <item>
    <title>Add a linkedin field to vbulletin user profile</title>
    <link>http://www.netingredient.com/blog/add-linkedin-field-vbulletin-user-profile</link>
    <description>&lt;div class="field field-type-text field-field-subtitle"&gt;
    &lt;div class="field-items"&gt;
            &lt;div class="field-item odd"&gt;
                    vbulletin        &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;A few days ago i added a new option to the user profiles in a vbulletin forum ( seo-romania.com/forum ). This option let the users have on their postbit a link to their &lt;a href="http://linkedin.com" title="http://linkedin.com"&gt;http://linkedin.com&lt;/a&gt; profile. &lt;/p&gt;
&lt;p&gt;&lt;span class="inline inline-none"&gt;&lt;img src="http://www.netingredient.com/sites/default/files/images/linkedin-vbulletin1.jpg" alt="" title=""  class="image image-_original" width="491" height="469" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;It's simple to achieve this, just follow the next steps:&lt;/p&gt;
&lt;p&gt;1.  Go to admincp -&gt; User Profile Fields -&gt; Add New User Profile Field&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.netingredient.com/blog/add-linkedin-field-vbulletin-user-profile" target="_blank"&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
     <comments>http://www.netingredient.com/blog/add-linkedin-field-vbulletin-user-profile#comments</comments>
 <category domain="http://www.netingredient.com/category/blog/php-0">php</category>
 <category domain="http://www.netingredient.com/category/blog/vbulletin">vbulletin</category>
 <pubDate>Tue, 13 May 2008 14:11:07 +0000</pubDate>
 <dc:creator>Mihai</dc:creator>
 <guid isPermaLink="false">11 at http://www.netingredient.com</guid>
  </item>
  <item>
    <title>Joomla 1.5 - add a new module position inside an article</title>
    <link>http://www.netingredient.com/blog/joomla-15-add-new-module-position-inside-article</link>
    <description>&lt;div class="field field-type-text field-field-subtitle"&gt;
    &lt;div class="field-items"&gt;
            &lt;div class="field-item odd"&gt;
                    Joomla 1.5        &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Today i received a request to insert a new module position inside the article template of a joomla website. The client wanted to print an adsense module in that position. You can see the result in the image below. &lt;/p&gt;
&lt;p&gt;&lt;span class="inline inline-none"&gt;&lt;img src="http://www.netingredient.com/sites/default/files/images/joomla-position-in-content.jpg" alt="" title=""  class="image image-_original" width="630" height="608" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;To do this, you need to define a new position first, so go to &lt;strong&gt;/templates/your_template&lt;/strong&gt;. Open the templateDetails.xml file and search for &lt;strong&gt;&lt;code&gt;&lt;br /&gt;
&lt;positions&gt;&lt;/positions&gt;&lt;/code&gt;&lt;/strong&gt; Add a new position, something like &lt;strong&gt;&lt;code&gt;&lt;br /&gt;
&lt;position&gt;adsense_in_content&lt;/position&gt;&lt;/code&gt;&lt;/strong&gt;. &lt;/p&gt;
&lt;p&gt;Save the file, and upload it back to it's place.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.netingredient.com/blog/joomla-15-add-new-module-position-inside-article" target="_blank"&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
     <comments>http://www.netingredient.com/blog/joomla-15-add-new-module-position-inside-article#comments</comments>
 <category domain="http://www.netingredient.com/category/blog/joomla-15">joomla 1.5</category>
 <category domain="http://www.netingredient.com/category/blog/php-0">php</category>
 <pubDate>Sun, 11 May 2008 16:31:19 +0000</pubDate>
 <dc:creator>Mihai</dc:creator>
 <guid isPermaLink="false">12 at http://www.netingredient.com</guid>
  </item>
  </channel>
</rss>

