Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Code Gallery (https://forums.graalonline.com/forums/forumdisplay.php?f=179)
-   -   "Advanced" Graphic Uploader (https://forums.graalonline.com/forums/showthread.php?t=134256672)

cbk1994 10-26-2009 03:03 AM

"Advanced" Graphic Uploader
 
8 Attachment(s)
I've decided to release the graphic uploader I made for Era. It's similar to this one by LoneAngelIbesu, but contains a queue, admin approval/denial, and more.

To use it, press F11 and click "Upload Graphic". Choose the graphic type, file name, and press "Browse". Select your graphic, and it will upload. It automatically checks the headers, checks to make sure the file does not already exists, and then moves it to a folder where it waits for an admin to approve it. You can view your pending, uploaded, and denied graphics as well by pressing F11.

Admins will see an extra option to moderate the queue, and they have a list of quick deny options, a custom deny reason button, an approve button, and a skip button (move on to the next item in the queue, do not approve or deny the current).

Screenshots:

Attachment 49693Attachment 49694Attachment 49695Attachment 49696Attachment 49697

Installation

This isn't the easiest script to add, but it's not too bad if you follow these steps:
  1. Download the images attached to this post (at the bottom; there is a dark noob head, a body template, and a head template). Upload these files to your server.
  2. Upload the script to your server and add it to everyone on login.
  3. This script assumes that you use levels/heads, levels/bodies, and levels/shields. You can change these if you like, or create the folders if you don't use them. Normally it can be left as-is.
  4. At the top of the script, add a list of admins who should be able to moderate the uploaded graphics.
  5. Open the rights of (npcserver). Add the following lines:
    Quote:

    rw personaluploads/*/*/*
    rw levels/uploads/*
    rw levels/heads/*
    rw levels/bodies/*
    rw levels/shields/*
    rw uploads/*/*
  6. Add the following lines to your folder config:
    Quote:

    file uploads/*.png
    file uploads/*.gif
  7. This script requires the server to use a prefix. At default, it is taking the lowercase first word of the server (e.g. for "Era Dev", "era"), appending an underscore ("era_"), then letting the player choose the name. This can, of course, be changed to whatever you want.
  8. Add createTable(); to the onCreated function at the top of the script. Update the script, remove the line, then update it again. You only need to to this once to create the SQLite table.

The latest version can be found here (last updated 2012/01/20 by fowlplay4).

fowlplay4 10-26-2009 03:27 AM

Yay, totally using this if Stefan ever implements that server-side TDrawingPanel functionality that will let us set transparencies.

cyan3 10-26-2009 03:27 AM

Very nice work.

Liberated 10-26-2009 09:03 AM

nice,
man i took a look in that script, and i was just happy i could make a spinning script lmao.

Admins 10-26-2009 01:45 PM

Looks impressive :o

Crono 10-26-2009 01:48 PM

Good job, you should get a GAT to skin a much nicer GUI though. :]

Gothika 10-26-2009 09:39 PM

Thats some good stuff. Nice job.

BlueMelon 10-26-2009 09:47 PM

Good job man. they should have this on every server :P
Does it get spammed with useless ****?

[email protected] 10-26-2009 10:05 PM

Awesome idea- love it! :)

cbk1994 10-26-2009 10:07 PM

Quote:

Originally Posted by BlueMelon (Post 1534258)
Good job man. they should have this on every server :P
Does it get spammed with useless ****?

We use it on Era, and we don't have any problems with spam. We can always threaten to jail/ban/suspend-use-of-this-tool-for them if needed, though.

It would be cool if Stefan added something like this to the login server so players could upload their graphics on all servers at once. This kind of functionality already exists with default files (/finddef in RC) I think, and could probably be extended to player appearance graphics.

DustyPorViva 10-26-2009 10:18 PM

Quote:

Originally Posted by cbk1994 (Post 1534265)
It would be kinda cool if something like this was added to the Login server, and Stefan made it possible for heads to be mirrored (much like they are now for default heads) across all servers.

???

Jcs1919 10-26-2009 10:29 PM

;o whoa

cbk1994 10-26-2009 11:29 PM

Quote:

Originally Posted by DustyPorViva (Post 1534270)
???

Apparently I forgot to finish my sentence.

It would be cool if Stefan added something like this to the login server so players could upload their graphics on all servers at once. This kind of functionality already exists with default files (/finddef in RC) I think, and could probably be extended to player appearance graphics.

fowlplay4 10-27-2009 05:45 AM

Quote:

Originally Posted by cbk1994 (Post 1534286)
Apparently I forgot to finish my sentence.

It would be cool if Stefan added something like this to the login server so players could upload their graphics on all servers at once. This kind of functionality already exists with default files (/finddef in RC) I think, and could probably be extended to player appearance graphics.

That would be cool cause if an obscene upload got approved, then i could be graphically obscene on every non-gold server and you would have to wait for globals to undo it! :D

Mark Sir Link 10-27-2009 05:56 AM

Quote:

Originally Posted by fowlplay4 (Post 1534402)
That would be cool cause if an obscene upload got approved, then i could be graphically obscene on every non-gold server and you would have to wait for globals to undo it! :D

:noob:

EDIT: I find the copyright warning on Era's version hilarious considering the usage of copyrighted audio on the server.

cbk1994 10-27-2009 12:56 PM

Quote:

Originally Posted by fowlplay4 (Post 1534402)
That would be cool cause if an obscene upload got approved, then i could be graphically obscene on every non-gold server and you would have to wait for globals to undo it! :D

:p

Perhaps the GDT could handle those types of situations.

Matt 10-28-2009 05:12 AM

Very nice. ^^

darkcloud667 12-17-2009 01:06 AM

nice script :o

and the only problem with it uploading to all servers at once is that some servers have different rules on what to upload and what not to.
certain images arent allowed on one server that are allowed on another
blah.

cbk1994 02-13-2011 03:28 AM

There is a problem in the original script that could potentially result in a loss of data in any of your data that is stored via SQL, although this is very unlikely because of the nature of the problem—generally, you should just see some errors in RC if it's being abused.

With that said, if you're using this script, please update it ASAP to a patched version here.

fowlplay4 02-13-2011 09:00 AM

That pastebin is really nice.

Toxen 02-14-2011 04:51 PM

@cbk1994, just curious, i didn't look at the script but I looked at the post and pictures and what i saw showed that you don't get to choose your extension, does that mean you can't upload .mngs with it?

fowlplay4 10-25-2011 05:34 AM

Request: Add support for fixImageTransparency(file);

It sets the transparent color as the same color in the top left corner. When transing it also converts truecolor images down to 256 colors / 8 bit.

fowlplay4 01-20-2012 10:16 PM

Updated by fowlplay4

1. Added work-around for downloading images.
No longer need to add anything to folder config.
See function getGraphic(img) for more notes on that.
2. Added support for setting transparencies via
fiximagetransparency(filepath)
3. Updated naming to be more user-friendly by changing
the getUploadFullName() function. Prevents players
from using periods in the name however.
4. Added support for hats.
5. Added support for using a different database.
6. Fixed to use V6's new uploadfile() function.

Link:
http://pastebin.graalcenter.org/read.php?id=43131936319

cbk1994 01-21-2012 06:48 PM

Quote:

Originally Posted by fowlplay4 (Post 1682226)
Updated by fowlplay4

Thanks, nice work :).

edit: thanks Skyld for updating OP

MattKan 01-21-2012 09:13 PM

Quote:

Originally Posted by fowlplay4 (Post 1682226)
Update

:)

r3ckless 03-25-2012 02:12 AM

I put this script on my server, followed all the directions correctly, but everytime I go to Manage Uploads, I get an error telling me it can't load the graphic, to check if im lagging etc etc

What's up with this?

Bam112 03-25-2012 02:54 PM

Very nice.

iGraalian 07-31-2015 10:54 PM

For some reason when someone uploads anything, it shows up black so I can't see the image they want to upload. What's the problem?

xAndrewx 08-01-2015 09:50 AM

Can you post a screenshot?


All times are GMT +2. The time now is 03:49 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.