• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
dompdf as helper instead of plugin - CI 2.x

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

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: http://codeigniter.com/wiki/PDF_generati...ng_dompdf/ ) 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.


[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.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.