At 6/8/17 10:55 PM, TheOverGhoul wrote:
Split what the site does into multiple .css .html and .js files so you can easily upgrade and mess around with certain parts of the site's code without making a mess out of everything and ending up trying to decipher spaghetti code.
Or did you mean "moderate" like lock threads and delete users? if that's the case, just make a .js file that gives you admin privileges.
Yup, I meant more like the locking threads and delete users abilities--although I may not be doing those things specifically, I just wanted to make sure there was a way no one else could Moderate my site except for me somehow. I'd hate to register and submit it and then find out I can't update it, or that other people can too. And that's interesting; Moderation and Administration abilities come from Javascript code. Does this mean I would have to separate JS files: One for Design functions, and the Second for Moderation functions? Or Would I put both of those on the same document each time for a new webpage?
Trigger a function to change the video into the most recent one at the time that you upload a new video, this could be done by comparing the date of the old video to the date of the new one, and if the old video doesn't match today's date, change the video source file to the new one for example :
if (vid.date != today){
vid.source = "files/videos/something.avi"
};
//Not very sure this would work... but i guess with some modifications it could!
I see! When I start learning the Syntax for JS in the near future I'll definitely test this out and play with it. I'll probably make a few test videos (or use really old ones I made) to try it out in JSFiddle. Also, just to make sure I understand, this code is for embedding original videos that you made and have yet to upload anywhere else? If so, then that's perfect, thank you!
Of course, this could be done using the HTML5 <video tag>
https://www.w3schools.com/tags/tag_video.asp
Also just to quickly point in case you don't know, to turn your html into HTML5, use this line at the top of the html file :
<!DOCTYPE html>
Thanks! Yeah, I'd prefer much cooler button layout than the generic one I see. I also want to get rid of the download option I see there every time, and maybe put something else.
I'd say using a javascript array would be a good thing to use to save your updates, throw the files into an array and whenever you want to publish a new update (With the admin privileges) trigger a javascript function to append a new value to your array.
This page explains how to use arrays :
https://www.w3schools.com/js/js_arrays.asp
And then to log them and make them visible, mess around also with js to make the .html file show these updates by creating new elements in the .html with certain values, such for example "log153.value = logs[most_recent_number]"
Whoa! Looks a little intimidating. I still don't know JS yet, but If I understand correctly, the 'log153.value' part of that code means there are 153 log entries that were made, while the '= logs[most_recent_number]' shows the latest log, but it also means that I could go back to later entries if I wanted to for whatever reason?
I'll definitely look more into this!
HTML and JS yes.
CSS? not very sure.
JS can be used for this by using the <canvas> element, HTML can directly do that with the <img> tag, just mess with the attributes a bit such as <img src="rope.gif" height = "150px" width = "100px">
TL;DR - Javascript is your friend.
I see. So with the <canvas> element in JS, I wouldn't have to use any images or gifs that I had to design beforehand in order to make that same effect I'm looking for? Kind of like the the fireworks effect in this example?
If so, I'm definitely up for doing as much code as needed in JS, I just don't want to use images, or gifs for this effect like I would have to in the HTML way.
At 6/8/17 11:53 PM, FireFoxxy wrote:
Most content on NewGrounds is generated by php as many of the functions are run on the server the site is hosted on. With that being said I believe that certain accounts have special privileges or rights to delete and change text. From a administrator standpoint he can do anything server related or related with the direct code itself. It would be a huge security risk to allow even mods access to server and database files so I assume Tom has special accounts on the website set in place.
I'm unfamiliar with php. By any chance, could I merge any potential code I do with that program in the future with the HTML, CSS and (later) JS code I would have? For the time being, I'll think I'll use JS for Moderation as the other generous person mentioned, but if php makes it 'easier' or provides more Moderation features, it could be worth learning in the future.
You can change the code directly or make a administrator/moderator/supervisor toolset for your webpage.
Correct me if I'm wrong, but I'm assuming that can be done in JS for my current situation right now? I believe the poster above always alluded to that.
Also thank you both very much @TheOverGhoul and @FireFoxxy
I don't usually ask for help on the forums or in general really, probably because I'm afraid of sounding stupid. But Your help means a lot to me!