logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

SF.net SVN: squirrelmail: [12673] branches/SM-1_4-STABLE/squirrelmail/ plug: msg#00018

Subject: SF.net SVN: squirrelmail: [12673] branches/SM-1_4-STABLE/squirrelmail/ plugins/demo
Revision: 12673
          
http://squirrelmail.svn.sourceforge.net/squirrelmail/?rev=12673&view=rev
Author:   pdontthink
Date:     2007-09-05 12:06:15 -0700 (Wed, 05 Sep 2007)

Log Message:
-----------
Add options block demo

Modified Paths:
--------------
    branches/SM-1_4-STABLE/squirrelmail/plugins/demo/functions.php
    branches/SM-1_4-STABLE/squirrelmail/plugins/demo/setup.php

Modified: branches/SM-1_4-STABLE/squirrelmail/plugins/demo/functions.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/plugins/demo/functions.php      
2007-09-05 16:13:18 UTC (rev 12672)
+++ branches/SM-1_4-STABLE/squirrelmail/plugins/demo/functions.php      
2007-09-05 19:06:15 UTC (rev 12673)
@@ -20,11 +20,35 @@
   */
 function demo_menuline_do()
 {
-    sq_change_text_domain('demo');
-    displayInternalLink('plugins/demo/demo.php', _("Demo"), '');
-    echo "  \n";
-    sq_change_text_domain('squirrelmail');
+   sq_change_text_domain('demo');
+   displayInternalLink('plugins/demo/demo.php', _("Demo"), '');
+   echo "  \n";
+   sq_change_text_domain('squirrelmail');
 }
 
 
 
+/**
+  * Inserts an option block in the main SM options page
+  *
+  */
+function demo_option_link_do()
+{
+
+   global $optpage_blocks;
+
+   sq_change_text_domain('demo');
+
+   $optpage_blocks[] = array(
+      'name' => _("Demo"),
+      'url' => sqm_baseuri() . 'plugins/demo/demo.php',
+      'desc' => _("This is where you would describe what your plugin does."),
+      'js' => FALSE
+   );
+
+   sq_change_text_domain('squirrelmail');
+
+}
+
+
+

Modified: branches/SM-1_4-STABLE/squirrelmail/plugins/demo/setup.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/plugins/demo/setup.php  2007-09-05 
16:13:18 UTC (rev 12672)
+++ branches/SM-1_4-STABLE/squirrelmail/plugins/demo/setup.php  2007-09-05 
19:06:15 UTC (rev 12673)
@@ -19,27 +19,33 @@
   */
 function squirrelmail_plugin_init_demo() 
 {
+//FIXME: put *ALL* SM hooks in here... and put them in the right order
+//FIXME: many hooks have examples in the original demo plugin in 
trunk/plugins/demo
 
    global $squirrelmail_plugin_hooks;
 
+//FIXME: this hook not yet implemented below 
    $squirrelmail_plugin_hooks['login_cookie']['demo']
       = 'demo_login_cookie';
 
+//FIXME: this hook not yet implemented below 
    $squirrelmail_plugin_hooks['login_top']['demo']
       = 'demo_login_top';
 
+//FIXME: this hook not yet implemented below 
    $squirrelmail_plugin_hooks['login_form']['demo']
       = 'demo_login_form';
 
+//FIXME: this hook not yet implemented below 
    $squirrelmail_plugin_hooks['login_bottom']['demo']
       = 'demo_login_bottom';
 
    $squirrelmail_plugin_hooks['menuline']['demo']
       = 'demo_menuline';
 
-//FIXME: put *ALL* SM hooks in here... and put menuline in right order
-//FIXME: not all of the above hooks are yet implemented below
-//FIXME: many hooks have examples in the original demo plugin in 
trunk/plugins/demo
+   $squirrelmail_plugin_hooks['optpage_register_block']['demo']
+      = 'demo_option_link';
+
 }
 
 
@@ -92,3 +98,17 @@
 
 
 
+/**
+  * Inserts an option block in the main SM options page
+  *
+  * @return void
+  *
+  */
+function demo_option_link()
+{
+   include_once(SM_PATH . 'plugins/demo/functions.php');
+   demo_option_link_do();
+}
+
+
+


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/


<Prev in Thread] Current Thread [Next in Thread>