Uridium Posted March 12, 2021 Share Posted March 12, 2021 (edited) Some time ago i made a maintenance mod so you could close your site or a page for maintenance. Ive been messing again with the script and had a bit of a rewrite so now you can close as many pages as you want and as staff still be able to work on the page which wasnt available on the old version you can close the entire site down by closing header.php and again staff can still enter the site and see whats happening.. if your interested in this upgrade i'll post the script Edited March 12, 2021 by Uridium 2 Quote Link to comment Share on other sites More sharing options...
Sim Posted March 13, 2021 Share Posted March 13, 2021 Just post it instead of having someone telling you to. Quote Link to comment Share on other sites More sharing options...
Uridium Posted March 13, 2021 Author Share Posted March 13, 2021 I'll post as soon as the countdown stops being an arse, Quote Link to comment Share on other sites More sharing options...
Sim Posted March 13, 2021 Share Posted March 13, 2021 4 hours ago, Uridium said: I'll post as soon as the countdown stops being an arse, ????? Quote Link to comment Share on other sites More sharing options...
Magictallguy Posted March 13, 2021 Share Posted March 13, 2021 1 hour ago, Sim said: ????? I'd hazard a guess at a countdown until re-opening Quote Link to comment Share on other sites More sharing options...
Sim Posted March 13, 2021 Share Posted March 13, 2021 1 hour ago, Magictallguy said: I'd hazard a guess at a countdown until re-opening His countdown code is wrong? Quote Link to comment Share on other sites More sharing options...
Uridium Posted March 14, 2021 Author Share Posted March 14, 2021 16 hours ago, Sim said: His countdown code is wrong? Sorry this is taking a while i had an issue with the countdown timer and when I fixed that I had another brainstorm which i'll list 1 = 1 click shut down closes down site immediately (admin still had access) 2= make sure that all closed pages are backed up before any edits are made.. (This will create a backup file of the closed file before you edit anything the file will be renamed from example (inventory.php to inventory.backup). 3 = View all PHP files on your root this will let you view on the page all named php files and will allow you to click on any file to goto that page) 4 = edit any of the current closed file times incase your not quite finished you can increase the offline timer 5 = make sure NO pages can be closed down twice if page is already closed.. 6 = closing header.php will close down entire site (you can set your own time limit here) on #1 the site is shut down for 24 hours 7 = All pages can be open with one click from the OPEN ALL link..... I'll post some pics im still working on the EDIT filename and close all function...... but the rest works fine 2 Quote Link to comment Share on other sites More sharing options...
Spydre452 Posted March 14, 2021 Share Posted March 14, 2021 This is looking really good @Uridium 👏 Quote Link to comment Share on other sites More sharing options...
MNG Posted March 15, 2021 Share Posted March 15, 2021 I am interested in this 😄 Quote Link to comment Share on other sites More sharing options...
Uridium Posted March 16, 2021 Author Share Posted March 16, 2021 Sorry still coding.. It dawned on me that displaying a time to come back to the game could put people off... So ive implemented a colour changer basically like a set of traffic lights Red, Amber Green as your work progresses you can inform your members by changing the colour of the Time block even though your time says 72hours and 25 minutes your users can watch the colours change from red to amber to green to inform them that the work is nearing completion... fixed a few bugs it didn't notice in the meantime 2 Quote Link to comment Share on other sites More sharing options...
Sim Posted March 16, 2021 Share Posted March 16, 2021 Very good mod. Since this is a very in depth mod, Maybe add If the user is logged in, add a button 'notify me when reopened' or something that will send out emails after maintenance. Quote Link to comment Share on other sites More sharing options...
Uridium Posted March 16, 2021 Author Share Posted March 16, 2021 maintenance_mod.rar there is a readme.txt file included any issues post on here 1 Quote Link to comment Share on other sites More sharing options...
Uridium Posted March 19, 2021 Author Share Posted March 19, 2021 Has anyone installed this mod and if so was it easy from the instructions and working Quote Link to comment Share on other sites More sharing options...
Sim Posted March 20, 2021 Share Posted March 20, 2021 This be a great MOD for GL. Quote Link to comment Share on other sites More sharing options...
URBANZ Posted March 20, 2021 Share Posted March 20, 2021 (edited) 14 hours ago, Sim said: This be a great MOD for GL. yes it would i do have something like this already running in my game, i may release it at some point works totally as a standalone with no editing of other files, also is hooked up to my bug tracking class so can see status and reports of each module that may need work also sends notifications when it has either detected an error or a user has issued a report on that module. Edited March 21, 2021 by URBANZ 3 Quote Link to comment Share on other sites More sharing options...
Sim Posted March 21, 2021 Share Posted March 21, 2021 Automatic error reporting. I like that idea!! A maintenance mod is one of the last good mods that could be released for GL. Quote Link to comment Share on other sites More sharing options...
Dayo Posted March 21, 2021 Share Posted March 21, 2021 Yes this would be really good and with the moduleLoad function it would be really easy to make. Ill take a look at this next week Quote Link to comment Share on other sites More sharing options...
URBANZ Posted March 21, 2021 Share Posted March 21, 2021 (edited) Ive just stripped my version down so will post up the the way i do it, i havent included the ACP part as that is unique to my game but you could always build this part yourself. @Dayo this might save you some time. Just note i did it this way as wanted a banner displayed to the admin when page is in maintenance. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Edited March 22, 2021 by URBANZ 1 1 Quote Link to comment Share on other sites More sharing options...
peterisgb Posted March 24, 2021 Share Posted March 24, 2021 This looks mental. I will give it a try later, But from the images looks like you put your heart into it, Nice job. 2 Quote Link to comment Share on other sites More sharing options...
Sim Posted March 24, 2021 Share Posted March 24, 2021 47 minutes ago, peterisgb said: This looks mental. I will give it a try later, But from the images looks like you put your heart into it, Nice job. It might not look to neat, but the hooks dont allow you to to change the defaultb loaded template to easily. @URBANZ im sure you know you can return the maintenance mod tpl? Or load maintenance. Quote Link to comment Share on other sites More sharing options...
Uridium Posted March 24, 2021 Author Share Posted March 24, 2021 A page counter would be an advantage it would display all PHP files and the number people who visit each page that way if a page isnt doing so well you can maybe upgrade it or get rid of it Quote Link to comment Share on other sites More sharing options...
URBANZ Posted March 24, 2021 Share Posted March 24, 2021 (edited) 9 hours ago, Sim said: It might not look to neat, but the hooks dont allow you to to change the defaultb loaded template to easily. @URBANZ im sure you know you can return the maintenance mod tpl? Or load maintenance. This is very true to alter the loaded template is a massive pain which is why i use this way as works very well. yes i know you can return the tpl but decided it to make it an all in 1 for posting here and for loading the module page i didnt do this as it dont have its own page, for my game it is a hook for moduleManager so dont have to repeat a page i already have. instead it uses the current page the user is on and replaces the tpl and then if the admin is viewing it displays the page its meant to with a banner saying its in maintenance. I find this way better instead of redirecting as users could refresh the page for example and would display the page it needs to when its out of maintenance. Edited March 24, 2021 by URBANZ Quote Link to comment Share on other sites More sharing options...
Sim Posted March 25, 2021 Share Posted March 25, 2021 On 3/24/2021 at 3:28 PM, Uridium said: A page counter would be an advantage it would display all PHP files and the number people who visit each page that way if a page isnt doing so well you can maybe upgrade it or get rid of it I love this idea. I did that with oRPG Creator many years ago. Quote Link to comment Share on other sites More sharing options...
URBANZ Posted March 26, 2021 Share Posted March 26, 2021 4 hours ago, Sim said: I love this idea. I did that with oRPG Creator many years ago. personally this is a bad idea as you would then need to store the page views which then could become something that slows the game down. This is why analytics exists. Quote Link to comment Share on other sites More sharing options...
Sim Posted March 26, 2021 Share Posted March 26, 2021 Analytics would slow a site down even more IMO. Adding one additional query to every page load should not effect any performance at all. Update pageviews = pageviews +1 where page = thisPage Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.