<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-408141208604594417</id><updated>2024-09-04T03:24:16.454-07:00</updated><category term="OpenCart"/><category term="align div center"/><category term="heroku"/><category term="1.5.x"/><category term="3D text using css"/><category term="CSS shadow"/><category term="CodeIgniter Remove index.php in URL"/><category term="Foundation 5 Orbit Slider inside Reveal Modal has no Height"/><category term="How to get url parameters"/><category term="How to print array into spiral"/><category term="IE Issue"/><category term="IE6 fix for rollerover issue"/><category term="MVC"/><category term="PHP"/><category term="Reveal modal has height 0"/><category term="add category in opencart"/><category term="add copy to clipboard icon multiple places in a page"/><category term="adding public key to heroku"/><category term="ajax errors"/><category term="align image right side"/><category term="analytics for pligg"/><category term="array to spiral"/><category term="bookmarking platofrms"/><category term="cakephp static page"/><category term="cannot do a partial commit during a merge"/><category term="change console log color"/><category term="change console.log color"/><category term="clear form fields"/><category term="clear input fields after submission"/><category term="clipboard"/><category term="colors in javascript console"/><category term="comments in haml"/><category term="console.log color change"/><category term="constant aspect ratio"/><category term="convert url parameters into javascript object"/><category term="creating ssh keys"/><category term="cross browser css3 gradient"/><category term="css aspect ratio"/><category term="css background transparent"/><category term="css corners"/><category term="css down arrow"/><category term="css gradient and background image on same element"/><category term="css gradient combined with background image"/><category term="css gradientt"/><category term="css haml"/><category term="css in haml"/><category term="css line behind title text"/><category term="css opacity"/><category term="css transparency"/><category term="css transparent"/><category term="css triangle"/><category term="css triangle shapes"/><category term="css triangles"/><category term="css trics"/><category term="css up arrow"/><category term="div center"/><category term="div vertically center"/><category term="dot leaders"/><category term="down arrow using css"/><category term="download bookmarking software"/><category term="facebook app using heroku"/><category term="facebook application"/><category term="fix for IE6 duplicate character bug"/><category term="foundation data orbit"/><category term="git cannot do a partial commit during a merge"/><category term="gradients without images"/><category term="haml comments"/><category term="haml inline css"/><category term="haml inline styles"/><category term="haml style tag"/><category term="handle ajax errors"/><category term="handle global ajax errors using jquery"/><category term="horizontal centering div"/><category term="how do i copy and paste"/><category term="how to copy and paste"/><category term="how to get parameters of a url"/><category term="htaccess code to remove index.php from url in CodeIgniter"/><category term="images not displaying on hover in IE"/><category term="index printing"/><category term="inline css haml"/><category term="internal styles in HAML"/><category term="large number of emails php"/><category term="last characters displaying two times"/><category term="last row style change"/><category term="line on sides header"/><category term="maintain aspect ratio CSS"/><category term="multi line comments in haml"/><category term="new category addition in opencart"/><category term="new page in opencart"/><category term="open particular slide data orbit"/><category term="open source"/><category term="orbit open specific slide"/><category term="persistent header using jquery"/><category term="php send large no.of emails"/><category term="php send mails"/><category term="pixel to em"/><category term="pixel to points"/><category term="pligg"/><category term="print 2-D array in spiral order"/><category term="printing data like page index"/><category term="printing matrix in spiral order"/><category term="problem with IE"/><category term="px to em"/><category term="px to pt"/><category term="rake assets commands"/><category term="rake commands"/><category term="rake database commands"/><category term="rake seed command"/><category term="rake tasks"/><category term="remove form elements"/><category term="remove index.php from url"/><category term="rounded corners"/><category term="rounded corners without images"/><category term="scrollable header"/><category term="separate styles for last row in page"/><category term="set default error messages"/><category term="single line comments haml"/><category term="ssh keys"/><category term="static page creation in cakephp"/><category term="text around images"/><category term="text in between lines css"/><category term="text shadow using css"/><category term="transparent filters"/><category term="triangle shapes using css"/><category term="triangle using css"/><category term="up arrow using css"/><category term="vertical center"/><category term="wrap text around images"/><title type='text'>Tech FAQs</title><subtitle type='html'>This blog is about technical issues, CSS trics and javascript examples. It will give you easiest way of solving the issues. It contains frequently asked questions(faqs).</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://faqspoint.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://faqspoint.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>38</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-408141208604594417.post-3896386566215322307</id><published>2015-04-24T11:56:00.001-07:00</published><updated>2015-04-24T11:56:29.025-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Foundation 5 Orbit Slider inside Reveal Modal has no Height"/><category scheme="http://www.blogger.com/atom/ns#" term="Reveal modal has height 0"/><title type='text'>Foundation orbit slider inside reveal modal has no height</title><content type='html'>&lt;div class=&quot;own-para-sep&quot;&gt;Orbit slider inside foundation reveal modal sets height 0 some reason. Here is the simple way to fix that issue:&lt;/div&gt;
&lt;div class=&quot;own-code-section&quot;&gt;
&lt;pre&gt;
$(document).on(&#39;opened.fndtn.reveal&#39;, &#39;[data-reveal]&#39;, function(){
  $(window).trigger(&#39;resize&#39;);
});
&lt;/pre&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faqspoint.blogspot.com/feeds/3896386566215322307/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faqspoint.blogspot.com/2015/04/foundation-orbit-slider-inside-reveal.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/3896386566215322307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/3896386566215322307'/><link rel='alternate' type='text/html' href='http://faqspoint.blogspot.com/2015/04/foundation-orbit-slider-inside-reveal.html' title='Foundation orbit slider inside reveal modal has no height'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408141208604594417.post-4986056763591896899</id><published>2015-04-24T11:32:00.002-07:00</published><updated>2015-04-24T11:32:29.654-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="foundation data orbit"/><category scheme="http://www.blogger.com/atom/ns#" term="open particular slide data orbit"/><category scheme="http://www.blogger.com/atom/ns#" term="orbit open specific slide"/><title type='text'>Foundation data orbit open specific slide on load</title><content type='html'>&lt;div class=&quot;own-para-sep&quot;&gt;Here is the simple way to open the the particular slide on page load:&lt;/div&gt;
&lt;div class=&quot;own-code-section&quot;&gt;
&lt;pre&gt;
$.fx.off = true;
$(&quot;[data-orbit-slide=&#39;&quot;+index+&quot;&#39;]&quot;).trigger(&quot;click&quot;);
$.fx.off = false;
&lt;/pre&gt;
&lt;/div&gt;

&lt;div class=&quot;own-para-sep&quot;&gt;
Above code will first disable the jquery effects &amp; then triggers the particular slide and then enables the jquery effect. This way we can open any slide without animation.

&lt;div&gt;&lt;b&gt;Note:&lt;/b&gt; Here index is slide number(index always starts with 0).&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faqspoint.blogspot.com/feeds/4986056763591896899/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faqspoint.blogspot.com/2015/04/foundation-data-orbit-open-specific.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/4986056763591896899'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/4986056763591896899'/><link rel='alternate' type='text/html' href='http://faqspoint.blogspot.com/2015/04/foundation-data-orbit-open-specific.html' title='Foundation data orbit open specific slide on load'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408141208604594417.post-4052312071101640918</id><published>2015-04-05T11:43:00.000-07:00</published><updated>2015-04-05T11:43:17.279-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="last row style change"/><category scheme="http://www.blogger.com/atom/ns#" term="separate styles for last row in page"/><title type='text'>How to add different styles to last row of css grid layouts</title><content type='html'>&lt;div class=&quot;own-para-sep&quot;&gt;Here is the simple way to add different styles for last row elements of css grid layout.&lt;/div&gt;
&lt;div class=&quot;own-code-section&quot;&gt;
&lt;pre&gt;
li:nth-child(Xn):nth-last-child(-n+Y) ~ li {
}
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;own-para-sep&quot;&gt;&lt;b&gt;X&lt;/b&gt; is the no.of columns in the grid and &lt;b&gt;Y&lt;/b&gt; is the (no.of columns+1)&lt;/div&gt;
&lt;div class=&quot;&quot;&gt;&lt;b&gt;For example, we have 3 column grid layout with border bottom for each grid item, and we don&#39;t want to border bottom for last row items.&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;own-code-section&quot;&gt;
&lt;pre&gt;
li:nth-child(3n):nth-last-child(-n+4) ~ li {
    border-bottom: 0px;
}
&lt;/pre&gt;
&lt;/div&gt;

&lt;div class=&quot;&quot;&gt;&lt;b&gt;Ex:&lt;/b&gt; 4 column grid layout&lt;/div&gt;
&lt;div class=&quot;own-code-section&quot;&gt;
&lt;pre&gt;
li:nth-child(4n):nth-last-child(-n+5) ~ li {
    border-bottom: 0px;
}
&lt;/pre&gt;
&lt;/div&gt;

&lt;div class=&quot;&quot;&gt;&lt;b&gt;Ex:&lt;/b&gt; 5 column grid layout&lt;/div&gt;
&lt;div class=&quot;own-code-section&quot;&gt;
&lt;pre&gt;
li:nth-child(5n):nth-last-child(-n+6) ~ li {
    border-bottom: 0px;
}
&lt;/pre&gt;
&lt;/div&gt;

&lt;div class=&quot;own-para-sep&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; Above code will only work, if you have two or more than two rows.&lt;/div&gt;

</content><link rel='replies' type='application/atom+xml' href='http://faqspoint.blogspot.com/feeds/4052312071101640918/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faqspoint.blogspot.com/2015/04/how-to-add-different-styles-to-last-row.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/4052312071101640918'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/4052312071101640918'/><link rel='alternate' type='text/html' href='http://faqspoint.blogspot.com/2015/04/how-to-add-different-styles-to-last-row.html' title='How to add different styles to last row of css grid layouts'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408141208604594417.post-1929321037827958473</id><published>2015-03-22T11:12:00.000-07:00</published><updated>2015-03-22T11:12:44.682-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="convert url parameters into javascript object"/><category scheme="http://www.blogger.com/atom/ns#" term="how to get parameters of a url"/><category scheme="http://www.blogger.com/atom/ns#" term="How to get url parameters"/><title type='text'>get url parameters and values using jquery</title><content type='html'>&lt;div class=&quot;own-para-sep&quot;&gt;Here is the simple method to get url parameters &amp; values using jquery.&lt;/div&gt;
&lt;div class=&quot;own-code-section&quot;&gt;
&lt;pre&gt;
function getUrlParams() {
    var url = document.location.href;
    var params = {},hash;
    var params_arr = url.slice(url.indexOf(&#39;?&#39;) + 1).split(&#39;&amp;&#39;);
    for(var i=0; i  &amp;lt; params_arr.length; i++){
      hash = params_arr[i].split(&quot;=&quot;);
      params[hash[0]] = hash[1];
    }
    return params;
  }
&lt;/pre&gt;
&lt;/div&gt;

&lt;div class=&quot;own-para-sep&quot;&gt;Above method gets the current page URL and split into parameters and their values object. For example:&lt;/div&gt;

&lt;div class=&quot;own-para-sep&quot; style=&quot;margin:20px;&quot;&gt;
http://faqspoint.blogspot.in?src=google&amp;module=bottom
&lt;/div&gt;
&lt;div class=&quot;subheadertext&quot;&gt;Result:&lt;/div&gt;
&lt;div style=&quot;&quot;&gt;
{
    src : &quot;google&quot;,
    module : &quot;bottom&quot;
}
&lt;/div&gt;
&lt;div class=&quot;own-para-sep&quot;&gt;To get the values of parameters:&lt;/div&gt;
&lt;div class=&quot;own-code-section&quot;&gt;
&lt;pre&gt;
var source = getUrlParams()[&quot;src&quot;];    //It will return &quot;google&quot;
var module = getUrlParams()[&quot;module&quot;];    //It will return &quot;bottom&quot;
&lt;/pre&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faqspoint.blogspot.com/feeds/1929321037827958473/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faqspoint.blogspot.com/2015/03/get-url-parameters-and-values-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/1929321037827958473'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/1929321037827958473'/><link rel='alternate' type='text/html' href='http://faqspoint.blogspot.com/2015/03/get-url-parameters-and-values-using.html' title='get url parameters and values using jquery'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408141208604594417.post-2322912733223403025</id><published>2015-03-21T01:53:00.000-07:00</published><updated>2015-03-21T01:53:15.102-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CodeIgniter Remove index.php in URL"/><category scheme="http://www.blogger.com/atom/ns#" term="htaccess code to remove index.php from url in CodeIgniter"/><category scheme="http://www.blogger.com/atom/ns#" term="remove index.php from url"/><title type='text'>How to remove index.php from codeigniter url?</title><content type='html'>&lt;div class=&quot;own-para-sep&quot;&gt;Codeigniter defaultly add index.php in the url because that file is responsible for processing all requests to the system. But, we can easily remove index.php by using &lt;b&gt;URL Rewriting&lt;/b&gt;. 
&lt;/div&gt;
&lt;div&gt;Here are the simple steps:&lt;/div&gt;
&lt;div class=&quot;subheadertext&quot;&gt;1. Update general configuration:&lt;/div&gt;
Open &lt;b&gt;config.php&lt;/b&gt; from &lt;b&gt;system/application/config&lt;/b&gt; directory and replace 
&lt;div class=&quot;own-code-section&quot;&gt;
&lt;pre&gt;
$config[&quot;index_page&quot;] = &quot;index.php&quot;;

&lt;b&gt;with&lt;/b&gt;

$config[&quot;index_page&quot;] = &quot;&quot;;
&lt;/pre&gt;
&lt;/div&gt;

&lt;div class=&quot;own-para-sep&quot;&gt;
&lt;div class=&quot;subheadertext&quot;&gt;2.Create an .htaccess file&lt;/div&gt;
Create a new file named &lt;b&gt;.htaccess&lt;/b&gt; in the root directory and write below code in that file:
&lt;/div&gt;

&lt;div class=&quot;own-code-section&quot;&gt;
&lt;pre&gt;
RewriteEngine on
RewriteCond $1 !^(index\.php|css|images|js|robots\.txt)
RewriteRule ^(.*)$ /index.php?/$1 [L]
&lt;/pre&gt;
&lt;/div&gt;
 </content><link rel='replies' type='application/atom+xml' href='http://faqspoint.blogspot.com/feeds/2322912733223403025/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faqspoint.blogspot.com/2015/03/how-to-remove-indexphp-from-codeigniter.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/2322912733223403025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/2322912733223403025'/><link rel='alternate' type='text/html' href='http://faqspoint.blogspot.com/2015/03/how-to-remove-indexphp-from-codeigniter.html' title='How to remove index.php from codeigniter url?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408141208604594417.post-1187800519590891685</id><published>2015-03-01T03:24:00.000-08:00</published><updated>2015-03-01T03:24:14.906-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="css line behind title text"/><category scheme="http://www.blogger.com/atom/ns#" term="line on sides header"/><category scheme="http://www.blogger.com/atom/ns#" term="text in between lines css"/><title type='text'>Horizontal line with text in the middle using CSS</title><content type='html'>&lt;div class=&quot;own-para-sep&quot;&gt;Here is the simple example to create horizontal line with text in the middle. The line is created by setting a border-bottom on the containing h2 then giving the h2 a smaller line-height. The text is then put in a nested span with a non-transparent background.
&lt;/div&gt;
&lt;div&gt;&lt;b&gt;HTML:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;own-code-section&quot;&gt;
  &amp;lt;h2&amp;gt;&amp;lt;span&amp;gt;This is main header&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;
&lt;/div&gt;
&lt;div&gt;&lt;b&gt;CSS:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;own-code-section&quot;&gt;
&lt;pre&gt;
h2 {
   width: 100%; 
   text-align: center; 
   border-bottom: 1px solid #000; 
   line-height: 0.1em;
   margin: 10px 0 20px; 
} 

h2 span { 
    background:#ffffff; 
    padding:0 10px; 
}
&lt;/pre&gt;
&lt;/div&gt;

&lt;div style=&quot;margin-top: 50px;&quot;&gt;&lt;b&gt;OUTPUT:&lt;/b&gt;&lt;/div&gt;


&lt;style&gt;
.header {
   width: 100%; 
   text-align: center; 
   border-bottom: 1px solid #000; 
   line-height: 1px;
   margin: 10px 0 20px; 
} 

.header span { 
    background:#ffffff; 
    padding:0 10px; 
}
&lt;/style&gt;

&lt;div class=&quot;header&quot;&gt;&lt;span&gt;This is main header&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://faqspoint.blogspot.com/feeds/1187800519590891685/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faqspoint.blogspot.com/2015/03/horizontal-line-with-text-in-middle.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/1187800519590891685'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/1187800519590891685'/><link rel='alternate' type='text/html' href='http://faqspoint.blogspot.com/2015/03/horizontal-line-with-text-in-middle.html' title='Horizontal line with text in the middle using CSS'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408141208604594417.post-1744560598076462600</id><published>2015-02-26T10:58:00.001-08:00</published><updated>2015-02-26T10:58:24.184-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="pixel to em"/><category scheme="http://www.blogger.com/atom/ns#" term="pixel to points"/><category scheme="http://www.blogger.com/atom/ns#" term="px to em"/><category scheme="http://www.blogger.com/atom/ns#" term="px to pt"/><title type='text'>PX to EM to PT Conversion</title><content type='html'>&lt;div class=&quot;own-para-sep&quot;&gt;Here is the list of px to em conversions. These conversions are based on 16px browser default size.&lt;/div&gt;

&lt;table width=&quot;100%&quot; cellpadding=&quot;5&quot; cellspacing=&quot;0&quot; border=&quot;1&quot;&gt;
&lt;tr&gt;
&lt;th&gt;PX&lt;/th&gt;
&lt;th&gt;EM&lt;/th&gt;
&lt;th&gt;Percent&lt;/th&gt;
&lt;th&gt;Points&lt;/th&gt;
&lt;/tr&gt;
&lt;tr class=&quot;even&quot;&gt;&lt;td&gt;5px&lt;/td&gt;&lt;td&gt;0.3125em&lt;/td&gt;&lt;td&gt;31.25%&lt;/td&gt;&lt;td&gt;4pt&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;odd&quot;&gt;&lt;td&gt;6px&lt;/td&gt;&lt;td&gt;0.375em&lt;/td&gt;&lt;td&gt;37.5%&lt;/td&gt;&lt;td&gt;5pt&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;even&quot;&gt;&lt;td&gt;7px&lt;/td&gt;&lt;td&gt;0.438em&lt;/td&gt;&lt;td&gt;43.8%&lt;/td&gt;&lt;td&gt;5pt&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;odd&quot;&gt;&lt;td&gt;8px&lt;/td&gt;&lt;td&gt;0.500em&lt;/td&gt;&lt;td&gt;50.0%&lt;/td&gt;&lt;td&gt;6pt&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;even&quot;&gt;&lt;td&gt;9px&lt;/td&gt;&lt;td&gt;0.563em&lt;/td&gt;&lt;td&gt;56.3%&lt;/td&gt;&lt;td&gt;7pt&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;odd&quot;&gt;&lt;td&gt;10px&lt;/td&gt;&lt;td&gt;0.625em&lt;/td&gt;&lt;td&gt;62.5%&lt;/td&gt;&lt;td&gt;8pt&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;even&quot;&gt;&lt;td&gt;11px&lt;/td&gt;&lt;td&gt;0.688em&lt;/td&gt;&lt;td&gt;68.8%&lt;/td&gt;&lt;td&gt;8pt&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;odd&quot;&gt;&lt;td&gt;12px&lt;/td&gt;&lt;td&gt;0.750em&lt;/td&gt;&lt;td&gt;75.0%&lt;/td&gt;&lt;td&gt;9pt&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;even&quot;&gt;&lt;td&gt;13px&lt;/td&gt;&lt;td&gt;0.813em&lt;/td&gt;&lt;td&gt;81.3%&lt;/td&gt;&lt;td&gt;10pt&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;odd&quot;&gt;&lt;td&gt;14px&lt;/td&gt;&lt;td&gt;0.875em&lt;/td&gt;&lt;td&gt;87.5%&lt;/td&gt;&lt;td&gt;11pt&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;even&quot;&gt;&lt;td&gt;15px&lt;/td&gt;&lt;td&gt;0.938em&lt;/td&gt;&lt;td&gt;93.8%&lt;/td&gt;&lt;td&gt;11pt&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;odd selected base&quot;&gt;&lt;td&gt;16px&lt;/td&gt;&lt;td&gt;1.000em&lt;/td&gt;&lt;td&gt;100.0%&lt;/td&gt;&lt;td&gt;12pt&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;even&quot;&gt;&lt;td&gt;17px&lt;/td&gt;&lt;td&gt;1.063em&lt;/td&gt;&lt;td&gt;106.3%&lt;/td&gt;&lt;td&gt;13pt&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;odd&quot;&gt;&lt;td&gt;18px&lt;/td&gt;&lt;td&gt;1.125em&lt;/td&gt;&lt;td&gt;112.5%&lt;/td&gt;&lt;td&gt;14pt&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;even&quot;&gt;&lt;td&gt;19px&lt;/td&gt;&lt;td&gt;1.188em&lt;/td&gt;&lt;td&gt;118.8%&lt;/td&gt;&lt;td&gt;14pt&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;odd&quot;&gt;&lt;td&gt;20px&lt;/td&gt;&lt;td&gt;1.250em&lt;/td&gt;&lt;td&gt;125.0%&lt;/td&gt;&lt;td&gt;15pt&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;even&quot;&gt;&lt;td&gt;21px&lt;/td&gt;&lt;td&gt;1.313em&lt;/td&gt;&lt;td&gt;131.3%&lt;/td&gt;&lt;td&gt;16pt&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;odd&quot;&gt;&lt;td&gt;22px&lt;/td&gt;&lt;td&gt;1.375em&lt;/td&gt;&lt;td&gt;137.5%&lt;/td&gt;&lt;td&gt;17pt&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;even&quot;&gt;&lt;td&gt;23px&lt;/td&gt;&lt;td&gt;1.438em&lt;/td&gt;&lt;td&gt;143.8%&lt;/td&gt;&lt;td&gt;17pt&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;odd&quot;&gt;&lt;td&gt;24px&lt;/td&gt;&lt;td&gt;1.500em&lt;/td&gt;&lt;td&gt;150.0%&lt;/td&gt;&lt;td&gt;18pt&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://faqspoint.blogspot.com/feeds/1744560598076462600/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faqspoint.blogspot.com/2015/02/px-to-em-to-pt-conversion.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/1744560598076462600'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/1744560598076462600'/><link rel='alternate' type='text/html' href='http://faqspoint.blogspot.com/2015/02/px-to-em-to-pt-conversion.html' title='PX to EM to PT Conversion'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408141208604594417.post-2948937422492818476</id><published>2015-02-25T10:47:00.001-08:00</published><updated>2015-02-26T10:20:57.542-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="css down arrow"/><category scheme="http://www.blogger.com/atom/ns#" term="css triangle"/><category scheme="http://www.blogger.com/atom/ns#" term="css triangle shapes"/><category scheme="http://www.blogger.com/atom/ns#" term="css triangles"/><category scheme="http://www.blogger.com/atom/ns#" term="css up arrow"/><category scheme="http://www.blogger.com/atom/ns#" term="down arrow using css"/><category scheme="http://www.blogger.com/atom/ns#" term="triangle shapes using css"/><category scheme="http://www.blogger.com/atom/ns#" term="triangle using css"/><category scheme="http://www.blogger.com/atom/ns#" term="up arrow using css"/><title type='text'>CSS Triangle</title><content type='html'>&lt;style&gt;
.triangle_up{
  width: 0px;
  height: 0px;
  border-left: 50px solid transparent;
  border-right: 50px solid transparent;
  border-bottom: 50px solid red;
}
.triangle_down{
  width: 0px;
  height: 0px;
  border-left: 50px solid transparent;
  border-right: 50px solid transparent;
  border-top: 50px solid red;
}
.triangle_left{
  width: 0px;
  height: 0px;
  border-top: 50px solid transparent;
  border-bottom: 50px solid transparent;
  border-right: 50px solid red;
}
.triangle_right{
  width: 0px;
  height: 0px;
  border-top: 50px solid transparent;
  border-bottom: 50px solid transparent;
  border-left: 50px solid red;
}
.triangle_topleft{
  width: 0px;
  height: 0px;
  border-right: 50px solid transparent;
  border-top: 50px solid red;
}
.triangle_topright{
  width: 0px;
  height: 0px;
  border-left: 50px solid transparent;
  border-top: 50px solid red;
}
.triangle_bottomleft{
  width: 0px;
  height: 0px;
  border-right: 50px solid transparent;
  border-bottom: 50px solid red;
}
.triangle_bottomright{
  width: 0px;
  height: 0px;
  border-left: 50px solid transparent;
  border-bottom: 50px solid red;
}
.triangle_combine{
  width: 0px;
  height: 0px;
  border-top: 100px solid #0099ff;
  border-left: 100px solid #ff9900;
  border-right: 100px solid #F6402D;
  border-bottom: 100px solid #8CC63E;
}
.own-code-section {
  margin-bottom: 20px;
}
.subheader{
  font-size: 14px;
  background-color: #f2f2f2;
  font-weight: bold;
  padding: 5px;
  margin-bottom: 5px;
  margin-top:30px;
}
&lt;/style&gt;
&lt;div class=&quot;own-para-sep&quot;&gt;Here are the simple example of css triangles:&lt;/div&gt;

&lt;div class=&quot;own-para-sep&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; Before writing CSS, first create div tag with class &#39;triangle&#39;.&lt;/div&gt;
&lt;div class=&quot;own-code-section&quot;&gt;
&amp;lt;div class=&quot;triangle&quot;&amp;gt;&amp;lt;/div&amp;gt;
&lt;/div&gt;
&lt;div class=&quot;subheader&quot;&gt;Triangle Up:&lt;/div&gt;
&lt;div class=&quot;own-code-section&quot;&gt;
&lt;pre&gt;
.triangle{
  width: 0px;
  height: 0px;
  border-left: 50px solid transparent;
  border-right: 50px solid transparent;
  border-bottom: 50px solid red;
}
&lt;/pre&gt;
&lt;/div&gt;
&lt;b&gt;Output:&lt;/b&gt;
&lt;div class=&quot;triangle_up&quot;&gt;&lt;/div&gt;

&lt;div class=&quot;subheader&quot;&gt;Triangle Down:&lt;/div&gt;
&lt;div class=&quot;own-code-section&quot;&gt;
&lt;pre&gt;
.triangle{
  width: 0px;
  height: 0px;
  border-left: 50px solid transparent;
  border-right: 50px solid transparent;
  border-top: 50px solid red;
}
&lt;/pre&gt;
&lt;/div&gt;
&lt;b&gt;Output:&lt;/b&gt;
&lt;div class=&quot;triangle_down&quot;&gt;&lt;/div&gt;

&lt;div class=&quot;subheader&quot;&gt;Triangle Left:&lt;/div&gt;
&lt;div class=&quot;own-code-section&quot;&gt;
&lt;pre&gt;
.triangle{
  width: 0px;
  height: 0px;
  border-top: 50px solid transparent;
  border-bottom: 50px solid transparent;
  border-right: 50px solid red;
}
&lt;/pre&gt;
&lt;/div&gt;
&lt;b&gt;Output:&lt;/b&gt;
&lt;div class=&quot;triangle_left&quot;&gt;&lt;/div&gt;


&lt;div class=&quot;subheader&quot;&gt;Triangle Right:&lt;/div&gt;
&lt;div class=&quot;own-code-section&quot;&gt;
&lt;pre&gt;
.triangle{
  width: 0px;
  height: 0px;
  border-top: 50px solid transparent;
  border-bottom: 50px solid transparent;
  border-left: 50px solid red;
}
&lt;/pre&gt;
&lt;/div&gt;
&lt;b&gt;Output:&lt;/b&gt;
&lt;div class=&quot;triangle_right&quot;&gt;&lt;/div&gt;


&lt;div class=&quot;subheader&quot;&gt;Top Left Triangle:&lt;/div&gt;
&lt;div class=&quot;own-code-section&quot;&gt;
&lt;pre&gt;
.triangle{
  width: 0px;
  height: 0px;
  border-right: 50px solid transparent;
  border-top: 50px solid red;
}
&lt;/pre&gt;
&lt;/div&gt;
&lt;b&gt;Output:&lt;/b&gt;
&lt;div class=&quot;triangle_topleft&quot;&gt;&lt;/div&gt;


&lt;div class=&quot;subheader&quot;&gt;Top Right Triangle:&lt;/div&gt;
&lt;div class=&quot;own-code-section&quot;&gt;
&lt;pre&gt;
.triangle{
  width: 0px;
  height: 0px;
  border-left: 50px solid transparent;
  border-top: 50px solid red;
}
&lt;/pre&gt;
&lt;/div&gt;
&lt;b&gt;Output:&lt;/b&gt;
&lt;div class=&quot;triangle_topright&quot;&gt;&lt;/div&gt;

&lt;div class=&quot;subheader&quot;&gt;Bottom Left Triangle:&lt;/div&gt;
&lt;div class=&quot;own-code-section&quot;&gt;
&lt;pre&gt;
.triangle{
  width: 0px;
  height: 0px;
  border-right: 50px solid transparent;
  border-bottom: 50px solid red;
}
&lt;/pre&gt;
&lt;/div&gt;
&lt;b&gt;Output:&lt;/b&gt;
&lt;div class=&quot;triangle_bottomleft&quot;&gt;&lt;/div&gt;


&lt;div class=&quot;subheader&quot;&gt;Bottom Right Triangle:&lt;/div&gt;
&lt;div class=&quot;own-code-section&quot;&gt;
&lt;pre&gt;
.triangle{
  width: 0px;
  height: 0px;
  border-left: 50px solid transparent;
  border-bottom: 50px solid red;
}
&lt;/pre&gt;
&lt;/div&gt;
&lt;b&gt;Output:&lt;/b&gt;
&lt;div class=&quot;triangle_bottomright&quot;&gt;&lt;/div&gt;


&lt;div class=&quot;subheader&quot;&gt;Finally combine four triangles:&lt;/div&gt;
&lt;div class=&quot;own-code-section&quot;&gt;
&lt;pre&gt;
.triangle{
  width: 0px;
  height: 0px;
  border-top: 100px solid #0099ff;
  border-left: 100px solid #ff9900;
  border-right: 100px solid #F6402D;
  border-bottom: 100px solid #8CC63E;
}
&lt;/pre&gt;
&lt;/div&gt;
&lt;b&gt;Output:&lt;/b&gt;
&lt;div class=&quot;triangle_combine&quot;&gt;&lt;/div&gt;



</content><link rel='replies' type='application/atom+xml' href='http://faqspoint.blogspot.com/feeds/2948937422492818476/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faqspoint.blogspot.com/2015/02/css-triangle.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/2948937422492818476'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/2948937422492818476'/><link rel='alternate' type='text/html' href='http://faqspoint.blogspot.com/2015/02/css-triangle.html' title='CSS Triangle'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408141208604594417.post-3213249525628486134</id><published>2015-02-25T09:31:00.001-08:00</published><updated>2015-02-25T09:31:52.554-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="constant aspect ratio"/><category scheme="http://www.blogger.com/atom/ns#" term="css aspect ratio"/><category scheme="http://www.blogger.com/atom/ns#" term="maintain aspect ratio CSS"/><title type='text'>How to maintain aspect ratio when resizing a DIV?</title><content type='html'>&lt;div class=&quot;own-para-sep&quot;&gt;You can create containers that maintain a constant aspect ratio by using padding-bottom as a percentage. The CSS specifications says that padding-bottom is defined relative to the &quot;width&quot;, not height, so if you want a 4:3 aspect ratio container you can do something like this:&lt;/div&gt;
&lt;div class=&quot;own-code-section&quot;&gt;
&lt;pre&gt;
&amp;lt;div style=&quot;width: 100%; position: relative;padding-bottom: 75%;&quot;&amp;gt;
  &amp;lt;div style=&quot;position:absolute;left:0;top:0; right:0; bottom:0;&quot;&amp;gt;
    This content will have a constant aspect ratio that varies based on the width.
  &amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;

</content><link rel='replies' type='application/atom+xml' href='http://faqspoint.blogspot.com/feeds/3213249525628486134/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faqspoint.blogspot.com/2015/02/how-to-maintain-aspect-ratio-when.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/3213249525628486134'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/3213249525628486134'/><link rel='alternate' type='text/html' href='http://faqspoint.blogspot.com/2015/02/how-to-maintain-aspect-ratio-when.html' title='How to maintain aspect ratio when resizing a DIV?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408141208604594417.post-6560635071198521724</id><published>2015-02-23T10:14:00.000-08:00</published><updated>2015-02-23T10:20:52.886-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="change console log color"/><category scheme="http://www.blogger.com/atom/ns#" term="change console.log color"/><category scheme="http://www.blogger.com/atom/ns#" term="colors in javascript console"/><category scheme="http://www.blogger.com/atom/ns#" term="console.log color change"/><title type='text'>Change console.log display(color/font/background color)</title><content type='html'>&lt;div class=&quot;own-para-sep&quot;&gt;You can apply your own styling to log message, by prefixing the message with &lt;b&gt;%c&lt;/b&gt;, and provide the css styles as second parameter to the log message. Here is the simple example: &lt;/div&gt;
&lt;div class=&quot;own-code-section&quot;&gt;
console.log(&quot;%cThis is green color text&quot;, &quot;color: green;&quot;);
&lt;/div&gt;

&lt;b&gt;Here is the output:&lt;/b&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDuzJAZx1tJsqvBXttzwQnRMM2hWgbpmPa5kR5HMXpbJ-9IVJQewQFmO5CYMhdW1sQCddSRDDVqHrp13qsWagcQOvscINxbRp3EU_olBJlWdZmDd1IC7jjGqStNXclpYYN7e_1Flm5kmo/s1600/console.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDuzJAZx1tJsqvBXttzwQnRMM2hWgbpmPa5kR5HMXpbJ-9IVJQewQFmO5CYMhdW1sQCddSRDDVqHrp13qsWagcQOvscINxbRp3EU_olBJlWdZmDd1IC7jjGqStNXclpYYN7e_1Flm5kmo/s400/console.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;b&gt;Bold text:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;own-code-section&quot;&gt;
console.log(&quot;%cThis is green color text&quot;, &quot;color: green;font-weight: bold;&quot;);
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkoZ-ci_GEuOH9ktatU8s1IN4Jr91ZOGmRbTwC3LqggWZyTKajxT0u290HTmaTGyEns1sdl50QQjtmGUJYWKKoH3IaScM_noqW_koSl6G35YrZgkFQG7FDlpqIEK5pHGKUOoe5yqeHsBc/s1600/console1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkoZ-ci_GEuOH9ktatU8s1IN4Jr91ZOGmRbTwC3LqggWZyTKajxT0u290HTmaTGyEns1sdl50QQjtmGUJYWKKoH3IaScM_noqW_koSl6G35YrZgkFQG7FDlpqIEK5pHGKUOoe5yqeHsBc/s400/console1.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;div&gt;&lt;b&gt;Background color:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;own-code-section&quot;&gt;
console.log(&quot;%c Hello world &quot;, &quot;color: #FFFFFF;font-weight: bold;background-color: red;&quot;);
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSM43Xdn_UoMf3FTRb_VZe1SrekBlPCBllsI36lQZ5zErSGBz3kbyUuWK5uViNm74mKx7eeQ6v3Mpr4gtVMCbnhE81QY7lJMBX1hseSw1o4q7ONBMZRBAsHXpiPncgkhlEizoSqP8kvbs/s1600/console2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSM43Xdn_UoMf3FTRb_VZe1SrekBlPCBllsI36lQZ5zErSGBz3kbyUuWK5uViNm74mKx7eeQ6v3Mpr4gtVMCbnhE81QY7lJMBX1hseSw1o4q7ONBMZRBAsHXpiPncgkhlEizoSqP8kvbs/s400/console2.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;div&gt;&lt;b&gt;Multiple colors:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;own-code-section&quot;&gt;
console.log(&quot;%c Hello world, %c Hello world &quot;, &quot;color: green;&quot;, &quot;color: red;&quot;);
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUPsOdL3cnuDviAN6YO6URPlD9NyupTNBYS9DnhKMV8r8ICxS86FHlAxMIyhcNmY3wh4umGTxsKXY6EnTcY7JdaVZUo76FJKiRko1bziP5MxsaWPKI3kphEipkaHRzXxKvr7N2ZMTHBkg/s1600/console4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUPsOdL3cnuDviAN6YO6URPlD9NyupTNBYS9DnhKMV8r8ICxS86FHlAxMIyhcNmY3wh4umGTxsKXY6EnTcY7JdaVZUo76FJKiRko1bziP5MxsaWPKI3kphEipkaHRzXxKvr7N2ZMTHBkg/s400/console4.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://faqspoint.blogspot.com/feeds/6560635071198521724/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faqspoint.blogspot.com/2015/02/change-consolelog-displaycolorfontbackg.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/6560635071198521724'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/6560635071198521724'/><link rel='alternate' type='text/html' href='http://faqspoint.blogspot.com/2015/02/change-consolelog-displaycolorfontbackg.html' title='Change console.log display(color/font/background color)'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDuzJAZx1tJsqvBXttzwQnRMM2hWgbpmPa5kR5HMXpbJ-9IVJQewQFmO5CYMhdW1sQCddSRDDVqHrp13qsWagcQOvscINxbRp3EU_olBJlWdZmDd1IC7jjGqStNXclpYYN7e_1Flm5kmo/s72-c/console.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408141208604594417.post-219165092236675627</id><published>2015-02-22T02:56:00.002-08:00</published><updated>2015-02-22T02:56:55.701-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="large number of emails php"/><category scheme="http://www.blogger.com/atom/ns#" term="php send large no.of emails"/><category scheme="http://www.blogger.com/atom/ns#" term="php send mails"/><title type='text'>How to send large number(10000+) of emails using Php/MySql?</title><content type='html'>&lt;div class=&quot;own-para-sep&quot;&gt;We can do this in two ways:&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;With Cron&lt;/li&gt;
&lt;li&gt;With ajax&lt;/li&gt;
&lt;/ol&gt;

&lt;div class=&quot;own-para-sep&quot;&gt;&lt;b&gt;1. With cron&lt;/b&gt;&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;Create new table for emails with required fields&lt;/li&gt;
&lt;li&gt;Insert all the email ids into table with status as &#39;not sent&#39;&lt;/li&gt;
&lt;li&gt;Write a php function to fetch set of email ids(Ex: get 100 ids of status=&#39;not sent&#39; at a time) and send email to them using mail() method. After sending the mail update status to &quot;sent&quot;&lt;/li&gt;
&lt;li&gt;Write cron job to run this method every 5 min until all mails sent.&lt;/li&gt;
&lt;/ol&gt;

&lt;div class=&quot;own-para-sep&quot;&gt;&lt;b&gt;2. With ajax(through browser)&lt;/b&gt;&lt;/div&gt;
Most of the times your request will be timed out, if you are trying to send large no.of emails through browser. Instead of sending all mails at a time, we can send using pagination concept. So you don&#39;t need to worry about request timeouts.
&lt;ol&gt;
&lt;li&gt;Create Empty div with id &lt;/li&gt;
&lt;li&gt;Get all mail ids using ajax and save in javascript variable&lt;/li&gt;
&lt;li&gt;Consider sending 100 mails at a time and create no. of pages it will create
&lt;div class=&quot;own-code-section&quot;&gt;&lt;b&gt;Ex:&lt;/b&gt; 
&lt;pre&gt;
var totalmails = 12000;&lt;br /&gt;
var pagecount = Math.ceil(totalmails/100);
&lt;/pre&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
Depends on no.of pages, create select dropdown with page numbers
&lt;div class=&quot;own-code-section&quot;&gt;
&lt;pre&gt;
var pages = &quot;&amp;lt;select name=&#39;pages&#39;&amp;gt;&quot;;
for(var i = 0; i &amp;lt;= pagecount; i ++){
  pages += &quot;&amp;lt;option value=&#39;&quot;+i+&quot;&#39;&amp;gt;&quot;+i+&quot;&amp;lt;/option&amp;gt;&quot;;
}
pages += &quot;&amp;lt;/select&amp;gt;&quot;;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;On selection of each page number, split the array and make the ajax call with those mail ids and send mail using php mail() method.&lt;/li&gt;
&lt;li&gt;Thats it!&lt;/li&gt;
&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://faqspoint.blogspot.com/feeds/219165092236675627/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faqspoint.blogspot.com/2015/02/how-to-send-large-number10000-of-emails.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/219165092236675627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/219165092236675627'/><link rel='alternate' type='text/html' href='http://faqspoint.blogspot.com/2015/02/how-to-send-large-number10000-of-emails.html' title='How to send large number(10000+) of emails using Php/MySql?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408141208604594417.post-5972853759193002185</id><published>2015-02-21T00:14:00.001-08:00</published><updated>2015-02-21T00:14:17.974-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="css haml"/><category scheme="http://www.blogger.com/atom/ns#" term="css in haml"/><category scheme="http://www.blogger.com/atom/ns#" term="haml inline css"/><category scheme="http://www.blogger.com/atom/ns#" term="haml inline styles"/><category scheme="http://www.blogger.com/atom/ns#" term="haml style tag"/><category scheme="http://www.blogger.com/atom/ns#" term="inline css haml"/><category scheme="http://www.blogger.com/atom/ns#" term="internal styles in HAML"/><title type='text'>How to add styles(internal styles) in HAML file?</title><content type='html'>&lt;div class=&quot;own-para-sep&quot;&gt;Simply use:&lt;/div&gt;
&lt;div class=&quot;own-code-section&quot;&gt;
&lt;pre&gt;
:css
  .header {
    font-size: 14px;
  }
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;own-para-sep&quot;&gt;If you want to use scss:&lt;/div&gt;
&lt;div class=&quot;own-code-section&quot;&gt;
&lt;pre&gt;
:scss
  .header {
    font-size: 14px;
    .logo {
        width: 100px;
        margin-right: 10px;
    }
}
&lt;/pre&gt;
&lt;/div&gt;

</content><link rel='replies' type='application/atom+xml' href='http://faqspoint.blogspot.com/feeds/5972853759193002185/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faqspoint.blogspot.com/2015/02/how-to-add-stylesinternal-styles-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/5972853759193002185'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/5972853759193002185'/><link rel='alternate' type='text/html' href='http://faqspoint.blogspot.com/2015/02/how-to-add-stylesinternal-styles-in.html' title='How to add styles(internal styles) in HAML file?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408141208604594417.post-1514557525652826171</id><published>2015-02-20T23:38:00.000-08:00</published><updated>2015-02-20T23:38:54.632-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cannot do a partial commit during a merge"/><category scheme="http://www.blogger.com/atom/ns#" term="git cannot do a partial commit during a merge"/><title type='text'>fatal: cannot do a partial commit during a merge in Git</title><content type='html'>&lt;div class=&quot;own-para-sep&quot;&gt;Adding &lt;b&gt;-i&lt;/b&gt; to the commit command fixes this problem.&lt;/div&gt;
&lt;div class=&quot;own-code-section&quot;&gt;git commit -i filename.php&lt;/div&gt;
&lt;div class=&quot;own-para-sep&quot;&gt;&lt;b&gt;Ex: &lt;/b&gt;git commit -i filename.php -m&quot;COMMIT MESSAGE&quot;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faqspoint.blogspot.com/feeds/1514557525652826171/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faqspoint.blogspot.com/2015/02/fatal-cannot-do-partial-commit-during.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/1514557525652826171'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/1514557525652826171'/><link rel='alternate' type='text/html' href='http://faqspoint.blogspot.com/2015/02/fatal-cannot-do-partial-commit-during.html' title='fatal: cannot do a partial commit during a merge in Git'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408141208604594417.post-1933546398738838040</id><published>2015-02-20T23:30:00.000-08:00</published><updated>2015-02-20T23:30:52.758-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cakephp static page"/><category scheme="http://www.blogger.com/atom/ns#" term="static page creation in cakephp"/><title type='text'>How to create a static page in cakephp?</title><content type='html'>&lt;div&gt;
Here is the simple way to create static page.&lt;br/&gt;
&lt;ol&gt;
&lt;li&gt;First create page with .ctp extension(static pages should be created with .ctp extension) and save in app/views/page folder. Ex: file named as sample.ctp&lt;/li&gt;
&lt;li&gt;Add rewrite URL in routes.php (app/config/routes.php).&lt;/li&gt;
&lt;/ol&gt;

Router::connect(&#39;/sample/&#39;, array(&#39;controller&#39; =&gt; &#39;pages&#39;, &#39;action&#39; =&gt; &#39;display&#39;, &#39;sample&#39;));&lt;br /&gt;&lt;br /&gt;

That&#39;s it. Now you can access your sample page at www.yoursite.com/sample
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faqspoint.blogspot.com/feeds/1933546398738838040/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faqspoint.blogspot.com/2015/02/how-to-create-static-page-in-cakephp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/1933546398738838040'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/1933546398738838040'/><link rel='alternate' type='text/html' href='http://faqspoint.blogspot.com/2015/02/how-to-create-static-page-in-cakephp.html' title='How to create a static page in cakephp?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408141208604594417.post-8001502398250576825</id><published>2014-06-16T21:00:00.000-07:00</published><updated>2014-06-16T21:02:00.873-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="rake assets commands"/><category scheme="http://www.blogger.com/atom/ns#" term="rake commands"/><category scheme="http://www.blogger.com/atom/ns#" term="rake database commands"/><category scheme="http://www.blogger.com/atom/ns#" term="rake seed command"/><category scheme="http://www.blogger.com/atom/ns#" term="rake tasks"/><title type='text'>Rails and Rake Commands</title><content type='html'>&lt;div class=&quot;own-para-sep&quot;&gt;Here is a list of various important commands supported by Rake:&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;rake about&lt;/b&gt; - List versions of all Rails frameworks and the environment&lt;/li&gt;
&lt;li&gt;&lt;b&gt;rake assets:clean[keep]&lt;/b&gt; - Remove old compiled assets&lt;/li&gt;
&lt;li&gt;&lt;b&gt;rake assets:clobber&lt;/b&gt; - Remove compiled assets&lt;/li&gt;
&lt;li&gt;&lt;b&gt;rake assets:environment&lt;/b&gt; -Load asset compile environment&lt;/li&gt;
&lt;li&gt;&lt;b&gt;rake assets:precompile&lt;/b&gt; - Compile all the assets named in config.assets.precompile&lt;/li&gt;
&lt;li&gt;&lt;b&gt;rake clean&lt;/b&gt; - Cleanup temporary, log and backup files&lt;/li&gt;
&lt;li&gt;&lt;b&gt;rake db:create&lt;/b&gt; - Create the database from DATABASE_URL or config/database.yml for the current Rails.env (use db:create:all to create all dbs in the config) &lt;/li&gt;
&lt;li&gt;&lt;b&gt;rake db:drop&lt;/b&gt; - Drops the database using DATABASE_URL or the current Rails.env (use db:drop:all to drop all databases)&lt;/li&gt;

&lt;li&gt;&lt;b&gt;rake db:fixtures:load&lt;/b&gt; - Load fixtures into the current environment&#39;s database. Load specific fixtures using FIXTURES=x,y&lt;/li&gt;
&lt;li&gt;&lt;b&gt;rake db:migrate&lt;/b&gt; - Migrate the database through scripts in db/migrate. Target specific version with VERSION=x &lt;/li&gt;
&lt;li&gt;&lt;b&gt;rake db:migrate:status&lt;/b&gt; - Display status of migrations&lt;/li&gt;
&lt;li&gt;&lt;b&gt;rake db:remigrate&lt;/b&gt; - Migrate schema to version 0 and back up again&lt;/li&gt;
&lt;li&gt;&lt;b&gt;rake db:rollback&lt;/b&gt; - Rolls the schema back to the previous version (specify steps w/ STEP=n)&lt;/li&gt;
&lt;li&gt;&lt;b&gt;rake db:schema:cache:clear&lt;/b&gt; - Clear a db/schema_cache.dump file&lt;/li&gt;
&lt;li&gt;&lt;b&gt;rake db:schema:cache:dump&lt;/b&gt; - Create a db/schema_cache.dump file&lt;/li&gt;

&lt;li&gt;&lt;b&gt;rake db:schema:dump&lt;/b&gt; - Create a db/schema.rb file that can be portably used against any DB supported by AR.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;rake db:schema:load&lt;/b&gt; -  Load a schema.rb file into the database.&lt;/li&gt;

&lt;li&gt;&lt;b&gt;rake db:seed&lt;/b&gt; - Load the seed data from db/seeds.rb&lt;/li&gt;
&lt;li&gt;&lt;b&gt;rake db:setup&lt;/b&gt; - Create the database, load the schema, and initialize with the seed data (use db:reset to also drop the db first)&lt;/li&gt;
&lt;li&gt;&lt;b&gt;rake db:structure:dump&lt;/b&gt; - Dump the database structure to db/structure.sql&lt;/li&gt;
&lt;li&gt;&lt;b&gt;rake db:version&lt;/b&gt; - Retrieves the current schema version number&lt;/li&gt;

&lt;li&gt;&lt;b&gt;rake db:sessions:clear&lt;/b&gt; - Clear the sessions table.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;rake db:sessions:create&lt;/b&gt; - Creates a sessions table for use with CGI::Session::ActiveRecordStore.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;rake db:structure:dump&lt;/b&gt; - Dump the database structure to a SQL file.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;rake doc:app&lt;/b&gt; - Generate docs for the app -- also available doc:rails, doc:guides (options: TEMPLATE=/rdoc-template.rb, TITLE=&quot;Custom Title&quot;)&lt;/li&gt;
&lt;li&gt;&lt;b&gt;rake log:clear&lt;/b&gt; - Truncates all *.log files in log/ to zero bytes (specify which logs with LOGS=test,development)&lt;/li&gt;
&lt;li&gt;&lt;b&gt;rake rails:template&lt;/b&gt; - Applies the template supplied by LOCATION=(/path/to/template) or URL&lt;/li&gt;
&lt;li&gt;&lt;b&gt;rake routes&lt;/b&gt; - Print out all defined routes in match order, with names&lt;/li&gt;
&lt;li&gt;&lt;b&gt;rake spec&lt;/b&gt; - Run all specs in spec directory (excluding plugin specs)&lt;/li&gt;
&lt;li&gt;&lt;b&gt;rake spec:features&lt;/b&gt; - Run the code examples in spec/features&lt;/li&gt;
&lt;li&gt;&lt;b&gt;rake spree:install:migrations&lt;/b&gt; - Copy migrations from spree to application&lt;/li&gt;
&lt;li&gt;&lt;b&gt;rake spree:reset_taxon_permalinks&lt;/b&gt; - Resets all taxon permalinks&lt;/li&gt;
&lt;li&gt;&lt;b&gt;rake spree_api:install:migrations&lt;/b&gt; - Copy migrations from spree_api to application&lt;/li&gt;
&lt;li&gt;&lt;b&gt;rake spree_auth:admin:create&lt;/b&gt; - Create admin username and password&lt;/li&gt;
&lt;li&gt;&lt;b&gt;rake spree_auth:install:migrations&lt;/b&gt; - Copy migrations from spree_auth to application&lt;/li&gt;
&lt;li&gt;&lt;b&gt;rake stats&lt;/b&gt; - Report code statistics (KLOCs, etc) from the application&lt;/li&gt;
&lt;li&gt;&lt;b&gt;rake test&lt;/b&gt; - Runs test:units, test:functionals, test:integration together&lt;/li&gt;
&lt;li&gt;&lt;b&gt;rake test:all&lt;/b&gt; - Run tests quickly by merging all types and not resetting db&lt;/li&gt;
&lt;li&gt;&lt;b&gt;rake test:all:db&lt;/b&gt; - Run tests quickly, but also reset db&lt;/li&gt;
&lt;li&gt;&lt;b&gt;rake time:zones:all&lt;/b&gt; - Displays all time zones, also available: time:zones:us, time:zones:local -- filter with OFFSET parameter, e.g., OFFSET=-6&lt;/li&gt;
&lt;li&gt;&lt;b&gt;rake tmp:clear&lt;/b&gt; - Clear session, cache, and socket files from tmp/ (narrow w/ tmp:sessions:clear, tmp:cache:clear, tmp:sockets:clear)&lt;/li&gt;
&lt;li&gt;&lt;b&gt;rake tmp:create&lt;/b&gt; - Creates tmp directories for sessions, cache, sockets, and pids&lt;/li&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://faqspoint.blogspot.com/feeds/8001502398250576825/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faqspoint.blogspot.com/2014/06/rails-ans-rake-commands.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/8001502398250576825'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/8001502398250576825'/><link rel='alternate' type='text/html' href='http://faqspoint.blogspot.com/2014/06/rails-ans-rake-commands.html' title='Rails and Rake Commands'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408141208604594417.post-4593267225068417124</id><published>2014-06-13T01:06:00.000-07:00</published><updated>2014-06-13T01:06:42.430-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="comments in haml"/><category scheme="http://www.blogger.com/atom/ns#" term="haml comments"/><category scheme="http://www.blogger.com/atom/ns#" term="multi line comments in haml"/><category scheme="http://www.blogger.com/atom/ns#" term="single line comments haml"/><title type='text'>Comments in HAML</title><content type='html'>&lt;div class=&quot;own-para-sep&quot;&gt;
There are two types of comments in HAML files.
&lt;/div&gt;
&lt;div class=&quot;own-para-sep&quot;&gt;
&lt;b&gt;1. Single line Comment&lt;/b&gt;
&lt;p&gt;Single line comments can be written in two ways.&lt;/p&gt;
This will create the HTML comment that will sent to client(visible in &#39;view source&#39; of the web page)
&lt;div class=&quot;own-code-section&quot;&gt;
/  comment text
&lt;/div&gt;
&lt;/div&gt;

&lt;div class=&quot;own-para-sep&quot;&gt;
This will comment the code so that will not sent to the client:
&lt;div class=&quot;own-code-section&quot;&gt;
-#  comment text
&lt;/div&gt;
&lt;/div&gt;

&lt;div class=&quot;own-para-sep&quot;&gt;
&lt;b&gt;2. Multi line Comment&lt;/b&gt;
&lt;div class=&quot;own-code-section&quot;&gt;
&lt;pre&gt;
-#  
    Everything indented below the comment symbol is considered as comment
    below
    text
    is
    not
    visible
    in view source of the file
    
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;

 </content><link rel='replies' type='application/atom+xml' href='http://faqspoint.blogspot.com/feeds/4593267225068417124/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faqspoint.blogspot.com/2014/06/comments-in-haml.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/4593267225068417124'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/4593267225068417124'/><link rel='alternate' type='text/html' href='http://faqspoint.blogspot.com/2014/06/comments-in-haml.html' title='Comments in HAML'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408141208604594417.post-1912002512547151834</id><published>2012-04-12T11:10:00.001-07:00</published><updated>2012-04-12T11:10:48.102-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="add copy to clipboard icon multiple places in a page"/><category scheme="http://www.blogger.com/atom/ns#" term="clipboard"/><category scheme="http://www.blogger.com/atom/ns#" term="how do i copy and paste"/><category scheme="http://www.blogger.com/atom/ns#" term="how to copy and paste"/><title type='text'>jquery copy to clipboard</title><content type='html'>&lt;div class=&quot;own-para-sep&quot;&gt;Here i am going to explain copy to clipboard functionality using &lt;a href=&quot;http://code.google.com/p/zeroclipboard/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;ZeroClipboard&lt;/a&gt; plugin. &lt;/div&gt;

&lt;div class=&quot;own-subheader&quot;&gt;Brief introduction of ZeroClipboard&lt;/div&gt;
&lt;div class=&quot;own-para-sep&quot;&gt;
This library is fully compatible with Flash Player 10, which requires that the clipboard copy operation be initiated by a user click event inside the Flash movie. This is achieved by automatically floating the invisible movie on top of a DOM element of your choice. Standard mouse events are even propagated out to your DOM element, so you can still have rollover and mouse down effects.&lt;/div&gt;

&lt;div class=&quot;own-para-sep&quot;&gt;
There are 4 simple steps to get clipboard functionality.
&lt;ol&gt;
&lt;li&gt; Download latest jquery base and include in your page.&lt;/li&gt;
&lt;li&gt;Download &lt;a href=&quot;http://code.google.com/p/zeroclipboard/downloads/list&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;ZeroClipboard plugin&lt;/a&gt; and include ZeroClipboard.js file in your page.&lt;/li&gt;
&lt;li&gt;
copy ZeroClipboard.swf file from downloaded list to your file location and change file path in ZeroClipboard.js
&lt;div class=&quot;own-code-section&quot;&gt;
 moviePath: &#39;&lt;b&gt;FILE PATH&lt;/b&gt;/ZeroClipboard.swf&#39;, // URL to movie
&lt;/div&gt;
&lt;/li&gt;

&lt;li&gt;
just add below html next to text you want to add clipboard icon
&lt;div class=&quot;own-code-section own-bmargin10&quot;&gt;
     &amp;lt;span class=&#39;copyclipboard&#39;&amp;gt;&amp;lt;/span&amp;gt;
&lt;/div&gt;
Also, put the text you want to copy in any html tag

&lt;div class=&quot;&quot;&gt;&lt;b&gt;Ex for simple text:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;own-code-section own-bmargin10&quot;&gt;
&amp;lt;span&amp;gt;TEXT TO COPY&amp;lt;/span&amp;gt;&amp;lt;span class=&#39;copyclipboard&#39;&amp;gt;&amp;lt;/span&amp;gt;
&lt;/div&gt;

&lt;div class=&quot;&quot;&gt;&lt;b&gt;Ex for link:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;own-code-section own-bmargin10&quot;&gt;
&amp;lt;a&amp;gt;LINK TEXT&amp;lt;/a&amp;gt;&amp;lt;span class=&#39;copyclipboard&#39;&amp;gt;&amp;lt;/span&amp;gt;
&lt;/div&gt;

&lt;/li&gt;

&lt;li&gt;
Now, add below code
&lt;div class=&quot;own-code-section own-bmargin10&quot;&gt;
&lt;pre&gt;
&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;
    $(function() {
        $(&quot;.copyclipboard&quot;).each(function(){
            var clip = new ZeroClipboard.Client();
            clip.setHandCursor( true );
            clip.setText($(this).prev().text());
            clip.glue(this);
            clip.addEventListener(&#39;complete&#39;, function(client, text) {
                alert(&quot;Copied text to clipboard:\n&quot; + text);
            });

        })
    });
&amp;lt;/script&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;
The above code look for all the &quot;copyclipboard&quot; classes and create clipboard object for each occurrence and get the text from previous tag of current instance and set it in the clipboard object. 
&lt;/li&gt;
&lt;li&gt;
Finally
&lt;div class=&quot;own-code-section own-bmargin10&quot;&gt;
&lt;pre&gt;
  .copyclipboard{
     padding-right: 20px;
     padding-top:1px;
     background: url(&#39;/images/clipboard.png&#39;) 100% 50% no-repeat;
  }
&lt;/pre&gt;
&lt;/div&gt;
&lt;/li&gt;

&lt;/ol&gt;
&lt;/div&gt;
&lt;div class=&quot;own-para-sep&quot;&gt;
 Whenever user click on clipboard icon, it will show alert with the copied text. Output look like this:
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-55El9C9hAlg6RDAyGBFtsYYCOxgd5JWp4ndEBRxOikjzdRAAaa48q9RNpUqR17oLSBxdDgVZ_bRZj3BQlmw65Zm9NAYClz1EmftSxk9iF-SKxt6ifjxv3lCmLCf2XGNNiLgKHRTsQTY/s1600/screenshot1.png&quot; imageanchor=&quot;1&quot; style=&quot;clear:left; float:left;margin-right:1em; margin-bottom:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;29&quot; width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-55El9C9hAlg6RDAyGBFtsYYCOxgd5JWp4ndEBRxOikjzdRAAaa48q9RNpUqR17oLSBxdDgVZ_bRZj3BQlmw65Zm9NAYClz1EmftSxk9iF-SKxt6ifjxv3lCmLCf2XGNNiLgKHRTsQTY/s320/screenshot1.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVqHVs1HDrISUlYppIhGmf9rfbBdnRlh8a52IS4oOGGLekdzfRvGt6yVJGV7n_X0KMYk-vXX4irzmQrn1A8QucmGEVZlA2lRxnLJmyLAU7wcy47AM6eC1Hfv6GkoO2mPLDgUrYxasQHrA/s1600/screensho2.png&quot; imageanchor=&quot;1&quot; style=&quot;clear:right; float:right; margin-left:1em; margin-bottom:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;145&quot; width=&quot;243&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVqHVs1HDrISUlYppIhGmf9rfbBdnRlh8a52IS4oOGGLekdzfRvGt6yVJGV7n_X0KMYk-vXX4irzmQrn1A8QucmGEVZlA2lRxnLJmyLAU7wcy47AM6eC1Hfv6GkoO2mPLDgUrYxasQHrA/s320/screensho2.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faqspoint.blogspot.com/feeds/1912002512547151834/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faqspoint.blogspot.com/2012/04/jquery-copy-to-clipboard.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/1912002512547151834'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/1912002512547151834'/><link rel='alternate' type='text/html' href='http://faqspoint.blogspot.com/2012/04/jquery-copy-to-clipboard.html' title='jquery copy to clipboard'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-55El9C9hAlg6RDAyGBFtsYYCOxgd5JWp4ndEBRxOikjzdRAAaa48q9RNpUqR17oLSBxdDgVZ_bRZj3BQlmw65Zm9NAYClz1EmftSxk9iF-SKxt6ifjxv3lCmLCf2XGNNiLgKHRTsQTY/s72-c/screenshot1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408141208604594417.post-6329855968823334143</id><published>2012-02-29T04:03:00.000-08:00</published><updated>2012-02-29T04:04:02.598-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ajax errors"/><category scheme="http://www.blogger.com/atom/ns#" term="handle ajax errors"/><category scheme="http://www.blogger.com/atom/ns#" term="handle global ajax errors using jquery"/><category scheme="http://www.blogger.com/atom/ns#" term="set default error messages"/><title type='text'>Handling global ajax errors using ajaxSetup</title><content type='html'>&lt;div class=&quot;own-para-sep&quot;&gt;Jquery ajaxsetUp function is used for setting up default values for future ajax requests. Here i am going to use that method to handle all ajax errors.&lt;/div&gt;
&lt;div class=&quot;own-code-section own-bmargin20&quot;&gt;
&lt;pre&gt;
function global_ajax_errors(){
  $.ajaxSetup({
    error:function(x,e){
      var errortext = &quot;&quot;;
       switch(x.status){
         case 0:
           errortext =&#39;You are offline! Please Check Your Network&#39;;
           break;
         case 404:
           errortext =  &quot;Requested URL not found.&quot;;
           break;
         case 500:
           errortext = &quot;Internal server error&quot;;
           break;
         default:
           if(e == &quot;parsererror&quot;){
             errortext = &quot;Error. Parsing JSON request failed.&quot;
           }else if(e == &quot;timeout&quot;){
             errortext = &quot;Request Time out&quot;;
           }else{
             errortext = &quot;Unknown Error.&quot;.x.responseText;
           }
           break;
       }
       alert(&quot;Error:&quot;+errortext);
    }
  });
}

&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;own-para-sep&quot;&gt;Now, call this method at the time of loading the page. This will give alert message if any ajax error(internal server error, 404 page error, timeout etc) comes. You can handle other type of errors also by adding entry in switch.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faqspoint.blogspot.com/feeds/6329855968823334143/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faqspoint.blogspot.com/2012/02/handling-global-ajax-error-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/6329855968823334143'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/6329855968823334143'/><link rel='alternate' type='text/html' href='http://faqspoint.blogspot.com/2012/02/handling-global-ajax-error-using.html' title='Handling global ajax errors using ajaxSetup'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408141208604594417.post-3431781083295925380</id><published>2012-02-27T02:44:00.001-08:00</published><updated>2012-02-27T02:44:56.926-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="clear form fields"/><category scheme="http://www.blogger.com/atom/ns#" term="clear input fields after submission"/><category scheme="http://www.blogger.com/atom/ns#" term="remove form elements"/><title type='text'>clearing form elements using jQuery</title><content type='html'>&lt;div class=&quot;own-para-sep&quot;&gt;HTML form can be reset using reset button but it resets the form back to its original state, whereas you may want to clear all the fields in the form. Here i am going to show how we can clear form elements using jQuery.&lt;/div&gt;
&lt;div class=&quot;own-code-section own-bmargin20&quot;&gt;
&lt;pre&gt;
function resetForm(ele){
    $(ele).find(&#39;:input&#39;).each(function() {
       switch(this.type) {
           case &#39;password&#39;:
            case &#39;select-multiple&#39;:
            case &#39;select-one&#39;:
            case &#39;text&#39;:
            case &#39;textarea&#39;:
                $(this).val(&#39;&#39;);
                break;
            case &#39;checkbox&#39;:
            case &#39;radio&#39;:
                this.checked = false;
                break;
         }
     });
};
&lt;/pre&gt;
&lt;/div&gt;

&lt;div class=&quot;own-para-sep&quot;&gt;
Above code find all the input fields under form/div and clear its values. This function can also use to clear set of input fields under #id.   
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faqspoint.blogspot.com/feeds/3431781083295925380/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faqspoint.blogspot.com/2012/02/clearing-form-elements-using-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/3431781083295925380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/3431781083295925380'/><link rel='alternate' type='text/html' href='http://faqspoint.blogspot.com/2012/02/clearing-form-elements-using-jquery.html' title='clearing form elements using jQuery'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408141208604594417.post-7947287898661994242</id><published>2012-01-27T03:21:00.000-08:00</published><updated>2012-01-27T03:21:47.363-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="css gradient and background image on same element"/><category scheme="http://www.blogger.com/atom/ns#" term="css gradient combined with background image"/><title type='text'>combine background image and css gradient</title><content type='html'>&lt;div class=&quot;own-para-sep&quot;&gt;In my previous posts, i explained how we can &lt;a target=&quot;_blank&quot; href=&quot;http://faqspoint.blogspot.com/2011/11/cross-browser-css-gradient-without.html&quot;&gt;create gradient without any images&lt;/a&gt;. In this , i am going to explain &lt;b&gt; combine background image and css gradient&lt;/b&gt;.&lt;/div&gt;

&lt;div class=&quot;own-para-sep&quot;&gt;Originally, I started with the following css&lt;/div&gt;

&lt;div class=&quot;own-code-section own-bmargin20&quot;&gt;
&lt;pre&gt;
.button{
    width:130px;
    padding:20px;
    margin:10px;
}
.example1{
    background:url(IMG URL) no-repeat;
    /* for firefox 3.6+ */
    background-image: -moz-linear-gradient(top,  #CBf6FA,  #A6DD9F);
    /* for webkit browsers */ 
    background-image: -webkit-gradient(linear, left top, left bottom, from(#CBf6FA),to(#A6DD9F)); 
}

&amp;lt;div class=&quot;button example1&quot;&amp;gt;Button&amp;lt;/div&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;own-para-sep&quot;&gt;It will give the out like below:&lt;/div&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifIzv1EgyE40vjg2DRGwEHYfhEKVd9jjE1hM27eK7u2Fe1z7M4ZzNs3f7YrDAsZ2NAWyPIPXJTjp3hDJQhIH7hv7fTD8393LsoOazmbtXnWw0CorkEhHtr5m0Bbl5Ys5kg_ndGQWLyUMU/s1600/button_without.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;64&quot; width=&quot;171&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifIzv1EgyE40vjg2DRGwEHYfhEKVd9jjE1hM27eK7u2Fe1z7M4ZzNs3f7YrDAsZ2NAWyPIPXJTjp3hDJQhIH7hv7fTD8393LsoOazmbtXnWw0CorkEhHtr5m0Bbl5Ys5kg_ndGQWLyUMU/s320/button_without.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;own-para-sep&quot;&gt;It was close but not quite what I wanted. My background image was being hidden behind gradient. The problem here is gradient is specified as a background-image, which means they override any previously declared background-image.&lt;/div&gt;
&lt;div class=&quot;own-para-sep&quot;&gt;So, here I went with few minor changes to my CSS by specifying background color as a fall-back for browsers that don&#39;t support CSS3 gradients. &lt;/div&gt;

&lt;div class=&quot;own-code-section own-bmargin20&quot;&gt;
&lt;pre&gt;
.button{
    width:130px;
    padding:20px;
    margin:10px;
}
.example1{
    background-color:#CBf6FA;
    /* for firefox 3.6+ */
    background-image: url(IMG URL), -moz-linear-gradient(top,  #CBf6FA,  #A6DD9F);

    /* for webkit browsers */ 
    background-image: url(IMG URL), -webkit-gradient(linear, left top, left bottom, from(#CBf6FA),to(#A6DD9F));

    /* IE 10 */
    background-image: url(IMAGE_URL), -ms-linear-gradient(top, #CBf6FA, #A6DD9F);

    /*  Opera 11.10+ */
    background-image: url(IMAGE_URL), -o-linear-gradient(top, #CBf6FA, #A6DD9F); 

    /* make IE happy */
     filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr=#CBf6FA, endColorstr=#A6DD9F);
     -ms-filter: &quot;progid:DXImageTransform.Microsoft.gradient (GradientType=0, startColorstr=#CBf6FA, endColorstr=#A6DD9F)&quot;;
   
    background-position: 4px 50%, 0 0;
    background-repeat: no-repeat;

}

&amp;lt;div class=&quot;button example1&quot;&amp;gt;Button&amp;lt;/div&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSenmLJgqXZuxRVHvftdW2kt4a8JSGbuAOAt9L6HoLFvdm0ruWGLQhiwDXpUxpYNUWoTpwjFBcG7ipwYoIVAwRoYjx4E-v62keJi1X9TUFr_idBfjv01pnoc_76Mhdl5Rpsar2VtFT-_k/s1600/button.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;67&quot; width=&quot;176&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSenmLJgqXZuxRVHvftdW2kt4a8JSGbuAOAt9L6HoLFvdm0ruWGLQhiwDXpUxpYNUWoTpwjFBcG7ipwYoIVAwRoYjx4E-v62keJi1X9TUFr_idBfjv01pnoc_76Mhdl5Rpsar2VtFT-_k/s320/button.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;div class=&quot;own-para-sep&quot;&gt;thats it!&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faqspoint.blogspot.com/feeds/7947287898661994242/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faqspoint.blogspot.com/2012/01/combine-background-image-and-css.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/7947287898661994242'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/7947287898661994242'/><link rel='alternate' type='text/html' href='http://faqspoint.blogspot.com/2012/01/combine-background-image-and-css.html' title='combine background image and css gradient'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifIzv1EgyE40vjg2DRGwEHYfhEKVd9jjE1hM27eK7u2Fe1z7M4ZzNs3f7YrDAsZ2NAWyPIPXJTjp3hDJQhIH7hv7fTD8393LsoOazmbtXnWw0CorkEhHtr5m0Bbl5Ys5kg_ndGQWLyUMU/s72-c/button_without.png" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408141208604594417.post-4181789905851346816</id><published>2012-01-27T00:23:00.000-08:00</published><updated>2012-01-27T00:23:53.529-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="add category in opencart"/><category scheme="http://www.blogger.com/atom/ns#" term="new category addition in opencart"/><category scheme="http://www.blogger.com/atom/ns#" term="OpenCart"/><title type='text'>Adding new categories in opencart</title><content type='html'>&lt;div class=&quot;own-para-sep&quot;&gt;After completing the installation process, you will get access to admin panel. From there you can add/remove categories of your shopping cart. To add a product category in OpenCart, log in your OpenCart admin panel and go to &lt;b&gt;Catalog &amp;raquo; Categories&lt;/b&gt; from the admin navigation menu.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkrZ9Z9SElib3Cmn34MvIab77rFIZJArzMULSFdG5ham8WpflEP1h6FDYje1063d6tZ_MzHxHEmdWSPZggJMGHhyphenhyphen0meg8jqbN_lmlHl3z5ZnGrGgs_p33Y5xhomzDQQaqG-rPdsoFwawA/s1600/select1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;123&quot; width=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkrZ9Z9SElib3Cmn34MvIab77rFIZJArzMULSFdG5ham8WpflEP1h6FDYje1063d6tZ_MzHxHEmdWSPZggJMGHhyphenhyphen0meg8jqbN_lmlHl3z5ZnGrGgs_p33Y5xhomzDQQaqG-rPdsoFwawA/s200/select1.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;div class=&quot;own-para-sep&quot;&gt;It will open the categories screen.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi36Nw0LE8sQXN5FXKgDpBSxMXUpDGVCRsXmJlmSh8KpnXq8mN0BDVbBfYcfv882nDmDUtn8QtiyVaVn5-OjR4IA9uuAxu8tPZFlPMltXpVzYGrrJ77CjYIlDsISk5gCQMWmxwhuyjf8iU/s1600/categories.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;74&quot; width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi36Nw0LE8sQXN5FXKgDpBSxMXUpDGVCRsXmJlmSh8KpnXq8mN0BDVbBfYcfv882nDmDUtn8QtiyVaVn5-OjR4IA9uuAxu8tPZFlPMltXpVzYGrrJ77CjYIlDsISk5gCQMWmxwhuyjf8iU/s320/categories.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;div class=&quot;own-para-sep&quot;&gt;Click on &quot;insert&quot; button on the upper right corner of the page.&lt;/div&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnfzH-HBsE7EFtajnC1oKMhkSomLSqr6tr0jju2OhpiRAD0kRuZbiFOVnqFU5sPNpX20m19sDQB7Rlp4LP-OR_dmhc-fvpPm89wnVVchtABiST76wI73hDNwTixwkwYQ9eEZcJwEuRPrI/s1600/categories_entry.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;146&quot; width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnfzH-HBsE7EFtajnC1oKMhkSomLSqr6tr0jju2OhpiRAD0kRuZbiFOVnqFU5sPNpX20m19sDQB7Rlp4LP-OR_dmhc-fvpPm89wnVVchtABiST76wI73hDNwTixwkwYQ9eEZcJwEuRPrI/s320/categories_entry.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;div class=&quot;own-para-sep&quot;&gt;Enter basic information such as category name, meta description, meta key words and description about category. Next, Go to &lt;b&gt;Data&lt;/b&gt; tab.&lt;/div&gt; 
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT9p1F1dHOz0nBD8gNeUdkFUtHpzAdwaJhtj579uGHgodpZjq1lsd1SkOYyS8Oa1CGmZB-zDuQb-_jhzgUVly0CGOckIMhCqT54rdItEKvZ61RFLKYmCdZp_B2iYv-B5SuWfgnmI7EJpA/s1600/category_data.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;233&quot; width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT9p1F1dHOz0nBD8gNeUdkFUtHpzAdwaJhtj579uGHgodpZjq1lsd1SkOYyS8Oa1CGmZB-zDuQb-_jhzgUVly0CGOckIMhCqT54rdItEKvZ61RFLKYmCdZp_B2iYv-B5SuWfgnmI7EJpA/s320/category_data.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;


&lt;div class=&quot;own-para-sep&quot;&gt;This will allow you to add hierarchy of your categories. You can set Search Engine friendly url for this category in &quot;SEO keyword&quot; field. Also, you can set image for your new category by clicking on &quot;Camera image&quot; and a popup will appear allowing you to upload a picture you like from your local computer or set a pre-existing one which is already uploaded in the images directory of OpenCart.&lt;/div&gt;

&lt;div class=&quot;own-para-sep&quot;&gt;Category status allows you to disable/enable the category on your site. Sort Order set&#39;s the order of which the category will be displayed amongst others in the same parent category. Next, Go to &lt;b&gt;&quot;Design&quot; tab.&lt;/b&gt;&lt;/div&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvUSoYp1YKP4XpyfXD_kabphJ7ojNHwMwhFczffD607ICo5_7QspjS3Xo7JjuF96pfj3-2I2z92YjuyFcu8D6RgwPO-k0-vX-tX5HWf6NTgjagQAwFzxmhrGRFTlTpv-e6qxMF19AJWfw/s1600/category_design.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;69&quot; width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvUSoYp1YKP4XpyfXD_kabphJ7ojNHwMwhFczffD607ICo5_7QspjS3Xo7JjuF96pfj3-2I2z92YjuyFcu8D6RgwPO-k0-vX-tX5HWf6NTgjagQAwFzxmhrGRFTlTpv-e6qxMF19AJWfw/s320/category_design.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;div class=&quot;own-para-sep&quot;&gt;Here, you can set your category look and feel. And, Finally you need to click the &quot;Save&quot; button(located upper right corner) to save your new product category.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faqspoint.blogspot.com/feeds/4181789905851346816/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faqspoint.blogspot.com/2012/01/adding-new-categories-in-opencart.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/4181789905851346816'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/4181789905851346816'/><link rel='alternate' type='text/html' href='http://faqspoint.blogspot.com/2012/01/adding-new-categories-in-opencart.html' title='Adding new categories in opencart'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkrZ9Z9SElib3Cmn34MvIab77rFIZJArzMULSFdG5ham8WpflEP1h6FDYje1063d6tZ_MzHxHEmdWSPZggJMGHhyphenhyphen0meg8jqbN_lmlHl3z5ZnGrGgs_p33Y5xhomzDQQaqG-rPdsoFwawA/s72-c/select1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408141208604594417.post-6585152130598877221</id><published>2012-01-20T17:19:00.000-08:00</published><updated>2012-01-20T17:19:56.900-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="analytics for pligg"/><category scheme="http://www.blogger.com/atom/ns#" term="pligg"/><title type='text'>Adding Google Analytics Code in Pligg</title><content type='html'>&lt;div class=&quot;own-para-sep&quot;&gt;Many people have reported problem with adding Google Analytics in pligg.tpl&lt;/div&gt;
&lt;div class=&quot;own-para-sep&quot;&gt;Here is the solution:&lt;/div&gt;

&lt;div class=&quot;own-para-sep&quot;&gt;When adding the javascript code to your pligg.tpl file you will need to wrap the javascript with &lt;b&gt;{literal}&lt;/b&gt; and &lt;b&gt;{/literal}&lt;/b&gt; tags.&lt;/div&gt;

&lt;div class=&quot;own-para-sep&quot;&gt;thats it.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faqspoint.blogspot.com/feeds/6585152130598877221/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faqspoint.blogspot.com/2012/01/adding-google-analytics-code-in-pligg.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/6585152130598877221'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/6585152130598877221'/><link rel='alternate' type='text/html' href='http://faqspoint.blogspot.com/2012/01/adding-google-analytics-code-in-pligg.html' title='Adding Google Analytics Code in Pligg'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408141208604594417.post-8574310439679011187</id><published>2011-12-19T00:53:00.000-08:00</published><updated>2012-03-28T02:51:57.764-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="1.5.x"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC"/><category scheme="http://www.blogger.com/atom/ns#" term="new page in opencart"/><category scheme="http://www.blogger.com/atom/ns#" term="OpenCart"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>Adding new page/layout in opencart 1.5.0.x</title><content type='html'>&lt;div class=&quot;own-para-sep&quot;&gt;I have spent reasonable amount of time on Opencart(Its an open source e-commerce solutions written in PHP that&#39;s designed around the MVC) couple of days ago. One thing I would say about OpenCart is that it doesn&#39;t have the good documentation.&lt;/div&gt;
&lt;div class=&quot;own-para-sep&quot;&gt;In this tutorial I want to demonstrate how to add a simple page(non-admin page) view to the many default ones OpenCart comes with. The view I want to add is a simple one. It displays all the categories with some number of products from each category all on one page. That&#39;s a view that OpenCart doesn&#39;t come with by default.&lt;/div&gt;

&lt;div class=&quot;own-para-sep&quot; style=&quot;color:#bb0000;&quot;&gt;I will be demonstrating on a default installation of OpenCart 1.5.0.  Before you start, make a copy of the &lt;code&gt;default&lt;/code&gt; theme, under &lt;code&gt;/catalog/view/theme/default&lt;/code&gt;.  I&#39;ll call it &lt;code&gt;default-backup&lt;/code&gt;.&lt;/div&gt;

&lt;div class=&quot;own-para-sep&quot;&gt;Before start modifying, first understand the Opencart file structure.&lt;/div&gt;
&lt;h3 class=&quot;own-subheader&quot;&gt;Opencart file structure&lt;/h3&gt;
&lt;div class=&quot;own-code-section own-bmargin10&quot;&gt;
&lt;pre&gt;
Here is the default Opencart file structure:
 /opencart
 ---- /admin
 ---- /catalog
 ---- /download
 ---- /image
 ---- /system
 ---- config.php
 ---- index.php
 ---- php.ini
 ---- .htaccess.txt

Since we&#39;re only adding a new view, the &lt;code&gt;catalog&lt;/code&gt; folder is the only we&#39;re concerned with. That folder contains:

 /opencart/catalog
 ---- /controller
 ---- /language
 ---- /model
 ---- /view
 
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;own-para-sep&quot;&gt;OpenCart follows an MVC+L design, the L represented by the &lt;code style=&quot;color:#bb0000;&quot;&gt;language&lt;/code&gt; folder above.  Again, since we&#39;re only adding a new layout, we won&#39;t be doing anything with the &lt;code style=&quot;color:#bb0000;&quot;&gt;model&lt;/code&gt; or &lt;code style=&quot;color:#bb0000;&quot;&gt;language&lt;/code&gt; files, so we&#39;re only concerned with the controller and view folders.&lt;/div&gt;
&lt;div style=&quot;margin-top:10px;margin-bottom:10px;&quot;&gt;
&lt;a target=&quot;_blank&quot; rel=&quot;nofollow&quot; href=&quot;https://secure1.inmotionhosting.com/cgi-bin/gby/clickthru.cgi?id=luckyG&amp;page=7&quot;&gt;
&lt;img src=&quot;http://creatives.inmotionhosting.com/doesnt-suck/468x60.png&quot; border=0&gt;
&lt;/a&gt;

&lt;/div&gt;

&lt;div class=&quot;own-subheader&quot;&gt;Catalog Controllers&lt;/div&gt;
&lt;div class=&quot;own-code-section own-bmargin10&quot;&gt;
&lt;pre&gt;
There are many folders inside &lt;code&gt;/catalog/contollers&lt;/code&gt;:
  /opencart/catalog/controllers
 ---- /account
 ---- /affliate
 ---- /checkout
 ---- /common
 ---- /error
 ---- /feed
 ---- /information 
 ---- /module
 ---- /payment
 ---- /product
 ---- /total
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;own-para-sep&quot;&gt;All these folders will represents their own functionality. For instance, account contains controller files relevant to customer accounts, checkout contains controller files relevant to the shopping checkout process, and so on.&lt;/div&gt;
&lt;div class=&quot;own-para-sep&quot;&gt;The product folder contains:&lt;/div&gt;
&lt;div class=&quot;own-code-section own-bmargin10&quot;&gt;
&lt;pre&gt;
 /opencart/catalog/controllers/product
 ---- category.php
 ---- compare.php
 ---- manufacturer.php
 ---- product.php
 ---- search.php
 ---- special.php
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;own-para-sep&quot;&gt;This is the place, we need to add our new controller. I called this as &lt;code style =&quot;color:#bb0000;&quot;&gt; categories.php&lt;/code&gt;. Now the view... &lt;/div&gt;
&lt;div class=&quot;own-subheader&quot;&gt;Catalog Views&lt;/div&gt;
&lt;div class=&quot;own-para-sep&quot;&gt;The &lt;code style=&quot;color:#bb0000;&quot;&gt;categories.php&lt;/code&gt; controller will retrieve whatever data it requires from the relevant models and send them to the appropriate view.  View files are written inside &lt;code style=&quot;color:#bb0000;&quot;&gt;/catalog/view&lt;/code&gt;, which looks like:&lt;/div&gt;

&lt;div class=&quot;own-code-section own-bmargin10&quot;&gt;
&lt;pre&gt;
 /opencart/catalog/view/theme/default_copy/template
 ------------ /account
 ----------- /affiliate
 ----------- /checkout
 ----------- /common
 ----------- /error
 ----------- /information
 ----------- /mail
 ----------- /module
 ----------- /payment
 ----------- /product
 ----------- /total
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;own-para-sep&quot;&gt;Except for the mail folder, there is a 1-to-1 correspondence between the folders under &lt;code style =&quot;color:#bb0000;&quot;&gt;/catalog/controller&lt;/code&gt; and &lt;code style =&quot;color:#bb0000;&quot;&gt;/catalog/view/theme/default-copy/template&lt;/code&gt;.  It makes intuitive sense that since we added a new controller under &lt;code style =&quot;color:#bb0000;&quot;&gt;/controller/product&lt;/code&gt;, we&#39;ll add a corresponding view file under &lt;code style =&quot;color:#bb0000;&quot;&gt;/template/products&lt;/code&gt;.&lt;/div&gt;

&lt;div class=&quot;own-code-section own-bmargin10&quot;&gt;
&lt;pre&gt;
The &lt;code style=&quot;color:#bb0000;&quot;&gt;/template/products&lt;/code&gt; folder contains the following template files:
 /template/products
 - category.tpl
 - compare.tpl
 - manufacturer_info.tpl
 - manufacturer_list.tpl
 - product.tpl
 - review.tpl
 - search.tpl
 - special.tpl 
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;own-para-sep&quot;&gt;Similar to how we added a &lt;code style =&quot;color:#bb0000;&quot;&gt;categories.php&lt;/code&gt; controller, we&#39;ll add a new view file here (call it &lt;code style =&quot;color:#bb0000;&quot;&gt;categories.tpl&lt;/code&gt;), containing the HTML markup and embedded PHP to display the data &lt;code style =&quot;color:#bb0000;&quot;&gt;categories.php&lt;/code&gt; is sending it.&lt;/div&gt;
&lt;div class=&quot;own-subheader&quot;&gt;Categories.php controller&lt;/div&gt;
&lt;div class=&quot;own-para-sep&quot;&gt;Now, we need to write code to get all the categories and some products for each category. Check sample code below:&lt;/div&gt;
&lt;div class=&quot;own-code-section own-bmargin10&quot;&gt;
&lt;pre&gt;
&amp;lt;?php 
class ControllerProductCategories extends Controller {  
  public function index() { 
    $this-&gt;language-&gt;load(&#39;product/category&#39;);
    $this-&gt;load-&gt;model(&#39;catalog/category&#39;);
    $this-&gt;load-&gt;model(&#39;catalog/product&#39;);
    $this-&gt;load-&gt;model(&#39;tool/image&#39;); 
    $this-&gt;data[&#39;breadcrumbs&#39;] = array();
    $this-&gt;data[&#39;breadcrumbs&#39;][] = array(
        &#39;text&#39;      =&gt; $this-&gt;language-&gt;get(&#39;text_home&#39;),
        &#39;href&#39;      =&gt; $this-&gt;url-&gt;link(&#39;common/home&#39;),
        &#39;separator&#39; =&gt; false
    ); 
   
    $categories = $this-&gt;model_catalog_category-&gt;getCategories(0);
        
    foreach ($categories as $category){
      $products_data = array();
   
      $data = array(
         &#39;filter_category_id&#39; =&gt; $category[&#39;category_id&#39;], 
         &#39;start&#39;              =&gt; 0,
         &#39;limit&#39;              =&gt; 3
       );
    
       $product_total = $this-&gt;model_catalog_product-&gt;getTotalProducts($data); 
       $results = $this-&gt;model_catalog_product-&gt;getProducts($data);
   
       foreach ($results as $result) {
         if ($result[&#39;image&#39;]) {
           $image = $this-&gt;model_tool_image-&gt;resize(
                       $result[&#39;image&#39;], 
                       $this-&gt;config-&gt;get(&#39;config_image_product_width&#39;), 
                       $this-&gt;config-&gt;get(&#39;config_image_product_height&#39;));
          } else {
            $image = false;
          }
    
          if (($this-&gt;config-&gt;get(&#39;config_customer_price&#39;) &amp;&amp; 
               $this-&gt;customer-&gt;isLogged()) || !$this-&gt;config-&gt;get(&#39;config_customer_price&#39;)) {
             $price = $this-&gt;currency-&gt;format(
                              $this-&gt;tax-&gt;calculate($result[&#39;price&#39;], 
                              $result[&#39;tax_class_id&#39;], $this-&gt;config-&gt;get(&#39;config_tax&#39;)));
          } else {
             $price = false;
          }
    
          if ((float)$result[&#39;special&#39;]) {
            $special = $this-&gt;currency-&gt;format(
                            $this-&gt;tax-&gt;calculate($result[&#39;special&#39;], 
                            $result[&#39;tax_class_id&#39;], 
                            $this-&gt;config-&gt;get(&#39;config_tax&#39;)));
           } else{
             $special = false;
           } 
    
           if ($this-&gt;config-&gt;get(&#39;config_tax&#39;)) {
             $tax = $this-&gt;currency-&gt;format((float)$result[&#39;special&#39;] ? $result[&#39;special&#39;] : $result[&#39;price&#39;]);
           } else {
             $tax = false;
           }    
    
           if ($this-&gt;config-&gt;get(&#39;config_review_status&#39;)) {
             $rating = (int)$result[&#39;rating&#39;];
           } else {
             $rating = false;
           }
        
            $products_data[] = array(
                     &#39;product_id&#39;  =&gt; $result[&#39;product_id&#39;],
                     &#39;thumb&#39;       =&gt; $image,
                     &#39;name&#39;        =&gt; $result[&#39;name&#39;],
                     &#39;href&#39;        =&gt; $this-&gt;url-&gt;link(
                                        &#39;product/product&#39;, 
                                        &#39;path=&#39; . $category[&#39;category_id&#39;] . &#39;&amp;product_id=&#39; . $result[&#39;product_id&#39;])
            );
       }
            
       $this-&gt;data[&#39;categories&#39;][] = array(
                         &#39;category_id&#39; =&gt; $category[&#39;category_id&#39;],
                         &#39;name&#39;        =&gt; $category[&#39;name&#39;] . &#39; (&#39; . $product_total . &#39;)&#39;,
                         &#39;products&#39;    =&gt; $products_data,
                         &#39;href&#39;        =&gt; $this-&gt;url-&gt;link(&#39;product/category&#39;, &#39;path=&#39; . $category[&#39;category_id&#39;])
       );            
    }

     if (file_exists(DIR_TEMPLATE . $this-&gt;config-&gt;get(&#39;config_template&#39;) . &#39;/template/product/categories.tpl&#39;)) {
       $this-&gt;template = $this-&gt;config-&gt;get(&#39;config_template&#39;) . &#39;/template/product/categories.tpl&#39;;
     } else {
       $this-&gt;template = &#39;default/template/product/categories.tpl&#39;;
     }
   
     $this-&gt;children = array(
               &#39;common/column_left&#39;,
               &#39;common/column_right&#39;,
               &#39;common/content_top&#39;,
               &#39;common/content_bottom&#39;,
               &#39;common/footer&#39;,
               &#39;common/header&#39;
          );
    
  $this-&gt;response-&gt;setOutput($this-&gt;render());
  }
}
?&gt;
&lt;/pre&gt;
&lt;/div&gt;

&lt;div class=&quot;own-subheader&quot;&gt;categories.tpl&lt;/div&gt;
&lt;div class=&quot;own-para-sep&quot;&gt;sample code for view&lt;/div&gt;
&lt;div class=&quot;own-code-section own-bmargin10&quot;&gt;
&lt;pre&gt;
&amp;lt;?php echo $header; ?&amp;gt;
&amp;lt;?php echo $column_left; ?&amp;gt;
&amp;lt;?php echo $column_right; ?&amp;gt;
&amp;lt;div id=&quot;content&quot;&amp;gt;
  &amp;lt;?php echo $content_top; ?&amp;gt;
  &amp;lt;?php if ($categories) { ?&amp;gt;
      lt;?php foreach ($categories as $category) { ?&amp;gt;
      &amp;lt;h2&amp;gt;&amp;lt;?php echo $category[&#39;name&#39;]; ?&amp;gt;&amp;lt;/h2&amp;gt;
      &amp;lt;?php $products = $category[&#39;products&#39;];
        if ($products) { ?&gt;
          &amp;lt;div class=&quot;product-grid&quot;&amp;gt;
             &amp;lt;?php foreach ($products as $product) { ?&amp;gt;
               &amp;lt;div&amp;gt;
                 &amp;lt;?php if ($product[&#39;thumb&#39;]) { ?&amp;gt;
                   &amp;lt;div class=&quot;image&quot;&amp;gt;
                     &amp;lt;a href=&quot;&amp;lt;?php echo $product[&#39;href&#39;]; ?&amp;gt;&quot;&amp;gt;
                       &amp;lt;img src=&quot;&amp;lt;?php echo $product[&#39;thumb&#39;]; ?&amp;gt;&quot; title=&quot;&amp;lt;?php echo $product[&#39;name&#39;]; ?&amp;gt;&quot; alt=&quot;&amp;lt;?php echo $product[&#39;name&#39;]; ?&amp;gt;&quot; /&amp;gt;
                     &amp;lt;/a&amp;gt;
                   &amp;lt;/div&amp;gt;
                 &amp;lt;?php } ?&amp;gt;
                 &amp;lt;div class=&quot;name&quot;&amp;gt;
                   &amp;lt;a href=&quot;&amp;lt;?php echo $product[&#39;href&#39;]; ?&amp;gt;&quot;&amp;gt;
                     &amp;lt;?php echo $product[&#39;name&#39;]; ?&amp;gt;
                   &amp;lt;/a&amp;gt;
                 &amp;lt;/div&amp;gt;
               &amp;lt;/div&amp;gt;
             &amp;lt;?php } ?&amp;gt;
          &amp;lt;/div&amp;gt;
          &amp;lt;a style=&quot;float: right; width: 100%; text-align: right; padding-bottom: 20px; margin-top: -10px; margin-right: 40px;&quot; href=&quot;&amp;lt;?php echo $category[&#39;href&#39;]; ?&amp;gt;&quot;&amp;gt;view more&amp;lt;/a&amp;gt;

        &amp;lt;?php } ?&amp;gt;
      &amp;lt;?php } ?&amp;gt;
  &amp;lt;?php } ?&amp;gt;
  &amp;lt;?php echo $content_bottom; ?&amp;gt;
&amp;lt;/div&amp;gt;

&amp;lt;?php echo $footer; ?&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;

&lt;div class=&quot;own-subheader&quot;&gt;One last thing&lt;/div&gt;
&lt;div class=&quot;own-para-sep&quot;&gt;Since we&#39;ve added a new layout to our OpenCart project, we should add it to the database, which keeps a list of layouts, so we can specify modules that we want to display in our layout.&lt;/div&gt;

&lt;div class=&quot;own-bmargin10&quot;&gt;There are two places to add an entry&lt;/div&gt;
&lt;div class=&quot;own-bmargin10&quot;&gt;1. The first is in the table called &lt;code style=&quot;color:#bb0000;&quot;&gt;layout&lt;/code&gt;.  Notice the last entry in the screenshot below, which represents the new layout. &lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYVbvZ4eQgHrdCbJsBDJSUil_PoaAaclDBjK9_tcyoLEprILTSLabvbAXkCfkcS8xSaP-ZmEJQna9dtbv7Z3e2C1Wjl58Ogrr7nJ1Rnvy3GuwdrAP9vBMaUc0Kr8rohcMoA455ac01B04/s1600/opencart-layout.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;171&quot; width=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYVbvZ4eQgHrdCbJsBDJSUil_PoaAaclDBjK9_tcyoLEprILTSLabvbAXkCfkcS8xSaP-ZmEJQna9dtbv7Z3e2C1Wjl58Ogrr7nJ1Rnvy3GuwdrAP9vBMaUc0Kr8rohcMoA455ac01B04/s200/opencart-layout.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;div class=&quot;own-bmargin10&quot;&gt;2. You also need an entry in &lt;code style=&quot;color:#bb0000;&quot;&gt;layout_route&lt;/code&gt;, as shown below (the last entry): &lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiC2eMmy2uqfishbVIq1A-VxeQryLyIsLwyv9KY_USK0AQZheJDmFHyesv9dRLAyXfDXIJxFQKxI7XGKmbxKlKSIBcBBCRrVcGW85OkVP4cVqH7WKuJ0b9t7eM8TEhxNBfmt64cwvM1UKk/s1600/opencart-layout-route.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;122&quot; width=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiC2eMmy2uqfishbVIq1A-VxeQryLyIsLwyv9KY_USK0AQZheJDmFHyesv9dRLAyXfDXIJxFQKxI7XGKmbxKlKSIBcBBCRrVcGW85OkVP4cVqH7WKuJ0b9t7eM8TEhxNBfmt64cwvM1UKk/s200/opencart-layout-route.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;div class=&quot;own-bmargin10&quot;&gt;Now we need to  enable our new layout using OpenCart admin panel.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyTiV6Ho8dIrCrSGh8sqPvVRVMnidJrz6HG5C-fTTMQZH9f2rmW-WFsCRz3mZfc85BdZ3S_qIxoJmXj5Y5UQCv-pWGbHoZfQ9mav94vd1F2OWiNtigOGB-tVSMfB-y7vhoUtBS52_viQ8/s1600/opencart-module.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;94&quot; width=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyTiV6Ho8dIrCrSGh8sqPvVRVMnidJrz6HG5C-fTTMQZH9f2rmW-WFsCRz3mZfc85BdZ3S_qIxoJmXj5Y5UQCv-pWGbHoZfQ9mav94vd1F2OWiNtigOGB-tVSMfB-y7vhoUtBS52_viQ8/s200/opencart-module.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;div class=&quot;own-para-sep&quot;&gt;Thats it!&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faqspoint.blogspot.com/feeds/8574310439679011187/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faqspoint.blogspot.com/2011/12/adding-new-pagelayout-in-opencart-150x.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/8574310439679011187'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/8574310439679011187'/><link rel='alternate' type='text/html' href='http://faqspoint.blogspot.com/2011/12/adding-new-pagelayout-in-opencart-150x.html' title='Adding new page/layout in opencart 1.5.0.x'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYVbvZ4eQgHrdCbJsBDJSUil_PoaAaclDBjK9_tcyoLEprILTSLabvbAXkCfkcS8xSaP-ZmEJQna9dtbv7Z3e2C1Wjl58Ogrr7nJ1Rnvy3GuwdrAP9vBMaUc0Kr8rohcMoA455ac01B04/s72-c/opencart-layout.jpg" height="72" width="72"/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408141208604594417.post-2875242715867213984</id><published>2011-12-15T04:27:00.000-08:00</published><updated>2012-03-28T03:01:26.511-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bookmarking platofrms"/><category scheme="http://www.blogger.com/atom/ns#" term="download bookmarking software"/><category scheme="http://www.blogger.com/atom/ns#" term="open source"/><title type='text'>Downloadable Open Source Social Bookmarking Platforms</title><content type='html'>&lt;div class=&quot;own-para-sep&quot;&gt;Social bookmarking is a method for users to organize, store, manage and search for bookmarks of resources online. Unlike file sharing, the resources themselves aren&#39;t shared, merely bookmarks that reference them. In a &lt;a href=&quot;http://www.linksbang.com&quot; target=&quot;_blank&quot;&gt;social bookmarking system&lt;/a&gt;, users save links to web pages that they want to remember and/or share. These bookmarks are usually public, and can be saved privately, shared only with specified people or groups, shared only inside certain networks, or another combination of public and private domains. Here is the list of top Open Source Social Bookmarking Platforms:&lt;/div&gt;

&lt;div style=&quot;margin-top:10px;margin-bottom:10px;&quot;&gt;
&lt;a target=&quot;_blank&quot; rel=&quot;nofollow&quot; href=&quot;https://secure1.inmotionhosting.com/cgi-bin/gby/clickthru.cgi?id=luckyG&amp;page=1&quot;&gt;
&lt;img src=&quot;http://creatives.inmotionhosting.com/branded-single-feature/468x60.gif&quot; border=0&gt;
&lt;/a&gt;
&lt;/div&gt;

&lt;div class=&quot;own-para-sep&quot;&gt;
1. &lt;a href=&quot;http://sourceforge.net/projects/scuttle/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Scuttle&lt;/a&gt;
&lt;div&gt;&amp;#8220;Scuttle is a free open source software for creating social bookmarking sites like del.icio.us. Allows multiple users to store, share and tag their favourite links online.&amp;#8221;&lt;/div&gt;
&lt;/div&gt;

&lt;div class=&quot;own-para-sep&quot;&gt;
2. &lt;a href=&quot;http://sourceforge.net/projects/semanticscuttle/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;SemanticScuttle&lt;/a&gt;
&lt;div&gt;&amp;#8220;SemanticScuttle is a social bookmarking tool experimenting with new features like structured tags and collaborative descriptions of tags. Originally a fork of Scuttle, it has overtaken its ancestor in stability, features and usability.&amp;#8221;&lt;/div&gt;
&lt;/div&gt;

&lt;div class=&quot;own-para-sep&quot;&gt;
3. &lt;a href=&quot;http://sourceforge.net/projects/getboo/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;GetBoo&lt;/a&gt;
&lt;div&gt;&amp;#8220;Web 2.0 bookmarking system, both social (with tags) and private (with folders). Import and export your bookmarks from multiple browsers. Admin management section with SPAM protection, translations, bookmarklets, Firefox extension, RSS feeds, and more! &amp;#8221;&lt;/div&gt;
&lt;/div&gt;

&lt;div class=&quot;own-para-sep&quot;&gt;
4. &lt;a href=&quot;http://sourceforge.net/projects/pligg/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Pligg CMS&lt;/a&gt;
&lt;div&gt;&amp;#8220;Pligg CMS is a content management platform that powers tens of thousands of websites. It specializes in creating social publishing networks, where users submit and promote content similar to sites like Digg, Reddit, &lt;a href=&quot;http://www.linksbang.com&quot; target=&quot;_blank&quot;&gt;linksbang&lt;/a&gt; and Mixx. &amp;#8221;&lt;/div&gt;
&lt;/div&gt;

&lt;div class=&quot;own-para-sep&quot;&gt;
5. &lt;a href=&quot;http://sourceforge.net/projects/communitynews/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Communitynews&lt;/a&gt;
&lt;div&gt;&amp;#8220;CommunityNews uses social bookmarking and bayesian techinques to provide periodic postings to blogs. Users can vote for or against RSS sources ti increase the chances that the source is used again. Spam filtering (bayesian) is provided by spam bayes. &amp;#8221;&lt;/div&gt;
&lt;/div&gt;

&lt;div class=&quot;own-para-sep&quot;&gt;
6. &lt;a href=&quot;http://sourceforge.net/projects/jumper/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Jumper&lt;/a&gt;
&lt;div&gt;&amp;#8220;Jumper 2.0 is a collaborative search engine that is powered by social bookmarking. It uses peer and social-networking principles to tag and link distributed content, media, or data to make valuable information more easily discoverable. &amp;#8221;&lt;/div&gt;
&lt;/div&gt;
 
&lt;div class=&quot;own-para-sep&quot;&gt;
7. &lt;a href=&quot;http://sourceforge.net/projects/akarru/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Akarru Social BookMarking Engine&lt;/a&gt;
&lt;div&gt;&amp;#8220;Akarru is a social bookmarking engine, is used to build social bookmarkings sites, like &lt;b&gt;www.blogmemes.com&lt;/b&gt;. Users posts links and promote links to front page using voting system.&amp;#8221; &lt;/div&gt;
&lt;/div&gt;

&lt;div class=&quot;own-para-sep&quot;&gt;
8. &lt;a href=&quot;http://sourceforge.net/projects/bookmark4u/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Bookmark4U&lt;/a&gt;
&lt;div&gt;&amp;#8220;Bookmark4U is an web-server application, which is based onApache + PHP + MySQL. Bookmark4U is intended to provide a comfortable bookmarking environment for users. &amp;#8221;&lt;/div&gt;
&lt;/div&gt;

&lt;div class=&quot;own-para-sep&quot;&gt;
9. &lt;a href=&quot;http://sourceforge.net/projects/laicos/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;laicos - Social Bookmarking in ASP.Net&lt;/a&gt;
&lt;div&gt;&amp;#8220;laicos or social backwards is a social bookmarking website development application. Use this project to create a Digg style clone. In asp.net and MySQL environment. &amp;#8221;&lt;/div&gt;
&lt;/div&gt;

&lt;div class=&quot;own-para-sep&quot;&gt;
10. &lt;a href=&quot;http://sourceforge.net/projects/taggly/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Taggly&lt;/a&gt;
&lt;div&gt;&amp;#8220;Taggly is an online social bookmarking software written with usability and scalability in mind. &amp;#8221;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;margin-top:10px;margin-bottom:10px;&quot;&gt;
&lt;a target=&quot;_blank&quot; rel=&quot;nofollow&quot; href=&quot;https://secure1.inmotionhosting.com/cgi-bin/gby/clickthru.cgi?id=luckyG&amp;page=1&quot;&gt;
&lt;img width=&quot;500&quot; src=&quot;http://creatives.inmotionhosting.com/max-speed/imh_banner_728x90_maxspeed.jpg&quot; border=0&gt;
&lt;/a&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faqspoint.blogspot.com/feeds/2875242715867213984/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faqspoint.blogspot.com/2011/12/downloadable-open-source-social.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/2875242715867213984'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/2875242715867213984'/><link rel='alternate' type='text/html' href='http://faqspoint.blogspot.com/2011/12/downloadable-open-source-social.html' title='Downloadable Open Source Social Bookmarking Platforms'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408141208604594417.post-3329742253131222828</id><published>2011-12-06T05:33:00.001-08:00</published><updated>2011-12-07T07:28:48.142-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="css background transparent"/><category scheme="http://www.blogger.com/atom/ns#" term="css opacity"/><category scheme="http://www.blogger.com/atom/ns#" term="css transparency"/><category scheme="http://www.blogger.com/atom/ns#" term="css transparent"/><category scheme="http://www.blogger.com/atom/ns#" term="transparent filters"/><title type='text'>CSS Transparency in all browsers</title><content type='html'>&lt;div class=&quot;own-para-sep&quot;&gt;Transparency is one of those CSS properties that has a weird history and requires lots of different properties to ensure cross browser compatibility that goes back as far as you can. All the browsers treat transparency in a different way to overcome this issue we need to define their own specific properties.&lt;/div&gt;
&lt;div class=&quot;own-subheader&quot;&gt;Internet Explorer:&lt;/div&gt;
&lt;div class=&quot;own-para-sep&quot;&gt;The first thing you need to remember to get IE to make things transparent is that the element needs to have a layout. In other words, the &lt;code&gt;hasLayout&lt;/code&gt; DOM property must be set. So, if you want to set transparency on an element, you need to set the hasLayout property some other way. There are several CSS properties that when set on an element, cause the element to have layout as well:&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;inline:block&lt;/li&gt;
&lt;li&gt;height or width with any value&lt;/li&gt;
&lt;li&gt;float:left or float:right&lt;/li&gt;
&lt;li&gt;zoom with any value&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;own-para-sep&quot;&gt;The easiest to apply tend to be setting the &lt;code&gt;width&lt;/code&gt; to 100% or the &lt;code&gt;zoom&lt;/code&gt; to 1.&lt;/div&gt; 
&lt;div class=&quot;own-bmargin10&quot;&gt;In IE 8 and 9, there is support for the browser extension &lt;code&gt;-ms-filter&lt;/code&gt; and you can use this to add alpha transparency. The following sets the opacity to 50%: &lt;/div&gt;
&lt;div class=&quot;own-code-section own-bmargin10&quot;&gt;
&lt;pre&gt;
-ms-filter: &quot;progid:DXImageTransform.Microsoft.Alpha(Opacity=50)&quot;;
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;own-para-sep&quot;&gt;it only works in IE 8 and 9. To make it work in all other IE browsers, you need to add filter property also. But, make sure &lt;code&gt;-ms-filter&lt;/code&gt; line comes first in your CSS.&lt;/div&gt;

&lt;div class=&quot;own-code-section own-para-sep&quot;&gt;
&lt;pre&gt;
-ms-filter: &quot;progid:DXImageTransform.Microsoft.Alpha(Opacity=50)&quot;;
filter: alpha(opacity=50);
&lt;/pre&gt;
&lt;/div&gt;

&lt;div class=&quot;own-subheader&quot;&gt;Firefox:&lt;/div&gt;
&lt;div class=&quot;own-bmargin10&quot;&gt;Firefox older versions requires browser extension &lt;code&gt;-moz-opacity&lt;/code&gt;. So to set the transparency in Firefox 0.8 and lower to 50% use:&lt;/div&gt;
&lt;div class=&quot;own-code-section own-para-sep&quot;&gt;
&lt;pre&gt;
-moz-opacity: 0.5;
&lt;/pre&gt;
&lt;/div&gt;

&lt;div class=&quot;own-subheader&quot;&gt;Safari:&lt;/div&gt;
&lt;div class=&quot;own-bmargin10&quot;&gt;Before Safari switched to Webkit, you needed to use the browser extension -khtml-opacity. So to set the transparency in Safari 1 and lower to 50% use:&lt;/div&gt;
&lt;div class=&quot;own-code-section own-para-sep&quot;&gt;
&lt;pre&gt;
-khtml-opacity: 0.5;
&lt;/pre&gt;
&lt;/div&gt; 

&lt;div class=&quot;own-subheader&quot;&gt;Modern Browsers:&lt;/div&gt;
&lt;div class=&quot;own-bmargin10&quot;&gt;Modern browsers like Android 2.2+, Chrome 1+, Firefox 0.9+, Internet Explorer 9+, iOS 3+ Opera 9+, and Safari 2+:&lt;/div&gt;
&lt;div class=&quot;own-code-section own-para-sep&quot;&gt;
&lt;pre&gt;
opacity: 0.5;
&lt;/pre&gt;
&lt;/div&gt;

&lt;div class=&quot;own-subheader&quot;&gt;Finally combine all together:&lt;/div&gt;
&lt;div class=&quot;own-code-section own-para-sep&quot;&gt;
&lt;pre&gt;
.trans {
 zoom: 1; /* gives the object layout */
 -ms-filter:&quot;progid:DXImageTransform.Microsoft.Alpha(Opacity=50)&quot;;
 filter: alpha(opacity=50);
 -moz-opacity: 0.5;
 -khtml-opacity: 0.5;
 opacity: 0.5;
} 
&lt;/pre&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://faqspoint.blogspot.com/feeds/3329742253131222828/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://faqspoint.blogspot.com/2011/12/css-transparency-in-all-browsers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/3329742253131222828'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408141208604594417/posts/default/3329742253131222828'/><link rel='alternate' type='text/html' href='http://faqspoint.blogspot.com/2011/12/css-transparency-in-all-browsers.html' title='CSS Transparency in all browsers'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>