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:
"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 Razz)

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.
Anybody have comments? Shock?
Yeah, I considered something like this, but don't forget that it will add more load to your server.
Yes, thats very true. That was my only concern. I already have part of sax.php modded for this type of thing, I saved it as a new file instead of overwriting so that I don't screw with tiSAX's display.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement