function onPrepareContent(&$article, &$params, $limitstart)
 {
     $regexp = '/\\{artsexylightbox((\\s+[a-z\\_0-9]+=(?:"[^"]*"|".*?"|[^\\s}]*))*\\s*)\\}(?:(.*?){\\/artsexylightbox\\})?/si';
     if ($params && $params->get("enabled", "1") == "0") {
         $article->text = preg_replace($regex, "", $article->text);
     } else {
         $artParams = array("path" => "", "name" => "SLB", "zIndex" => 65555, "color" => "black", "find" => "sexylightbox", "imagesdir" => JURI::BASE() . "plugins/content/artsexylightbox/images", "background" => "bgSexy.png", "backgroundIE" => "bgSexy.gif", "closeButton" => "SexyClose.png", "displayed" => 0, "modal" => 0, "showDuration" => 200, "showEffect" => "linear", "closeDuration" => 400, "closeEffect" => "linear", "moveDuration" => 800, "resizeDuration" => 800, "moveEffect" => "easeOutBack", "resizeEffect" => "easeOutBack", "noConflict" => false, "previewWidth" => "", "previewHeight" => "");
         $pluginParams = plgContentartsexylightbox::getPluginParams($artParams);
         if (preg_match_all($regexp, $article->text, $matches, PREG_SET_ORDER) > 0) {
             plgContentartsexylightbox::loadExtensions();
             plgContentartsexylightbox::addResources();
             $i = 0;
             $matchesCount = count($matches);
             foreach ($matches as $match) {
                 $adjustedMatch = plgContentartsexylightbox::adjustMatch($match[1]);
                 $adjustedMatch = parse_str($adjustedMatch, $clientParams);
                 $finalParams = plgContentartsexylightbox::getClientParams($clientParams, $pluginParams);
                 $article->text = preg_replace($regexp, plgContentartsexylightbox::getSexyLightboxCode($i, $finalParams, $match[3]), $article->text, 1);
                 $i++;
                 $finalParams = $pluginParams;
             }
         }
     }
 }
        list($anum, $aalph) = explode('.', $a);
        list($bnum, $balph) = explode('.', $b);
        if ($anum == $bnum) {
            return !strcmp($aalph, $balph);
        }
        return $anum > $bnum ? -1 : 1;
    }
}
$finalParams = array();
$finalParams['path'] = $params->get('path', '');
$finalParams['thumbnailPath'] = $params->get('thumbnailPath', '');
$finalParams['name'] = $params->get('name', 'SLB');
$finalParams['zIndex'] = $params->get('zIndex', 65555);
$finalParams['color'] = $params->get('color', 'black');
$finalParams['find'] = $params->get('find', 'sexylightbox');
$finalParams['imagesdir'] = $params->get('imagesdir', JURI::BASE() . 'modules/mod_artsexylightbox/artsexylightbox/images');
$finalParams['background'] = $params->get('background', 'bgSexy.png');
$finalParams['backgroundIE'] = $params->get('backgroundIE', 'bgSexy.gif');
$finalParams['closeButton'] = $params->get('closeButton', 'SexyClose.png');
$finalParams['displayed'] = $params->get('displayed', 0);
$finalParams['modal'] = $params->get('modal', 0);
$finalParams['showDuration'] = $params->get('showDuration', 200);
$finalParams['showEffect'] = $params->get('showEffect', 'linear');
$finalParams['closeDuration'] = $params->get('closeDuration', 400);
$finalParams['closeEffect'] = $params->get('closeEffect', 'linear');
$finalParams['moveDuration'] = $params->get('moveDuration', 800);
$finalParams['resizeDuration'] = $params->get('resizeDuration', 800);
$finalParams['moveEffect'] = $params->get('moveEffect', 'easeOutBack');
$finalParams['resizeEffect'] = $params->get('resizeEffect', 'easeOutBack');
$finalParams['noConflict'] = $params->get('noConflict', false);
$finalParams['previewWidth'] = $params->get('previewWidth', '');
        ?>
					<?php 
        $newLink3 = JRoute::_("index.php?option=com_community&view=profile&userid=" . $item->user_id);
        //echo $newLink3;
        $patterns[0] = '/\\/modules\\//';
        $patterns[1] = '/mod_jomtube_tabs\\//';
        $replacements[0] = '';
        $replacements[1] = '';
        $parsedLink3 = preg_replace($patterns, $replacements, $newLink3);
        ?>
					<div id="video-from-jt-tabs-module">
						<?php 
        echo _VIDEOINFO_AUTHOR;
        ?>
:<span class="video-username-jt-tabs-module"> <a href="<?php 
        echo JURI::BASE() . $newLink3;
        ?>
"><?php 
        echo jomtube::showShortAuthor($item->username);
        ?>
</a></span>
					</div>
					<?php 
    }
    ?>
					<!--## VIDEO HITS COUNTER ##-->
					<?php 
    if ($show_numberviews) {
        ?>
					<div id="video-view-count-jt-tabs-module">
						<?php 
 function onTP_Processpayment($data)
 {
     $db = JFactory::getDBO();
     $post = JRequest::get('post');
     $cardnum = substr($post['cardnum'], 0, 8);
     $iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CBC), MCRYPT_DEV_URANDOM);
     $cardno = base64_encode($iv . mcrypt_encrypt(MCRYPT_RIJNDAEL_256, hash('sha256', $this->encryption_key, true), $cardnum, MCRYPT_MODE_CBC, $iv));
     $cardexp = base64_encode($iv . mcrypt_encrypt(MCRYPT_RIJNDAEL_256, hash('sha256', $this->encryption_key, true), $post['cardexp'], MCRYPT_MODE_CBC, $iv));
     $cardcvv = base64_encode($iv . mcrypt_encrypt(MCRYPT_RIJNDAEL_256, hash('sha256', $this->encryption_key, true), $post['cardcvv'], MCRYPT_MODE_CBC, $iv));
     $cardtype = base64_encode($iv . mcrypt_encrypt(MCRYPT_RIJNDAEL_256, hash('sha256', $this->encryption_key, true), $post['activated'], MCRYPT_MODE_CBC, $iv));
     $arr = array('Card No' => $cardno, 'Expiry Date' => $cardexp, 'CVV Number' => $cardcvv, 'Card Type' => $cardtype);
     $params = json_encode($arr);
     $mainframe =& JFactory::getApplication('site');
     $sql = "UPDATE #__jg_orders SET processor = 'Offline Card', extra = '" . $params . "' ORDER BY id DESC LIMIT 1";
     $db->setQuery($sql);
     $db->query();
     $sql = "SELECT id FROM #__jg_orders WHERE order_id = '" . $data["order_id"] . "'";
     $db->setQuery($sql);
     $id = $db->loadResult();
     $jconfig = JFactory::getConfig();
     $jconfig->getValue('config.fromname');
     $params = JComponentHelper::getParams('com_jgive');
     $email = $params->get('email');
     $subject = JText::_('CREDIT_CARD_DETAILS');
     $lastcardno = substr($post['cardnum'], 8);
     $count = strlen($lastcardno);
     $order_id = $data["order_id"];
     $body = JText::sprintf('SEND_MSG_USER', $order_id, $count, $lastcardno);
     JUtility::sendMail($jconfig->getValue('config.mailfrom'), $jconfig->getValue('config.fromname'), $email, $subject, $body, $mode = 1, $cc = null, $bcc = null, $attachment = null, $replyto = null, $replytoname = null);
     $user = JFactory::getUser();
     if ($user->guest) {
         $link = $_REQUEST["return"];
         $base = JURI::BASE();
         $link = str_replace($base, "", $link);
         $mainframe->redirect($link);
     } else {
         $mainframe->redirect('index.php?option=com_jgive&view=donations&layout=details&donationid=' . $id . '&processor=offlinecard&email=&Itemid=0');
     }
     return true;
 }