]> git.mxchange.org Git - friendica-addons.git/blobdiff - page/page.php
Links now are directed to target="_blank"
[friendica-addons.git] / page / page.php
index 6d0044e06a18e061d19d563e609d7c68bd716c35..e1ca90703fd3374f6eee689c696c10bb2814a2ad 100755 (executable)
@@ -1,7 +1,7 @@
 <?php
 /**
  * Name: Page
- * Description: Shows list of subscribed community pages/forums on network sidebar
+ * Description: This addon is now deprecated.  Administrators should switch to forumlist instead.  Developers should also add any functionality to forumlist instead of here.
  * Version: 1.0
  * Author: Mike Macgirvin <mike@macgirvin.com>
  * based on pages plugin by
@@ -38,6 +38,7 @@ function page_getpage($uid,$showhidden = true,$randomise = false) {
 
        $contacts = q("SELECT `id`, `url`, `name`, `micro` FROM `contact`
                        WHERE `network`= 'dfrn' AND `forum` = 1 AND `uid` = %d
+                       and blocked = 0 and hidden = 0 and pending = 0 and archive = 0
                        $order ",
                        intval($uid)
        );
@@ -68,7 +69,7 @@ function page_page_end($a,&$b) {
        $more = false;
 
        foreach($contacts as $contact) {
-               $page .= '<li style="list-style-type: none;" class="tool"><img height="20" width="20" src="' . $contact['micro'] .'" alt="' . $contact['url'] . '" /> <a href="'.$a->get_baseurl().'/redir/'.$contact["id"].'" title="' . $contact['url'] . '" class="label sparkle" target="external-link">'.
+               $page .= '<li style="list-style-type: none;" class="tool"><img height="20" width="20" src="' . $contact['micro'] .'" alt="' . $contact['url'] . '" /> <a href="'.$a->get_baseurl().'/redir/'.$contact["id"].'" title="' . $contact['url'] . '" class="label sparkle" target="_blank">'.
                                $contact["name"]."</a></li>";
                $total_shown ++;
                if($total_shown == 6) {
@@ -102,7 +103,7 @@ function page_network_mod_init($a,$b) {
        $more = false;
 
        foreach($contacts as $contact) {
-               $page .= '<li style="list-style-type: none;" class="tool"><img height="20" width="20" src="' . $contact['micro'] .'" alt="' . $contact['url'] . '" /> <a href="'.$a->get_baseurl().'/redir/'.$contact["id"].'" title="' . $contact['url'] . '" class="label sparkle" target="external-link">'.
+               $page .= '<li style="list-style-type: none;" class="tool"><img height="20" width="20" src="' . $contact['micro'] .'" alt="' . $contact['url'] . '" /> <a href="'.$a->get_baseurl().'/redir/'.$contact["id"].'" title="' . $contact['url'] . '" class="label sparkle" target="_blank">'.
                                $contact["name"]."</a></li>";
                $total_shown ++;
                if(($show_total) && ($total_shown == $show_total)) {
@@ -129,7 +130,9 @@ function page_profile_advanced($a,&$b) {
                        <div class="title">'.t("Forums:").'</div>
                        <div id="profile-page-list">';
 
-       $show_total = 6;
+       // place holder in case somebody wants configurability
+       $show_total = 9999;
+
        $randomise = true;
 
        $contacts = page_getpage($a->user['uid'],false,$randomise);
@@ -205,7 +208,7 @@ function page_plugin_settings(&$a,&$s) {
 
        /* provide a submit button */
 
-       $s .= '<div class="settings-submit-wrapper" ><input type="submit" name="page-settings-submit" class="settings-submit" value="' . t('Submit') . '" /></div></div>';
+       $s .= '<div class="settings-submit-wrapper" ><input type="submit" name="page-settings-submit" class="settings-submit" value="' . t('Save Settings') . '" /></div></div>';
 
 }