From: Justin F. <je...@ey...> - 2001-07-07 18:32:03
|
Alex: Another "usuability issue" and/or I don't know where to do something in this BC environment. You have already pre-empted the name "BC_" prefix for define()'s, and you call these "user constants". Now, what if I want a page-scope/all module defined constant. What should I do? Where do I define() something that I wish all modules to see in global scope. Is this going to be possible in the *.xml file that will be ripped into the index.php? If so, will it be put up there at the top like: // ripped from /path/to/binarycloud/user/htdocs/index.xml $SITE_EMAIL="jo...@so..."; //for email all over $SITE_ROWS_BEFORE_PAGING=15; //for paging lists $SITE_TEL_NO="1-800-6969"; // for telno all over $SITE_WEBMASTER="wi...@so..."; or define(SITE_EMAIL,"jo...@so..."); and so forth. As an aside, I sort of think of these as "user constants", but I suppose they are "site constants" or "page constants". So, the question(s) are: 1. Where should I define them for global scope? 2. If you tell me some module that I will have to load, such as a SiteLibrary.php, then I guess I would have to go along with it, but this seems wrong-headded. Now I want to be able to put them in the *.xml and have them work as I described above, defining them in global scope for THAT PAGE with any set of modules called from and set of packages, and not have to worry that I didn't load, say, the SiteLibrary.php that would do it, with its potential omission. If I create a new page(s) for the site six months after it has been up, I might forget which bloody module globaled my constants. What if I want: define(BUTTONS,"../resources/images/buttons/"); define(SITE_GIZMOS,"resources/images/gizmos/"); Where? I suppose that now I am starting to get into the operation of the XML --> php file thingy. I will be happy when that is ready. And I would like to have defines()'s available in that XML --> php. -- Justin Farnsworth Eye Integrated Communications 321 South Evans - Suite 203 Greenville, NC 27858 | Tel: (252) 353-0722 |