FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » FUDforum 3.0+ » Get rid of __autoload() and global settings (Lazy practice, messes up other frameworks' code)
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
Get rid of __autoload() and global settings [message #166598] Fri, 27 January 2012 09:52 Go to next message
NeXuS is currently offline  NeXuS
Messages: 121
Registered: July 2010
Location: South Korea
Karma: 5
Senior Member
Contributing Core Developer
add to buddy list
ignore all messages by this user
Hi,
in my infinite struggle to have FUDforum and CodeIgniter get along well, I came across an instance where the presence of __autoload() in core.inc causes problems (it tries to load one of CI's classes, which obviously is not in FUD's path).

I had to resort to a ugly hack checking the classname, but it would just be much better to get rid of __autoload in the first place and include the necessary files when needed (I will have to redo the hack every time I update FUD).

Also the use of tons of globals may lead to name conflicts. It would be much better to have only one global variable which is an object of options (or array of options).
Re: Get rid of __autoload() and global settings [message #166610 is a reply to message #166598] Fri, 27 January 2012 23:27 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3628
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
The autoloader was fixed to only look of and load exiting FUDforum libraries.
Details @ http://fudforum.svn.sourceforge.net/viewvc/fudforum/trunk/install/forum_dat a/include/core.inc?r1=5376&r2=5388
Re: Get rid of __autoload() and global settings [message #166612 is a reply to message #166610] Sat, 28 January 2012 00:14 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3628
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
Changing all settings to one global variable will be a lot of work. You are welcome to implement it, provided you do all the work yourself and leave the code in a working state. Let me know if you need SVN commit access.
Re: Get rid of __autoload() and global settings [message #166613 is a reply to message #166612] Sat, 28 January 2012 08:34 Go to previous message
NeXuS is currently offline  NeXuS
Messages: 121
Registered: July 2010
Location: South Korea
Karma: 5
Senior Member
Contributing Core Developer
add to buddy list
ignore all messages by this user
I'll first work on a local tree, if I can get everything in order I will then ask for SVN access.

Thanks
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: 3.0.4 and php
Next Topic: Props to Frank
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Dec 11 04:43:09 EST 2017

Total time taken to generate the page: 0.00523 seconds