Hello There, Guest! Register

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Any documentation for plugins
01-20-2012, 03:26 PM
Post: #1
Any documentation for plugins
I'd like to start making plugins, and I'm wondering if you have any available documentation to help developers get started.
Find all posts by this user
Quote this message in a reply
01-21-2012, 02:26 AM (This post was last modified: 01-21-2012 02:28 AM by admin.)
Post: #2
RE: Any documentation for plugins
(01-20-2012 03:26 PM)zealbux Wrote:  I'd like to start making plugins, and I'm wondering if you have any available documentation to help developers get started.

The plug-in system works like this...

Plugin folders and database
You make a new folder in "plugins" with prefix and plugin name

Each Plugin needs a 4-character long prefix. In this case "clix" (please use your own, something that represent your name/company).
When creating a plugin folder you must name it in the following format "prefix_plugin_name".
E.g.... a few valid examples:
- clix_youtube_ads
- clix_blackjack
- mxwu_send_message

When creating tables in database please prefix them using your prefix. E.g.
clix_your_table
clix_your_second_table

If you alter other tables, please also use your prefix.
E.g. make a colum named clix_id instead of just id.

Why use prefix? To minimize the risk of plugin collisions.

Inside each plugin folder you can create a number of folders, these are:

- classes
Put all classes you need in here, they will auto-load so no need to include them!
- hooks
Put all hooks in here.

Below is a list of valid hooks. To add hooks, simply place php files in the "hooks" directory with matching name:
e.g. if hook is named "after_login", create a file named "after_login.php". The content of this file will be
runned after each member login. This way you don't have to edit the login page to perform action after login. If you have to edit any pages outside the plugin folder to make it work, then it's not really a plugin (not one that is well made anyhow), that's why we use hooks.

Please keep in mind that some hooks do not allow output (such as login).
------------------------
after_login
after_logout
after_register
after_forgot_password
after_activation
switch_success
switch_success_json
switch_order_process
after_hourly_cron
after_daily_cron
advertising_option
in_account_panel_stats
in_account_panel_menu
in_account_panel_menu_global
view_ads_page_before_query
view_ads_page_after_active_ads
// Admin Hooks:
main_admin_menu
side_admin_menu
side_admin_box
plugin_admin_menu

- install
Place database.sql file here if you have one (optional of course)
- views
Views placed here, I recommend splitting MVC style into classes and views folder if you know how that works. Anyhow, look at the included plugin to understand better how it can be done.
- admin
You can place 3 files in here, admin.php which is the default admin for your plugin, info.php which may include info about plugin and settings.php which is a file to edit settings for plugin.

Now to even make sense of this I have included a plugin that is open source (although it's not finished, it should give you enough info to make your own plugin work)

For css, images and such that is public, place it in public_html/plugins/prefix_yourplugin

You will have two plugins folders:
public_html/plugins
ClixScript_PHP_DOCS/plugins

Hope that helps, feel free to ask if you got any questions.


Attached File(s)
.zip  clix_youtube_ads.zip (Size: 15 KB / Downloads: 48)
Find all posts by this user
Quote this message in a reply
03-13-2014, 03:38 PM (This post was last modified: 03-13-2014 03:42 PM by Warz.)
Post: #3
RE: Any documentation for plugins
This topic is slightly outdated and clix_youtube_ads is out of date. I am therefore uploading the login ads plugin as open source. This should provide all of the info needed to create a fully functional plugin. Please download and use this as reference.

PS: we now only use 1 plugin folder, all plugins goes inside:
public_html\plugins

that being said, you may put user uploaded content (avatars, file uploads etc) inside:
ClixScript_PHP_DOCS\storage\plugins\yourpluginname

replace yourpluginname with your prefix_plugin

The storage folder and all subfolders are chmod 777, which is why this may be useful, but completely optional and most plugins won't need any kind of upload feature.


Attached File(s)
.zip  clix_login_ads.zip (Size: 33.07 KB / Downloads: 12)

I do NOT reply to PMs, submit a ticket instead.
Find all posts by this user
Quote this message in a reply
01-13-2015, 06:09 PM
Post: #4
Any documentation for plugins
I use premiere Pro and have premiere 6.0, useing the plugins with either would be fine, but I cant seem to use photoshop cs plugins with either.
Find all posts by this user
Quote this message in a reply
01-30-2015, 11:50 AM
Post: #5
RE: Any documentation for plugins
Any documentation on how to install the plugins as i had a clean install but no plugin installed.
Find all posts by this user
Quote this message in a reply
02-04-2015, 10:36 AM
Post: #6
RE: Any documentation for plugins
Just click on the plugin> first install it> after that only u can view the plugin
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)