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

Home » FUDforum Development » FUDforum 3.0+ » Suggestions
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Suggestions [message #15865] Wed, 07 January 2004 16:12 Go to next message
Gribnif is currently offline  Gribnif   United States
Messages: 82
Registered: December 2003
Karma: 0
Member
1. Add a "technical" section to the documentation, which describes how the src/*.pm.t files are compiled into the .php files for each theme. It took me quite some time to figure out that I couldn't just make changes to the .php files and have them persist.

2. Add more comments to the PHP source. It's very sparse right now.

3. Change PHP code like this:

if (!($usr_d->users_opt & 131072)) {

to be more readable, by using constants:

define( 'ACCT_CONFIRMED',131072);
...
if (!($usr_d->users_opt & ACCT_CONFIRMED)) {
Re: Suggestions [message #15866 is a reply to message #15865] Wed, 07 January 2004 16:25 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
It maybe more readable, but WAY slower. Constant look-ups in PHP are very slow.

FUDforum Core Developer
Re: Suggestions [message #15868 is a reply to message #15866] Wed, 07 January 2004 16:47 Go to previous messageGo to next message
Gribnif is currently offline  Gribnif   United States
Messages: 82
Registered: December 2003
Karma: 0
Member
That's too bad. Is using a regular variable, like $ACCT_CONFIRMED, any faster?
Re: Suggestions [message #15870 is a reply to message #15868] Wed, 07 January 2004 16:58 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Yeah, but variables are not always in the scope of functions that use them and so on. If you want to see what the various #s mean looks inside GLOBALS_HELP, which documents all global constants. The sql/*.tbl files identify the keys for used in various tables.

FUDforum Core Developer
Re: Suggestions [message #15879 is a reply to message #15865] Thu, 08 January 2004 00:53 Go to previous messageGo to next message
AzaToth is currently offline  AzaToth   Sweden
Messages: 125
Registered: October 2003
Karma: 0
Senior Member

but those *.t files, arent they only used when compiling the theme? wouldn't it then be possible to define own "pseudo" constants, that when compiling the theme translates to the constante of choose to it's real value/string?
Re: Suggestions [message #15880 is a reply to message #15879] Thu, 08 January 2004 01:34 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
It'll over complicate matters.

FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: cvs
Next Topic: Wich file do I have to keept for record keeping of members
Goto Forum:
  

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

Current Time: Wed Dec 11 21:30:22 GMT 2024

Total time taken to generate the page: 0.03968 seconds