Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in
/home/joomlapolis824/public_html/libraries/kunena/External/Nbbc/src/BBCode.php on line
1435
Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in
/home/joomlapolis824/public_html/libraries/kunena/External/Nbbc/src/BBCode.php on line
1435
Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in
/home/joomlapolis824/public_html/libraries/kunena/External/Nbbc/src/BBCode.php on line
1435
Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in
/home/joomlapolis824/public_html/libraries/kunena/External/Nbbc/src/BBCode.php on line
1435
Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in
/home/joomlapolis824/public_html/libraries/kunena/External/Nbbc/src/BBCode.php on line
1435
Hello All,
I'm trying to develop my first CB plugin but need a little help in the analysis portion.
Use Case (Scenario):
- User clicks Login/Register Here button or Register Your Book link
- Registration form displayed with extra Order ID field
- User fills out form including Order ID number
- User submits form
- Normal CB User email confirmation sent
- User clicks email confirmation link
- CB onAfterUserConfirm Event triggers new plugin to email accounting to confirm Order ID, if entered
- Accounting clicks confirmation link which triggers new plugin which upgrades User Access level
- User able to view/download Valid Order content
My understanding is this is a user plugin but has configuration settings akin to those in the CB administration Registration tab. Should I create another tab in the admin area or can you add on to the Registration tab.
Normally I'd want to check the Order ID against a database but that isn't possible in this particular scenario so I'd like to automate the process as much as possible without having to manually get an email, login to CB/!JAdmin and update the User level.
My boss just purchased the subscription today so I have access to all the core plugins. Can this be accomplished with one of them. I searched but didn't see anything that might fit the bill.
Ideas, comments, have I lost my mind
PS: Finished the plugin but had to hack comprofiler.php. Also might have an issue with lifetime of the cbactivation code. Anyone know the lifetime of the code, I'm using the event onAfterUserActive and the code is there but I've noticed during testing that the code is dissappearing...
PSS: Here's what I had to do:
- Create a activation code field for my plug-in to use
- Create a field to display on the Login Form for a code the plug-in uses for validation
- Create plugin - See code below
- Hack comprofiler.php - see code below
- Add a user to Joomla, with email that gets the confirmation emails
- Install the plugin
- Upload the hack of comprofiler.php
- Configure the plugin to match your field names and user
Jw
Post edited by: jwwicks, at: 2009/09/28 23:04
Post edited by: jwwicks, at: 2009/09/28 23:10
nxtlvlconfirm.php
[code:1]
<?php
/**
* Joomla Community Builder User Plugin: plug_nextlvlconfirm
* @version 1.0.0
* @package plug_nxtlvlconfirm
* @subpackage nxtlvlconfirm.xml
* @author John Wicks (Gh0st)
* @copyright (C) (Gh0st), GreatLittleBook Publishing Co., Inc
* @license Limited
www.gnu.org/copyleft/gpl.html
GNU/GPL
* @final 1.0.0
*/
/** ensure this file is being included by a parent file **/
if ( ! ( defined( '_VALID_CB' ) || defined( '_JEXEC' ) || defined( '_VALID_MOS' ) ) ) { die( 'Direct Access to this location is not allowed.' ); }
global $_PLUGINS;
$_PLUGINS->registerFunction('onUserActive', 'nxtlvlOnUserActive', 'plug_nxtlvlconfirm');
$_PLUGINS->registerFunction('onBeforeUserActive', 'nxtlvlOnBeforeUserActive', 'plug_nxtlvlconfirm');
/**
* NextLevel Confirmation Class.
* This plugin is used to confirm a user via a user-created CB field.
*/
class plug_nxtlvlconfirm extends cbTabHandler {
/**
* Constructor
*/
function plug_nxtlvlconfirm() {
$this->cbTabHandler();
}
/**
* Get plugin, tab, and Community Builder fields related to this application
* @returns associative array of parameters/values pairs for the plugin
*/
function _nxtlvlGetPlugParameters(){
$params = $this->params;
$PlugParams["nxtlvlplugenabled"] = intval($params->get('nxtlvlPlugEnabled', 1));
$PlugParams["nxtlvlwatchfieldid"] = $params->get('nxtlvlWatchFieldId',"email"«»);
$PlugParams["nxtlvlonconfirmedgroup"] = intval($params->get('nxtlvlOnConfirmedGroup',19));
$PlugParams["nxtlvlemailfromuserid"] = intval($params->get('nxtlvlEmailFromUserId',0));
$PlugParams["nxtlvlemailtouserid"] = intval($params->get('nxtlvlEmailToUserId',62));
$PlugParams["nxtlvlonchecksubject"] = $params->get('nxtlvlOnCheckSubject',"[SITENAME] - Next Level Verification"«»);
$PlugParams["nxtlvloncheckbody"] = $params->get('nxtlvlOnCheckBody',"Username: [NAME]
Email: