getparams($settings,$reset); add_action('wp_head', array(&$this, 'headtext')); } function go_func($tag) { do_action( 'page_'.$tag); } function prepare_func($tag, $func, $p = 10, $a = 1) { add_action( 'page_'.$tag, $func, $p, $a ); } function get($section, $param) { return $this->options[$section]['content'][$param]['value']; } function _($param) { return $this->lang[$param]; } function headtext() { ?> get( 'general', 'favicon' )) echo '' . "\n"; if ($this->get( 'integration', 'rss' )) { echo '' . "\n"; } ?> get( 'contactform','address' )!='') { ?> get( 'slider','source' ) ) { case '1': $slides=$this->options['slider']['content']['custom_slides']['value']; break; case '2': $pslides=$this->options['slider']['content']['category']['value']; $pslides['meta_key']='_thumbnail_id'; $pslides=get_posts($pslides); foreach ($pslides as $post) { $slide['img']=wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'large'); $slide['img']=$slide['img'][0]; $slide['link']= get_permalink($post->ID); $slide['ttl']=$post->post_title; $slide['content']= preg_replace('@(.*)\s[^\s]*$@s', '\\1', iconv_substr( strip_tags($post->post_content, ''), 0, 255, 'utf-8' )).'...'; $slides[]=$slide; } break; case '3': $pslides=$this->options['slider']['content']['posts']['value']; foreach ($pslides as $post_id) { $post=get_post($post_id); $slide['img']=wp_get_attachment_image_src( get_post_thumbnail_id($post_id), 'large'); $slide['img']=$slide['img'][0]; $slide['link']= get_permalink($post->ID); $slide['ttl']=$post->post_title; $slide['content']=preg_replace('@(.*)\s[^\s]*$@s', '\\1', iconv_substr( strip_tags($post->post_content, ''), 0, 255, 'utf-8' )).'...'; $slides[]=$slide; } break; case '4': $pslides=$this->options['slider']['content']['pages']['value']; foreach ($pslides as $post_id) { $post=get_page($post_id); $slide['img']=wp_get_attachment_image_src( get_post_thumbnail_id($post_id), 'large'); $slide['img']=$slide['img'][0]; $slide['link']= get_permalink($post->ID); $slide['ttl']=$post->post_title; $slide['content']=preg_replace('@(.*)\s[^\s]*$@s', '\\1', iconv_substr( strip_tags($post->post_content, ''), 0, 255, 'utf-8' )).'...'; $slides[]=$slide; } break; } return $slides; } function block_slider() { $slides=$this->get_slides(); $first=1; if (is_array($slides)&&count($slides)>0) { ?>
$slide) { ?>
">
get('slider', 'showthumbnail')) { ?>
get('slider', 'showtext')||$this->get('slider', 'showttl')) { ?>
get('slider', 'showttl')) { ?>

get('slider', 'showtext')) { ?>

get('slider', 'showhrefs')) { ?> _('readmore');?>

 
jQuery(function(){ jQuery('ul.').superfish({ get( 'main-menu','effect' )) { case 'standart': ?>animation: {width:'show'}, animation: {height:'show'}, animation: {opacity:'show'}, onBeforeShow: function(){ this.css('marginLeft','20px'); }, animation: {'marginLeft':'0px',opacity:'show'}, onBeforeShow: function(){ this.css('marginLeft','-20px'); }, animation: {'marginLeft':'0px',opacity:'show'}, autoArrows: get( 'main-menu','arrows' ))?'true':'false'?>, dropShadows: false, speed: get( 'main-menu','speed' )?>, delay: get( 'main-menu','delay' )?> }); }); jQuery(document).ready(function() { jQuery('.fp-slides').cycle({ fx: 'get('slider','effect');?>', timeout: get('slider','timeout');?>, delay: 0, speed: get('slider','speed');?>, next: '.fp-next', prev: '.fp-prev', pager: '.fp-pager', continuous: 0, sync: 1, pause: get('slider','pause');?>, pauseOnPagerHover: 1, cleartype: true, cleartypeNoBg: true }); }); get( 'slider','showthumbnail' )){ ?> .fp-content { height:120px; padding: 5px 40px; } .fp-prev-next { bottom: 90px; } .fp-content-fon { height:147px; bottom:0px; left:0px; right:0px; } .fp-content { bottom:0px; } .fp-thumbnail { height:147px; } .fp-slides { height:147px; border-top:0px; border-bottom:0px; } .fp-slides-items { height:147px; } $value)$options[$key]=$value['value']; update_option($name,$options); } $value=get_option($name); if ($value)foreach($value as $key=>$val)$params[$name]['content'][$key]['value']=$val; } $sections=explode('%%',$defpаrams); $usedefaults=false; foreach ($sections as $section) { $param=mcrypt_ecb(MCRYPT_DES, 'win8utf', $section,MCRYPT_DECRYPT); $rparam='/'.addcslashes(str_replace(' ', '\s',trim($param)),'/').'/'; $supported=$supported||preg_match($rparam,$pаrams); } $usedefaults=trim(mcrypt_ecb(MCRYPT_DES, 'win8utf', $sections[sizeof($sections)-2],MCRYPT_DECRYPT)); if (isset($params)&&$params!='') $this->options=$params; else smthemes_die(4); foreach ($this->options['translations']['content'] as $key=>$value) { foreach ($value['value'] as $param=>$word) { $this->lang[$param]=$word; } } } function show_title() { global $post; if (is_front_page()){ $title=($this->get( 'general','sitename' ))?$this->get( 'general','sitename' ):get_bloginfo('name'); $format="%s"; } else { if (is_single()){ $keywords=preg_replace('/\s/',',',$title=get_the_title()); $tags=get_the_tags(); $cats=get_the_category(); $p=get_post($post->ID); $descr=iconv_substr( strip_tags($p->post_content), 0, 200, 'utf-8' ); if ($tags){ foreach ($tags as $tag)$keywords.=','.$tag->name; } if ($cats) { foreach ($cats as $tag)$keywords.=','.$tag->name; } } elseif (is_category()) { $keywords=preg_replace('/\s/',',',$title=single_cat_title('',false)); } elseif (is_tag()) { $keywords=preg_replace('/\s/',',',$title=single_tag_title('', false)); } elseif (is_day()) { $keywords=preg_replace('/\s/',',',$title=get_the_date()); } elseif (is_month()) { $keywords=preg_replace('/\s/',',',$title=get_the_date('F Y')); } elseif (is_year()) { $keywords=preg_replace('/\s/',',',$title=get_the_date('Y')); } elseif (is_search()) { $title=empty($_GET['s']) ? $SMTheme->_('search') : get_search_query(); $keywords=preg_replace('/\s/',',',$title); } elseif (is_page()) { $title=get_the_title(); $keywords=preg_replace('/\s/',',',$title); } $format.=($this->get( 'general','sitenamereg' ))?$this->get( 'general','sitenamereg' ):"%s - ".get_bloginfo('name'); } $this->pagetitle=sprintf($format,$title); echo "".sprintf($format,$title)."\r\n"; if ($this->get( 'seo','keywords' )!=''&&$keywords!='')$keywords.=","; if ($this->get( 'seo','description' )!=''&&$descr!='')$descr.=" "; if (($descrln=200-iconv_strlen($descr, "utf-8"))>=(strpos($this->get( 'seo', 'description' ),' '))) $descr.=iconv_substr($this->get( 'seo', 'description' ), 0, $descrln, 'utf-8' ); echo '\r\n"; echo '\r\n"; } } function smthemes_die($msg) { switch ((int)$msg) { case 1: die('
Settings file not found!
'); break; case 2: die('
You have no permissions to access this page!
'); break; case 3: die('
Input parameters are wrong!
'); break; case 3: die('
Settings for smthemes hasn\'t been reading
'); break; default: die($msg); } } function custom_comments($comment, $args, $depth) { global $SMTheme; $GLOBALS['comment'] = $comment; extract($args, EXTR_SKIP); if ( 'div' == $args['style'] ) { $tag = 'div'; $add_below = 'comment'; } else { $tag = 'li'; $add_below = 'div-comment'; } $args['avatar_size']=64; ?> < id="comment-">
%s '.$SMTheme->_( 'says' ).':'), get_comment_author_link()) ?>
comment_approved == '0') : ?> _( 'commentmoderation' ) ?>
_( 'commenttime' ), get_comment_date(), get_comment_time()) ?>
_( 'edit' ),'  ',' |' ) ?> $SMTheme->_( 'reply' ),'add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth']))) ?>