UBB6 future hacking standards - an open conversation for all UBB code hackers - 03/09/2001 10:48 PM
Question posed to all UBB code hackers in advance of UBB6 release (this does not apply to any betas):
Many of us plan on using some of the custom fields in the member profile for our hacks. I plan on using the 4th field, to be specific. However, many of us may end up using the same fields. So, I would like to propose, informally and fully subject to debate and/or ridicule, a "standard" we could all follow to store data in that field. An informal "agreement" among UBB code hackers.
Here is my suggestion, and bear in mind I hope you all know I am not trying to run things but merely propose this to get ideas and suggestions and start some of you thinking about it when UBB6 is out of beta.
[field:"data1","data2"...]
Example:
[foobar:"hello"][test:"goodbye","world"]
Here are my thoughts:
1) encase all stored data in [] brackets
2) use comma deliminated "data" for data
3) spaces will be ignored outside of []
4) terminate line with newlines char
5) this standard would apply to all 4
custom profile fields
Additional comments:
Well, if you didn't know, a newlines character is the only character that distinguishes one profile line from another.
If we follow this format, we can create hacks that can store and retrieve data safely, not have to be in any particular order, and also we can share data between hacks if we so desire. Such as a memberlist hack using data from who's online, or vice versa.
This also means we can share the same field without corrupting each other's data, and the only criteria when writing data to the profile line is to follow the standard and ensure a newlines is on the end.
We can even work on a common routine which could be placed in ubb_lib.pl which allows which custom line is to be examined, then parse the data into an array very similar to the way ReadParse() examines the environment or command line. Example: ReadCustomProfile(4) and the info is pushed into an array. And of course we could make another routine to write data.
Standardization is scary, but if done properly, means we can all hack freely and really make UBB6 even more special than it really is with our hacks. But hacks that WORK TOGETHER. Or, at least, work with each other.
All thoughts, ideas, opinions, good/bad/otherwise welcomed. This is only for UBB6 final release so I'm merely starting conversation now, informally.
-jim
Many of us plan on using some of the custom fields in the member profile for our hacks. I plan on using the 4th field, to be specific. However, many of us may end up using the same fields. So, I would like to propose, informally and fully subject to debate and/or ridicule, a "standard" we could all follow to store data in that field. An informal "agreement" among UBB code hackers.
Here is my suggestion, and bear in mind I hope you all know I am not trying to run things but merely propose this to get ideas and suggestions and start some of you thinking about it when UBB6 is out of beta.
[field:"data1","data2"...]
Example:
[foobar:"hello"][test:"goodbye","world"]
Here are my thoughts:
1) encase all stored data in [] brackets
2) use comma deliminated "data" for data
3) spaces will be ignored outside of []
4) terminate line with newlines char
5) this standard would apply to all 4
custom profile fields
Additional comments:
Well, if you didn't know, a newlines character is the only character that distinguishes one profile line from another.
If we follow this format, we can create hacks that can store and retrieve data safely, not have to be in any particular order, and also we can share data between hacks if we so desire. Such as a memberlist hack using data from who's online, or vice versa.
This also means we can share the same field without corrupting each other's data, and the only criteria when writing data to the profile line is to follow the standard and ensure a newlines is on the end.
We can even work on a common routine which could be placed in ubb_lib.pl which allows which custom line is to be examined, then parse the data into an array very similar to the way ReadParse() examines the environment or command line. Example: ReadCustomProfile(4) and the info is pushed into an array. And of course we could make another routine to write data.
Standardization is scary, but if done properly, means we can all hack freely and really make UBB6 even more special than it really is with our hacks. But hacks that WORK TOGETHER. Or, at least, work with each other.
All thoughts, ideas, opinions, good/bad/otherwise welcomed. This is only for UBB6 final release so I'm merely starting conversation now, informally.
-jim