Writing PHP plugins for Squiz Matrix


(Ryan Archer) #1

How is it possible to write plugins for Squiz Matrix system. We currently have Squiz Matrix 5.3.xx version installed and we have SLA with Squiz Matrix.

 

I want to be able to put together some PHP files that will be able to read and write SQL to Active Directory (AD) via LDAP. Basically, I want to write SQL queries using PHP - something that is obviously done all the time within the environment itself.

 

I want to approach it as a plugin as I don't want to void our SLA or affect/conflict with any of the operating env behind Squiz Matrix. What is the best possible approach to this? Is there any available plugin documentation akin to a Wordpress codex out there?

 

Thanks


(Nic Hubbard) #2

I have build many many assets for Matrix, but they wouldn't be considered "plugins". I assume your SLA doesn't give you root access to your server?


(Ryan Archer) #3

Your assumption is most likely correct Nic, but I will double check on that and confirm.


(Ryan Archer) #4

Hi Nic. Actually I don't think a plugin or package is what we need. I'm not looking to create a new type of asset in Squiz Matrix (unless I can make a package that allows me to create PHP files!).

 

I'm looking to be able to create custom PHP files that sit on the same level as a HTML form. Then that form can use PHP to talk (and push information) to several SQL databases (Definitely NOT the Squiz Matrix DB, one of them being AD) and also perform a basic HTTP push.

 

If I was not using a CMS, this would be fairly straightforward to me. We do have root level access but I'd have to spin up a test instance of the server as it would be too risky (and stupid) to go play around in our front facing Squiz Matrix environment.


(Peter McLeod) #5

Hi

could you use the DB connector and data source assets, and use the Run DB Query form submission action?https://matrix-manuals.squiz.net/data/chapters/db-connector

 

Though it depend on the specific type of SQL db your querying.

 

Another option could be to set up an intermediate app (that runs external to your matrix site) that you push data to, and it then handles the interaction with the database.

 

Thanks

Peter


(Ryan Archer) #6

Thanks Pete. We already have the app running outside the SM environment. It was written in C# inside a Visual Studio environment which then runs up a web application/environment at runtime using ASP.NET - it was built by a contracted software developer.

 

I want to do the whole thing with PHP, which seems way more suitable and bring it into the SM environment so it can use the dynamic header and footers used in our design customisations.

 

I had a quick look at the DB Connector and as far as I can tell, it appears as read only like most of the Squiz assets - can read information in but I'm looking to read and write to database in LDAP. If I spin up a DB Connector, can I also create PHP files to compile HTML form data and push it to SQL?


(Nic Hubbard) #7

Oh, well I have done this too. I just created my own PHP form and then used the Remote Content asset. Have you looked into this?