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) »
  • Discussion »
  • Extensions (Moderators: mathieu, totten, kasiawaka) »
  • CMS specific changes in extensions, eg for WP shortcodes
Pages: [1]

Author Topic: CMS specific changes in extensions, eg for WP shortcodes  (Read 714 times)

JoeMurray

  • Administrator
  • Ask me questions
  • *****
  • Posts: 578
  • Karma: 24
    • JMA Consulting
  • CiviCRM version: 4.4 and 4.5 (as of Nov 2014)
  • CMS version: Drupal, WordPress, Joomla
  • MySQL version: MySQL 5.5, 5.6, MariaDB 10.0 (as of Nov 2014)
CMS specific changes in extensions, eg for WP shortcodes
January 06, 2014, 07:54:23 am
This is a general issues, but our specific use case concerns just WordPress.

We want to add support for additional short codes, and at present this seems to require that we change files manually on install. See https://github.com/JMAConsulting/biz.jmaconsulting.grantapplications/blob/4.4/shortcode-wp/civicrm.php, lines 1369-1378, and related changes in https://github.com/JMAConsulting/biz.jmaconsulting.grantapplications/blob/4.4/shortcode-wp/civicrm.js lines 48-52. What is the correct way to insert stuff into these files?
Co-author of Using CiviCRM https://www.packtpub.com/using-civicrm/book

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: CMS specific changes in extensions, eg for WP shortcodes
January 06, 2014, 10:54:17 am
Hmm, since shortcodes are WP-only, I wonder if it would make sense to do it as a WP plugin rather.
Try asking your question on the new CiviCRM help site.

JoeMurray

  • Administrator
  • Ask me questions
  • *****
  • Posts: 578
  • Karma: 24
    • JMA Consulting
  • CiviCRM version: 4.4 and 4.5 (as of Nov 2014)
  • CMS version: Drupal, WordPress, Joomla
  • MySQL version: MySQL 5.5, 5.6, MariaDB 10.0 (as of Nov 2014)
Re: CMS specific changes in extensions, eg for WP shortcodes
January 06, 2014, 11:04:08 am
Hmm from my side too. The extension is providing the functionality behind the forms that are rendered by the shortcodes. We were following the core team's approach for implementing shortcodes, but didn't see how to extend it easily using existing patterns for extensions.

FWIW, we are hoping to have this whole extension accepted into core for 4.5.
Co-author of Using CiviCRM https://www.packtpub.com/using-civicrm/book

totten

  • Administrator
  • Ask me questions
  • *****
  • Posts: 695
  • Karma: 64
Re: CMS specific changes in extensions, eg for WP shortcodes
January 06, 2014, 12:27:57 pm
Not sure how much time there is to spend on it, but...

We currently have a few different constructs which are basically all "ways to expose prewritten Civi widgets in the CMS", ie:
 * Full/standalone pages
 * Shortcodes (currently supported best in civicrm-wordpress)
 * Blocks (currently supported best in civicrm-drupal)

In an ideal world, I think we would support all of these in all CMSs -- e.g. shortcodes would be supported as input filters in Drupal.

The connection - if someone does plan to do some changes to the WP shortcode handling, it would be good to push more of the logic out of civicrm-wordpress.git and into civicrm-core.git (eg CRM/Core/Shortcode ?).

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: CMS specific changes in extensions, eg for WP shortcodes
January 06, 2014, 12:30:29 pm
+1 on abstracting this stuff. Joe if your work is moving in that direction, then I would say don't do it as an extension do it as a PR for civicrm 4.5.
Try asking your question on the new CiviCRM help site.

JoeMurray

  • Administrator
  • Ask me questions
  • *****
  • Posts: 578
  • Karma: 24
    • JMA Consulting
  • CiviCRM version: 4.4 and 4.5 (as of Nov 2014)
  • CMS version: Drupal, WordPress, Joomla
  • MySQL version: MySQL 5.5, 5.6, MariaDB 10.0 (as of Nov 2014)
Re: CMS specific changes in extensions, eg for WP shortcodes
January 06, 2014, 12:48:13 pm
Agreed then. We'll provide manual instructions for WordPress for 4.4, and aim to have this in core for 4.5 as previously agreed in principle subject to code review etc.

BTW, +1 from here too on abstracting the CMS-specific approaches. I have had clients who were quite disappointed to not be able to put up some blocks in WP that they were used to in Drupal. WRT shortcodes as a input format, this reminds me a bit of how the gmap module used to do its work back in D5 days.
Co-author of Using CiviCRM https://www.packtpub.com/using-civicrm/book

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Extensions (Moderators: mathieu, totten, kasiawaka) »
  • CMS specific changes in extensions, eg for WP shortcodes

This forum was archived on 2017-11-26.