View Full Version : The Dot Hack
This is the Dot Hack:
http://www.hedgehogwheels.com/hacks/dothack.jpg
The point of the hack is that it will place a dot on each thread that you have posted in. I think it is a great hack, what do you think?
I would like to release it but you have to modify the search index function and update the threadindex field for every user. If John wants to include it in the new version I will send him the code and give him hints on how to make the threadindex and search by user functions more robust, as I have done.
nice would like to see it in the next release, although i won't be adding any more hacks until then :(
I really like this idea :) That way it's really easy for a user to see which threads he/she has posted in.
-Chris
It is on my forum, just register and post a message to see it in action. I blatantly stole the idea from a UBB hack that achieves the same thing. It adds no queries to forumdisplay as it uses the threadindex which is already in the thread table. That is where the issue comes up though as the usernames are space delimited and goes to pot if a user has a space in his/her name!
[Edited by rangersfan on 10-25-2000 at 01:37 PM]
I thought some shot a hole in the icon when I saw it last night. LOL :)
but I think its cool.
It may earn a spot in my sig making it two rangersfan hacks.
Originally posted by rangersfan
That is where the issue comes up though as the usernames are space delimited and goes to pot if a user has a space in his/her name!
oh well then that eliminates me getting the hack anytime... my members have all sorts of spaces etc in their usernames
Eva that is why I converted the function to use commas but you also have to convert the thread index in every thread on your forum. I am hoping John will really fix this in the next version as it is silly to use a space as a delimiter when the data itself can contains spaces.
Originally posted by Chris Schreiber
I really like this idea :) That way it's really easy for a user to see which threads he/she has posted in.
-Chris
Make it optional... cause I hate those Dots :)
Rangersfan,
Since you've created this dot hack and the favorites hack, why not integrate the two so that threads that one has added as a favorite can also use a slightly differnt icon. Instead of a hole, perhaps a "glow" around the icon or something?
I can do that but it would have nothing to do with the dot hack. I will see about giving you code that will achive what you want. Just add it to my long list of stuff to do.
Should be able to just do a left join with the fav_threads table to achieve what you want. You will have to create the glowing icons though.
How are you determining if the user's posted in it?
Splitting up the data with explode, and cycling through with a loop?
If so, you might want to look into strpos or strstr for a more optimized solution.
I forget, let me check ...
yes strpos of ",username," as I used commas to delimit the threadindex.
Otherwise if you have a user named "joe" and "joe blow", doing a strpos of " joe " will return true if "joe blow" is in the index with its current usage of a space as a delimiter.
Great, nice and optimized :D
Just a thought, but wouldn't adding the User ID to the query instead of using the username be more reliable?
peter you don't fully grasp what is going on as I would be the last person to ever use a username in a query.
Threads already contain an index of the users in the table. So I saved doing a query on the post table to see who has posted in a particular thread by just using the index that is already available to me, hence the matching of names.
any luck in getting john to change this for version 2.0? another great hack i would like.
I have no clue Chris, as I have said, I have no contact with Jelsoft. There does exist a bug since you cannot use a space delimiter when the data itself may contain spaces. Mike/Ed has said all "known" bugs have been fixed in 1.1.4 so perhaps they have changed the delimiter, if not then all known bugs haven't been fixed.
I made a bug report about this maybe 4 months ago but only in the last 1-2 months have I come to known vBulletin in and out so it became obvious to me what the problem is.
ok cool. We can but wait :)
Originally posted by rangersfan
Mike/Ed has said all "known" bugs have been fixed in 1.1.4 so perhaps they have changed the delimiter, if not then all known bugs haven't been fixed.All REPRODUCABLE bugs have been fixed (except for one which I may have forgotten about) :) But the speed increase is DEFINATELY noticeable.
Well this one is reproduceable. Find a user with a name that is a substring of another users name where the substring is separated by a space in the larger name. Then search for posts by the user with the substring. You will then receive the posts from both users since the delimiter of the index is a space.
Yes, but this isn't one that's fixed for the simple reason of backward compatibility - I didn't feel like making a script to update the indexes :p
ARGH!!!
This must be fixed and why must you do it anyway? I, of course, had a script that changed my indexes and I will just have to create another one and fix it myself for my own forum if jelsoft refuses to fix it.
Originally posted by rangersfan
ARGH!!!
This must be fixed and why must you do it anyway?Woah, lets get this straight - I don't HAVE to. I offered to.
I'll try to get it in.
You said "I didn't feel like making a script to update the indexes" which to me implied that you are working for Jelsoft in some capacity if you make decisions about including or not including code in vBulletin.
'tis a reproduceable bug that needs to be rectified.
i am with the new bugs moderator on this :)
just do a search for posts by "chris" or by "john" in the forums, it shouldn't give the results that it does.
AS a database developer it makes no sense to have any text field delimited by spaces. If you are going to use delimiters it needs to be a uncommon character. Usually a PIPE (|) is used the delimiter because that is the characters sole purpose in life within a database.
When the user requests an exact name search, why not do a simple lookup on the username to grab their ID, then it's extraordinarily easy to just go SELECT whatever FROM post WHERE userid = $userid
And with that, provided the user entered the username in correctly, will provide *exact* results.
That is another thing which annoys me on the "Search All posts by this user" icon. It should check the userID of the posts, not that silly text field. In that case you don't even have to look-up anything, the userid is provided in the postbit! I'm going to make it work like that tonight if anyone is interested. Otherwise I will keep the tiny hack to myself! :)
mrogish yes it does need to be changed as it is rather silly now. If you change a users name then they won't show up in searches *until* you rebuild the search indexes OR someone makes a post in each thread that they have participated in. That is a little too much like UBB for me!
I guess that brings up another issue, usually when I search for posts by a user I want to see what they have posted. Showing me a bunch of threads that they *might* have posted in (if my name is Bob and a poster is Bob Ross I'll get Bob Ross' as well) is not what I'm concerned with. That and on mult-page threads who knows where Bob's post is? So what I am proposing to do, simply because it annoys the heck out of me, is to:
Fix the search by exact user name to use UserIDs, because searching exactly for a username will NOT provide intended results due to the text field stuffing.
Have the resulting search page show threads they have participated in, but when you click on it, it goes directly to their first post in the thread.
If anyone else has done this please let me know so I don't duplicate any code! :)
Oh, I will be duplicating code then. Can't wait for this for a couple of months as it's been bugging the hell out of me and I finally got motivated enough to do it! :):)
mrgosh, if they fix the delimiter then that will work.
Also, i would like to be able to search by topic starter so i could do a search like
[release] topic starter freedie to get all of your excellent hacks :) as opposed to getting ones in which you have made a reply to.
You are wanting to include the two searches together which isn't currently supported. While technically possible to do, I doubt that will be an option in v2.
arr, ok, but will it be possible to do a search by thread starter i wonder on its own?
Guess i will have to use your sig for hacks. Think eva started a useful thing there with listing important info in signatures until vbulletin.org really takes off
wow, this hack is useful. Just went to your forum to check the 1 thread i posted in. New which forum it was and there it was a folder with a little black dot in it !!! Brilliant, love it, great idea! (and far more useful than flaming folders!) Also think the suggestion of favourite threads looking different is a good plan as well.
I really lack my little Dot Hack and I'm glad someone else does to! I don't even utilize the favorites hack I made, just some of my users wanted it but I do look for the little dots on my forum from the Dot Hack :)
do you care posting the act?
it definately is something i want
Originally posted by Mental Stamina
do you care posting the act?
it definately is something i want
Yep, I would like it too plz. :)
If you read the entire thread, you will see that you have to change the inherent way that vBulletin performs indexing and searching. Personally I feel this change should be made anyway. Until that is done though, you could make it so your forum is not upgradeable without considerable work.
so it's only going to be on v2.0? is there anyway to apply it on 1.14?? it's such a cool hack...... :p
Originally posted by Da_Gem
so it's only going to be on v2.0? is there anyway to apply it on 1.14?? it's such a cool hack...... :p
I am sure that if you really need it for the next month or so, you can contact Freddie and ask how much it would be to hack it in for you.
If you can wait a month then you can upgrade your vBulletin to 2.0 with your member's area access and have it for free.
well........i guess i can wait a while then :P
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.