In wordpress, free plugin for Paid membership registration

Tags

, , ,

In WordPress, there is one free plugin as s2Member which is used for paid registration membership. In detail about 2Member® (Membership w/ PayPal®). Powerful (free) membership capabilities. Protect members only content. The s2Member Framework (free) integrates w/ PayPal® (very easy), and fully supports recurring billing. s2Member supports custom Pages for registration (including Custom Registration/Profile Fields), account access, and a lot more.

Click here to know more details about the plugin.

Magento Useful Links

Tags

, , ,

Here you will check the collection of blog links related to Magento articles and ready made sample code. These links are very useful to increase your magento skill & learn more about it. Here i am listing some of links are

Please check it, I am expect above link are very useful to all and if anyone know any other blog link. Could also welcome. Thanks!!!

 

In Magento – How to fetch the Attribute value

Tags

, ,

In Magento , There is option to create new attribute in admin side and show value in the frontend .Here we going to see how to fetch the data from the dropdown attribute , Below is the code for shows the fitering the layout as per the attribut value in product list page:

<?php
    $_productCollection=$this->getLoadedProductCollection();
    $_helper = $this->helper('catalog/output');
	$_product = $this->getProduct();
?>
<div class="SkinType">
<h2>Search by Skin Type:</h2>
<?php
$collection = Mage::getResourceModel('catalog/product_attribute_collection') ->addFieldToFilter('attribute_code', array('eq'=>'skintype'))
->addStoreLabel(Mage::app()->getStore()->getId())
->load();
foreach($collection as $a){
$manufArray = $a->getSource()->getAllOptions(false);
//foreach($a->getSource()->getAllOptions(false) as $option)
//$manufArray[$option['value']] = $option['label'] . "<br />";
}
?>

<?php
//IF YOU NEED TO DEBUG YOUR VALUES
$cnt=count($manufArray);
?>
<ul>
<?php
for($i=0;$i<$cnt;$i++)
{?>
 <li><a href="?skintype=<?php echo $manufArray[$i][value] ?>"><?php echo $manufArray[$i][label]; ?></a></li>
<?php
}?>
</ul>
</div>

What is Magento and its feature?

Tags

Magento is a feature-rich eCommerce platform built on open-source technology that provides online merchants with unprecedented flexibility and control over the look, content and functionality of their eCommerce store. Magento’s intuitive administration interface features powerful marketing, search engine optimization and catalog-management tools to give merchants the power to create sites that are tailored to their unique business needs. Designed to be completely scalable and backed by Varien’s support network, Magento offers companies the ultimate eCommerce solution.

Here are some of Features of Magento are:

  • Marketing Promotions and Tools
  • Analytics and Reporting
  • Search Engine Optimization
  • Site Management
  • Catalog Management
  • Catalog Browsing
  • Mobile Commerce
  • International Support
  • Checkout
  • Shipping
  • Payment
  • Customer Service
  • Order Management

To know full details about Magento, Please visit the Magento Official Site

TOP 10 PHP MySQL Web Development Security Tips

Tags

Here is the some security tips for PHP MYSQL web development tips. Checkout the below points, it would be very useful

1. Do not trust user input

If you are expecting an integer call intval() (or use cast) or if you don’t expect a username to have a dash (-) in it,
check it with strstr() and prompt the user that this username is not valid.

Here is an example:

PHP Code:

$post_id = intval($_GET[‘post_id’]);
mysql_query(“SELECT * FROM post WHERE id = $post_id”);

Now $post_id will be an integer for sure

2. Validate user input on the server side

If you are validating user input with JavaScript, be sure to do it on the server side too, because for bypassing your
JavaScript validation a user just needs to turn their JavaScript off.
JavaScript validation is only good to reduce the server load.

3. Do not use user input directly in your SQL queries

Use mysql_real_escape_string() to escape the user input.
PHP.net recommends this function: (well a little different)

PHP Code:

function escape($values) {
if(is_array($values)) {
$values = array_map(array(&$this, ‘escape’), $values);
} else {
/* Quote if not integer */
if ( !is_numeric($values) || $values{0} == ‘0’ ) {
$values = “‘” .mysql_real_escape_string($values) . “‘”;
}
}
return $values;
}

Then you can use it like this:

PHP Code:

$username = escape($_POST[‘username’]);
mysql_query(“SELECT * FROM user WHERE username = $username”); /* escape() will also adds quotes to strings automatically */

4. In your SQL queries don’t put integers in quotes

For example $id is suppose to be an integer:

PHP Code:

$id = “0; DELETE FROM users”;
$id = mysql_real_escape_string($id); // 0; DELETE FROM users – mysql_real_escape_string doesn’t escape ;
mysql_query(“SELECT * FROM users WHERE id=’$id'”);
Note that, using intval() would fix the problem here.

5. When uploading files, validate the file mime type

If you are expecting images, make sure the file you are receiving is an image or it might be a PHP script that can run
on your server and does whatever damage you can imagine.

One quick way is to check the file extension:

PHP Code:
$valid_extensions = array(‘jpg’, ‘gif’, ‘png’); // …

$file_name = basename($_FILES[‘userfile’][‘name’]);
$_file_name = explode(‘.’, $file_name);
$ext = $_file_name[ count($_file_name) – 1 ];

if( !in_array($ext, $valid_extensions) ) {
/* This file is invalid */
}

6. Give your database users just enough permissions

If a database user is never going to drop tables, then when creating that user don’t give it drop table permissions,
normally just SELECT, UPDATE, DELETE, INSERT should be enough.

7. Do not allow hosts other than localhost to connect to your database

If you need to, add only that particular host or IP as necessary but never, ever let everyone connect to your database server.

8. Your library file extensions should be PHP

.inc files will be written to the browser just like text files (unless your server is setup to interpret them as PHP scripts),
users will be able to see your messy code (kidding) and possibly find exploits or see your passwords etc.
Have extensions like config.inc.php or have a .htaccess file in your extension (templates, libs etc.) folders with this one line:

Code:

deny from all

9. Have register globals off or define your variables first

Register globals can be very dangerous, consider this bit of code:

PHP Code:
if( user_logged_in() ) {
$auth = true;
}

if( $auth ) {
/* Do some admin stuff */
}

If you have registered globals on and you can’t turn it off for some reason you can fix these issues by defining your variables first:

PHP Code:
$auth = false;
if( user_logged_in() ) {
$auth = true;
}

if( $auth ) {
/* Do some admin stuff */
}
Defining your variables first is a good programming practice that I suggest you follow anyway.

10. Keep PHP itself up to date

Just take a look at www.php.net and see release announcements and note how many security issues they
fix on every release to understand why this is important.

keyboard shortcuts

Tags

· CTRL+C (Copy)
· CTRL+X (Cut)
· CTRL+V (Paste)
· CTRL+Z (Undo)
· DELETE (Delete)
· SHIFT+DELETE (Delete the selected item permanently without placing the item in the Recycle Bin)
· CTRL while dragging an item (Copy the selected item)
· CTRL+SHIFT while dragging an item (Create a shortcut to the selected item)
· F2 key (Rename the selected item)
· CTRL+RIGHT ARROW (Move the insertion point to the beginning of the next word)
· CTRL+LEFT ARROW (Move the insertion point to the beginning of the previous word)
· CTRL+DOWN ARROW (Move the insertion point to the beginning of the next paragraph)
· CTRL+UP ARROW (Move the insertion point to the beginning of the previous paragraph)
· CTRL+SHIFT with any of the arrow keys (Highlight a block of text)
· SHIFT with any of the arrow keys (Select more than one item in a window or on the desktop, or select text in a document)
· CTRL+A (Select all)
· F3 key (Search for a file or a folder)
· ALT+ENTER (View the properties for the selected item)
· ALT+F4 (Close the active item, or quit the active program)
· ALT+ENTER (Display the properties of the selected object)
· ALT+SPACEBAR (Open the shortcut menu for the active window)
· CTRL+F4 (Close the active document in programs that enable you to have multiple documents open simultaneously)
· ALT+TAB (Switch between the open items)
· ALT+ESC (Cycle through items in the order that they had been opened)
· F6 key (Cycle through the screen elements in a window or on the desktop)
· F4 key (Display the Address bar list in My Computer or Windows Explorer)
· SHIFT+F10 (Display the shortcut menu for the selected item)
· ALT+SPACEBAR (Display the System menu for the active window)
· CTRL+ESC (Display the Start menu)
· ALT+Underlined letter in a menu name (Display the corresponding menu)
· Underlined letter in a command name on an open menu (Perform the corresponding command)
· F10 key (Activate the menu bar in the active program)
· RIGHT ARROW (Open the next menu to the right, or open a submenu)
· LEFT ARROW (Open the next menu to the left, or close a submenu)
· F5 key (Update the active window)
· BACKSPACE (View the folder one level up in My Computer or Windows Explorer)
· ESC (Cancel the current task)
· SHIFT when you insert a CD-ROM into the CD-ROM drive (Prevent the CD-ROM from automatically playing)

Dialog Box Keyboard Shortcuts:

· CTRL+TAB (Move forward through the tabs)
· CTRL+SHIFT+TAB (Move backward through the tabs)
· TAB (Move forward through the options)
· SHIFT+TAB (Move backward through the options)
· ALT+Underlined letter (Perform the corresponding command or select the corresponding option)
· ENTER (Perform the command for the active option or button)
· SPACEBAR (Select or clear the check box if the active option is a check box)
· Arrow keys (Select a button if the active option is a group of option buttons)
· F1 key (Display Help)
· F4 key (Display the items in the active list)
· BACKSPACE (Open a folder one level up if a folder is selected in the Save As or Open dialog box)

Microsoft Natural Keyboard Shortcuts:

· Windows Logo (Display or hide the Start menu)
· Windows Logo+BREAK (Display the System Properties dialog box)
· Windows Logo+D (Display the desktop)
· Windows Logo+M (Minimize all of the windows)
· Windows Logo+SHIFT+M (Restore the minimized windows)
· Windows Logo+E (Open My Computer)
· Windows Logo+F (Search for a file or a folder)
· CTRL+Windows Logo+F (Search for computers)
· Windows Logo+F1 (Display Windows Help)
· Windows Logo+ L (Lock the keyboard)
· Windows Logo+R (Open the Run dialog box)
· Windows Logo+U (Open Utility Manager)

Accessibility Keyboard Shortcuts:

· Right SHIFT for eight seconds (Switch FilterKeys either on or off)
· Left ALT+left SHIFT+PRINT SCREEN (Switch High Contrast either on or off)
· Left ALT+left SHIFT+NUM LOCK (Switch the MouseKeys either on or off)
· SHIFT five times (Switch the StickyKeys either on or off)
· NUM LOCK for five seconds (Switch the ToggleKeys either on or off)
· Windows Logo +U (Open Utility Manager)

Windows Explorer Keyboard Shortcuts:

· END (Display the bottom of the active window)
· HOME (Display the top of the active window)
· NUM LOCK+Asterisk sign (*) (Display all of the subfolders that are under the selected folder)
· NUM LOCK+Plus sign (+) (Display the contents of the selected folder)
· NUM LOCK+Minus sign (-) (Collapse the selected folder)
· LEFT ARROW (Collapse the current selection if it is expanded, or select the parent folder)
· RIGHT ARROW (Display the current selection if it is collapsed, or select the first subfolder)

Shortcut Keys for Character Map:

After you double-click a character on the grid of characters, you can move through the grid by using the keyboard shortcuts:

· RIGHT ARROW (Move to the right or to the beginning of the next line)
· LEFT ARROW (Move to the left or to the end of the previous line)
· UP ARROW (Move up one row)
· DOWN ARROW (Move down one row)
· PAGE UP (Move up one screen at a time)
· PAGE DOWN (Move down one screen at a time)
· HOME (Move to the beginning of the line)
· END (Move to the end of the line)
· CTRL+HOME (Move to the first character)
· CTRL+END (Move to the last character)
· SPACEBAR (Switch between Enlarged and Normal mode when a character is selected)

Microsoft Management Console (MMC) Main Window Keyboard Shortcuts:

· CTRL+O (Open a saved console)
· CTRL+N (Open a new console)
· CTRL+S (Save the open console)
· CTRL+M (Add or remove a console item)
· CTRL+W (Open a new window)
· F5 key (Update the content of all console windows)
· ALT+SPACEBAR (Display the MMC window menu)
· ALT+F4 (Close the console)
· ALT+A (Display the Action menu)
· ALT+V (Display the View menu)
· ALT+F (Display the File menu)
· ALT+O (Display the Favorites menu)

MMC Console Window Keyboard Shortcuts:

· CTRL+P (Print the current page or active pane)
· ALT+Minus sign (-) (Display the window menu for the active console window)
· SHIFT+F10 (Display the Action shortcut menu for the selected item)
· F1 key (Open the Help topic, if any, for the selected item)
· F5 key (Update the content of all console windows)
· CTRL+F10 (Maximize the active console window)
· CTRL+F5 (Restore the active console window)
· ALT+ENTER (Display the Properties dialog box, if any, for the selected item)
· F2 key (Rename the selected item)
· CTRL+F4 (Close the active console window. When a console has only one console window, this shortcut closes the console)

Remote Desktop Connection Navigation:

· CTRL+ALT+END (Open the Microsoft Windows NT Security dialog box)
· ALT+PAGE UP (Switch between programs from left to right)
· ALT+PAGE DOWN (Switch between programs from right to left)
· ALT+INSERT (Cycle through the programs in most recently used order)
· ALT+HOME (Display the Start menu)
· CTRL+ALT+BREAK (Switch the client computer between a window and a full screen)
· ALT+DELETE (Display the Windows menu)
· CTRL+ALT+Minus sign (-) (Place a snapshot of the entire client window area on the Terminal server clipboard and provide the same functionality as pressing ALT+PRINT SCREEN on a local computer.)
· CTRL+ALT+Plus sign (+) (Place a snapshot of the active window in the client on the Terminal server clipboard and provide the same functionality as pressing PRINT SCREEN on a local computer.)

Microsoft Internet Explorer Navigation:

· CTRL+B (Open the Organize Favorites dialog box)
· CTRL+E (Open the Search bar)
· CTRL+F (Start the Find utility)
· CTRL+H (Open the History bar)
· CTRL+I (Open the Favorites bar)
· CTRL+L (Open the Open dialog box)
· CTRL+N (Start another instance of the browser with the same Web address)
· CTRL+O (Open the Open dialog box, the same as CTRL+L)
· CTRL+P (Open the Print dialog box)
· CTRL+R (Update the current Web page)
· CTRL+W (Close the current window)

KEYBOARD SHORTCUTS

· CTRL+C (Copy)
· CTRL+X (Cut)
· CTRL+V (Paste)
· CTRL+Z (Undo)
· DELETE (Delete)
· SHIFT+DELETE (Delete the selected item permanently without placing the item in the Recycle Bin)
· CTRL while dragging an item (Copy the selected item)
· CTRL+SHIFT while dragging an item (Create a shortcut to the selected item)
· F2 key (Rename the selected item)
· CTRL+RIGHT ARROW (Move the insertion point to the beginning of the next word)
· CTRL+LEFT ARROW (Move the insertion point to the beginning of the previous word)
· CTRL+DOWN ARROW (Move the insertion point to the beginning of the next paragraph)
· CTRL+UP ARROW (Move the insertion point to the beginning of the previous paragraph)
· CTRL+SHIFT with any of the arrow keys (Highlight a block of text)
· SHIFT with any of the arrow keys (Select more than one item in a window or on the desktop, or select text in a document)
· CTRL+A (Select all)
· F3 key (Search for a file or a folder)
· ALT+ENTER (View the properties for the selected item)
· ALT+F4 (Close the active item, or quit the active program)
· ALT+ENTER (Display the properties of the selected object)
· ALT+SPACEBAR (Open the shortcut menu for the active window)
· CTRL+F4 (Close the active document in programs that enable you to have multiple documents open simultaneously)
· ALT+TAB (Switch between the open items)
· ALT+ESC (Cycle through items in the order that they had been opened)
· F6 key (Cycle through the screen elements in a window or on the desktop)
· F4 key (Display the Address bar list in My Computer or Windows Explorer)
· SHIFT+F10 (Display the shortcut menu for the selected item)
· ALT+SPACEBAR (Display the System menu for the active window)
· CTRL+ESC (Display the Start menu)
· ALT+Underlined letter in a menu name (Display the corresponding menu)
· Underlined letter in a command name on an open menu (Perform the corresponding command)
· F10 key (Activate the menu bar in the active program)
· RIGHT ARROW (Open the next menu to the right, or open a submenu)
· LEFT ARROW (Open the next menu to the left, or close a submenu)
· F5 key (Update the active window)
· BACKSPACE (View the folder one level up in My Computer or Windows Explorer)
· ESC (Cancel the current task)
· SHIFT when you insert a CD-ROM into the CD-ROM drive (Prevent the CD-ROM from automatically playing)

Dialog Box Keyboard Shortcuts:

· CTRL+TAB (Move forward through the tabs)
· CTRL+SHIFT+TAB (Move backward through the tabs)
· TAB (Move forward through the options)
· SHIFT+TAB (Move backward through the options)
· ALT+Underlined letter (Perform the corresponding command or select the corresponding option)
· ENTER (Perform the command for the active option or button)
· SPACEBAR (Select or clear the check box if the active option is a check box)
· Arrow keys (Select a button if the active option is a group of option buttons)
· F1 key (Display Help)
· F4 key (Display the items in the active list)
· BACKSPACE (Open a folder one level up if a folder is selected in the Save As or Open dialog box)

Microsoft Natural Keyboard Shortcuts:

· Windows Logo (Display or hide the Start menu)
· Windows Logo+BREAK (Display the System Properties dialog box)
· Windows Logo+D (Display the desktop)
· Windows Logo+M (Minimize all of the windows)
· Windows Logo+SHIFT+M (Restore the minimized windows)
· Windows Logo+E (Open My Computer)
· Windows Logo+F (Search for a file or a folder)
· CTRL+Windows Logo+F (Search for computers)
· Windows Logo+F1 (Display Windows Help)

· Windows Logo+ L (Lock the keyboard)
· Windows Logo+R (Open the Run dialog box)
· Windows Logo+U (Open Utility Manager)

Accessibility Keyboard Shortcuts:

· Right SHIFT for eight seconds (Switch FilterKeys either on or off)
· Left ALT+left SHIFT+PRINT SCREEN (Switch High Contrast either on or off)
· Left ALT+left SHIFT+NUM LOCK (Switch the MouseKeys either on or off)
· SHIFT five times (Switch the StickyKeys either on or off)
· NUM LOCK for five seconds (Switch the ToggleKeys either on or off)

31 CSS Code Snippets To Make You A Better Coder

Tags

It is almost impossible to gather in an article all the CSS code snippets that could help you in the future but here are some of the ones that you would need more often than others. Don’t get scared by the length of some of these CSS hacks’s code cause they’re all easy to implement and where is the case, they’re well documented. Besides the ones that solve common and annoying problems there are also some that solve new issues brought by the new technologies.

Comprehensive List of Browser-Specific CSS Hacks

/***** Selector Hacks ******/
/* IE6 and below */
* html #uno { color: red }
/* IE7 */
*:first-child+html #dos { color: red }
/* IE7, FF, Saf, Opera */
html>body #tres { color: red }
/* IE8, FF, Saf, Opera (Everything but IE 6,7) */
html>/**/body #cuatro { color: red }
/* Opera 9.27 and below, safari 2 */
html:first-child #cinco { color: red }
/* Safari 2-3 */
html[xmlns*=””] body:last-child #seis { color: red }
/* safari 3+, chrome 1+, opera9+, ff 3.5+ */
body:nth-of-type(1) #siete { color: red }
/* safari 3+, chrome 1+, opera9+, ff 3.5+ */
body:first-of-type #ocho { color: red }
/* saf3+, chrome1+ */
@media screen and (-webkit-min-device-pixel-ratio:0) {
#diez { color: red }
}
/* iPhone / mobile webkit */
@media screen and (max-device-width: 480px) {
#veintiseis { color: red }
}
/* Safari 2 – 3.1 */
html[xmlns*=””]:root #trece { color: red }
/* Safari 2 – 3.1, Opera 9.25 */
*|html[xmlns*=””] #catorce { color: red }
/* Everything but IE6-8 */
:root *> #quince { color: red }
/* IE7 */
*+html #dieciocho { color: red }
/* Firefox only. 1+ */
#veinticuatro, x:-moz-any-link { color: red }
/* Firefox 3.0+ */
#veinticinco, x:-moz-any-link, x:default { color: red }
/***** Attribute Hacks ******/
/* IE6 */
#once { _color: blue }
/* IE6, IE7 */
#doce { *color: blue; /* or #color: blue */ }
/* Everything but IE6 */
#diecisiete { color/**/: blue }
/* IE6, IE7, IE8 */
#diecinueve { color: blue\9; }
/* IE7, IE8 */
#veinte { color/*\**/: blue\9; }
/* IE6, IE7 — acts as an !important */
#veintesiete { color: blue !ie; } /* string after ! can be anything */

Please Click here to read full article

How To Add Lightbox To Magento Theme

Tags

Have you ever wondered how people are showing larger images for products on mouseover or mouse click using lightbox (very popular JavaScript library). Adding Lightbox to your magento theme is not difficult and by adding very little code to your theme you can get the Lightbox functionality easily. Lightbox will give the ability to highlight your products by showing lager image of the product along with brief description. Our approach will be based on default layout, you can change the theme name based on your selection.

Click Dere to read full article

How to use WordPress home page in Magento home page (CMS page)

Tags

Lot of people are heading down the road of integrating the WordPress and Magento. Probably everyone in web development has heard about WordPress. Personaly I like them, from Joomla, Drupal, WordPress… But there is that little something that makes WordPress far more loving in the eyes of the client. Not to start a flame here, lets get back to the topic. Due to the lack of the proper content management in Magento those who use WordPress can easily manage the (home page in this case) content trough WordPress and make it accessible in Magento CMS page (that you can set to home page in Magento).

Click Here to read full article

The Mystery Of CSS Sprites: Techniques, Tools And Tutorials

Tags

CSS Sprites are not new. In fact, they are a rather well-established technique and have managed to become common practice in Web development. Of course, CSS sprites are not always necessary, but in some situation they can bring significant advantages and improvements – particularly if you want to reduce your server load. And if you haven’t heard of CSS sprites before, now is probably a good time to learn what they are, how they work and what tools can help you create and use the technique in your projects.

Click Here to read full article