This file contains hidden or 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
$template->registerHelper('eol', function ($s) { | |
return preg_replace("/(?<=^\w) |(?<=\s\w) /"," ",$s); | |
}); |
This file contains hidden or 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
# Attempt to override some php settings, these settings may be helpful on some hosts if your | |
# default configuration does not meet CMS's minimum requirements, and your host | |
# has given your account appropriate permissions | |
#php_value upload_max_filesize "10M" | |
#php_value session_save_path "tmp/cache" | |
#php_flag magic_quotes_gpc Off | |
#php_flag register_globals Off | |
#php_flag session.use_trans_sid Off |
This file contains hidden or 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
do functions.php | |
/* =================================================================== */ | |
function gordon_comments( $comment, $args, $depth ) { | |
$GLOBALS['comment'] = $comment; | |
?> | |
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>"> | |
<div id="comment-<?php comment_ID(); ?>" class="comment-body"> | |
<div class="comment-body-inner"> |
This file contains hidden or 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
//do functions.php | |
function sparkling_header_menu() { | |
wp_nav_menu(array( | |
'menu' => 'primary', | |
'theme_location' => 'primary', | |
'depth' => 3, | |
'container' => 'div', | |
'container_class' => 'collapse navbar-collapse navbar-ex1-collapse', |
This file contains hidden or 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
add_action('get_header', 'lynt_redirect_to_login'); | |
function lynt_redirect_to_login(){ | |
if ( is_page(123) ) {//nutno zadat spravne id stranky | |
if(!is_user_logged_in()) auth_redirect(); | |
} | |
} |
This file contains hidden or 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 | |
$content = '<?xml version="1.0" encoding="Windows-1250"?> | |
<dat:dataPack id="Za001" ico="12345678" application="StwTest" version="2.0" note="export" | |
xmlns:dat="http://www.stormware.cz/schema/version_2/data.xsd" | |
xmlns:stk="http://www.stormware.cz/schema/version_2/stock.xsd" | |
xmlns:ftr="http://www.stormware.cz/schema/version_2/filter.xsd" | |
xmlns:lStk="http://www.stormware.cz/schema/version_2/list_stock.xsd" | |
xmlns:typ="http://www.stormware.cz/schema/version_2/type.xsd"> | |
<dat:dataPackItem id="a55" version="2.0"> |
This file contains hidden or 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: WP-Ratings Score correction for titulkomet.cz | |
Description: Displays the best posts in chosen timerange | |
Author: Vladimir Smitka | |
Version: 1.0 | |
Author URI: http://lynt.cz | |
*/ | |
function get_highest_score_range($time = '1 day', $mode = '', $limit = 10, $chars = 0, $display = true) { |
This file contains hidden or 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
set $no_cache ""; | |
if ($request_method !~ ^(GET|HEAD)$) { | |
set $no_cache "1"; | |
} | |
if ($http_cookie ~* "nocache") { | |
set $no_cache "1"; | |
} |
This file contains hidden or 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
= | |
DOSADIT( | |
DOSADIT( | |
DOSADIT( | |
DOSADIT( | |
DOSADIT( | |
DOSADIT( | |
DOSADIT( | |
DOSADIT( | |
DOSADIT( |
This file contains hidden or 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
cd /etc/cron.hourly | |
touch ntpsync | |
chmod +x ntpsync | |
echo '#!/bin/bash' > ntpsync | |
echo 'ntpdate 195.113.144.201 #tik.cesnet.cz' >> ntpsync | |
echo 'hwclock --systohc' >> ntpsync | |
./ntpsync |
OlderNewer