forked from GNUsocial/gnu-social
add event for showing content license in action
This commit is contained in:
parent
21c3e08804
commit
71f519f64a
@ -687,3 +687,9 @@ StartLeaveGroup: when a user is leaving a group
|
|||||||
EndLeaveGroup: when a user has left a group
|
EndLeaveGroup: when a user has left a group
|
||||||
- $group: the group being left
|
- $group: the group being left
|
||||||
- $user: the user leaving
|
- $user: the user leaving
|
||||||
|
|
||||||
|
StartShowContentLicense: Showing the default license for content
|
||||||
|
- $action: the current action
|
||||||
|
|
||||||
|
EndShowContentLicense: Showing the default license for content
|
||||||
|
- $action: the current action
|
||||||
|
@ -791,23 +791,26 @@ class Action extends HTMLOutputter // lawsuit
|
|||||||
*/
|
*/
|
||||||
function showContentLicense()
|
function showContentLicense()
|
||||||
{
|
{
|
||||||
$this->element('dt', array('id' => 'site_content_license'), _('Site content license'));
|
if (Event::handle('StartShowContentLicense', array($this))) {
|
||||||
$this->elementStart('dd', array('id' => 'site_content_license_cc'));
|
$this->element('dt', array('id' => 'site_content_license'), _('Site content license'));
|
||||||
$this->elementStart('p');
|
$this->elementStart('dd', array('id' => 'site_content_license_cc'));
|
||||||
$this->element('img', array('id' => 'license_cc',
|
$this->elementStart('p');
|
||||||
'src' => common_config('license', 'image'),
|
$this->element('img', array('id' => 'license_cc',
|
||||||
'alt' => common_config('license', 'title'),
|
'src' => common_config('license', 'image'),
|
||||||
'width' => '80',
|
'alt' => common_config('license', 'title'),
|
||||||
'height' => '15'));
|
'width' => '80',
|
||||||
//TODO: This is dirty: i18n
|
'height' => '15'));
|
||||||
$this->text(_('All '.common_config('site', 'name').' content and data are available under the '));
|
//TODO: This is dirty: i18n
|
||||||
$this->element('a', array('class' => 'license',
|
$this->text(_('All '.common_config('site', 'name').' content and data are available under the '));
|
||||||
'rel' => 'external license',
|
$this->element('a', array('class' => 'license',
|
||||||
'href' => common_config('license', 'url')),
|
'rel' => 'external license',
|
||||||
common_config('license', 'title'));
|
'href' => common_config('license', 'url')),
|
||||||
$this->text(_('license.'));
|
common_config('license', 'title'));
|
||||||
$this->elementEnd('p');
|
$this->text(_('license.'));
|
||||||
$this->elementEnd('dd');
|
$this->elementEnd('p');
|
||||||
|
$this->elementEnd('dd');
|
||||||
|
Event::handle('EndShowContentLicense', array($this));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user