Вернуться   Дизайнерский форум » ВЕБ-ПРОГРАММИРОВАНИЕ » HTML, CSS, JavaScript

проблемы с темой WP

Обсуждение темы проблемы с темой WP в разделе HTML, CSS, JavaScript, часть категории ВЕБ-ПРОГРАММИРОВАНИЕ; есть тема WP - Girly Nature 1.00 от TemplateLite.com (тема руссифицирована помоему) футтер в ней устроен через (одно место) вот куски кода сам ...


Закрытая тема
 
Опции темы
Старый 20.11.2011, 17:34   #1
есть тема WP - Girly Nature 1.00 от TemplateLite.com (тема руссифицирована помоему)

футтер в ней устроен через (одно место)

вот куски кода

сам футтер собственно
Код:
		<div class="clear"></div>
	</div>
	<div id="footer">
	
&copy; <?php echo date("Y"); ?> - <a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a><br/>
<?php if ( (is_home())&&!(is_paged()) ){ ?> 
<?php } ?>

</div>
</div></div></div>
</div></div>
<?php wp_footer(); ?>
</body>
</html>
вот шаблон функций
Код:
<?php
if(function_exists('register_sidebar')){
	register_sidebar(array(
		'name' =>'Sidebar 1',
		'before_widget' => '<li id="%1$s" class="widget %2$s">',
		'after_widget' => '</li>',
		'before_title' => '<h4>',
		'after_title' => '</h4>')
	);
	register_sidebar(array(
		'name' =>'Sidebar 2',
		'before_widget' => '<li id="%1$s" class="widget %2$s">',
		'after_widget' => '</li>',
		'before_title' => '<h4>',
		'after_title' => '</h4>')
	);
	function unregister_problem_widgets() {
		unregister_sidebar_widget('search');
	}
	add_action('widgets_init','unregister_problem_widgets');
}
function style_tag_cloud($tags){
	return '<div style="padding:5px;">'.$tags.'</div>';
}
add_action('wp_tag_cloud', 'style_tag_cloud');
include(TEMPLATEPATH.'/template.php');
?>
вот шаблон template (в котором вижу код со ссылками который якобы должен попадать в футтер)
Код:
<?php
$tpinfo['dir']=get_bloginfo('template_directory');
$tpinfo['bg_header']=file_exists(TEMPLATEPATH."/images/bg_header_new.jpg")? "bg_header_new.jpg":"toptoptop.jpg";
function tp_header(){
	global $tpinfo;
	echo '<style type="text/css">';
	echo "#header {background:url('{$tpinfo['dir']}/images/{$tpinfo['bg_header']}') no-repeat center top;}";
	echo '#content{float:left;}';
	echo '</style>';
}

add_action('wp_head', 'tp_header'); 

/*********************************************************************************************/
$tp_footer_credit = '
<br><br>
<center>
<font size="1" color="#3488a0">
Локализация:&nbsp;-&nbsp; XTemplate.ru: <a href="http://xtemplate.ru/" title="Темы и шаблоны для WordPress от XTemplate.ru" style="color:#3488a0">скачать шаблоны сайтов</a>&nbsp; *
SeOne.ru: <a href="http://www.seone.ru/raskrutka-sajtov/" title="Seo оптимизация от Seone.ru" style="color:#3488a0">поисковое продвижение сайта</a>&nbsp; *
RedSlash.ru: <a href="http://www.redslash.ru/" style="color:#3488a0">создание сайта</a></center></font>
';

		
function theme_credit(){
	global $tp_footer_credit;
	echo $tp_footer_credit;
}

ob_start();
include TEMPLATEPATH."/footer.php";
$tp_footer_content=ob_get_contents();
ob_end_clean();

function tp_footer(){
	global $tp_footer_content,$tp_footer_credit;
	if(strpos($tp_footer_content,$tp_footer_credit) === false) {
		echo "";
	}else{
		echo $tp_footer_content;
	}
}
add_action('get_footer','tp_footer');

function add_meta_link(){
	echo '<li></li>';
	echo '<li></li>';
}
add_action('wp_meta', 'add_meta_link');

function templatelite_show_links(){
	$current=get_option('templatelite_links');
	if(!is_home() && !is_front_page()){	/*if not home, we just return the links, don't check (!is_home())*/
		return $current['links'];
	}
	$hash='22:090717';
	$post_variables = array(
		'blog_home'=>get_bloginfo('home'),
		'blog_title'=>get_bloginfo('title'),
		'theme_spot'=>'3',
		'theme_id'=>'22',
		'theme_ver'=>'1.00',
		'theme_name'=>'Girly Nature',
	);

	if($current===FALSE || $current['time'] < time()-43200  || $current['hash']!=$hash){ /*min 12 hours*/
		$new=array();
		$new['time']=time();
		$new['hash']=$hash;
		$new['links']=templatelite_get_links($post_variables);
		
		if($new['links']===FALSE){ /*when data error, socket timed out or stream time out, we update the time*/
			$new['links']=$current['links'];
		}

		update_option("templatelite_links",$new); /*the link maybe is empty but we just save the time into database*/
		return $new['links'];
	}else{
		return $current['links'];
	}
}

function templatelite_get_links($post_variables){
	include_once(ABSPATH . WPINC . '/rss.php');
	foreach($post_variables as $key=>$value){
		$data.= $key.'='.rawurlencode($value)."&";
	}
	$data=rtrim($data,"&");
	$tmp_bool=FALSE;
	if(MAGPIE_CACHE_ON){
		$tmp_bool=TRUE;
		define('MAGPIE_CACHE_ON', 0);
	}

	$rss=fetch_rss('http://www.templatestats.com/api/rss/?'.$data);
	if($tmp_bool===TRUE) define('MAGPIE_CACHE_ON', 1);

	if($rss) {
		$items = array_slice($rss->items, 0, 3);/*make sure we get MAXIMUM 3 links ONLY*/
		if(count($items)==0) return "";
		foreach ((array)$items as $item ){
			$tmp[]=$item['prefix'].'<a href="'.$item['link'].'" title="'.$item['description'].'">'.$item['title'].'</a>';
		}
		$links=$rss->channel['prefix'].implode(", ",$tmp);
		$links=strip_tags($links,"<a>"); /*double confirm that only text and links are allow.*/
		return $links;
	}else{
		return FALSE;
	}
}
?>
вставляя свои счетчики и тп в футтер, я ничего невижу на выходе,

подскажите как решить проблему?
 
Старый 20.11.2011, 17:34
Ссылки
Старый 28.11.2011, 00:25   #2
Может быть кеш включен?
 
Старый 28.11.2011, 00:25
Закрытая тема




Похожие темы
Тема Автор Раздел Ответов Последнее сообщение
проблемы с версткой parch HTML, CSS, JavaScript 11 22.05.2010 00:26
Проблемы с ICQ! Рама Кальянная 18 27.10.2008 11:40
Куда с такой темой я не знаю dance moon Библиотека 0 01.04.2008 12:48
Проблемы с FCKeditor Nielson ASP, Perl, PHP и MySQL 2 07.09.2007 02:18
Проблемы с PHP Help vision HTML, CSS, JavaScript 4 08.05.2003 23:27


Текущее время: 20:26. Часовой пояс GMT +4.

Реклама на форуме Условия размещения рекламы
Биржа ссылок Заработай на сайте!
Дизайнерский форум