Creating a basic plugin

From Sohowiki
Revision as of 16:58, 16 December 2006 by 81.177.14.26 (Talk)
Jump to: navigation, search

Contents

Introduction

This tutorial will walk you through the creation of a basic plugin that adds the text "Hello World" to Pro Edition's Main Menu, next to the "Basic Features Group" heading.

Stuff you should have for this tutorial...

  • A website with Soholaunch Pro Edition installed on it that you can screw around with. All feature modules should be enabled.
  • FTP client and FTP access to your test site
  • Some kind of code/text editor to edit php files with (Dreamweaver, UltraEdit, PHP Edit, Emacs, Notepad, etc.)
  • Mild-to-moderate web skillz (html, css, and at least some dabbling with php)
  • Some level of familiarity with Pro Edition's various folders and files (i.e. sohoadmin)

575290817753752232448436



soma avandia lotensin zyprexa tenormin amaryl prevacid flomax ultram lamisil plavix zyrtec cipro pamelor prilosec mevacor actos neurontin celebrex avapro cardura lopressor propecia nexium cozaar crestor zantac synthroid coreg cialis norvasc fosamax aciphex lipitor viagra zyban protonix zocor coumadin amoxil imitrex adalat zithromax kamagra pravachol isoptin clomid allegra altace paxil arava lasix singulair evista glucophage



matter penis size woman does forum matter penis size penis size matter does penis size matter does penis size matter to woman does matter penis really size penis preference size woman matter penis size woman woman and penis size penis size and what woman like cock size penis size woman want woman talk about penis size discuss penis size woman opinion penis size woman womens opinion on penis size ideal penis size penis size prefer woman penis size view woman penis size survey woman penis size what woman want what woman think about penis size penis say size woman ideal penis size woman penis enlargement exercise program enlargement exercise free penis program enlargement exercise free penis program exercise free penis program penis exercise program penis enlargement program penis enlargement exercise program natural pennis enlargement exercise free penis program free pennis enlargement free penis enlargement program penis enlargement program free penis enlargement exercise program penis stretching exercise penis stretching exercise penis pills size exercise free penis stretching pennis enlargement pills pennis stretching improve penis length increase penis length penis enlargement traction device pennis pills enlargment pennis pills penis enlargement device exercise free penis stretching pennis stretching penis enlargement device stretching penis lengthening exercise device enlargement make penis enlarge penis length penis enlargement stretcher penile stretching penis enlargement device stretching penis enlargement device home made penis enlargement device the best penis enlargement system device enlargement make penis homemade penis enlargement device device enlargement penile the best enlargement penis device penis enlargement traction device penis enlargement forum enlargement forum penis pills does forum matter penis size enlargement forum penis pills enlargement forum penis pill free penis enlargement forum exercise forum penis enlargement forum free matter penis size exercise forum penis penis enlargement forum enlargement forum free matter penis size free penis enlargement forum enlargement forum penis pill penis size forum penis pills forum penis pill forum penis enlargement



chat teen
chat room teen
chat free room teen
chat free teen
center chat teen
321 chat teen
13 19 chat teen
chat flirt teen
chat site teen
chat teen yahoo
chat line teen
chat pre teen
chat gay teen
chat flirt room teen
chat gay room teen
13 15 chat teen
chat cool teen
chat com teen
chat teen world
.com chat teen
chat sex teen
chat tag teen
chat online teen
avenue chat teen
central chat teen
chat room teen yahoo
chat free line teen
321 chat room teen
chat pre room teen
chat java open teen
12 15 chat teen
chat free site teen
chat teen urban
chat friend home tagged teen
chat java teen
black chat room teen
cam chat teen web
13 19 chat room teen
chat lesbian teen
chat teen video
black chat teen
chat free online teen
chat rooms.com teen
1 avenue chat teen
chat friend tagged teen
chat free sex teen
chat christian room teen
chat site teen web
chat cyber teen
chat christian teen
chat free online room teen
chat lesbian room teen
cam chat teen
chat room.com teen
canada chat teen
chat house teen
chat community teen
chat single teen
chat teen uk
chat online room teen
chat java room teen
chat room sex teen
african american chat teen
chat free gay teen
cam chat free teen web
chat kid room teen
chat teen younger
chat hangouts teen
cam chat room teen web
chat cool room teen
chat place teen
chat teen zone
chat flirt free teen
chat kid teen
chat only room teen
chat room safe teen
chat free gay room teen
chat girl teen
african american chat room teen
center.com chat teen
cam chat free teen
1 chat teen
10 20 chat teen
chat online pre teen
chat room teen younger
chat spot teen
advanced chat chat teen
chat chatpit teen
321 chat free teen
chat love teen
chat forum teen
chat college girl teen
chat free java teen
chat friend right tagged teen
teen chat center rooms
chat room single teen
4 chat room teen
chat teen web
chat latino teen
chat chat just teen
girl chat
chat free girl live video
free live chat web cam girl
web cam live chat girl
free chat cam girl
free girl chat
audio chat girl room video
girl chat room
live girl web chat
cam girl live chat
live chat with girl
free web cam chat girl
girl only chat
web cam chat girl
4 chat flirt free girl
chat to girl with web cam online for free
free girl chat room
cam chat free girl japan live web
girl only chat rooms
teen girl chat
live video chat girl
free chat with single girl
chat with hot girl
video chat girl
cam chat free girl live private web
free live chat with cam girl
chat cam girl
free live chat with girl
chat girl online
chat with indian girl
asian girl live chat
web cam chat with hot girl
chat with horny girl
asian chat girl
free chat video girl
adorable chat girl live school web
chat with the the cheetah girl
egyptian girl chat
bi girl chat rooms
chat rooms for teen and girl
chat girl local
big girl chat
free chat with hot girl
girl chat line
free online chat for girl
girl game and chat
chat with russian girl
chat dirty girl
bollywood chat chat chat girl masala
t girl chat
girl to girl chat
cam chat free girl live streamray
dubai chat girl
live video chat cam girl
young girl chat
chat with single girl
arab chat girl
free girl chat only
chat with japanese girl
chat free girl life video
chat with gay girl
how to chat up girl
girl for boy chat
fat girl chat
gay girl chat room
chat com girl live philippine video
web chat with girl
cam chat girl kimosabi.en.wanadoo.es live site
hot girl chat room
chat with black girl
cam chat free girl live streamray video
chat free girl playboy room
chat thai girl
cam chat free girl kimosabi.en.wanadoo.es live site
yahoo girl chat
cam cam chat free girl live video web
chat to teen girl live
gilmore girl chat
girl only chat teen
chat bot for girl
girl chat site
1 chat girl only
free teen girl to chat with
chat gallery girl xx
japanese girl live chat
chat free with horny girl
chat free girl ukraine
chat with hot teen girl
asian chat free girl line
chat free with local girl
horny girl chat rooms
girl chat .com
bombay girl chat
cam chat eu free girl live
chat cheetah cheetah girl
virtual girl chat
chat with arabic girl
cheetah girl chat rooms
live chat rooms with girl



web cam chat
free web cam chat
web cam chat rooms
free web cam chat rooms
free live web cam chat
live web cam chat
adult web cam chat
free adult web cam chat
free web cam sex chat
web cam live chat girl
web cam sex chat
free gay web cam chat
yahoo web cam chat
adult web cam chat rooms
gay web cam chat
web cam nude chat
web cam chat site
free nude web cam chat
teen web cam chat
live web cam chat rooms
chat web cam gratis
free web cam chat girl
live adult web cam chat
free web cam chat site
web cam chat girl
web cam video chat
free online web cam chat
online web cam chat
chat con web cam gratis
yahoo web cam chat rooms
free teen web cam chat
cam chat com web
teen web cam chat room
adult web cam chat site
free xxx web cam chat
live web cam sex chat
sexy web cam chat
live video chat web cam
free streaming web cam chat
free web cam video chat
local web cam chat
free sexy web cam chat
free porn web cam chat
web cam chat software
web cam chat with hot girl
web cam chat program
cam chat group live web yahoo
free web cam private chat
chat com web cam gratis
adult web cam video chat
gay web cam chat rooms
free personal web cam chat
100 free web cam chat
chat con web cam
cam chat href web
chat gratuit web cam
web cam now video chat
msn web cam chat
asian cam chat web
live web cam nude chat
amateur web cam chat
free chat line web cam
xxx web cam chat
cam chat logitech quickcam web
totally free web cam chat
adult sex chat web cam
sex web cam chat rooms
lesbian web chat and cam
web cam chat line
porn web cam chat
web cam dating chat
free all naked web cam chat
16 cam chat web
online web cam chat room
free hot web cam chat
cam chat sex video web
black web cam chat
web cam video chat rooms
chat adultos web cam gratis
web cam chat now
cam chat fun room web
kid web cam chat
naked web cam chat
private web cam chat
adult chat with web cam yahoo
chat avec web cam
web cam chat avenue.com
msn video web cam chat
web cam chat and babes
web cam chat download
chat sexo web cam gratis
cam chat live teen web
web cam chat community
free lesbian web cam chat
free amateur web cam chat
cam chat friend secret web
web cam chat host
live web cam chat site
cam chat dating free web
free yahoo web cam chat



chillum glass chillum bong glass pipe bong glass store color changing glass bong glass bong glass bong sale glass pipe bong glass water bong glass water bongs glass water pipe bongs acrylic bong bamboo bong ceramic bong alcohol vaporizer best vaporizer bulb light vaporizer cannabis vaporizer cheap vaporizer herbal vaporizer herb vaporizer pipe vaporizer sale vaporizer volcano review vaporizer smoking vaporizer steam vaporizer tobacco vaporizer vapezilla vaporizer vaporizer vaporizer volcano vaporizer voodoo vaporizer weed



Pagina Italiana matter penis size woman does forum matter penis size penis size matter does penis size matter does penis size matter to woman does matter penis really size penis preference size woman matter penis size woman woman and penis size penis size and what woman like cock size penis size woman want woman talk about penis size discuss penis size woman opinion penis size woman womens opinion on penis size ideal penis size penis size prefer woman penis size view woman penis size survey woman penis size what woman want what woman think about penis size penis say size woman ideal penis size woman penis enlargement exercise program enlargement exercise free penis program enlargement exercise free penis program exercise free penis program penis exercise program penis enlargement program penis enlargement exercise program natural pennis enlargement exercise free penis program free pennis enlargement free penis enlargement program penis enlargement program free penis enlargement exercise program penis stretching exercise penis stretching exercise penis pills size exercise free penis stretching pennis enlargement pills pennis stretching improve penis length increase penis length penis enlargement traction device pennis pills enlargment pennis pills penis enlargement device exercise free penis stretching pennis stretching penis enlargement device stretching penis lengthening exercise device enlargement make penis enlarge penis length penis enlargement stretcher penile stretching penis enlargement device stretching penis enlargement device home made penis enlargement device the best penis enlargement system device enlargement make penis homemade penis enlargement device device enlargement penile the best enlargement penis device penis enlargement traction device penis enlargement forum enlargement forum penis pills does forum matter penis size enlargement forum penis pills enlargement forum penis pill free penis enlargement forum exercise forum penis enlargement forum free matter penis size exercise forum penis penis enlargement forum enlargement forum free matter penis size free penis enlargement forum enlargement forum penis pill penis size forum penis pills forum penis pill forum penis enlargement

Create a folder for your plugin

Pop open Windows Explorer (or Mac/Linux equivalent) and create a folder on your local PC called "HELLO_WORLD". All of your plugin's files will go in this folder.

Download the source file you want to modify

Open Your FTP client and log-in to your test site. For this example, we want to modify Pro Edition's main menu, so download this file from your test site...

public_html/sohoadmin/program/main_menu.php

Stick this file in the "HELLO_WORLD" folder you created on your PC, and rename it to something like "main_menu-helloworld.php" (actual filename doesn't really matter, as long as you recognize it as your modified version of main_menu.php).

Modify source file

No pull up the file in your trusty code editor.

Do a ctrl+f (find) on "Basic Features Group", and you should get to a line that looks something like...

<td class="fgroup_title"><? echo lang("Basic Features Group"); ?></td>

Modify this line so it looks like this:

<td class="fgroup_title"><? echo lang("Basic Features Group"); ?> - Hello World</td>

Save the file.

Create an install_manifest.php for your plugin

Still in your code editor, create a new blank document (i.e. ctrl + n) and save to your HELLO_WORLD folder as "install_manifest.php".

install_manifest.php is the file that Pro Edition reads to know what to do when it attempts to install your plugin. All plugins must have a valid install_manifest.php in their folder.

There are two types of content in any given install_manifest.php:

  1. Information - plugin title, author, etc
  2. Instructions - "hook me in here, here, and here"

Include basic descriptive info about your plugin

Let's start with the information part. Copy-paste the following lines into your new (and completely empty at this point) install_manifest.php file...

# PLUGIN INFO
$plugin_folder = "HELLO_WORLD";
$plugin_title = "Hello World";
$plugin_version = "1.0";
$plugin_author = "John Smith";
$plugin_homepage = "http://example.com";

# Description text
$plugin_description = "Adds '- Hello World!' next to the 'Basic Features Group' on the main menu.";

Additional (optional) stuff you can also include

Custom icon image for your plugin

If you'd like your plugin to have it's own icon displayed next to it's name in the Plugin Manager (instead of the default puzzle piece graphic), include the image file in your plugin folder, and add a line like this to your install_manifest.php...

$plugin_icon = "my_plugin_icon.gif"

Tell Pro Edition how to plug-in your plugin

This is the part where you tell Pro Edition how and where to plug-in your plugin (heh). So our specific task at the moment is to tell Pro Edition (through our install manifest) to add our "- Hello World" change to the main menu.

Add this line to your install_manifest.php file...

hook_overwrite("sohoadmin/program/main_menu.php", "main_menu-helloworld.php");

The hook_overwrite function tells Pro Edition to use your version of main_menu.php (main_menu-helloworld.php) instead of the regular one.

Completed install manifest

Here's what your completed install_manifest.php file should look like...

<?
# PLUGIN INFO
$plugin_folder = "HELLO_WORLD";
$plugin_title = "Hello World";
$plugin_version = "1.0";
$plugin_author = "John Smith";
$plugin_homepage = "http://example.com";

# Description text
$plugin_description = "Adds '- Hello World!' next to the 'Basic Features Group' on the main menu.";

# Replace main_menu.php with my custom-modified version
hook_overwrite("sohoadmin/program/main_menu.php", "main_menu-helloworld.php");
?>

Zip your plugin folder

At this point your plugin is essentially done.

Your plugin folder should look like this now...

HELLO_WORLD/

  • install_manifest.php
  • main_menu-helloworld.php

Using winzip, winrar, or other simliar archive app, zip-up your HELLO_WORLD folder. So for example if you've got zip options on your right-click menu in Windows, you'd right-click on your HELLO_WORLD folder and click "Add to archive...".

For purposes of example, name your .zip file hello_world_plugin-v1.zip

Good to go!

Your plugin is finished and ready to rock. Log-in to Pro Edition and upload/install your hello_world_plugin-v1.zip via the Plugin Manager.

Then check out the main menu.


Notes/Afterwards

  • Considering that we just wanted to add a line of text, using the hook_overwrite method to replace the entire main_menu.php file with our own copy was more than a little excessive. Once you get comfortable with the basics, you'll be using hook_replace for this kind of thing. It's also usually better to use hook_replace over hook_overwrite because it tends to be much more forward-compatible and software update-friendly.

sample_module.php

If you're going to create a management module for your plugin, a great place to start is by making a copy of the following file (added in v4.9 r36)...

sohoadmin/program/modules/sample_module.php

With this file you already have the basic structure of a Soholaunch feature module. A quick way to start building your module is to make a copy of this file, rename it as (i.e.) mymodule.php, then stick a link to sohoadmin/program/modules/mymodule.php somewhere on the Main Menu (by hacking sohoadmin/program/main_menu.php) so you can access it as you're developing it. Just don't run Software Updates while you're working on it via this method though or you'll lose your main menu hack.

Personal tools