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

Home » FUDforum Development » FUDforum 3.0+ » Suggestions
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
Suggestions [message #15865] Wed, 07 January 2004 11:12 Go to next message
Gribnif is currently offline  Gribnif   United States
Messages: 82
Registered: December 2003
Karma: 0
Member
add to buddy list
ignore all messages by this user
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 11: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
add to buddy list
ignore all messages by this user
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 11:47 Go to previous messageGo to next message
Gribnif is currently offline  Gribnif   United States
Messages: 82
Registered: December 2003
Karma: 0
Member
add to buddy list
ignore all messages by this user
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 11: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
add to buddy list
ignore all messages by this user
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] Wed, 07 January 2004 19:53 Go to previous messageGo to next message
AzaToth is currently offline  AzaToth   Sweden
Messages: 125
Registered: October 2003
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user

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] Wed, 07 January 2004 20:34 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
It'll over complicate matters.

FUDforum Core Developer
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
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: Sat Dec 16 19:37:29 EST 2017

Total time taken to generate the page: 0.00675 seconds