VB type comments

Started by Tony Reid, October 15, 2003, 04:33:44 AM

Previous topic - Next topic

Tony Reid

Hi Guys,

I have just noticed a cool bandwidth saving feature of VB3.0

When you wave your mouse over the post titles, it pops up with a yellow comments box, with a text only version of the post.

here is an example - just wave your mouse over the index.

http://www.programmingtalk.com/forumdisplay.php?f=4
Tony Reid

Tyris

thats just using the title feature of the A tag...
perhaps could be done with the template system...? ;)
if not, a very simple mod to apply I'd think...

Ben_S

Not quite sure how its bandwidth saving as it only shows a couple of lines so most (all?) people would still read the topic anyway, then theres the extra bytes on the message index to actually show it...

I like it though but as Tyris says, probably easy enough with the template system
Liverpool FC Forum with 14 million+ posts.

Tyris

yeah... in terms of bandwidth.. its actually a tiny bit more... coz it has a larger index... and you'd most likely have to read the topic anyway. Its use however would be that you can check what a topic is about before actually reading the whole thing so you dont have to load all the useless images etc.
Template system can do...? cool ^_^
does that mean that you can use the template system to make additional queries to the database to get whatever info you need...?
very cool indeed ^_^

Tony Reid

Hmm... maybe it would be a fine feature for admins/mods to just whizz down the index and check the posts quicker?

Tony Reid

Tyris

however it only shows the first post right...?
and also, you have to pause over the topic so its not -that- quick either ;D
still a nice idea tho.

Tony Reid

Quote from: Tyris on October 15, 2003, 05:28:23 AM
however it only shows the first post right...?
and also, you have to pause over the topic so its not -that- quick either ;D
still a nice idea tho.

yeah but less clicking for us lazy people ;)


Tony Reid

Tyris

true... for those of use with minimal control over our clicking finger... or who are just too lazy to use it ;)

I think the best new 'feature' now... would be a list of things we can do with the template system + examples ^_^

bostasp

dum dum dum dum....

<a href="http://www.simplemachines.org" title="Simple Machines">dum dum dum dum...</a>

How hard was that?

Tyris

yeah... but I assume it'd be a tad harder to get the first post of the relevant topic in there ;)

bostasp

yea... surely its just a call-up from the database, so if I knew what I was doing... and had a piece of paper here, then it would be just as easy I suppose...


Tyris

yeah, easy... depending on if the template system can do extra db calls easy :P which I guess you'd know about :P

speaking of db calls... is it a good idea to pre-parse your php script and do all your db queries at once and in as few as possible...?
some software I was writing does this, and stores all the info in variables... so it gets all the information for the entire page at once, then uses php to display it... would that be faster...?

bostasp

*shrugs* I'd wait for [Unknown] or someone clever... I haven't a clue when it comes to PHP :-[

Tyris

heheh, I thought that he'd be one of the few people here who'd know an answer...
I have a small clue when it comes to php... but I'm really interested to know if pre-parsing is worth it... ^_^ (it seems like a good idea... but is it... ;)??)
*looks questioningly @ [Unknown] ;D*

James Woodcock

Interesting idea, but to be honest I can't think of it being any easier then clicking the link rather then hovering over it!  As for bandwidth php and MySQL is so much better then perl anyway, I doubt it would make much difference!

Spaceman-Spiff

you just need to do something like
$message = substr($message, 0, 100) . '...';  //show only first 100 characters of the post
then put the $message var in title attribute of <a> tag

writeto

Quote from: Tyris on October 15, 2003, 06:44:54 AM
yeah, easy... depending on if the template system can do extra db calls easy :P which I guess you'd know about :P

speaking of db calls... is it a good idea to pre-parse your php script and do all your db queries at once and in as few as possible...?
some software I was writing does this, and stores all the info in variables... so it gets all the information for the entire page at once, then uses php to display it... would that be faster...?

This question is to vague as the speed of a database depends on the databases size, and the database type... not to mention how memory intensive you want your program to be. --Although I prefer to do all my file handling (including database) in one area, it makes for cleaner source, but this simply can not be done if I have 100,000 items in the database.

Andrew
This would entire be program specific.

[Unknown]

Most likely it doesn't matter, when you take into account how fast a page load really is - it's like a heart beat.  I don't really know...

As far as this feature itself, a little would have to be added to the database, and it could even be an optional thing (per user.) - it'd be a mod, but it'd be an EASY mod.

Or maybe it could be built in...

-[Unknown]

writeto

[Unknown]

What was the largest page you created? I mean have you created a mock group of posts that totaled in the 100's or even 1000s. Also I have been meaning to ask what the size limit is on the size of the post?

Andrew

[Unknown]

Oh, okay - I misread the question, so let me reanswer it:

First, the number of queries you make matters quite a bit, and taking out the right queries (or just optimizing them ot properly use keys..) can speed things up a LOT.

Second, I don't think it matters *IF YOU DO THEM ALL AT ONCE.*  That was the part I was answering above.

Anyhow, writeto - I've converted the yabbse.org database and tested it, and that was fine.... I'm not sure what you mean by largest page....

Posts are limited, by default, to... 10,000 bytes. (characters, letters, whatever floats your boat.)  That's pretty long.... but most posts aren't that long.

-[Unknown]

Advertisement: