Архиви на блога

preg_match_all image

$matches = array(); preg_match_all(‘/<img.+src=[\’“]([^\’“]+)[\’“].*\/>/i’ , $article->text , $matches); if($matches[0][0]){ echo $matches[0][0]; }

С етикет: , , , , ,
Публикувано в Joomla

virtuemart empty cart link

go to /components/com_virtuemart/controllers/cart.php and add this fuction public function deleteall() { $mainframe = JFactory::getApplication(); $cart = VirtueMartCart::getCart(); $cart->emptyCart(); $mainframe->redirect(JRoute::_(‘index.php?option=com_virtuemart&view=cart’)); } Go to your cart template and add <a title=“<?php echo JText::_(‘COM_VIRTUEMART_CART_DELETE’) ?>“ align=“middle“ href=“<?php echo JRoute::_(‘index.php?option=com_virtuemart&view=cart&task=deleteall’) ?>“><i></i></a>

С етикет: , , ,
Публикувано в Joomla

run joomla plugin in component module or virtuemart template

$text = JHTML::_(‘content.prepare’, $text );

С етикет: , , , , ,
Публикувано в Joomla

Joomla Share link on Facebook and Default image

<link rel=“image_src“ href=“http://example.com/facebook-will-use-this.jpg“ /> JFactory::getDocument()->addHeadLink( $imagePath, ‘image_src’, ‘rel’ );

С етикет: , , ,
Публикувано в Joomla