File manager - Edit - /home/opticamezl/www/newok/plugin.zip
Back
PK -�\.���? ? user/plug_fabrik/fbk.fabrik.phpnu &1i� <?php /** */ use CB\Database\Table\PluginTable; use CB\Database\Table\TabTable; use CB\Database\Table\UserTable; use CBLib\Language\CBTxt; if ( ! ( defined( '_VALID_CB' ) || defined( '_JEXEC' ) || defined( '_VALID_MOS' ) ) ) { die( 'Direct Access to this location is not allowed.' ); } global $_PLUGINS; // TODO: This should be in a function: We should have no code in files outside of classes: $_PLUGINS->loadPluginGroup( 'user' ); class getFabrikTab extends cbTabHandler { function getFabrikTab() { $this->cbTabHandler(); } function __construct($tab,$user,$ui) { // $$$ hugh - added privacy option, so you can restrict who sees the tab, requested on forums: // http://fabrikar.com/forums/showthread.php?p=128127#post128127 // privacy setting: // 0 = public // 1 = profile owner only // 2 = profile owner and admins $private = (int)$this->params->get('fabrik_private', '0'); if ($private > 0) { $viewer = JFactory::getuser(); if ($private === 1) { if ($user->get('user_id') != $viewer->get('id')) { return false; } } else if ($private === 2) { if ($user->get('id') !== $viewer->get('id') && ($viewer->get('gid') != 24 && $viewer->get('gid') != 25)) { return false; } } } $dispatcher = new JDispatcher(); JPluginHelper::importPlugin('content', 'fabrik', true, $dispatcher); if (JPluginHelper::importPlugin('content', 'fabrik', true, $dispatcher) !== true) { throw new RuntimeException(JText::_('Fabrik content plugin not loaded in CB tab! Check that it is installed and enabled.'), 400); } $dispatcher->register('content', 'plgContentFabrik'); $args = array(); $article = new stdClass(); $txt = $this->params->get('plugintext'); // $$$ hugh - set profile user in session so Fabrik user element can get at it // TODO - should really make this table/form specific! $session = JFactory::getSession(); // $$$ hugh - testing using a unique session hash, which we will stuff in the // plugin args, and will get added where necessary in Fabrik lists and forms so // we can actually track the right form submissions with their coresponding CB // profiles. $social_hash = md5(serialize(array(JRequest::getURI(), $tab, $user))); $session->set('fabrik.plugin.' . $social_hash . '.profile_id', $user->get('id')); // do the old style one without the hash for backward compat $session->set('fabrik.plugin.profile_id', $user->get('id')); if (empty($txt)) { $txt = '{fabrik_social_profile_hash=' . $social_hash . '}'; } else { $txt = rtrim($txt, '}') . " fabrik_social_profile_hash=" . $social_hash . '}'; } //do some dynamic replacesments with the owner's data foreach ($user as $k=>$v) { if (strstr( $txt, "{\$my->$k}" )) { $txt = str_replace("{\$my->$k}", $v, $txt); } else if (strstr( $txt, "[\$my->$k]" )) { $txt = str_replace("[\$my->$k]", $v, $txt); } // $$$ hugh - might as well stuff the entire CB user object in the session $session->set('fabrik.plugin.' . $social_hash . '.' . $k, $v); } $params = new stdClass(); $args[] = 0; $article->text = $txt; $args[] = &$article; $args[] = &$params; $res = $dispatcher->trigger('onContentPrepare', $args); // $$$ peamak http://fabrikar.com/forums/showthread.php?t=10446&page=2 $dispatcher->register('content', 'plgContentFabrik'); return $article->text; } } ?> PK -�\� ��� � user/plug_fabrik/fbk.fabrik.xmlnu &1i� <?xml version="1.0" encoding="UTF-8"?> <cbinstall version="1.0" type="plugin" group="user"> <name>Fabrik</name> <author>Media A-Team, Inc.</author> <creationDate>Jan 2009</creationDate> <copyright>(C) 2005-2008 fabrikar.com</copyright> <license>http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU/GPL version 2</license> <authorEmail>rob@pollen-8.co.uk</authorEmail> <authorUrl>www.fabrikar.com</authorUrl> <version>2.1</version> <description>Fabrik tab</description> <files> <filename plugin="fbk.fabrik">fbk.fabrik.php</filename> <filename>index.html</filename> </files> <params> </params> <tabs> <tab name="Fabrik" description="" class="getFabrikTab" fields="0" position="cb_main" displaytype="tab"> <params> <param name="plugintext" type="text" size="40" default="" label="plugin text" description="Use standard joomla plugin code - e.g. {fabrik view=table id=1}" /> <param name="fabrik_private" type="radio" default="0" label="Tab Visibility" description="Controls who can see this tab. Public is normal behavior, visible to everyone. You may optionally restrict visibility to just the profile owner, or the owner plus admins (Administrator and Super Admin)"> <option value="0">Public</option> <option value="1">User Only</option> <option value="2">User and Admins</option> </param> </params> <fields> </fields> </tab> </tabs> <database> </database> </cbinstall>PK -�\ user/plug_fabrik/index.htmlnu &1i� PK -�\.���? ? user/plug_fabrik/fbk.fabrik.phpnu &1i� PK -�\� ��� � � user/plug_fabrik/fbk.fabrik.xmlnu &1i� PK -�\ � user/plug_fabrik/index.htmlnu &1i� PK �
| ver. 1.4 |
Github
|
.
| PHP 8.3.23 | Generation time: 0 |
proxy
|
phpinfo
|
Settings