Call php before loading page list - table prefix

Hi all,

Completely new to Fabrik - just heard about it this morning!

Two questions:

1. Before loading any lists, I need to connect to a web service and verify data. Can this be done easily in Fabrik?

2. We may need to have multiple joomla! instances using the same database so it is important that we can use the #__ joomla! table prefix. I found some old messages about this and I'm wondering if this has been fully implemented?

Best regards,
Arnor Baldvinsson - Icetips Alta LLC.
 
1 - yes, there is a plugin hook for 'onLoadData', which can be accessed through either the existing generic 'php_events' list plugin, or by writing your own list plugin (see the 'pivot' plugin code for an example of rewriting list data on load).

2 - yes, the #__ prefix is supported in all queries made through Fabrik.

-- hugh
 
Hi Hugh,

That is Excellent!

Two other questions:

1. Does Fabrik have anything in terms of creating "reports" and exporting for example to PDF, etc. ?

2. We are developing components/modules to use on multiple sites so we need to be able to install our product. Is there some easy way to determine what files have been created by Fabrik - or does it perhaps have an option to pack up an install zip file itself or an option to list the files created somewhere?

Best regards,

Arnor Baldvinsson - Icetips Alta LLC.
 
Fabrik can generate PDF's of lists and details views, although because of the nature of PDF generation, if you want something "nice" you'll probably need to do some work on a custom CSS and/or template for it. Joomla has no built in support for PDF, so we use a third party library (DOMPDF) and use the HTML to PDF conversion from that library, which has some quirks and weaknesses.

As for "reports", that's kind of a "how long is a piece of string" question. Rather depends what you mean by "reports".

One way to get reports is to use MySQL views. Say you wanted "sales of widgets by month", it's easy enough to build a MySQL view that groups and sums a "sales" table. Then you can build a Fabrik list which uses that view as the "table" - we allow lists to use views, you just can't add or edit them, as views are read-only in MySQL (well, for all intents and purposes).

-- hugh
 
Hi Hugh,

Coming from desktop applications, reports on the web are a headache in the best of times!<g>

Thanks for the point on using views on the SQL side!

One more question: You said we could use a plugin for adding code before a page loads. What about when a form has been accepted? I need to intercept that to send update data to a web service once the data is submitted.

Best regards,
Arnor Baldvinsson - Icetips Alta LLC
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top