gallery.php 830 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11
<?php

/**
 * Name: Gallery
 * Description: Image Gallery
 * Version: 0.1
 * MinVersion: 3.4
 * Author: Mario
 * Maintainer: Mario
 */

12 13 14 15
use App;
use Zotlabs\Lib\Apps;
use Zotlabs\Extend\Hook;

16 17 18
require_once('addon/gallery/Mod_Gallery.php');

function gallery_load() {
19
	Hook::register('channel_apps', 'addon/gallery/gallery.php', 'gallery_channel_apps');
20 21 22
}

function gallery_unload() {
23
	Hook::unregister('channel_apps', 'addon/gallery/gallery.php', 'gallery_channel_apps');
24 25 26
}

function gallery_channel_apps(&$b) {
27 28 29 30 31 32 33 34 35 36
	if(Apps::system_app_installed(App::$profile_uid, 'Gallery')) {
		$b['tabs'][] = [
			'label' => t('Gallery'),
			'url'   => z_root() . '/gallery/' . $b['nickname'],
			'sel'   => ((argv(0) == 'gallery') ? 'active' : ''),
			'title' => t('Photo Gallery'),
			'id'    => 'gallery-tab',
			'icon'  => 'image'
		];
	}
37 38
}