| |||||||||||
![]() |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Rating: | Display Modes |
(#1)
|
| Member Posts: 352 Join Date: Feb 2007 Location: Lyon, France | Creating a module: Hello World (Complete guide) -
25-06-2007, 06:33 PM
This is a new thread created from Creating a module: Hello World - Kayako Community Forums by greengiant As his guide isn't enougth i though starting a new one (the first part of this guide have been taken from the guide by greengiant). I'm creating a new thread because i'll update this one as soon as i find new tips and that should be quite often (i'm making a module atm). This guide covers: Creating a new module, Creating the module installation process (database table creation), Creating a new tab in the staff (and admin) pannel, Creating a widget in the client side A Helloworld module is a sample where the purpose is to display hello. If you want to know more take a look at the download module. == Updates== 26/06/07 - added: admin tab & client widget 26/06/07 - corrected some stuffs 26/06/07 - sample screenshot 25/06/07 - initial guide == Screenshot == ![]() ![]() == Hello World Module == -- Creating the module setup -- 1. Create a Folder called helloworld in you modules directory. 2. Create a setup.php file in the new helloworld folder. 3. Creating the basic setup file. - In this setup file we are going to register the module during install and create a simple mysql table called helloworld, which contains two fields. PHP Code: define("MODULE_PURCHASE", "purchase"); define("MODULE_SERVERS", "servers"); 6. Add the following line after the above code. The first argument is the name of the constant that is used in the setup.php file that we just created to register the module with esupport. The second argument is the name of the module folder. PHP Code: PHP Code: PHP Code: emailMyName- Low-cost email address - 1GB email storage - Block spam - Web & POP3 email access - Get your name as your email address click on the "modify" link, then go to the last step and there you'll be able to install/uninstall the module Now our module can be registered but can't do anything. Lets do our basic helloworld. -- Adding events handler -- 9. Create "modules/helloworld/helloworld.php" including PHP Code: 10. Create "modules/helloworld/hello1.php" including PHP Code: Repeat 10. to create hello2 (and modify all the hello1 to hello2 of course!) -- Creating the tabs -- 11. Open "locale/en-us/en-us.php" 12. Find PHP Code: PHP Code: 14. Look a bit further and find the PHP Code: PHP Code: Our menu has the id 10 so we have to change our parent in the hello1 & hello2 script 16. In modules/helloworld/hello1.php Search for PHP Code: change the 0 to 10 (our menu id) This id is the tab selected (can be different from helloworld) so if you want to change it, you can. Now the submenu cache needs to be rebuilt: Go to emailMyName- Low-cost email address - 1GB email storage - Block spam - Web & POP3 email access - Get your name as your email address Unlog from the staff pannel Log in again (If the new tab doesn't appear try to clean your browser cache) To play with the admin pannel tabs that's the same thing. Restart from 11. but play in the zone: PHP Code: -- Creating a widget -- 17. Open includes/Widgets/widgets.php You'll find here all the widgets and their permissions checks Lets add our basic widget 18. Search PHP Code: PHP Code: Dont forget to put a new helloworld.gif in the theme folder (you can also use "downloads".gif etc..., just change the $_widgets[$index]["icon"]) 21. You shouldn't harcode the title and descritions. Lets change it using the language feature You'll have to create the phases in the language administration PHP Code: but now we need to register the event we've set in the link ( "index.php?_m=helloworld&_a=view" ) 22. Open modules/helloworld/helloworld.php 23. in PHP Code: PHP Code: PHP Code: PHP Code: PHP Code: ---- END ---- -- Lurking around there -- |
| | |
(#2)
|
(#3)
|
(#4)
|
(#5)
|
(#6)
|
(#7)
|
(#8)
|
| Senior Member Posts: 5,247 Join Date: Aug 2006 Location: Mumbai, India |
26-06-2007, 02:26 PM
This is great stuff! Thanks for sharing Professional and Affordable Kayako Skins - Specialists in Kayako Skinning & Customization - Professional Paid Support Our Skins and Services - http://www.supportskins.com/store/ - NEW SKIN ADDED!! SupportSkins.com - http://www.supportskins.com/ |
| | |
(#9)
|
| Member Posts: 377 Join Date: Jan 2007 Location: Orange County, CA |
26-06-2007, 03:17 PM
This would be an excellent article for the suportsuite wiki perhaps? http://www.div0.com/supportsuite/index.php/Main_Page Rich Features I need asap: 1) Ticket search in the client portal! 2) Column display in client portal showing clients email address or name 3) Downloads by client (i.e. - each client has their own download area and can't see/touch downloads for any other client.) This would be on top of a "public" download area. 4) Integrated KB image uploads The ability for staff to upload images with a KB articles. Cheers! |
| | |
(#10)
|
(#11)
|
| Senior Member Posts: 7,547 Join Date: Jun 2005 Location: Cumbria, UK |
26-06-2007, 07:59 PM
I think http://www.div0.com/supportsuite/index.php/User_manual was a user started one Varun posted about in the news section a long while ago but not sure if this is what he is referring to.
Click here for Kayako Software Development My Addons: BlackBerry Ticket Client for Kayako - Windows Mobile Live Support Client for Kayako |
| | |
(#12)
|
| Operations Manager Posts: 7,372 Join Date: Jan 2006 Location: England, UK |
26-06-2007, 08:03 PM
I do not think this support Wiki is being maintained. We (I) are currently working on an official Wiki, however.
-------------------------------------------------------------------
|
| | |
(#13)
|
(#14)
|
(#15)
|
![]() |
| Tags |
| complete, guide, module |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
| |