Skip to content
G31 Zone
  • About
  • Contact

Zend Framework – Setting the DocType

Posted on: December 19, 2010 /
Categories: Zend

Specify the DocType $this->doctype(‘XHTML1_STRICT’); XHTML1_STRICT – XHTML 1.0 Strict XHTML1_TRANSITIONAL – XHTML 1.0 Transitional HTML4_STRICT – HTML 4.01 Strict HTML4_Loose – HTML 4.01 Loose HTML5 – HTML 5 Source: Zend Framework

Magento script to import newsletter subscribers

Posted on: December 16, 2010 /
Categories: Magento

Script to import newsletter subscribers

Javascript get elements by name

Posted on: December 13, 2010 /
Categories: JavaScript

Javascript get elemens by name: <html> <head> <script type=”text/javascript”> function getInputValues(varName) { varValues = document.getElementsByName(varName); for (var i = 0; i < varValues.length; i++) { alert(varValues[i].value); } } </script> </head> <body> <input type=”text” name=”xName” ><br /> <input type=”text” name=”xName” ><br /> <input type=”text” name=”xName” ><br /> <input type=”button” onclick=”getInputValues(‘xName’); return false;” value=”Display Values”> </body> </html>

Javascript redirect to another page

Posted on: December 13, 2010 /
Categories: JavaScript

Javascript redirect to another page window.location = “redirect url”;

Javascript – confirm leave the page

Posted on: December 8, 2010 /
Categories: JavaScript

Javascript code to be used when you need a confirmation before leaving a page: <script language=”javascript” type=”text/javascript”> window.onbeforeunload = confirmClose; function confirmClose(){ return “Are you sure do you want to leave this page.”; } </script>

MySQL show tables from a database

Posted on: December 6, 2010 /
Categories: MySQL

MySQL command to view all tables from a database: SHOW TABLES;

MySQL command to view databases from server

Posted on: December 6, 2010 /
Categories: MySQL

MySQL command to view databases from server: SHOW DATABASES;

MySQL – show user privileges

Posted on: December 6, 2010 /
Categories: MySQL

MySQL command to view user privileges: SHOW GRANTS FOR ‘root’@’localhost’;

Javascript – convert type

Posted on: December 2, 2010 /
Categories: JavaScript

Convert variable to boolean var booleanValue = Boolean(variableValue); Converting to String var stringValue = String(variableValue); Converting to Number var numberValue = Number(variableValue); Parsing to Number Parse to float value parseFloat(variableValue) Parse to Integer Value parseInt(variableValue)

Magento get customer group Id and group name

Posted on: December 2, 2010 /
Categories: Magento

Get customer group Id // Check if costomer is logged in if(Mage::getSingleton(‘customer/session’)->isLoggedIn()) { // Get group Id $groupId = Mage::getSingleton(‘customer/session’)->getCustomerGroupId(); } Get group name: $group = Mage::getModel(‘customer/customer_group’)->load($groupId); $group->getName();

« 1 … 4 5 6 7 8 9 »

Categories

  • Apache
  • CentOS
  • Git
  • HTML
  • HTTP
  • JavaScript
  • JQuery
  • Linux
  • Magento
  • MySQL
  • PHP
  • Regular expression (Regex)
  • Smarty
  • Symfony 2 / Doctrine
  • Twig
  • Ubuntu
  • Uncategorized
  • Zend

Archives

  • June 2015
  • May 2015
  • March 2015
  • September 2014
  • October 2013
  • September 2013
  • August 2013
  • July 2013
  • January 2013
  • October 2012
  • August 2012
  • May 2012
  • April 2012
  • January 2012
  • December 2011
  • November 2011
  • July 2011
  • June 2011
  • May 2011
  • April 2011
  • February 2011
  • January 2011
  • December 2010
  • November 2010
  • October 2010
  • September 2010

Recent Posts

  • Connect to VPN from Linux
  • Enable slow query log on MySQL server
  • Doctrine Console Commands
  • Symfony2 Doctrine debug query
  • Mysqldump only tables with certain prefix

Tags

ajax all post data apache asynchronously bookmark categories images category category thumbnail create subdomain create virtualhost git git basics git force overwrite git pull htaccess html html codes HTTP status codes JavaScript javascript getcookie javascript get url javascript setcookie javascript strip tags javascript strip_tags jquery jquery.validator jquery ajax jquery bookmark jquery validator rule Lorem ipsum Magento mysql php preview button preview target blank print array products redirect www soap soap client soap sample soap server status codes zend framework 1 zend trace mysql errors

Copyright G31 Zone 2026 | Theme by Theme in Progress | Proudly powered by WordPress