SphereCommunity
Webpage Generator - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Webpage Generator (/Thread-Webpage-Generator)



Webpage Generator - pinku - 03-02-2014 10:41 PM

Hey all,

I decided to try this guide out:

http://forum.spherecommunity.net/Thread-TUTORIAL-Spheres-Webpage-Generator

I did it in a very similar way.

Well, everything goes right, except the numbers. As everyone knows, they are stored in hexadecimals by sphere.

Is there anyway I can use EVAL there or anything to convert back to decimals to show on the HTML page?

I tried EVAL but it didn't go any right.

Thanks!


RE: Webpage Generator - Avatar - 03-03-2014 12:02 AM

You better use mysql instead. Because HTML generator have you open to vulnerabilities. Then you can show your values with Php, Asp, whatever you like.

Also, in html generator dont take eval of values before showing html page. I mean think like that;

You want to show a value on html web page. So you assign var, for instance, as var.value = 5.

So put it on html page like %eval %var.value%%.

This should work if I dont remember wrongly. I used this 5-6 years ago.


RE: Webpage Generator - pinku - 03-03-2014 02:38 PM

(03-03-2014 12:02 AM)Avatar Wrote:  You better use mysql instead. Because HTML generator have you open to vulnerabilities. Then you can show your values with Php, Asp, whatever you like.

Also, in html generator dont take eval of values before showing html page. I mean think like that;

You want to show a value on html web page. So you assign var, for instance, as var.value = 5.

So put it on html page like %eval %var.value%%.

This should work if I dont remember wrongly. I used this 5-6 years ago.

Thanks Avatar,
I lack MySQL knowledge, so I would probably be risking my (future) users more. :/
I have seen many shards being MySQL injected, I don't know how that happens, but I'm trying to keep safe my own way. Sad
Would love to use MySQL though.

Back to the subject, I haven't tried a VAR yet, but when I use %UID.MYUIDHERE.TAG% and this tag is a number, it doesn't seem to EVAL correctly.

I have tried:

%EVAL %UID.MYUIDHERE.TAG%% - This will show a zero% IIRC.

%EVAL UID.MYUIDHERE.TAG% - This will EVAL the UID number.

%EVAL %UID.MYUIDHERE.TAG% - This will show a zero only. I think it EVALs nothing.

When the tag is a player name, it works smooth, as I explained on the first post.

I haven't tried with a VAR, but I would love to see it working with the UID.

Any thoughts?

Thanks everyone!


RE: Webpage Generator - Staff_Stanic - 03-12-2014 01:46 PM

Try this:
Code:
%dUID.MYUIDHERE.TAG% //note the 'd' before UID[...]



RE: Webpage Generator - pinku - 03-12-2014 08:09 PM

Thanks, it works!