sniko Posted August 18, 2010 Posted August 18, 2010 Hello There, I haven't released any new modifications for the mccodes engine lately and this is not a new one, ive just found it on my laptop and have been granted permission from the guy who gave me the idea, Marc. Firstly, open up viewuser.php and put this code somewhere, anywhere, i don't mind where, but in that file, and make sure its not in the middle of any code, somewhere sensible. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Now go to PHPMYADMIN > SQL Tab and hit the CTRL+C AND CTRL+V Buttons, because here are the SQL's [mysql]CREATE TABLE `profile_views` ( `Key` INT( 11 ) NOT NULL AUTO_INCREMENT , `User` INT( 11 ) NOT NULL , `Viewers` TEXT NOT NULL , PRIMARY KEY ( `Key` ) ) ENGINE = MYISAM ;[/mysql] Now, create a new file, with any file name, preferably, a sensible one and paste this code within it and click the "save" button You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Thats all from me folks, enjoy. Thanks for reading/using - sniko Quote
CJ - Twitch Posted August 19, 2010 Posted August 19, 2010 Good mod but why so much code? You could just add an extra field to users and run a query updating it... Quote
bladewolf2010 Posted August 19, 2010 Posted August 19, 2010 why does everyone want to put it in users when not needed to Quote
rulerofzu Posted August 20, 2010 Posted August 20, 2010 @ Cj there would be a bit more to it than that. Breaking down what sniko has done. If you view someone's profile and then hit f5 it will only count once. Just adding a query to update would mean for every refresh it would add another. @ Blade. Notice the new mysql table there? :whistling: Quote
Haunted Dawg Posted August 20, 2010 Posted August 20, 2010 Ok, so i was going through cleaning up this script, and i found something odd. Here's the cleaned up script's. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. So i saw, the second script is actualy just sitting there, with no link to it or nothing. So yeah, you got to put the second script where ever you want to display it, not in a new file. Quote
Equinox Posted August 20, 2010 Posted August 20, 2010 Yes i noticed it? -.- So why did you mention what you mentioned? Quote
bladewolf2010 Posted August 20, 2010 Posted August 20, 2010 was directed to CJ as he wanted to just add another table to users -.- that just annoys me Quote
Equinox Posted August 20, 2010 Posted August 20, 2010 was directed to CJ as he wanted to just add another table to users -.- that just annoys me Oooh, I see. Quote
bladewolf2010 Posted August 20, 2010 Posted August 20, 2010 Yeah -.-" guess i should of mentioned that :P Quote
CJ - Twitch Posted August 20, 2010 Posted August 20, 2010 I was just saying, I didn't realise that they were unique views.. Quote
Paul Evans Posted August 22, 2010 Posted August 22, 2010 i didn't read the code but why not put all users who visit into a field (i hope sniko didn't do this) so instead of 1 row per visit on a users profile it would be only one row per user. explode is an amazing function. EDIT: Actually i stand corrected i think he did do that, sorry Sniko good work kiddo. Quote
Wazam Posted August 25, 2010 Posted August 25, 2010 Wow. Excellent work Sniko. I looked through a few mods then, but your kind of coding, on how you use is really good. Keep it up bud. And I think this is a nice little addition to members who are curious on how views they get on the profile. :p Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.