Jump to content
MakeWebGames

Recommended Posts

Posted

Hi Guys,

This is my first modification and its not perfect,

some of you guys are gona say "its nothing special its just tables added"

but this is important for me as its my first ever modification,

there is nothing added its just a visual update :).

Modification for Mccodes v2.x

Updated: You can now choose a display picture if the user has none

Special thanks to paddytm for helping me with the code for putting a default profile pic if there is none!

Instructions:

1# Replace index.php with this index.php

2# Replace: 'NO DISPLAY PIC URL HERE' with 'http://site.com/path/to/image.png' (your default image url)

 

Screenshot:

indexdisplay.png

 

Here it goes:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Posted

Well done for creating this its different which is always good.

You do need to address your html/css though. Using center tags and then using style when you could just use css to center it.

I also prefer to check the players image is valid or return a blank image.

Posted

could someone give me an example of the code that would check if a user has a image and if they dont it will show another image?

Thanks for the positive feedback guys :)

trying to make viewuser.php look nice also :)

Posted

DJK made something Similar to that Roz.

Aries, look through DJK post. It should be there mate. If so, try and put the code in. :)

EDIT: I'm not cretin' if it will work. Haven't looked at the code for a while. But worth a try.

Posted

Good job mate, now that you did this make a back up and try to make it even better by adding 1 thing at a time don't do multiple things at once so if it errors you know where the error came from..

for the image you can use/edit

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

then in the echo " do

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

or

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

depending if you have double or single quotes in your echo/print..

post back with your result

Also you have an extra bracket here

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Posted

I like this but I noticed a few things which could be better & A few css mistake's and so forth so I decided I'd recode it :); Nothing really has changed; I've just changed alot around and spaced out the code

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

I haven't coded in about 5months so chances are they're quite alot off mistakes but blah; It took me 15minuets maximum :)

Posted

Why are you re-formatting the numbers?

And you could probably check if 'pn_update' a bit more.

if(isset($_POST['pn_update']) && is_string($_POST['pn_update'])) {

Posted
See this post by DjK

[mccode v2.x] Different way of going about 'User Display Pictures'.

It's not that usefull as there is only one thing that checks that doesn't only apply to uploads.

Simple check would be to check the extension:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

However if you check everything on input no reason to check anything on output.

Doing uploads then using fread()/fopen() etc to check and serve the images would be another alternative.

Posted

Again take note of 'simple check' also take note of the last bit of advice, I'm well aware of using .htaccess to modify urls.

However what people fail to realise is if you actually solve problems within your site that can be exploited via display pictures you've got nothing to worry about when it comes to the display pictures, some of the most used open source scripts don't bother with securing the image tags in bbcode as it doesn't pose an imediate threat towards the script itself, sure you can log someone out, that's not life threating it's just a pain.

Posted

if i may point out that jordans recode will give users this error here

Parse error: syntax error, unexpected $end in /home/content/c/o/n/convicte/html/destroyed-country/index.php on line 55

 

however if you use this code below

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

the error above i mentioned will not occur

 

reason being is on line 44 of the recode jordan posted he had put a extra { which in resulted in the following error

Parse error: syntax error, unexpected $end in /home/content/c/o/n/convicte/html/destroyed-country/index.php on line 55

 

 

Posted

Thanks for the good feedback guys, im working on a nice usersonline update also :)

just trying to work things out on how to make it work :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...