Skip to content

Instantly share code, notes, and snippets.

View gist:728043
<?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 Jun 18, 2011
Extension template for PunBB 1.3
View manifest.xml
<?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 Jul 20, 2011
Include inline CSS in PunBB 1.4 extensions
View example.php
<?php
// Just include inline CSS in page
$forum_loader->add_css('.fancy-addthis-post { display: none; }', array('type' => 'inline'));
?>
@dimkalinux
dimkalinux / manifest.xml
Created Jul 20, 2011
Include CSS in PunBB 1.4 extensions
View manifest.xml
<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 Jul 20, 2011
Include inline CSS for disabled Javascript in PunBB 1.4 extensions
View example.php
<?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 Jul 20, 2011
Include JS in PunBB 1.4 extensions
View manifest.xml
<hook id="ft_js_include"><![CDATA[
$forum_loader->add_js($ext_info['url'].'/js/scripts.js');
]]></hook>
@dimkalinux
dimkalinux / flash_messenger.php
Created Aug 15, 2011
Updated flash with workaround for register_globals = 1
View flash_messenger.php
<?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 Nov 21, 2011
PunBB template changes between 1.3.6 and 1.4
View template_changes_1.3.6-1.4.patch
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]-->
View .hgrc
[extensions]
color =
graphlog =
pager =
bookmarks =
[color]
status.modified = magenta bold
status.added = green bold
status.removed = red bold
View gist:3618359
foreach ($book->getIsbns() as $isbn) {
doctrine()->remove($isbn);
}
$book->getIsbns()->clear();
doctrine()->flush();