Skip to content

Instantly share code, notes, and snippets.

@dimkalinux
dimkalinux / gist:728043
Created December 4, 2010 08:46
manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE extension SYSTEM "ext-1.0.dtd">
<!--
/**
*
* This extension allows you to load the statistics only on click, to reduce the number of queries on the index page using Jquery.
* Cette extension permet de charger les statistiques uniquement lors d'un clic, afin de réduire le nombre de requètes sur la page index en utilisant jquery.
*
* @copyright Copyright (C) 2008 PunBB
@dimkalinux
dimkalinux / manifest.xml
Created June 18, 2011 07:45
Extension template for PunBB 1.3
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE extension SYSTEM "ext-1.0.dtd">
<extension engine="1.0">
<id></id>
<title></title>
<description></description>
<author></author>
<version>0.1</version>
@dimkalinux
dimkalinux / example.php
Created July 20, 2011 08:10
Include inline CSS in PunBB 1.4 extensions
<?php
// Just include inline CSS in page
$forum_loader->add_css('.fancy-addthis-post { display: none; }', array('type' => 'inline'));
?>
@dimkalinux
dimkalinux / manifest.xml
Created July 20, 2011 08:03
Include CSS in PunBB 1.4 extensions
<hook id="hd_head"><![CDATA[
if ($forum_user['style'] != 'Oxygen' && file_exists($ext_info['path'].'/style/'.$forum_user['style'].'/style.css'))
$forum_loader->add_css($ext_info['url'].'/style/'.$forum_user['style'].'/style.css', array('type' => 'url'));
else
$forum_loader->add_css($ext_info['url'].'/style/Oxygen/style.css', array('type' => 'url'));
]]></hook>
@dimkalinux
dimkalinux / example.php
Created July 20, 2011 08:12
Include inline CSS for disabled Javascript in PunBB 1.4 extensions
<?php
// This CSS code is executed only when Javascript disabled in browser
// Usefull for hidding elements that depends on Javascript
$forum_loader->add_css('.fancy-addthis-post { display: none; }', array('type' => 'inline', 'noscript' => true));
?>
@dimkalinux
dimkalinux / manifest.xml
Created July 20, 2011 08:06
Include JS in PunBB 1.4 extensions
<hook id="ft_js_include"><![CDATA[
$forum_loader->add_js($ext_info['url'].'/js/scripts.js');
]]></hook>
@dimkalinux
dimkalinux / flash_messenger.php
Created August 15, 2011 13:09
Updated flash with workaround for register_globals = 1
<?php
/**
* Loads the flash messenger class.
*
* @copyright (C) 2008-2011 PunBB, partially based on code (C) 2008-2009 FluxBB.org
* @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
* @package PunBB
*/
@dimkalinux
dimkalinux / template_changes_1.3.6-1.4.patch
Created November 21, 2011 18:04
PunBB template changes between 1.3.6 and 1.4
diff --git a/include/template/admin.tpl b/include/template/admin.tpl
index 3536d56..bb42452 100644
--- a/include/template/admin.tpl
+++ b/include/template/admin.tpl
@@ -1,12 +1,14 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml" <!-- forum_local -->>
+<!DOCTYPE html>
+<!--[if lt IE 7 ]> <html class="oldie ie6" <!-- forum_local -->> <![endif]-->
@dimkalinux
dimkalinux / .hgrc
Created February 5, 2012 18:37
My .hgrc
[extensions]
color =
graphlog =
pager =
bookmarks =
[color]
status.modified = magenta bold
status.added = green bold
status.removed = red bold
foreach ($book->getIsbns() as $isbn) {
doctrine()->remove($isbn);
}
$book->getIsbns()->clear();
doctrine()->flush();