Please Register to get full access to the forums.
 | | | |  | Join Date: Jun 2007 | Posts: 63 | Coder Needed to make Leaderboard or Top Ten list for Post Thanks Hack Would anyone be willing to make a leaderboard for the Post Thanks Hack? My members really want to be able to see who's getting the most thanks for a competition. Please PM with quote or any questions. | |  | Join Date: Nov 2006 | Posts: 156 | Location: Florida | Re: Coder Needed to make Leaderboard or Top Ten list for Post Thanks Hack I'd have to see the tables, but based on what I see, the data is there to run a simple query and tabulate the results. | |  | Join Date: Jun 2007 | Posts: 63 | Re: Coder Needed to make Leaderboard or Top Ten list for Post Thanks Hack Yes, I took a quick stab at it myself but my vBulletin SQL-fu is weak. (If possible I'd also like their avatar displayed along with their name and thanks count, which means pulling in data from another table.) Do you just need the table structure or some sample data?
Last edited by Soliloquy; 11-15-2007 at 12:20 PM.
| |  | Join Date: Nov 2006 | Posts: 156 | Location: Florida | Re: Coder Needed to make Leaderboard or Top Ten list for Post Thanks Hack I'm interested in how and where the counts are stored. Fetching them and the user data I think we can do after we know that much.
Sounds like if we get the query, you can parse it?
Last edited by noppid; 11-15-2007 at 12:38 PM.
vBSetup Team vBulletin Owner vBSetup Owner | |  | Join Date: Jun 2007 | Posts: 63 | Re: Coder Needed to make Leaderboard or Top Ten list for Post Thanks Hack Ok, here's a snapshot of the table data: Quote:
CREATE TABLE `vB_post_thanks` (
`id` int(10) NOT NULL auto_increment,
`userid` int(10) NOT NULL default '0',
`username` varchar(50) NOT NULL default '',
`date` int(10) NOT NULL default '0',
`postid` int(10) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1186 ;
--
-- Dumping data for table `vB_post_thanks`
--
INSERT INTO `vB_post_thanks` VALUES(1, 3594, 'Shoq T.', 1169760632, 12358);
INSERT INTO `vB_post_thanks` VALUES(2, 3594, 'Shoq T.', 1169760643, 12365);
INSERT INTO `vB_post_thanks` VALUES(3, 3594, 'Shoq T.', 1169769319, 12320);
INSERT INTO `vB_post_thanks` VALUES(4, 3772, 'lollipop!', 1169769961, 12385);
INSERT INTO `vB_post_thanks` VALUES(5, 1, 'The_Princess', 1169775511, 12320);
| The username field refers to the person who did the thanking, we can ignore that. | |  | Join Date: Nov 2006 | Posts: 156 | Location: Florida | Re: Coder Needed to make Leaderboard or Top Ten list for Post Thanks Hack I can see from the table that we can do what you want at first glance. But it also tells me that the code in the hack is poorly written too. The indexing on this is not adaquate for your idea and I can't see it being usefull in operation. Right off the bat I can tell it's table walking.
However, I will donwload the hack and look closer and make a suggestion.
This is the like 4the or 5th hack I've seen in the last 90 days or so that is just frustrating. It's like no one knows, no one cares, or something, that the code is not noticed and improved.
So many good ideas, yet such poor coding and lack of community effort.
But when the attitude at the org is, as it has been, where they will accuse you of stealing one line of code, why would anyone think it's community oriented development anyway and help?
Then you have the folks that can't see the forest for the trees and if you tell them they have a problem, they cry. Go figure.
AUTO MERGE POST: (Auto Merge Sucks ass in a Coding forum.)
Well, it appears they are using the search table to store results. I didn't read it real close as to how it avoids the pitfalls I pointed out.
But I did confirm that the table lacks the proper index(es) for a where search which causes table walks.
At a glance a counter for this calculated at post thanks time would be cool. I didn't notice if there was one. This would solve your immediate need if it existed. If not, you have to modify that table above and create the queries to tabulate.
The hack looks pretty complicated for the purpose as a whole. But it's popular and should get improved as time goes on.
Last edited by noppid; 11-17-2007 at 10:00 AM.
Reason: Automerged Doublepost
vBSetup Team vBulletin Owner vBSetup Owner | |  | Join Date: Nov 2006 | Posts: 156 | Location: Florida | Re: Coder Needed to make Leaderboard or Top Ten list for Post Thanks Hack Yeah it looked simple enough to walk through in a thread. I dunno where it's going though. I don't need the money. I was just tinkering. | |  | Join Date: Jun 2007 | Posts: 63 | Re: Coder Needed to make Leaderboard or Top Ten list for Post Thanks Hack Anything noppid wants to do is good with me... if he provides a quote I'll happily pay him or someone else to do the job, if he points me in the right direction SQL-wise I'll happily figure out the parsing end.
 | | vBulletin Setup > vBulletinSetup Information > vBSetup Marketplace > Webscripts and Websites | Thread Tools | | | | Display Modes | Linear Mode | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -6. The time now is 08:34 PM. |