×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Use PHP code directly in the Matukio Templates

Use PHP code directly in the Matukio Templates 9 years 8 months ago #30430

  • Imre Van den berge
  • Imre Van den berge's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 0
Hi Yves

Is it possible (for a Joomla Super User) to directly use PHP code in the Matukio templates? Perhapse with the use of some extra software like DirectPHP .

If not, is there some workaround for this?


Best regards
Imre

Use PHP code directly in the Matukio Templates 9 years 8 months ago #30433

  • Yves Hoppe
  • Yves Hoppe's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 3519
  • Karma: 71
  • Thank you received: 556
Hi Imre,

as you said this is not directly possible (The joomla editor filters any php code etc.) - you can try extensions, but these are working mostly with plugins - and plugins need to get executed by the extension (This is not the case in templates).

What are you trying to achieve?

Kind regards,

Yves

Use PHP code directly in the Matukio Templates 9 years 8 months ago #30595

  • Imre Van den berge
  • Imre Van den berge's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 0
Hi Yves

Perhaps you remember my earlier post about the structured communication that needs to be printed on every invoice. You already answered that this is possible:

Hmm you can add this number by creating a new booking placeholders (e.g. MAT_BOOKING_STRUCTURED_COM) using plugins or modifying the code, that isn't very complicated, should be minutes for any programer.


To answer your question... I was trying to achieve a quick implementation for testing this structured communication, before doing the actual implementation with a new booking placeholder.

You said that this implementation can be easily done by either changing the code, or creating a plugin.
(1) I guess if it comes to future Matukio updates and maintainability, it's better to use a plugin instead of messing around in the code?
(2) Is this a Matukio plugin, or a Joomla plugin?
(3) Can you provide (a link to) some guidelines or further info for doing the implementation please?
(4) If you want, I can post the php snippet for the creation of the structured communication. Like you already said, it's a rather small amount of code... Just a couple of lines.


Best regards
Imre

Ps:
  • For those interested, I tried using Sourcerer that enables you to write PHP code directly through (one of) the Joomla editor(s). Works perfectly in Joomla articles, but not in Matukio.
  • On the other hand, it seems that other extensions like Articles Anywhere and Tabs can be used directly into Matukio. Might be interesting for those looking for a nice way to structure longer content...
  • Page:
  • 1
Time to create page: 0.105 seconds