Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
You are here: HomeForum
Welcome, Guest

Insert the module after second paragraph
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Insert the module after second paragraph

Insert the module after second paragraph 10 years, 6 months ago #13344

  • danko54
  • OFFLINE
  • Junior Boarder
  • Posts: 21
  • Karma: 0
Hello, I would like to insert a module after second paragraph to article with override, if I put this code in file default.php puts the module after the first paragraph, please let you modify this code to put the form after the second paragraph?

//*******
jimport( 'joomla.application.module.helper' );
$module = JModuleHelper::getModule( 'mod_custom' , 'Name Module' );
$len = strlen($this->item->text);
$pos = strpos($this->item->text, "</p>");
$first = substr($this->item->text, 0, $pos);
$NameModule = $module->content;
$end = substr($this->item->text, $pos, $len);
$this->item->text = $first.$NameModule.$end;
//********
  • Page:
  • 1
Time to create page: 0.19 seconds

Notification

Please find your issue via Suggested Posts before submitting your question. We have solved the most of issues and maybe your issue was solved before.

Latest My Topics

No posts to display.

Love all our templates?

Join our membership clubs starting at $49 only for access to all of our templates

Join Now
Home Pricing
Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
SearchSupport
Magento Themes Magento Extensions Free Magento Extensions Prestashop Themes Prestashop Modules Magento 2 Themes