Skip to content

Instantly share code, notes, and snippets.

function ign_filter_downloads() //callback routine called by file_download
{
global $id, $file_error, $ign_user, $pretext, $s;
if(empty($id)) {
//no $id means we need to reparse the URL...
extract($pretext);
if($prefs['permlink_mode']=='messy') {
$id = gps('id'); //get $id from GET
} else { //we need to parse the uri
# Name : mdp_calendar
# Version : 1.1.1dev
# Description : Creates a monthly calendar view of posted articles.
# Author : Marshall Potter
# URL : http://www.outoverthevoid.com/
# Type : Public only
# ......................................................................
# Revision : e4af068c349473cf406fc43c155ef02bcd973c69
# Branch : dev
# ......................................................................
# Name : mem_form
# Version : 0.4.1.2dev
# Description : A library plugin that provides support for html forms.
# Author : Michael Manfre
# URL : http://manfre.net/
# Type : Library
# ......................................................................
# Revision : 5c2087bb263c5f11967fbc2783386389d1560714
# Branch : dev
# ......................................................................
@netcarver
netcarver / sed_plugin_help_viewer v0.4.3
Created September 6, 2008 13:18
Quickly check your Textpattern plugin's help section from the plugin cache dirctory.
# Name : sed_plugin_help_viewer
# Version : 0.4.3
# Description : Quickly check your plugin's help section from the plugin cache dirctory.
# Author : Netcarver
# URL : http://txp-plugins.netcarving.com
# Type : Admin + Public
# ......................................................................
# Revision : bf402ab92c8fc2c59495e7bd143f86f4d590ddc5
# Branch : master
# ......................................................................
function ign_getDomain() {
$debug = true;
$res = $_SERVER['HTTP_HOST'];
if (false === ip2long($res)) { # This is a normal domain string
$d = explode('.', $_SERVER['HTTP_HOST']);
// $d_copy keeps code simple
$d_copy = $d;
// Make sure the last 2 values look like TLDs (no more than 3 characters). Not bulletproof (.info? .mobi?), but simple.
if ( (count($d) > 2) && (strlen(array_pop($d_copy)) < 4) && (strlen(array_pop($d_copy)) < 4) ) {
function txp_validate($user,$password)
{
include_once txpath.'/lib/txplib_admin.php';
$safe_user = doSlash($user);
$pass_hash = doSlash(generate_pwd_hash(doSlash($password)));
$name = safe_field("name", "txp_users", "name = '$safe_user' and pass = '".$pass_hash."' and privs > 0");
if ($name !== FALSE)
{
class sed_lib_mlp
{
var $strings;
var $owner;
var $prefix;
var $lang;
var $event;
function sed_lib_mlp( $plugin_name , $strarray , $prefix='' , $ev='common' , $lng='en-gb' )
{
# Name : ob1_pagination
# Version : 2.5mlp.1
# Description : Creates a Google inspired pagination.
# Author : Henrik Jönsson
# URL : http://rise.lewander.com/
# Type : Public only
# ......................................................................
# Revision : ec5c0a740067c05735d79a1619de2c83c49531bb
# Branch : master
# ......................................................................
# Name : sed_section_fields
# Version : 0.5.20exp
# Description : Provides admin interface field customisation on a per-section basis.
# Author : Netcarver
# URL : http://txp-plugins.netcarving.com
# Type : Admin + Public
# ......................................................................
# Revision : 4076ec4e9f4e40e35b399ddbc2ab861bc32ec5d0
# Branch : exp
# ......................................................................
@netcarver
netcarver / HTML5.textplug.php
Created January 23, 2011 00:48
An experimental textplug to give the feature-block-plugins branch optional full HTML5 compatibility.
<?php
/**
* HTML5 textplug for textile
* ==========================
*
* Makes use of the default block handler implementation. Override by editing this file if you so wish.
*
* Usage
* -----