CodeIgniter Forums

Full Version: dompdf as helper instead of plugin - CI 2.x
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

Hi guys.

I have a question.
I´m using CI 1.7.x with the dompdf plugin. It was very easy because just putting the third-party code (which comes as a directory with many files) in a directory at /system/plugins/.

Now since Codeigniter 2.0.0 the plugin/ directory was removed. The documentation says:
Quote:Plugins have been removed, in favor of Helpers. The CAPTCHA plugin has been converted to a Helper and documented. The JavaScript calendar plugin was removed due to the ready availability of great JavaScript calendars, particularly with jQuery.

So I have to use dompdf as a helper. But where is suggested to put dompdf files, the subdirectories ...?
I think it is not nice to create a directory /application/helper/dompdf/
Or is this what you suggest?

Thanks for your answers! Smile

El Forum

I changed my code now in that way, that dompdf is a helper.
I do it in the same way as for the plugins (s. the wiki: ) but in the /application/helper/ directory.

Just put dompdf there in a extra directory called "dompdf" and rename the "to_pdf_pi.php" to "to_pdf_helper.php".

Now it works.

But would be nice to get answer anyway for the question if it is like intended or if there is a "better" way to use a external library.

Thanks for all suggestions.


El Forum

[eluser]Rok Biderman[/eluser]
It works as intended, plugins are deprecated in favor of helpers, so all is as it should be. No need to do it any other way, imo.