* License: GPLv2
 * Description: Extra site-specific bits
 * Documentation:
 *   Probably not much use to other sites, but it gives
 *   a few examples of how a shimmie-based site can be
 *   integrated with other systems
 */
if ( // kill these glitched requests immediately
    strpos(@$_SERVER["REQUEST_URI"], "/http") !== false
    && strpos(@$_SERVER["REQUEST_URI"], "paheal.net") !== false
) {
    die("No");
}
class Rule34 extends Extension
{
    protected $db_support = [DatabaseDriver::PGSQL];  # Only PG has the NOTIFY pubsub system
    public function onImageDeletion(ImageDeletionEvent $event)
    {
        global $database;
        $database->execute("NOTIFY shm_image_bans, '{$event->image->hash}';");
    }
    public function onImageInfoBoxBuilding(ImageInfoBoxBuildingEvent $event)
    {
        global $config;
        $image_link = $config->get_string('image_ilink');
        $url0 = $event->image->parse_link_template($image_link, "url_escape", 0);
        $url1 = $event->image->parse_link_template($image_link, "url_escape", 1);
        $html = "
Links Image Only  (Backup Server )