Friendica Communications Platform (please note that this is a clone of the repository at github, issues are handled there) https://friendi.ca
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 
 
 

106 Zeilen
2.5 KiB

  1. <?php
  2. function follow_widget() {
  3. return replace_macros(get_markup_template('follow.tpl'),array(
  4. '$connect' => t('Add New Contact'),
  5. '$desc' => t('Enter address or web location'),
  6. '$hint' => t('Example: bob@example.com, http://example.com/barbara'),
  7. '$follow' => t('Connect')
  8. ));
  9. }
  10. function findpeople_widget() {
  11. $a = get_app();
  12. if(get_config('system','invitation_only')) {
  13. $x = get_pconfig(local_user(),'system','invites_remaining');
  14. if($x || is_site_admin()) {
  15. $a->page['aside'] .= '<div class="side-link" id="side-invite-remain">'
  16. . sprintf( tt('%d invitation available','%d invitations available',$x), $x)
  17. . '</div>' . $inv;
  18. }
  19. }
  20. return replace_macros(get_markup_template('peoplefind.tpl'),array(
  21. '$findpeople' => t('Find People'),
  22. '$desc' => t('Enter name or interest'),
  23. '$label' => t('Connect/Follow'),
  24. '$hint' => t('Examples: Robert Morgenstein, Fishing'),
  25. '$findthem' => t('Find'),
  26. '$suggest' => t('Friend Suggestions'),
  27. '$similar' => t('Similar Interests'),
  28. '$inv' => t('Invite Friends')
  29. ));
  30. }
  31. function networks_widget($baseurl,$selected = '') {
  32. $a = get_app();
  33. if(! local_user())
  34. return '';
  35. $r = q("select distinct(network) from contact where uid = %d and self = 0",
  36. intval(local_user())
  37. );
  38. $nets = array();
  39. if(count($r)) {
  40. require_once('include/contact_selectors.php');
  41. foreach($r as $rr) {
  42. if($rr['network'])
  43. $nets[] = array('ref' => $rr['network'], 'name' => network_to_name($rr['network']), 'selected' => (($selected == $rr['network']) ? 'selected' : '' ));
  44. }
  45. }
  46. if(count($nets) < 2)
  47. return '';
  48. return replace_macros(get_markup_template('nets.tpl'),array(
  49. '$title' => t('Networks'),
  50. '$desc' => '',
  51. '$sel_all' => (($selected == '') ? 'selected' : ''),
  52. '$all' => t('All Networks'),
  53. '$nets' => $nets,
  54. '$base' => $baseurl,
  55. ));
  56. }
  57. function fileas_widget($baseurl,$selected = '') {
  58. $a = get_app();
  59. if(! local_user())
  60. return '';
  61. $saved = get_pconfig(local_user(),'system','filetags');
  62. if(! strlen($saved))
  63. return;
  64. $matches = false;
  65. $terms = array();
  66. $cnt = preg_match_all('/\[(.*?)\]/',$saved,$matches,PREG_SET_ORDER);
  67. if($cnt) {
  68. foreach($matches as $mtch) {
  69. $unescaped = file_tag_decode($mtch[1]);
  70. $terms[] = array('name' => $unescaped,'selected' => (($selected == $unescaped) ? 'selected' : ''));
  71. }
  72. }
  73. return replace_macros(get_markup_template('fileas_widget.tpl'),array(
  74. '$title' => t('Saved Folders'),
  75. '$desc' => '',
  76. '$sel_all' => (($selected == '') ? 'selected' : ''),
  77. '$all' => t('Everything'),
  78. '$terms' => $terms,
  79. '$base' => $baseurl,
  80. ));
  81. }