mirror of
https://github.com/friendica/friendica
synced 2024-11-18 06:23:41 +00:00
Add 'jot_tool' hook, plugins can add tool icons.
This commit is contained in:
parent
1f95ba5c34
commit
4a2c0fcc36
8 changed files with 54 additions and 5 deletions
|
@ -156,7 +156,8 @@ Current hooks:
|
|||
'page_end' - called after HTML content functions have completed
|
||||
$b is (string) HTML of content div
|
||||
|
||||
|
||||
'jot_plugin' - add tools to jot toolbar
|
||||
$b is (string) HTML for tool icon
|
||||
|
||||
|
||||
*** = subject to change
|
||||
|
|
|
@ -79,6 +79,9 @@ function network_content(&$a, $update = 0) {
|
|||
|
||||
$celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false);
|
||||
|
||||
$jotplugins = "";
|
||||
call_hooks('jot_tool', $jotplugins);
|
||||
|
||||
$o .= replace_macros($tpl,array(
|
||||
'$return_path' => $a->cmd,
|
||||
'$baseurl' => $a->get_baseurl(),
|
||||
|
@ -87,7 +90,8 @@ function network_content(&$a, $update = 0) {
|
|||
'$lockstate' => $lockstate,
|
||||
'$acl' => populate_acl((($group) ? $group_acl : $a->user), $celeb),
|
||||
'$bang' => (($group) ? '!' : ''),
|
||||
'$profile_uid' => $_SESSION['uid']
|
||||
'$profile_uid' => $_SESSION['uid'],
|
||||
'$jotplugins' => $jotplugins
|
||||
));
|
||||
|
||||
|
||||
|
|
|
@ -134,6 +134,10 @@ function profile_content(&$a, $update = 0) {
|
|||
$lockstate = 'lock';
|
||||
else
|
||||
$lockstate = 'unlock';
|
||||
|
||||
$jotplugins = "";
|
||||
call_hooks('jot_tool', $jotplugins);
|
||||
|
||||
$o .= replace_macros($tpl,array(
|
||||
'$baseurl' => $a->get_baseurl(),
|
||||
'$defloc' => (($is_owner) ? $a->user['default-location'] : ''),
|
||||
|
@ -142,7 +146,8 @@ function profile_content(&$a, $update = 0) {
|
|||
'$lockstate' => $lockstate,
|
||||
'$bang' => '',
|
||||
'$acl' => (($is_owner) ? populate_acl($a->user, $celeb) : ''),
|
||||
'$profile_uid' => $a->profile['profile_uid']
|
||||
'$profile_uid' => $a->profile['profile_uid'],
|
||||
'$jotplugins' => $jotplugins
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
@ -15,6 +15,11 @@
|
|||
|
||||
<textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" ></textarea>
|
||||
|
||||
<div id="profile-jot-plugin-wrapper" >
|
||||
$jotplugins
|
||||
</div>
|
||||
<div id="profile-jot-plugin-end"></div>
|
||||
|
||||
<div id="profile-jot-submit-wrapper" >
|
||||
<input type="submit" id="profile-jot-submit" name="submit" value="Share" />
|
||||
<div id="profile-upload-wrapper" style="display: $visitor;" >
|
||||
|
|
|
@ -15,6 +15,12 @@
|
|||
|
||||
<textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" ></textarea>
|
||||
|
||||
<div id="profile-jot-plugin-wrapper" >
|
||||
$jotplugins
|
||||
</div>
|
||||
<div id="profile-jot-plugin-end"></div>
|
||||
|
||||
|
||||
<div id="profile-jot-submit-wrapper" >
|
||||
<input type="submit" id="profile-jot-submit" name="submit" value="Share" />
|
||||
<div id="profile-upload-wrapper" style="display: $visitor;" >
|
||||
|
|
|
@ -15,6 +15,11 @@
|
|||
|
||||
<textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" ></textarea>
|
||||
|
||||
<div id="profile-jot-plugin-wrapper" >
|
||||
$jotplugins
|
||||
</div>
|
||||
<div id="profile-jot-plugin-end"></div>
|
||||
|
||||
<div id="profile-jot-submit-wrapper" >
|
||||
<input type="submit" id="profile-jot-submit" name="submit" value="Condividi" />
|
||||
<div id="profile-upload-wrapper" style="display: $visitor;" >
|
||||
|
@ -40,6 +45,8 @@
|
|||
<div id="profile-jot-acl-wrapper" style="display: none;" >$acl</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="profile-jot-end"></div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
@ -1034,7 +1034,7 @@ input#dfrn-url {
|
|||
margin-left: 110px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
#profile-jot-plugin-wrapper,
|
||||
#profile-jot-submit-wrapper {
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
@ -1078,7 +1078,9 @@ input#dfrn-url {
|
|||
#profile-jot-perms-end {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
#profile-jot-plugin-end {
|
||||
clear:both;
|
||||
}
|
||||
#profile-jot-end {
|
||||
clear: both;
|
||||
margin-bottom: 30px;
|
||||
|
@ -2000,3 +2002,10 @@ a.mail-list-link {
|
|||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.tool-wrapper {
|
||||
float: left;
|
||||
margin-left: 5px;
|
||||
}
|
||||
.tool-link {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
|
|
@ -907,6 +907,7 @@ input#dfrn-url {
|
|||
margin: 10px 0px 10px 110px;
|
||||
}
|
||||
|
||||
#profile-jot-plugin-wrapper,
|
||||
#profile-jot-submit-wrapper {
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
@ -952,6 +953,9 @@ input#dfrn-url {
|
|||
height: 30px;
|
||||
}
|
||||
|
||||
#profile-jot-plugin-end{
|
||||
clear: both;
|
||||
}
|
||||
#profile-jot-end {
|
||||
/*clear: both;*/
|
||||
margin-bottom: 30px;
|
||||
|
@ -1885,3 +1889,11 @@ a.mail-list-link {
|
|||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
|
||||
.tool-wrapper {
|
||||
float: left;
|
||||
margin-left: 5px;
|
||||
}
|
||||
.tool-link {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue