Skip to content

Instantly share code, notes, and snippets.

@josesayago
josesayago / router.php
Created June 23, 2013 15:26
GlotPress router gp-includes/router.php, customized to include route to the registration page.
<?php
class GP_Router {
var $api_prefix = 'api';
function __construct( $urls = null ) {
if ( is_null( $urls ) )
$this->urls = $this->default_routes();
else
@josesayago
josesayago / login.php
Last active June 1, 2017 12:54
GlotPress custom login page gp-templates/login.php, includes link to registration page.
<?php
gp_title( sprintf( __('%s &lt; GlotPress'), __('Login') ) );
gp_breadcrumb( array(
__('Login'),
) );
gp_tmpl_header();
?>
<h2><?php _e('Login'); ?></h2>
<?php do_action( 'before_login_form' ); ?>
<form action="<?php echo gp_url_ssl( gp_url_current() ); ?>" method="post" class="login-form">
@josesayago
josesayago / nlp-alignleft.css
Last active December 19, 2015 02:49
Network Latest Posts v3.5.4 CSS Stylesheet. Align thumbnails to the left.
/**
* Network Latest Posts v3.5.4
*
* Align Thumbnails to the Left
*
* Copyright 2012 L'Elite
* Licensed under the GPL v2.0
* http://www.gnu.org/licenses/gpl-2.0.html
*
* Great and ugly things aren't as good
@josesayago
josesayago / nlp-placeholders.php
Last active December 19, 2015 18:38
Network Latest Posts placeholders blocks, change URL addresses at will.
<?php
/**
* This block is found in lines: 630 to 654
* and 848 to 872 from network-latest-posts.php file.
*/
// Put a placeholder with the post title
switch($thumbnail_filler) {
// Placeholder provided by Placehold.it
case 'placeholder':
echo "<a href='".$all_permalinks[$field->guid]."'><img src='http://placehold.it/".$thumbnail_wh."&text=".$field->post_title."' alt='".$field->post_title."' title='".$field->post_title."' /></a>";
@josesayago
josesayago / nlp-defaultStyle.css
Created July 17, 2013 02:17
Network Latest Posts default stylesheet
/**
* Network Latest Posts v3.0
*
* Copyright 2012 L'Elite
* Licensed under the GPL v2.0
* http://www.gnu.org/licenses/gpl-2.0.html
*
* Great and ugly things aren't as good
* as great and beautiful things ;)
*/
@josesayago
josesayago / nlp-wraptext.css
Last active December 19, 2015 21:08
Network Latest Posts custom stylesheet, this one float thumbnails to the right, a screenshot example can be found here: http://i.imgur.com/ybpcR2u.png
/**
* Network Latest Posts v3.0
*
* Copyright 2012 L'Elite
* Licensed under the GPL v2.0
* http://www.gnu.org/licenses/gpl-2.0.html
*
* Great and ugly things aren't as good
* as great and beautiful things ;)
*/
@josesayago
josesayago / single-latest-posts-trunctitles.php
Last active December 20, 2015 00:19
Network Latest Posts tweaked to allow users to truncate post titles' length.
<?php
/*
Plugin Name: Network Latest Posts
Plugin URI: http://en.8elite.com/network-latest-posts
Description: Display the latest posts from the blogs in your network using it as a function, shortcode or widget.
Version: 3.5.4
Author: L'Elite
Author URI: http://laelite.info/
*/
/* Copyright 2012 - 2013 L'Elite (email : [email protected])
@josesayago
josesayago / nlposts-ulist-nodes.html
Created July 19, 2013 17:28
Network Latest Posts Unordered Lists HTML Nodes & CSS Classes.
<div class="nlposts-container nlposts-ulist-container">
<ul class="nlposts-wrapper nlposts-ulist nav nav-tabs nav-stacked">
<li class="nlposts-ulist-litem">
<ul class="nlposts-ulist-thumbnail thumbnails">
<li class="nlposts-ulist-thumbnail-litem span3">
<div class="thumbnail">
<a href="#"><img src="http://placehold.it/135x135" alt="" title=""></a>
<div class="nlposts-caption">
<h3 class="nlposts-ulist-title">
<a href="#">Post Title</a>
@josesayago
josesayago / nlposts-block-nodes.html
Created July 19, 2013 17:33
Network Latest Posts Block HTML Nodes & CSS Classes.
<div class="nlposts-container nlposts-block-container">
<div class="nlposts-wrapper nlposts-block content">
<div class="nlposts-block-item">
<ul class="nlposts-block-thumbnail thumbnails">
<li class="nlposts-block-thumbnail-litem span3">
<a href="#">
<img src="http://placehold.it/135x135" alt="" title="">
</a>
<div class="nlposts-caption">
<h3 class="nlposts-block-title">
@josesayago
josesayago / slp-horizontalBlocks.css
Last active December 20, 2015 02:48
Single Latest Posts Lite CSS stylesheet, displays blocks horizontally.
/**
* Single Latest Posts v1.4.1
*
* Copyright 2007 - 2013 L'Elite
* Licensed under the GPL v2.0
* http://www.gnu.org/licenses/gpl-2.0.html
*
* Great and ugly things aren't as good
* as great and beautiful things ;)
*/