]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Refs #2895: Removed footer/links view. Moved report-this link into alternate footer...
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>
Fri, 25 Feb 2011 23:45:22 +0000 (23:45 +0000)
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>
Fri, 25 Feb 2011 23:45:22 +0000 (23:45 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@8481 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/elgglib.php
mod/reportedcontent/start.php
mod/reportedcontent/views/default/reportedcontent/css.php
mod/reportedcontent/views/default/reportedcontent/footer_link.php [deleted file]
views/default/page/elements/footer.php

index 01b5a24e951e8018eecbdcb45adf3bb156191084..3d4c46310a7f7a9949f5d7140f4fad547c078592 100644 (file)
@@ -1828,6 +1828,7 @@ function elgg_init() {
                'href' => 'http://elgg.org',
                'text' => "<img src=\"$powered_url\" alt=\"Powered by Elgg\" />",
                'section' => 'alt',
+               'weight' => 1000,
        ));
        
        // Sets a blacklist of words in the current language.
index 2ef80a7e377cd80ad9158bbe136980f96d41f250..e4b2f585294c32331d7c8288450af575c21b009b 100644 (file)
@@ -21,7 +21,18 @@ function reportedcontent_init() {
 
        // Extend footer with report content link
        if (elgg_is_logged_in()) {
-               elgg_extend_view('footer/links', 'reportedcontent/footer_link');
+               $href = "javascript:elgg.forward('pg/reportedcontent/add'";
+               $href .= "+'?address='+encodeURIComponent(location.href)";
+               $href .= "+'&title='+encodeURIComponent(document.title));";
+               
+               elgg_register_menu_item('footer', array(
+                       'name' => 'report_this',
+                       'href' => $href,
+                       'title' => elgg_echo('reportedcontent:this:tooltip'),
+                       'text' => '<span class="elgg-icon report-this-icon"></span>' . elgg_echo('reportedcontent:this'),
+                       'section' => 'alt',
+                       'weight' => 500,
+               ));
        }
 
        elgg_register_plugin_hook_handler('register', 'menu:user_hover', 'reportedcontent_user_hover_menu');
index ed498f03aa81cf526e8ee008e0fa8573b0c806d2..718777400d15618c9e7512c465b4498c3207cea5 100644 (file)
@@ -9,9 +9,6 @@
 
 ?>
 /* Reported Content */
-.report-this {
-       font-size: 90%;
-}
 .report-this-icon {
        background: url(<?php echo elgg_get_site_url(); ?>mod/reportedcontent/graphics/icon_reportthis.gif) no-repeat left top;
 }
diff --git a/mod/reportedcontent/views/default/reportedcontent/footer_link.php b/mod/reportedcontent/views/default/reportedcontent/footer_link.php
deleted file mode 100644 (file)
index 58a19b3..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-/**
- * Elgg report this link
- *
- * @package ElggReportContent
- */
-
-$title = elgg_echo('reportedcontent:this:tooltip');
-$text  = elgg_echo('reportedcontent:this');
-
-$url = elgg_get_site_url() . 'pg/reportedcontent/add/?address=';
-$href = "javascript:location.href='$url'";
-$href .= "+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)";
-$href = elgg_format_url($href);
-?>
-
-<a class="report-this" href="<?php echo $href; ?>" title="<?php echo $title; ?>">
-       <span class="elgg-icon report-this-icon"></span>
-       <?php echo $text; ?>
-</a>
index 3fba27bc7641ebf374774d311bb667f617cd4d08..3e5f97991d8d7b2270b757bd2bd52bf8286b927f 100644 (file)
@@ -8,5 +8,4 @@
  *
  */
 
-echo elgg_view_menu('footer', array('class' => 'elgg-menu-footer'));
-echo elgg_view('footer/links');
+echo elgg_view_menu('footer', array('class' => 'elgg-menu-footer', 'sort_by' => 'weight'));
\ No newline at end of file