Tuesday, 15 September 2015

plugins - Jomsocial Extra Field -



plugins - Jomsocial Extra Field -

i trying create fields on jomsocial groups create new grouping page, suggested on jomsocial docs best way creat plugin this.

as have never created such complex plugin have working illustration start with?

here code have tried with

<?php defined('_jexec') or die('restricted access'); if (! class_exists ( 'plgspbgrouppostcode' )) { class plgspbgrouppostcode extends jplugin { /** * method build */ function plgsystemexample($subject, $config) { parent::__construct($subject, $config); // jplugin::loadlanguage ( 'plg_system_example', jpath_administrator ); // utilize if theres language file include_once( jpath_root .'/components/com_community/libraries/core.php' ); // loading core library } function onformdisplay( $form_name ) { /* add together additional form elements @ bottom privacy page */ $elements = array(); if( $form_name == 'jsform-groups-forms' ) { $obj = new cformelement(); $obj->label = 'labe1 1'; $obj->position = 'after'; $obj->html = '<input name="custom1" type="text">'; $elements[] = $obj; $obj = new cformelement(); $obj->label = 'labe1 2'; $obj->position = 'after'; $obj->html = '<input name="custom2" type="text">'; $elements[] = $obj; } homecoming $elements;

plugins joomla jomsocial

No comments:

Post a Comment