This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$product=Mage::getModel("catalog/product"); | |
$prod=$product->load($_product->getId()); | |
$conf = Mage::getModel('catalog/product_type_configurable')->setProduct($prod); | |
$col = $conf->getUsedProductCollection()->addAttributeToSelect('*')->addFilterByRequiredOptions(); | |
$total_qty=0; | |
foreach($col as $sprod){ | |
$sprod=$product->load($sprod->getId()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Rewrite Wordpress upload path | |
Plugin URI: http://mkdizajn.com | |
Description: Rewrites your image paths. | |
Version: 2.4 | |
Author: kreso | |
Author URI: http://mkdizajn.com/ | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######## | |
wordpress multisite timthumb patch | |
######## | |
correct the rewrite prepand path with timthumb script! | |
open timthumb and locate: | |
if(preg_match('/https?:\/\/(?:www\.)?' . $this->myHost . '(?:$|\/)/i', $this->src)){ | |
//$this->src = preg_replace('/https?:\/\/(?:www\.)?' . $this->myHost . '/i', '', $this->src); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
# uploaded files | |
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L] | |
# add a trailing slash to /wp-admin | |
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] | |
RewriteCond %{REQUEST_FILENAME} -f [OR] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE IF NOT EXISTS `inchoo_fiskalizacija_cert` ( | |
`cert_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Id', | |
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Created At', | |
`website_id` int(11) NOT NULL COMMENT 'Website Id', | |
`pfx_cert` text NOT NULL COMMENT 'Original Certificate in PFX format', | |
`pem_private_key` text NOT NULL COMMENT 'Private Key in PEM format', | |
`pem_private_key_passphrase` text NOT NULL COMMENT 'Passphrase for Private Key in PEM format', | |
`pem_public_cert` text NOT NULL COMMENT 'Public Certificate in PEM format', | |
`pem_public_cert_name` text NOT NULL COMMENT 'Name of the Public Certificate in PEM format', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// This script is to solve the problem of doing database search and replace | |
// when developers have only gone and used the non-relational concept of | |
// serializing PHP arrays into single database columns. It will search for all | |
// matching data on the database and change it, even if it's within a serialized | |
// PHP array. | |
// The big problem with serialised arrays is that if you do a normal DB | |
// style search and replace the lengths get mucked up. This search deals with |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// cleanup.php?clean=var | |
// cleanup.php?clean=log | |
$xml = simplexml_load_file('./app/etc/local.xml', NULL, LIBXML_NOCDATA); | |
$db['host'] = $xml->global->resources->default_setup->connection->host; | |
$db['name'] = $xml->global->resources->default_setup->connection->dbname; | |
$db['user'] = $xml->global->resources->default_setup->connection->username; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -type d -exec chmod 775 {} \; | |
find . -type f -exec chmod 664 {} \; | |
chmod 775 -R var/ app/etc/ media/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* wordpress multisite how to allow administrators to edit users! */ | |
function mc_admin_users_caps( $caps, $cap, $user_id, $args ){ | |
foreach( $caps as $key => $capability ){ | |
if( $capability != 'do_not_allow' ) | |
continue; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This method for last version of Bootstrap - Version 2.3.1 | |
Click this link to customize bootstrap: http://twitter.github.com/bootstrap/customize.html | |
You will find such as this list and change the number as you like. | |
16 Grid system with Gutter | |
@gridColumns: 16 | |
@gridColumnWidth: 45px | |
@gridGutterWidth: 15px |
OlderNewer