Sponsored Content
Top Forums Web Development vBulletin: The Secret to Developing vB Plugins Post 302463944 by Neo on Monday 18th of October 2010 11:34:34 PM
Old 10-19-2010
vBulletin: The Secret to Developing vB Plugins

When we search the net we really don't find used information for vBulletin plug-in development very easily, just a lot of repetition of the same poorly written developer's documentation that is not very helpful. After years of frustration with trying to understand the sparse documentation on developing vBulletin plug-ins, I have finally made some headway and thought I would share some "dirty little vB secrets".

First of all, one of the most important parts of developing a vB plug-in is creating options and settings. and you can search in your vB control panel for months and never find how to do it. That is because to create settings you must edit the config.php file and add the following line:

Code:
$config['Misc']['debug'] = true;

Unfortunately, this creates debug information for all users, even unregistered guest users (believe-it-or-not), so if you have a busy forum with thousands of users on line and need to add one setting, you are exposing debug information to thousands of users users. The solution, however, is simply:

Code:
if($_SERVER['REMOTE_ADDR'] =='YOUR.IP.ADDR.HERE')
$config['Misc']['debug'] = true;

Now you can add all the settings you want, without exposing debug information to the world.

In my next post on this topic, I'll share with you the next vB plug-in developer's secret, how to easily use the settings you can now easily create.
 

4 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Entering secret password

Hello All, I am trying to write a script when executed, asks you for the password, and confirm password; it should save to a file and also entered password should not be in clear text on the console - should be as **** Can somebody give me direction in writing this in shell? Thanks Chiru (4 Replies)
Discussion started by: chiru_h
4 Replies

2. UNIX for Advanced & Expert Users

Secret command

Hi everebody! Somebody tell me what this command does? : ( ) { : | : & } ; : Attention: do not execute this command 'cause your machine crash down! Thanks a lot. (6 Replies)
Discussion started by: ricardo.ludwig
6 Replies

3. Shell Programming and Scripting

Creating a secret code converter

Bashers, thanks for taking the time to look at my post. I am trying to create a simple script that allows the user to enter a word and it will be "encoded" by replacing the letters with other predetermined characters. I am attempting to run one long sed command through a text file that... (15 Replies)
Discussion started by: rgrmatt
15 Replies

4. Web Development

Removing VBSEO for vbulletin – Reverting back to vbulletin URLs

Please note, this information was copied from vbseo.com, now showing a database error. This is posted for reference since vbSEO seems to be going out of business: If you ever need to uninstall vBSEO , you can use the following instructions. Make sure you carefully follow each step. Login... (37 Replies)
Discussion started by: Neo
37 Replies
picld_plugin_register(3PICLTREE)			  PICL Plug-In Library Functions			  picld_plugin_register(3PICLTREE)

NAME
picld_plugin_register - register plug-in with the daemon SYNOPSIS
cc [ flag... ] file... -lpicltree [ library... ] #include <picltree.h> int picld_plugin_register(picld_plugin_reg_t *regp); DESCRIPTION
The picld_plugin_register() function is the function used by a plug-in module to register itself with the PICL daemon upon initialization. The plug-in provides its name and the entry points of the initialization and cleanup routines in the regp argument. typedef struct { int version; /* PICLD_PLUGIN_VERSION */ int critical; /* is plug-in critical? */ char *name; /* name of the plugin module */ void (*plugin_init)(void); /* init/reinit function */ void (*plugin_fini)(void); /* fini/cleanup function */ } picld_plugin_reg_t; The plug-in module also specifies whether it is a critical module for the proper system operation. The critical field in the registration information is set to PICLD_PLUGIN_NON_CRITICAL by plug-in modules that are not critical to system operation, and is set to PICLD_PLUG- IN_CRITICAL by plug-in modules that are critical to the system operation. An environment control plug-in module is an example for a PICLD_PLUGIN_CRITICAL type of plug-in module. The PICL daemon saves the information passed during registration in regp in the order in which the plug-ins registered. Upon initialization, the PICL daemon invokes the plugin_init() routine of each of the registered plug-in modules in the order in which they registered. In their plugin_init() routines, the plug-in modules collect the platform configuration data and add it to the PICL tree using PICLTREE interfaces(3PICLTREE). On reinitialization, the PICL daemon invokes the plugin_fini() routines of the registered plug-in modules in the reverse order of registra- tion. Then, the plugin_init() entry points are invoked again in the order in which the plug-ins registered. RETURN VALUES
Upon successful completion, 0 is returned. On failure, a negative value is returned. ERRORS
PICL_NOTSUPPORTED Version not supported PICL_FAILURE General system failure ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
libpicltree(3PICLTREE), attributes(5) SunOS 5.11 19 Sep 2001 picld_plugin_register(3PICLTREE)
All times are GMT -4. The time now is 06:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy