Differences

This shows you the differences between two versions of the page.

Link to this comparison view

plugins_documentation [2012-12-16 04:33]
potion [Creating the View – The Presentation Layer]
plugins_documentation [2013-02-27 18:06] (current)
Line 2: Line 2:
  
 In this tutorial we will create a minimal plugin that shows a simple message in a Feng Office tab. This should provide a basic understanding of how the Feng Office Plugin System works. In this tutorial we will create a minimal plugin that shows a simple message in a Feng Office tab. This should provide a basic understanding of how the Feng Office Plugin System works.
 +
 +//A tutorial for a less "trivial" example is being developed and can be found [[Advanced Plugin Tutorial|here]].//
  
 ===== Creating the plugin Structure ===== ===== Creating the plugin Structure =====
Line 134: Line 136:
 In info.php we set the array element <code>"icon_cls" => "ico-world"</code> and now we need to create a CSS class .ico-world that styles a background with the desired icon image. In info.php we set the array element <code>"icon_cls" => "ico-world"</code> and now we need to create a CSS class .ico-world that styles a background with the desired icon image.
  
-Edit the relevant CSS stylesheet for the theme's tabs, in our case 'public/assets/themes/default/stylesheets/file/types.cssand insert a style for the class .ico-world (in this case we used the default theme,s 16x16 spritesvertical offset -357 pixels)+Create CSS stylesheet for the theme's tab at [FENG_ROOT]/plugins/helloworld/public/assets/css/helloworld.css and insert the class .ico-world.  You may also create your an image folder for your plugin at [FENGOFFICE_ROOT]/plugins/helloworld/public/assets/images or, if suitable images are already available, simply use them instead, as we do here, i.e., the default theme's 16x16 sprites with a vertical offset of -357 pixels.
  
-<code>+<code css helloworld.css>
 .ico-world { .ico-world {
- background: transparent url(../../images/16x16/all_16_16_vertical.png) no-repeat scroll 0 -357px !important;+ background: transparent url('/public/assets/themes/default/images/16x16/all_16_16_vertical.png') no-repeat scroll 0 -357px !important;
 } }
 </code> </code>
Line 171: Line 173:
   * Close and restart Feng Office   * Close and restart Feng Office
   * Navigate to Adminstration -> Plugins.  //You should now see an entry for 'helloworld' and an 'Install' link just below.//   * Navigate to Adminstration -> Plugins.  //You should now see an entry for 'helloworld' and an 'Install' link just below.//
 +  * Manually edit the default theme stylesheet to include the class for the tab icon. //(See **Configuring the Tab Icon** above)//
   * Click the 'Install' link and, if successful, click the 'Activate' link.   * Click the 'Install' link and, if successful, click the 'Activate' link.
   * Now refresh the browser (Ctrl+F5) and you should see your new tab "World" appear.  If not, check the tab ordering for conflicts (Administration -> Tabs) and retry.   * Now refresh the browser (Ctrl+F5) and you should see your new tab "World" appear.  If not, check the tab ordering for conflicts (Administration -> Tabs) and retry.
Line 177: Line 180:
   * Upload the helloworld folder to the new server   * Upload the helloworld folder to the new server
   * Make sure the plugin manager is enabled   * Make sure the plugin manager is enabled
-  * Manually edit the CSS stylesheet+  * Manually edit the default theme CSS stylesheet
   * Navigate to Administration -> Plugins and 'Install' and 'Activate'   * Navigate to Administration -> Plugins and 'Install' and 'Activate'
   * If necessary, set the tab order in Administration -> Tabs   * If necessary, set the tab order in Administration -> Tabs
Line 190: Line 193:
   * 'Deactivate' and 'Uninstall' in Administration -> Plugins   * 'Deactivate' and 'Uninstall' in Administration -> Plugins
   * Remove your plugin folder from the plugins folder   * Remove your plugin folder from the plugins folder
-  * Launch phpMyAdmin and delete the relevant records in the 'tab-panelstable and 'pluginstable.+  * Launch phpMyAdmin and delete the relevant records in the 'plugins', 'tab_panels' and 'tab_panel_permissionstables.
  
  
plugins_documentation.1355639639.txt.gz · Last modified: 2013-02-27 18:02 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported


Terms of Service | Privacy and Security policies | Copyright © 2018 fengoffice.com