Welcome Guest, Not a member yet? Register   Sign In
Site library
#7

[eluser]dcheslow[/eluser]
Thanks to all for the comments. I forgot to mention that both the library and the config file should be named 'site.php' so that CI will do it's magic with autoloading.

So long as the language library is loaded before the site library, there is no problem with internationalizing. It's worth noting that "copyright" is not an international concept. Usually, the rest of the information managed by this class (company name, mailing address, etc.) does not get translated when internationalizing.

I have found it useful to have a single email address for the site AND to use a contacts library to manage email addresses for people/groups. I use the site email address in places like the page footer and the signature block of automatically generated email messages. If you want these emails to go to several individuals, it's easier to setup an email alias than to change the website.

It's a matter of business logic as to which bits of information are one-to-one with sites. Generally speaking, a site has only one company name, one mailing address, one (central) phone number, etc. This class is for these bits of information. The other thing the class does that I find very handy is allow me to specify different paths on different servers. Yes, it handles all the "base_url + offset" stuff, but it does a bit more. In the example configuration I posted, you can see that the ghostscript application ('gs') is located in one place on localhost and a different place on the production server. You don't need to do anything special to add application paths, just add them in the config file and you're ready to go.

I am definitely open to suggestions for improvement. Keep 'em coming...

Thanks,

=dave=


Messages In This Thread
Site library - by El Forum - 04-24-2008, 05:09 PM
Site library - by El Forum - 04-25-2008, 12:44 AM
Site library - by El Forum - 04-25-2008, 02:02 AM
Site library - by El Forum - 04-25-2008, 02:10 AM
Site library - by El Forum - 04-25-2008, 02:35 AM
Site library - by El Forum - 04-25-2008, 03:44 PM
Site library - by El Forum - 04-25-2008, 04:47 PM
Site library - by El Forum - 04-26-2008, 12:40 AM
Site library - by El Forum - 04-26-2008, 11:32 PM
Site library - by El Forum - 04-27-2008, 01:04 AM
Site library - by El Forum - 04-27-2008, 01:18 AM



Theme © iAndrew 2016 - Forum software by © MyBB