Exemple #1
0
 function onProfileDisplay()
 {
     JPlugin::loadLanguage('plg_community_events', JPATH_ADMINISTRATOR);
     $config = CFactory::getConfig();
     if (!$config->get('enableevents')) {
         return JText::_('PLG_EVENTS_EVENT_DISABLED');
     }
     $document = JFactory::getDocument();
     $mainframe = JFactory::getApplication();
     $user = CFactory::getRequestUser();
     $caching = $this->params->get('cache', 1);
     $model = CFactory::getModel('Events');
     $my = CFactory::getUser();
     $this->loadUserParams();
     //CFactory::load( 'helpers' , 'event' );
     $event = JTable::getInstance('Event', 'CTable');
     $handler = CEventHelper::getHandler($event);
     $events = $model->getEvents(null, $user->id, $this->params->get('sorting', 'latest'), null, true, false, null, null, $handler->getContentTypes(), $handler->getContentId(), $this->userparams->get('count', 5));
     if ($this->params->get('hide_empty', 0) && !count($events)) {
         return '';
     }
     if ($caching) {
         $caching = $mainframe->getCfg('caching');
     }
     $creatable = $my->canCreateEvents();
     $cache = JFactory::getCache('plgCommunityEvents');
     $cache->setCaching($caching);
     $callback = array($this, '_getEventsHTML');
     $content = $cache->call($callback, true, $events, $user, $config, $model->getEventsCount($user->id), $creatable);
     return $content;
 }
 function onAfterRouter()
 {
     if ($this->_admin) {
         return;
     }
     JPlugin::loadLanguage('com_content', JPATH_SITE);
 }
 public function onContentPrepare($context, &$article, &$params, $limitstart)
 {
     $app = JFactory::getApplication();
     /* @var $app JApplication */
     // Do not render the buttons in administration area
     if ($app->isAdmin()) {
         return;
     }
     $doc = JFactory::getDocument();
     /* @var $doc JDocumentHtml */
     $docType = $doc->getType();
     // Joomla! must render content of this plugin only in HTML document
     if (strcmp("html", $docType) != 0) {
         return;
     }
     $currentOption = JRequest::getCmd("option");
     if ($currentOption != "com_content" or !isset($article) or empty($article->id) or !isset($this->params)) {
         return;
     }
     JPlugin::loadLanguage('plg_mvsocialbuttons');
     $buttons = $this->getButtons($article);
     $position = $this->params->get('position');
     switch ($position) {
         case 1:
             $article->text = $buttons . $article->text;
             break;
         case 2:
             $article->text = $article->text . $buttons;
             break;
         default:
             $article->text = $buttons . $article->text . $buttons;
             break;
     }
     return true;
 }
Exemple #4
0
	function construct( )
	{
            $name = "input";
            
            if(empty($this->params)){
                    $plugin = JPluginHelper::getPlugin('fieldsattachment', $name);
                    $this->params = new JParameter($plugin->params); 
                }

            //LOAD LANGUAGE --------------------------------------------------------------
            $lang   =&JFactory::getLanguage();
            $lang->load( 'plg_fieldsattachment_'.$name  );
            $lang = &JFactory::getLanguage(); ;
            $lang_file="plg_fieldsattachment_".$name ;
            $sitepath1 = JPATH_BASE ;
            $sitepath1 = str_replace ("administrator", "", $sitepath1);
            $path = $sitepath1."languages".DS . $lang->getTag() .DS.$lang->getTag().".".$lang_file.".php.ini";
            
            if(JFile::exists($path)){
               JPlugin::loadLanguage( 'plg_fieldsattachment_'.$name );
            }
            //-----------------------------------------------------------------------------
            //JPlugin::loadLanguage( 'plg_fieldsattachment_input' );
            
            $this->params->set( "name" , $name  );
	}
 function onProfileDisplay()
 {
     // Load language
     $lang =& JFactory::getLanguage();
     JPlugin::loadLanguage('plg_community_plg_rsmembership', JPATH_ADMINISTRATOR);
     // Attach CSS
     $document =& JFactory::getDocument();
     $css = JURI::base() . 'plugins/community/plg_rsmembership/style.css';
     $document->addStyleSheet($css);
     if (!file_exists($this->_path)) {
         $content = '<div class="icon-nopost"><img src="' . JURI::base() . 'components/com_community/assets/error.gif" alt="" /></div>';
         $content .= '<div class="content-nopost">' . JText::_('RSM_NOT_INSTALLED') . '</div>';
     } else {
         require_once $this->_path;
         $user =& CFactory::getActiveProfile();
         $userName = $user->getDisplayName();
         $userId = $user->id;
         $memberships = $this->_getMemberships();
         $Itemid = $this->getItemid();
         $cache =& JFactory::getCache('plgCommunityPlg_RSMembership');
         $cache->setCaching($this->params->get('cache', 1));
         $callback = array('plgCommunityPlg_RSMembership', '_getRSMembershipHTML');
         $content = $cache->call($callback, $userName, $userId, $memberships, $Itemid);
     }
     return $content;
 }
    private function _getTagText($html)
    {
        JPlugin::loadLanguage('plg_system_pftomsproject', JPATH_ADMINISTRATOR);
        $str2 = null;
        $r = null;
        $p1 = '%<dd class="owner-data">.*?</dd>%si';
        $str2 = ' $0 
						<div class="btn-toolbar btn-toolbar-top">
							<div class="btn-group">
								<button class="btn export">
									<i class="cus-doc-pdf"></i> ' . JText::_('PLG_PFTOMSPROJECT_LABEL_EXPORT') . '
								</button>
								<button class="btn dropdown-toggle" data-toggle="dropdown">
									<span class="caret"></span>
								</button>
								<ul class="dropdown-menu">
									<li>
										<a href="index.php?option=com_pfprojects&view=projects&action=export&cid="><i class="cus-doc-excel-table"></i> ' . JText::_('PLG_PFTOMSPROJECT_LABEL_MS2013') . '</a>
									</li>									
								</ul>
							</div>
						</div>';
        $r = preg_replace($p1, $str2, $html);
        return $r;
    }
Exemple #7
0
 function onProfileDisplay()
 {
     JPlugin::loadLanguage('plg_community_mygoogleads', JPATH_ADMINISTRATOR);
     $config = CFactory::getConfig();
     $config = CFactory::getConfig();
     $this->loadUserParams();
     $uri = JURI::base();
     $user = CFactory::getRequestUser();
     $document = JFactory::getDocument();
     $css = $uri . 'plugins/community/mygoogleads/mygoogleads/style.css';
     $document->addStyleSheet($css);
     $googleCode = $this->userparams->get('googleCode');
     $content = '';
     if (!empty($googleCode)) {
         $mainframe = JFactory::getApplication();
         $caching = $this->params->get('cache', 1);
         if ($caching) {
             $caching = $mainframe->getCfg('caching');
         }
         $cache = JFactory::getCache('plgCommunityMyGoogleAds');
         $cache->setCaching($caching);
         $callback = array('plgCommunityMyGoogleAds', '_getGoogleAdsHTML');
         $content = $cache->call($callback, $googleCode, $user->id);
     } else {
         // $content = "<div class=\"icon-nopost\"><img src=\"".JURI::base()."components/com_community/assets/error.gif\" alt=\"\" /></div>";
         $content .= "<div class=\"content-nopost\">" . JText::_('PLG_GOOGLE_ADS_NOT_SET') . "</div>";
     }
     return $content;
 }
Exemple #8
0
 function onProfileDisplay()
 {
     if (!self::kunenaOnline()) {
         return;
     }
     //Load Language file.
     JPlugin::loadLanguage('plg_community_mykunena', JPATH_ADMINISTRATOR);
     $document = JFactory::getDocument();
     $document->addStyleSheet(JURI::base() . 'plugins/community/mykunena/style.css');
     $items = array();
     $user = CFactory::getRequestUser();
     if ($user->id) {
         require_once KPATH_SITE . '/funcs/latestx.php';
         $obj = new CKunenaLatestX('userposts', 0);
         $obj->user = JFactory::getUser($user->id);
         $obj->threads_per_page = $this->params->get('count', 5);
         $obj->embedded = 1;
         $obj->getUserPosts();
         $items = $obj->customreply;
     }
     $caching = $this->params->get('cache', 1);
     if ($caching) {
         $app = JFactory::getApplication();
         $caching = $app->getCfg('caching');
     }
     $cache = JFactory::getCache('plgCommunityMyKunena');
     $cache->setCaching($caching);
     $callback = array('plgCommunityMyKunena', '_getMyKunenaHTML');
     $content = $cache->call($callback, $user, $items);
     return $content;
 }
Exemple #9
0
 /**
  * Ajax function to save a new wall entry
  *
  * @param message    A message that is submitted by the user
  * @param uniqueId    The unique id for this group
  *
  **/
 function onProfileDisplay()
 {
     JPlugin::loadLanguage('plg_community_myvideos', JPATH_ADMINISTRATOR);
     $mainframe = JFactory::getApplication();
     $document = JFactory::getDocument();
     $user = CFactory::getRequestUser();
     $userid = $user->id;
     $this->loadUserParams();
     $def_limit = $this->params->get('count', 10);
     $limit = JRequest::getVar('limit', $def_limit, 'REQUEST');
     $limitstart = JRequest::getVar('limitstart', 0, 'REQUEST');
     $row = $this->getVideos($userid, $limitstart, $limit);
     $total = count($row);
     if ($this->params->get('hide_empty', 0) && !$total) {
         return '';
     }
     $caching = $this->params->get('cache', 1);
     if ($caching) {
         $caching = $mainframe->getCfg('caching');
     }
     $cache = JFactory::getCache('plgCommunityMyVideos');
     $cache->setCaching($caching);
     $callback = array('plgCommunityMyVideos', '_getLatestVideosHTML');
     $count = $this->userparams->get('count', $def_limit);
     $dbg = "<!--DEFLIMIT {$def_limit} USERPARAMLIMIT {$count}-->";
     $content = $dbg . $cache->call($callback, $userid, $count, $limitstart, $row, $total);
     return $content;
 }
 /**
  *  Handle onPrepareLocatie
  *
  */
 public function onContentPrepare($context, $article, $params, $page = 0)
 {
     // just startup
     $replacement = '';
     $app = JFactory::getApplication();
     // Only render in the HTML format
     $document = JFactory::getDocument();
     $type = $document->getType();
     $html = $type == 'html';
     // find all instances of plugin and put in $matches
     preg_match_all($this->_regex1, $article->text, $declarations);
     // Return if there are no matches
     if (!count($declarations[0])) {
         return true;
     }
     JPlugin::loadLanguage('plg_content_googlecalendar', JPATH_ADMINISTRATOR);
     // make replacement
     $replacement = $this->params->get('code');
     if (!$replacement) {
         $article->text = preg_replace($this->_regex1, '', $article->text);
         return true;
     }
     //Replace
     $article->text = preg_replace($this->_regex1, $replacement, $article->text);
 }
Exemple #11
0
 /**
  * Ajax function to save a new wall entry
  *
  * @param message	A message that is submitted by the user
  * @param uniqueId	The unique id for this group
  *
  * */
 function onProfileDisplay()
 {
     //Load language file.
     JPlugin::loadLanguage('plg_community_myarticles', JPATH_ADMINISTRATOR);
     // Attach CSS
     $document = JFactory::getDocument();
     $css = JURI::base() . 'plugins/community/myarticles/myarticles/style.css';
     $document->addStyleSheet($css);
     if (JRequest::getVar('task', '', 'REQUEST') == 'app') {
         $app = 1;
     } else {
         $app = 0;
     }
     $user = CFactory::getRequestUser();
     $userid = $user->id;
     $def_limit = $this->params->get('count', 10);
     $limit = JRequest::getVar('limit', $def_limit, 'REQUEST');
     $limitstart = JRequest::getVar('limitstart', 0, 'REQUEST');
     $row = $this->getArticle($userid, $limitstart, $limit, $this->section);
     $cat = $this->getCatAlias();
     $total = $this->countArticle($userid, $this->section);
     if ($this->params->get('hide_empty', 0) && !$total) {
         return '';
     }
     $mainframe = JFactory::getApplication();
     $caching = $this->params->get('cache', 1);
     if ($caching) {
         $caching = $mainframe->getCfg('caching');
     }
     $cache = JFactory::getCache('plgCommunityMyArticles');
     $cache->setCaching($caching);
     $callback = array('plgCommunityMyArticles', '_getArticleHTML');
     $content = $cache->call($callback, $userid, $limit, $limitstart, $row, $app, $total, $cat, $this->params);
     return $content;
 }
Exemple #12
0
 /**
  * Constructor
  *
  * For php4 compatability we must not use the __constructor as a constructor for plugins
  * because func_get_args ( void ) returns a copy of all passed arguments NOT references.
  * This causes problems with cross-referencing necessary for the observer design pattern.
  *
  * @access	protected
  * @param	object	$subject The object to observe
  * @param 	array   $config  An array that holds the plugin configuration
  * @since	1.0
  */
 function construct()
 {
     $name = "file";
     if (empty($this->params)) {
         $plugin = JPluginHelper::getPlugin('fieldsattachment', $name);
         $this->params = new JParameter($plugin->params);
     }
     $this->params->set("name", $name);
     //$this->params->set( "path" , '..'.DS.'images'.DS.'documents'  );
     /* $sitepath = JURI::base() ;
        $pos = strrpos($sitepath, "administrator");
        if(!empty($pos)){$sitepath  = JURI::base().'..'.DS;}*/
     $sitepath = fieldsattachHelper::getabsoluteURL();
     $this->params->set("path", $sitepath . 'images' . DS . 'documents');
     // $this->params->set( "sitepath" , $sitepath );
     $this->params->set("documentpath", JPATH_INSTALLATION . DS . '..' . DS . 'images' . DS . 'documents');
     //LOAD LANGUAGE --------------------------------------------------------------
     $lang =& JFactory::getLanguage();
     $lang->load('plg_fieldsattachment_' . $name);
     $lang =& JFactory::getLanguage();
     $lang_file = "plg_fieldsattachment_" . $name;
     $sitepath1 = JPATH_BASE;
     $sitepath1 = str_replace("administrator", "", $sitepath1);
     $path = $sitepath1 . "languages" . DS . $lang->getTag() . DS . $lang->getTag() . "." . $lang_file . ".php.ini";
     if (JFile::exists($path)) {
         JPlugin::loadLanguage('plg_fieldsattachment_' . $name);
     }
     //-----------------------------------------------------------------------------
 }
Exemple #13
0
 /**
  * Constructor
  *
  * For php4 compatability we must not use the __constructor as a constructor for plugins
  * because func_get_args ( void ) returns a copy of all passed arguments NOT references.
  * This causes problems with cross-referencing necessary for the observer design pattern.
  *
  * @access	protected
  * @param	object	$subject The object to observe
  * @param 	array   $config  An array that holds the plugin configuration
  * @since	1.0
  */
 function construct()
 {
     $name = "image";
     $this->name = $name;
     /*$sitepath = JURI::base() ;
       $pos = strrpos($sitepath, "administrator");
       if(!empty($pos)){$sitepath  = JURI::base().'..'.DS;}*/
     $sitepath = fieldsattachHelper::getabsoluteURL();
     $this->path1 = $sitepath . 'images' . DS . 'documents';
     $documentpath = fieldsattachHelper::getabsolutePATH();
     if (JRequest::getVar('option') == 'com_categories' && JRequest::getVar('layout') == "edit") {
         $this->documentpath = $documentpath . DS . 'images' . DS . 'documentscategories';
     }
     //LOAD LANGUAGE --------------------------------------------------------------
     $lang =& JFactory::getLanguage();
     $lang->load('plg_fieldsattachment_' . $name);
     $lang =& JFactory::getLanguage();
     $lang_file = "plg_fieldsattachment_" . $name;
     $sitepath1 = JPATH_BASE;
     $sitepath1 = str_replace("administrator", "", $sitepath1);
     $path = $sitepath1 . "languages" . DS . $lang->getTag() . DS . $lang->getTag() . "." . $lang_file . ".php.ini";
     if (JFile::exists($path)) {
         JPlugin::loadLanguage('plg_fieldsattachment_' . $name);
     }
     //-----------------------------------------------------------------------------
 }
 function fetchElement($name, $value, &$node, $control_name)
 {
     JPlugin::loadLanguage('com_virtuemart', JPATH_ADMINISTRATOR);
     $model = VmModel::getModel('Manufacturer');
     $manufacturers = $model->getManufacturers(true, true, false);
     return JHTML::_('select.genericlist', $manufacturers, $control_name . '[' . $name . ']', '', $name, 'mf_name', $value, $control_name . $name);
 }
Exemple #15
0
 /**
  * Ajax function to save a new wall entry
  *
  * @param message	A message that is submitted by the user
  * @param uniqueId	The unique id for this group
  *
  **/
 function onProfileDisplay()
 {
     JPlugin::loadLanguage('plg_community_mytaggedvideos', JPATH_ADMINISTRATOR);
     $mainframe = JFactory::getApplication();
     // Attach CSS
     $document = JFactory::getDocument();
     // $css		= JURI::base() . 'plugins/community/myvideos/style.css';
     // $document->addStyleSheet($css);
     $user = CFactory::getRequestUser();
     $userid = $user->id;
     $this->loadUserParams();
     $def_limit = $this->params->get('count', 10);
     $limit = JRequest::getVar('limit', $def_limit, 'REQUEST');
     $limitstart = JRequest::getVar('limitstart', 0, 'REQUEST');
     $row = $this->getVideos($userid);
     $total = count($row);
     if ($this->params->get('hide_empty', 0) && !$total) {
         return '';
     }
     $caching = $this->params->get('cache', 1);
     if ($caching) {
         $caching = $mainframe->getCfg('caching');
     }
     $cache = JFactory::getCache('plgCommunityMyTaggedVideos');
     $cache->setCaching($caching);
     $callback = array('plgCommunityMyTaggedVideos', '_getLatestVideosHTML');
     $content = $cache->call($callback, $userid, $this->userparams->get('count', 5), $limitstart, $row, $total);
     return $content;
 }
Exemple #16
0
 protected function _process(&$row, $params = array())
 {
     if (!file_exists(JPATH_SITE . DS . 'components' . DS . 'com_redform' . DS . 'redform.core.php')) {
         JError::raiseWarning(0, JText::_('COM_REDFORM_COMPONENT_REQUIRED_FOR_REDFORM_PLUGIN'));
         return false;
     }
     include_once JPATH_SITE . DS . 'components' . DS . 'com_redform' . DS . 'redform.core.php';
     $this->_rfcore = new RedFormCore();
     JPlugin::loadLanguage('plg_content_redform', JPATH_ADMINISTRATOR);
     $this->_rwfparams = $params;
     /* Regex to find categorypage references */
     $regex = "#{redform}(.*?){/redform}#s";
     if (preg_match($regex, $row->text, $matches)) {
         /* Hook up other red components */
         if (isset($row->eventid)) {
             JRequest::setVar('redevent', $row);
         } else {
             if (isset($row->competitionid)) {
                 JRequest::setVar('redcompetition', $row);
             }
         }
         // load form javascript
         if (JRequest::getVar('format', 'html') == 'html') {
             JHTML::_('behavior.tooltip');
             jimport('joomla.html.html');
         }
         /* Execute the code */
         $row->text = preg_replace_callback($regex, array($this, 'FormPage'), $row->text);
     }
     return true;
 }
Exemple #17
0
     $model = CFactory::getModel('Photos');
     $photos = $model->getAllPhotos($albumId);
     $content .= '<div class="photoList">';
     foreach ($photos as $rows) {
         $img = '<img src=\\"' . $rows->image . '\\" border=\\"0\\" alt=\\"Tree\\" />';
         $content .= '<div class="picture">';
         $content .= '<a href=\'#\' onClick=\'window.parent.jInsertEditorText("' . $img . '", "' . $e_name . '");window.parent.document.getElementById("sbox-window").close();return;\'>';
         $content .= '<img src="' . $rows->thumbnail . '" alt="' . $rows->caption . '" border="0">';
         $content .= '</a>';
         $content .= '</div>';
     }
     $content .= '<div style="clear:both;"></div></div>';
     $response->addAssign('iFrameContent', 'innerHTML', $backButton . $content);
     return $response;
 }
 function ajaxGetAlbum($response, $e_name)
 {
     $response->addAssign('iFrameContent', 'innerHTML', $this->_getAlbumHTML($e_name));
     return $response;
 }
 function _getAlbumHTML($e_name)
 {
     //Include language file
     JPlugin::loadLanguage('plg_editormyphotos', JPATH_ADMINISTRATOR);
     $user = JFactory::getUser();
     $model = CFactory::getModel('photos');
     $albums = $model->getAlbums($user->id, true, true);
     $content = '<div class="title">' . JText::_('ALBUM LIST') . '</div>';
     if (count($albums) > 0) {
Exemple #18
0
 function onProfileDisplay()
 {
     $this->loadUserParams();
     //get enable
     $enable = new stdClass();
     $enable->personalInfo = new stdClass();
     $enable->personalInfo->home_address = $this->params->get('home_address', TRUE);
     $enable->personalInfo->city = $this->params->get('city', TRUE);
     $enable->personalInfo->postal_code = $this->params->get('postal_code', TRUE);
     $enable->personalInfo->country = $this->params->get('country', TRUE);
     $enable->personalInfo->phone_number = $this->params->get('phone_number', TRUE);
     $enable->personalInfo->mobile_number = $this->params->get('mobile_number', TRUE);
     $enable->personalInfo->fax_number = $this->params->get('fax_number', TRUE);
     $enable->workInfo = new stdClass();
     $enable->workInfo->my_company = $this->params->get('my_company', TRUE);
     $enable->workInfo->work_address = $this->params->get('work_address', TRUE);
     $enable->workInfo->website = $this->params->get('website', TRUE);
     $enable->workInfo->department = $this->params->get('department', TRUE);
     $enable->workInfo->job_title = $this->params->get('job_title', TRUE);
     $enable->workInfo->main_im_id = $this->params->get('main_im_id', TRUE);
     $enable->im_list = $this->params->get('im_list', TRUE);
     //get info
     $info = new stdClass();
     $info->personal = new stdClass();
     $info->personal->home_address = $this->userparams->get('home_address', '');
     $info->personal->city = $this->userparams->get('city', '');
     $info->personal->postal_code = $this->userparams->get('postal_code', '');
     $info->personal->country = $this->userparams->get('country', '');
     $info->personal->phone_number = $this->userparams->get('phone_number', '');
     $info->personal->mobile_number = $this->userparams->get('mobile_number', '');
     $info->personal->fax_number = $this->userparams->get('fax_number', '');
     $info->work = new stdClass();
     $info->work->my_company = $this->userparams->get('my_company', '');
     $info->work->work_address = $this->userparams->get('work_address', '');
     $info->work->website = $this->userparams->get('website', '');
     $info->work->department = $this->userparams->get('department', '');
     $info->work->job_title = $this->userparams->get('job_title', '');
     $info->work->main_im_id = $this->userparams->get('main_im_id', '');
     $info->im = new stdClass();
     $info->im->icq = $this->userparams->get('icq', '');
     $info->im->aim = $this->userparams->get('aim', '');
     $info->im->yim = $this->userparams->get('yim', '');
     $info->im->msn = $this->userparams->get('msn', '');
     $info->im->google = $this->userparams->get('google', '');
     $info->im->skype = $this->userparams->get('skype', '');
     $mainframe = JFactory::getApplication();
     $document = JFactory::getDocument();
     $document->addStylesheet(JURI::root(true) . '/plugins/community/mycontacts/mycontacts/style.css');
     $caching = $this->params->get('cache', 1);
     if ($caching) {
         $caching = $mainframe->getCfg('caching');
     }
     $cache = JFactory::getCache('plgCommunityMyContacts');
     $cache->setCaching($caching);
     $callback = array('plgCommunityMyContacts', '_getMyContactsHTML');
     //Moving this out of _getMyContactsHTML because it's causing error in Joomla 1.6
     JPlugin::loadLanguage('plg_community_mycontacts', JPATH_ADMINISTRATOR);
     return $cache->call($callback, $enable, $info, $this->params);
 }
Exemple #19
0
 function __construct(&$subject)
 {
     parent::__construct($subject);
     // load plugin parameters and language file
     $this->_plugin = JPluginHelper::getPlugin('system', 'jumi');
     $this->_params = json_decode($this->_plugin->params);
     JPlugin::loadLanguage('plg_system_jumi', JPATH_ADMINISTRATOR);
 }
Exemple #20
0
 function onProfileStatusUpdate(&$userid, &$old_status, &$new_status)
 {
     JPlugin::loadLanguage('plg_statustowall', JPATH_ADMINISTRATOR);
     $my =& CFactory::getUser();
     $user =& CFactory::getUser($userid);
     include_once JPATH_ROOT . DS . 'components' . DS . 'com_community' . DS . 'libraries' . DS . 'wall.php';
     CWallLibrary::saveWall($userid, JText::sprintf('STATUS UPDATE', $new_status), 'user', $my, $my->id == $user->id);
 }
Exemple #21
0
	function plgFlexicontent_fieldsTextSelect( &$subject, $params ) {
		parent::__construct( $subject, $params );
		JPlugin::loadLanguage('plg_flexicontent_fields_text', JPATH_ADMINISTRATOR);
		JPlugin::loadLanguage('plg_flexicontent_fields_select', JPATH_ADMINISTRATOR);
		JPlugin::loadLanguage('plg_flexicontent_fields_textselect', JPATH_ADMINISTRATOR);
		JPluginHelper::importPlugin('flexicontent_fields', 'text' );
		JPluginHelper::importPlugin('flexicontent_fields', 'select' );
	}
Exemple #22
0
 function plgContentJumi(&$subject)
 {
     parent::__construct($subject);
     // load plugin parameters and language file
     $this->_plugin = JPluginHelper::getPlugin('content', 'jumi');
     $this->_params = new JParameter($this->_plugin->params);
     JPlugin::loadLanguage('plg_content_jumi', JPATH_ADMINISTRATOR);
 }
 /**
  * @param JEventDispatche $subject
  * @param array $params
  */
 public function __construct(&$subject, $params)
 {
     plgFlexicontent_fieldsImage::$field_types[] = 'rapidimage';
     parent::__construct($subject, $params);
     JPlugin::loadLanguage('plg_flexicontent_fields_rapidimage', JPATH_ADMINISTRATOR);
     $this->docOptimizer = new DocumentOptimizer(App::container());
     $this->flexiImages = FlexiImages::create();
 }
Exemple #24
0
	function onAfterDisplayContent(&$article, &$params, $limitstart)
	{
		JPlugin::loadLanguage( 'plg_content_simplepopup', JPATH_ADMINISTRATOR );		//Load the plugin language file - not in contructor in case plugin called by third party components
		$application = &JFactory::getApplication();

		$regex = "#{simplepopup\b(.*?)\}(.*?){/simplepopup}#s";
		$article->text = preg_replace_callback( $regex, array('plgContentSimplePopUp', 'render'), $article->text, -1, $count );
		
	}
Exemple #25
0
 /**
  * Constructor
  *
  * For php4 compatability we must not use the __constructor as a constructor for plugins
  * because func_get_args ( void ) returns a copy of all passed arguments NOT references.
  * This causes problems with cross-referencing necessary for the observer design pattern.
  *
  * @param object $subject The object to observe
  * @param object $params  The object that holds the plugin parameters
  * @since 1.5
  */
 function plgContentCdMagicTabs(&$subject)
 {
     parent::__construct($subject);
     // load plugin parameters
     $this->plugin =& JPluginHelper::getPlugin('content', 'cdmagictabs');
     $this->params = new JParameter($this->plugin->params);
     // define language
     JPlugin::loadLanguage('plg_content_cdmagictabs', JPATH_ADMINISTRATOR);
 }
 function fetchElement($name, $value, &$node, $control_name)
 {
     JPlugin::loadLanguage('com_virtuemart', JPATH_ADMINISTRATOR);
     if (!function_exists('curl_init')) {
         return JTExt::_('VMPAYMENT_AUTHORIZENET_CURL_LIBRARY_NOT_INSTALLED');
     } else {
         return JTExt::_('VMPAYMENT_AUTHORIZENET_CURL_LIBRARY_INSTALLED');
     }
 }
Exemple #27
0
    function onRenderAdminForm(&$item, $type, $tab = '')
    {
        $plugins = new DSCParameter($item->plugins);
        $tiendaParams = new K2Parameter($item->plugins, JPATH_SITE . '/plugins/k2/' . $this->_name . '.xml', $this->_name);
        $productID = $tiendaParams->get('productID', 0);
        JPlugin::loadLanguage();
        if ($this->_isInstalled() && $productID && $type == 'item' && $tab == 'content') {
            $db = JFactory::getDBO();
            $query = "SELECT * FROM #__tienda_products WHERE product_id=" . (int) $productID;
            $db->setQuery($query, 0, 1);
            $product = $db->loadObject();
            if (!is_null($product)) {
                $tiendaParams->set('tiendaproductID', $product->product_id);
                $tiendaParams->set('tiendaproductName', $product->product_name);
                $tiendaParams->set('tiendaproductSKU', $product->product_sku);
                $tiendaParams->set('tiendaproductManufacturer', $product->manufacturer_id);
                $tiendaParams->set('tiendaproductWeight', $product->product_weight);
                $tiendaParams->set('tiendaproductLength', $product->product_length);
                $tiendaParams->set('tiendaproductWidth', $product->product_width);
                $tiendaParams->set('tiendaproductHeight', $product->product_height);
                $tiendaParams->set('tiendaproductShipping', $product->product_ships);
                $tiendaParams->set('tiendaproductEnabled', $product->product_enabled);
                $tiendaParams->set('tiendaproductTax', $product->tax_class_id);
            } else {
                $tiendaParams->set('tiendaproductID', NULL);
                $tiendaParams->set('tiendaproductName', NULL);
                $tiendaParams->set('tiendaproductSKU', NULL);
                $tiendaParams->set('tiendaproductManufacturer', NULL);
                $tiendaParams->set('tiendaproductWeight', NULL);
                $tiendaParams->set('tiendaproductLength', NULL);
                $tiendaParams->set('tiendaproductWidth', NULL);
                $tiendaParams->set('tiendaproductHeight', NULL);
                $tiendaParams->set('tiendaproductShipping', NULL);
                $tiendaParams->set('tiendaproductEnabled', NULL);
            }
            $plugins->merge($tiendaParams);
            $item->plugins = $plugins->toString();
            $document = JFactory::getDocument();
            $document->addStyleDeclaration('
			.tiendaButton { display:inline-block; padding:0 6px; background:url("../plugins/k2/tienda/images/button.jpg") center center repeat-x; border:1px solid #cccccc; -moz-border-radius:6px; margin:3px;}
			.tiendaButton a, .tiendaButton a:link, tiendaButton a:visited, tiendaButton a:hover, .tiendaButton a.modal, tiendaButton a.modal:visited, tiendaButton a.modal:hover, tiendaButton span { color:#333333; cursor:pointer; line-height:14px; text-decoration:none;}
			');
        }
        $form = new K2Parameter($item->plugins, JPATH_SITE . '/plugins/k2/' . $this->_name . '.xml', $this->_name);
        if (!empty($tab)) {
            $path = $type . '-' . $tab;
        } else {
            $path = $type;
        }
        $fields = $form->render('plugins', $path);
        if ($fields) {
            $plugin = new JObject();
            $plugin->set('name', $this->pluginNameHumanReadable);
            $plugin->set('fields', $fields);
            return $plugin;
        }
    }
Exemple #28
0
 /**
  * Method to get the field input markup.
  *
  * @author      Valerie  Isaksen
  * @return	string	The field input markup.
  * @since	1.6
  */
 function getInput()
 {
     JPlugin::loadLanguage('com_virtuemart', JPATH_ADMINISTRATOR);
     $key = $this->element['key_field'] ? $this->element['key_field'] : 'value';
     $val = $this->element['value_field'] ? $this->element['value_field'] : $this->name;
     $model = VmModel::getModel('vendor');
     $vendors = $model->getVendors(true, true, false);
     return JHTML::_('select.genericlist', $vendors, $this->name, 'class="inputbox"  size="1"', 'virtuemart_vendor_id', 'vendor_name', $this->value, $this->id);
 }
	function getDisplayTab($tab,$user,$ui)
	{

		$params=$this->params;

		global $_CB_framework,$_CB_database;

		$livesite = JURI::base();
		JPlugin::loadLanguage( 'com_alphauserpoints', JPATH_SITE );
		$tableclass = $params->get('tableclass', 1);
		$count_activity = $params->get('count_activity', 20);
		$return ="";
		$api_AUP = JPATH_SITE.DS.'components'.DS.'com_alphauserpoints'.DS.'helper.php';

		if ( file_exists($api_AUP)) {
			require_once ($api_AUP);
			$listActivity = AlphaUserPointsHelper::getListActivity('all', $user->id, $count_activity);
		}
		
		if(count($listActivity) >0) {
			$return .='<table width="95%" cellspacing="0" border="0">';
			$return .= '<tr class=\'sectiontableheader\'><th>';
			$return .='</th><th width="20%">';
			$return .= JText::_( 'AUP_DATE' );
			$return .='</th><th width="20%">';
			$return .= JText::_( 'AUP_ACTION' );
			$return .='</th><th width="6%">';
			$return .= JText::_( 'AUP_POINTS_UPPER' );
			$return .='</th><th>';
			$return .= JText::_( 'AUP_DETAIL' );
			$return .='</th></tr>';
			$i=0;
			foreach ( $listActivity as $activity ) {
				$i++;
				if($i>2) $i=1;
				$return .='<tr';
				if($tableclass) $return .=' class="sectiontableentry'.$i.'"';
				$return .=' ><td>';
					$icon = ( $activity->category!='' ) ? '<img src="'.JURI::base(true).DS.'components'.DS.'com_alphauserpoints'.DS.'assets'.DS.'images'.DS.'categories'.DS.$activity->category.'.gif" alt="" />' : '';
				$return .= $icon;
				$return .='</td><td>';
				$return .= '<span style="color:#333;">'.JHTML::_('date', $activity->insert_date, JText::_('d.m.Y')).'</span>&nbsp;<span style="color:#777;font-style:oblique;">'.JHTML::_('date', $activity->insert_date, JText::_('H:i:s')).'</span>';
					$color = $activity->points>0 ? "#009900" : ($activity->points<0 ? "#ff0000" : ($activity->points==0.00 ? "#777" : "#777"));
				$return .='</td><td style="color:'. $color .';">';
				$return .= JText::_( $activity->rule_name );
				$return .='</td><td style="text-align: right; color:'. $color .';">';
				$return .= $activity->points;
				$return .='&nbsp;&nbsp;</td><td  style="color:#777;">';
				$return .= $activity->datareference;
				$return .='</td></tr>';
			}
			$return .='</table>';
			$return .= '<br />' . JHTML::_('date', 'now', JText::_('l d.m.Y H:i'));
		} else $return .='<div align="center"><p>'.JText::_( 'AUP_THIS_INFORMATION_HAS_NOT_BEEN_PROVIDED' ).'</p></div>';
		return $return;
	}
Exemple #30
0
function AlphacontentParseRoute($segments)
{
    $vars = array();
    $db =& JFactory::getDBO();
    JPlugin::loadLanguage('com_alphacontent');
    $task = JRequest::getVar('task', '', 'get', 'string');
    if ($task == 'viewmap') {
        return $segments;
    }
    // Count route segments
    $count = count($segments);
    if ($count) {
        $segments[0] = str_replace('.html', '', $segments[0]);
        // Break up the section id into numeric and alias values.
        if (isset($segments[0]) && strpos($segments[0], ':')) {
            list($sectionid, $sectionalias) = explode(':', $segments[0], 2);
        }
        if ($segments[0] == '0:' . urldecode(JText::_('AC_UNCATEGORIZED'))) {
            $segments[0] = 'uncategorized';
        }
        switch ($segments[0]) {
            case 'weblinks':
                $vars['section'] = 'weblinks';
                break;
            case 'contacts':
                $vars['section'] = 'contacts';
                break;
            case 'uncategorized':
                $vars['section'] = '0';
                break;
            default:
                $sql = "SELECT `id` FROM `#__sections`\n\t\t\t\t\t\tWHERE `alias` = '" . urldecode($sectionalias) . "' LIMIT 1";
                $db->setQuery($sql);
                $section = $db->loadResult();
                if (!$section) {
                    $section = '';
                }
                $vars['section'] = $section;
        }
        if ($count == 2) {
            $segments[1] = str_replace('.html', '', $segments[1]);
            // Break up the category id into numeric and alias values.
            if (isset($segments[1]) && strpos($segments[1], ':')) {
                list($catid, $catalias) = explode(':', $segments[1], 2);
            }
            $sql = "SELECT `id` FROM `#__categories`\n\t\t\t\t\tWHERE `alias` = '" . urldecode($catalias) . "' LIMIT 1";
            $db->setQuery($sql);
            $category = $db->loadResult();
            if (!$category) {
                $category = '';
            }
            $vars['category'] = $category;
        }
    }
    return $vars;
}