Ini files, using them in my extension?

Author Message

Clemens T

Tuesday 08 November 2005 3:40:44 am

Heya all,
I'd like to know how to use ini files throughout my extension.. in the templates as well as in the code. Right now we have an extension that is heavily depending on the id's in the contenttree.

I'd like to set these id's in an ini file, but really unsure on how to handle this, and what the best way is.

Thanks,
Clemens

Ɓukasz Serwatka

Tuesday 08 November 2005 3:54:47 am

Hi Clemens,

You can just place INI file in extension/your_extension/settings/ directory, and read it via ezini( section, variable [, ini file] ) in your tpl or eZINI::instance('your_ini_file.ini'); in PHP.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Clemens T

Tuesday 08 November 2005 8:17:40 am

wow. ez :)
thanks

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 20 2025 17:27:45
Script start
Timing: Jan 20 2025 17:27:45
Module start 'layout'
Timing: Jan 20 2025 17:27:45
Module start 'content'
Timing: Jan 20 2025 17:27:45
Module end 'content'
Timing: Jan 20 2025 17:27:45
Script end

Main resources:

Total runtime0.0125 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0044 587.9375151.2109
Module start 'layout' 0.00440.0021 739.148436.6484
Module start 'content' 0.00650.0044 775.796990.1563
Module end 'content' 0.01090.0016 865.953129.9922
Script end 0.0124  895.9453 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002318.3344140.0002
Check MTime0.00118.5939140.0001
Mysql Total
Database connection0.00075.819110.0007
Mysqli_queries0.002016.343130.0007
Looping result0.00000.080310.0000
Template Total0.00129.510.0012
Template load0.00097.334510.0009
Template processing0.00032.140310.0003
Override
Cache load0.00075.234310.0007
General
dbfile0.00032.125180.0000
String conversion0.00000.040140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs