Browse Source

Add 'jot_tool' hook, plugins can add tool icons.

pull/1/head
Fabio Comuni 11 years ago
parent
commit
4a2c0fcc36
8 changed files with 54 additions and 5 deletions
  1. +2
    -1
      addon/README
  2. +5
    -1
      mod/network.php
  3. +6
    -1
      mod/profile.php
  4. +5
    -0
      view/en/jot.tpl
  5. +6
    -0
      view/fr/jot.tpl
  6. +7
    -0
      view/it/jot.tpl
  7. +11
    -2
      view/theme/default/style.css
  8. +12
    -0
      view/theme/duepuntozero/style.css

+ 2
- 1
addon/README View File

@ -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


+ 5
- 1
mod/network.php View File

@ -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
));


+ 6
- 1
mod/profile.php View File

@ -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
));
}


+ 5
- 0
view/en/jot.tpl View File

@ -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;" >


+ 6
- 0
view/fr/jot.tpl View File

@ -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;" >


+ 7
- 0
view/it/jot.tpl View File

@ -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>

+ 11
- 2
view/theme/default/style.css View File

@ -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;
}

+ 12
- 0
view/theme/duepuntozero/style.css View File

@ -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…
Cancel
Save