]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
removing reported content dependency from core code...again
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 22 May 2010 16:20:15 +0000 (16:20 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 22 May 2010 16:20:15 +0000 (16:20 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@6137 36083f99-b078-4883-b0ff-0f9b5a30f544

mod/reportedcontent/start.php
mod/reportedcontent/views/default/reportedcontent/footer_link.php [new file with mode: 0644]
views/default/page_elements/elgg_footer.php

index e9b86230a344b5a4899cb793e9dbe0d3f511ee42..ad75f06f01af643b042dde543048d3778b2553de 100644 (file)
@@ -17,14 +17,15 @@ function reportedcontent_init() {
        global $CONFIG;
        
        // Register a page handler, so we can have nice URLs
-       register_page_handler('reportedcontent','reportedcontent_page_handler');
+       register_page_handler('reportedcontent', 'reportedcontent_page_handler');
        
        // Extend CSS
-       elgg_extend_view('css','reportedcontent/css');
+       elgg_extend_view('css', 'reportedcontent/css');
                        
-       // Extend context menu and owner_block with report content link
+       // Extend context menu and footer with report content link
        if (isloggedin()) {
-           elgg_extend_view('profile/menu/links','reportedcontent/user_report');
+           elgg_extend_view('profile/menu/links', 'reportedcontent/user_report');
+               elgg_extend_view('footer/links', 'reportedcontent/footer_link');
        }
 }
 
diff --git a/mod/reportedcontent/views/default/reportedcontent/footer_link.php b/mod/reportedcontent/views/default/reportedcontent/footer_link.php
new file mode 100644 (file)
index 0000000..729aef2
--- /dev/null
@@ -0,0 +1,15 @@
+<?php
+/**
+ * Elgg report this link
+ *
+ * @package ElggReportContent
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider <info@elgg.com>
+ * @copyright Curverider Ltd 2008-2010
+ * @link http://elgg.org/
+ */
+?>
+
+<div id="report_this">
+       <a href="javascript:location.href='<?php echo $vars['url']; ?>mod/reportedcontent/add.php?address='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)"><?php echo elgg_echo('reportedcontent:report'); ?></a>
+</div>
index fdce8218f83d4a1ae4725c19a45b013ea3a36e61..0f632d97d4b442cda69a1e3a73b7ae4aec06a6ca 100644 (file)
 ?>
 <div id="elgg_footer">
        <div id="elgg_footer_contents" class="clearfloat">
-               <?php
-                       if(is_plugin_enabled('reportedcontent') && isloggedin()){
-               ?>
-                       <div id="report_this">
-                               <a href="javascript:location.href='<?php echo $vars['url']; ?>mod/reportedcontent/add.php?address='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)">Report this</a>                             
-                       </div>
-               <?php
-                       }
-               ?>
                <?php echo elgg_view('footer/links'); ?>
                <a href="http://www.elgg.org" class="powered_by_elgg_badge">
                        <img src="<?php echo $vars['url']; ?>_graphics/powered_by_elgg_badge_drk_bckgnd.gif" alt="Powered by Elgg" />