Skip to content

Instantly share code, notes, and snippets.

Avatar

Nikolay luisciphere

View GitHub Profile
@luisciphere
luisciphere / Bootstrap Table CSS
Last active Jul 14, 2020
Bootstrap tables only css
View Bootstrap Table CSS
.table {
width: 100%;
max-width: 100%;
margin-bottom: 1rem;
}
.table th,
.table td {
padding: 0.75rem;
vertical-align: top;
View form.php
<?php
// проверка на спам - просто прерываем выполнение кода, при желании можно и сообщение спамерам вывести
if( isset( $_POST['comment'] ) || isset( $_POST['message'] ) )
exit;
// подключаем WP, можно конечно обойтись без этого, но зачем?
require( dirname(__FILE__) . '/wp-load.php');
$name = ($_POST['name']) ? $_POST['name'] : '';
$email = ($_POST['email'] && is_email( $_POST['email'] )) ? $_POST['email'] : '';
View form_submission.php
<?php
/*
* Тут мы будем обрабатывать ошибки и выводить соответствующие сообщения
*/
if( isset( $_GET['msg'] ) ) {
// в случае успеха
if( $_GET['msg'] == 'success' )
echo '<span>Сообщение успешно отправлено</span>';
View podcast_links_output
View podcast_links
View Temp menu stuff
<!-- Menu edits temp -->
<?php
$logheight = get_field('logo_height', 'option');
$btnheight = 40 + $logheight;
?>
<style media="screen">
.header-logo {
height: <?php echo $logheight; ?>px;
}
.menu-toggle {
View Wordpress Simple Dropdown
$('.sub-menu').hide ();
$('.mainmenu li').hover (
function () {
$(this).addClass('active');
$('ul:first', this).fadeIn ();
},
function () {
$(this).removeClass('active');
View bookie-errors
ERROR - 2017-10-04 22:38:21 --> Severity: Notice --> Undefined index: country /var/www/bookiefree.com/www/application/models/users_data.php 784
ERROR - 2017-10-04 22:38:21 --> Severity: Notice --> Undefined index: russian /var/www/bookiefree.com/www/application/models/users_data.php 785
ERROR - 2017-10-04 22:38:21 --> Severity: Warning --> Cannot use a scalar value as an array /var/www/bookiefree.com/www/application/models/users_data.php 782
@luisciphere
luisciphere / gulp-directory-template.md
Created Oct 3, 2017 — forked from Inclushe/gulp-directory-template.md
Gulpfile using Stylus, Pug, Browsersync, and Browserify.
View gulp-directory-template.md

Directory Template

📁 src
  📁 assets
    📁 images
    📁 videos
  📁 js
  📁 pug
    📁 templates
@luisciphere
luisciphere / AJAX Form Example
Created Oct 2, 2017
Simple jQuery ajax request
View AJAX Form Example
function ajax() {
var msg = $(".register").serialize();
$.ajax({
type: "POST",
url: "./mail.php",
data: msg,
success: function(data) {
$('#results').html(data);
console.log('форма отправлена');
},
You can’t perform that action at this time.