CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • WordPress Installations (Moderators: Kurund Jalmi, Coleman Watts) »
  • New feature for the_content hook?
Pages: [1]

Author Topic: New feature for the_content hook?  (Read 551 times)

joumak

  • I’m new here
  • *
  • Posts: 16
  • Karma: 0
  • CiviCRM version: 4.4.1
  • CMS version: WordPress 3.6.1
  • MySQL version: 5.5.31
  • PHP version: 5.3.10
New feature for the_content hook?
November 26, 2013, 12:58:48 am
Our site uses Multiple content blocks plugin, that applies the_content filters every time it's own the_block -function is called in templates. Civicrm adds itself to the content first time the_content filter is applied. In our case it's not so optimal left column. So would it be possible, that WordPress-plugin for CiviCRM could optionally check extra argument passed to the the_content -filter to inject CiviCRM to explicitly designated place in code like this (or something similar to address specific place in a code):
Code: [Select]
<div id="left-col"><?php the_block('left-col') ?></div>
<div id="content"><?php the_content(array('invoke_civicrm' => 'true')) ?></div>
<div id="right-col"><?php the_block('right-col') ?></div>
Update
It's not possible to add arguments to the the_content -function like this, so maybe there should be option to place special comment or similar to the actual content in WordPress text editor like <!--invoke_civicrm-->, that the CiviCRM optionally would sniff and use.

Thanks, Jouni
« Last Edit: November 26, 2013, 01:05:44 am by joumak »

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: New feature for the_content hook?
November 26, 2013, 06:24:52 am

can you take a look at the integration code (plugins/civicrm/civicrm.php) and potentially contribute a patch for this?

might also be worth checking how other plugins handle multiple invocations of the_content filter. Seems like there should be some name associated with each invocation to detect and do stuff in

thanx

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • WordPress Installations (Moderators: Kurund Jalmi, Coleman Watts) »
  • New feature for the_content hook?

This forum was archived on 2017-11-26.