Jump to content
MakeWebGames

Recommended Posts

Posted

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

Posted

@ 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:

Posted

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.

Posted

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.

Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...