5/24/2023 0 Comments Codeblocks infoarenaSome modifications have to be made to the wiki on template/userinfo after the script is run. It requires the attach folder to have permission for execute, read and write. The script which resizes the image for the current users is called make-avatar-folder found in the scripts folder. If the size given is not from the list or is omitted the server considers it as full(the last one). In case the user doesn't exists or he doesn't have an avatar we use a placeholder image. To get the avatar on a size from the server simply use the page avatar?user=%some_user%&size=%some_size% where %some_user% is a username and %some_size$ is a one the 5 sizes. This means that even if resizing is successful, you will not return anything. Ob_end_clean() discards everything in the buffer cache. I would like it if you would prompt the user asking him if this is required, because it's very likely. Why not foreach ($resize_sizes as $resize_size)? Īdd comment as I said for the image_resize function die_http_error is probably the worst way of reporting. This code block makes assumptions about how you are calling the function. Īlways put ĭo a log_warn() if file does not exist, but is in the DB. Controllers are supposed to be the main entry point of. Where is this used? Also this should be in common. What if the avatar folder exists but the size folders don'tĨ0 chars? Also this should be a constant somewhere No more than 80 chars! There is no way I can read this unless you break it in multiple lines. This should go into the setup script, where we set up the config and. I just need to know how to ship it with the rest of the files. The setup has also been modified so fresh installes will work without calling the script. It requires the attach folder to have permission for read and write. If the size given is not from the list or is omitted the server return a classic 404 Error(File not found) To get the avatar on a size from the server simply use the page avatar/%some_size%/%some_user where %some_user% is a username and %some_size$ is a one the 5 sizes. The 5 sizes are tiny (old L16x16), small(old 元2x32), normal(old L50x50), forum(old L75xL75, used only on the forum at the moment), big(old 100x100) and full(the original picture). Because there are only 5 sizes used on all the site it's more useful to resize all of the images to those 5(thus increasing the space usage by less than 100%) and when a client asks for a size give it directly rather then resizing all the time. This is an optimization for managing avatars on the server.
0 Comments
Leave a Reply. |