I was in the middle of modding SAX to where I could change the way SAX submitted its data. As I was making it possible to change the position of where the time, username, and text was displayed(instead of time: username: text, I could have it username(time): text) I realized, that if I'm going to be on the tiSAX network, then its going to look very weird on everyone else's SAX when I post something, and when you guys post something, its gonna look weird on mine. So doing it would be completely pointless cause it would make both sides unhappy.
So, heres the plan of how I'm going to mod it...
Instead of using the SAXformatstring() function for adding <br> and the date, I'm almost done making it so that you can change the position of the time, username, and text of sax post. The only problem is... I need to change the way it writes the the db.
I'm thinking of doing something like this... the syntax of the db will no longer be HTML, but it will be like this:
Code:
and then more parameters can be added, like you could make it so it adds "~SITE" for tiSAX, and other stuff.
Code:
Then, you set your template variables...
The most important one is the $saxlayout variable.
You'll first grab your data from the db, and split it into different posts, like so(theres prob an easier way, but oh well )
Code:
Then, we need to take each sax post; individually split them by their parameters; use the $saxlayout to position each variable, and then display them one by one.
Code:
the expload function makes it so that
$saxpost['0'] is the DATE
$saxpost['1'] is the USERNAME
$saxpost['2'] is the TEXT
and $saxpost['#'] is the optional parameters...
Now, theres a little more coding involved, alot more changes, and it might actually take longer to display sax then it usually would, but it would add easy customization to those sites that don't want to display it like the original SAX does. This is just a thought, and I'm sure theres an easier way, this was just thought up as I went on.
So, heres the plan of how I'm going to mod it...
Instead of using the SAXformatstring() function for adding <br> and the date, I'm almost done making it so that you can change the position of the time, username, and text of sax post. The only problem is... I need to change the way it writes the the db.
I'm thinking of doing something like this... the syntax of the db will no longer be HTML, but it will be like this:
Code:
"DATE~~USERNAME~~TEXT|||"
and then more parameters can be added, like you could make it so it adds "~SITE" for tiSAX, and other stuff.
Code:
"DATE~~USERNAME~~TEXT~~SITE|||"
Then, you set your template variables...
The most important one is the $saxlayout variable.
You'll first grab your data from the db, and split it into different posts, like so(theres prob an easier way, but oh well )
Code:
$saxposts = expload("|||", $db_file_contents);
Then, we need to take each sax post; individually split them by their parameters; use the $saxlayout to position each variable, and then display them one by one.
Code:
foreach(...) {
$saxpost = expload("~~", $saxposts[$i]);
...
}
the expload function makes it so that
$saxpost['0'] is the DATE
$saxpost['1'] is the USERNAME
$saxpost['2'] is the TEXT
and $saxpost['#'] is the optional parameters...
Now, theres a little more coding involved, alot more changes, and it might actually take longer to display sax then it usually would, but it would add easy customization to those sites that don't want to display it like the original SAX does. This is just a thought, and I'm sure theres an easier way, this was just thought up as I went on.