Reese
Junior Member
I've said one great thing!
Posts: 53
Reese said 0 great things
|
Post by Reese on May 20, 2010 17:30:04 GMT -8
Hey Wormo could you make me a code that undoes the last edit made to the headers/footers? 'Cuz I've ruined a board and made it where i could not edit them again!
|
|
|
Post by rhondairv on May 20, 2010 18:58:06 GMT -8
Wow, wouldn't that be nice! I have been wishing for that and a disable script for the advanced hack manager. It would be easier to disable a hack instead of uninstalling. Mostly for test purposes.
|
|
|
Post by Wormopolis on May 21, 2010 3:18:04 GMT -8
given the size of some headers and footers, Im not sure there would be an easy way to do this. Although just now I had an idea... Im going to have to test it though.
as for hack manager.. that is just how that code is Im afraid. it obfuscates everything in order to control everything. That is why I dont use it. if I want to disable a script temporarily, I just add disabled into its type. SubDevo wrote a jump to code that is awesome so I find codes fast with it.
I should be able to test a header/footer buffer code this weekend. provided I dont get another 10 requests before the end of the week.
|
|
|
Post by Wormopolis on May 25, 2010 19:35:57 GMT -8
I havent forgot about this. I have put a lot of thought into the idea I had, and I want to try it out, but there MIGHT be some dangers involved.
basically I am going to have it create a duplicate of all you header and footer code, IN your header and footer. this code will be commented out and clearly marked so if you are looking at your source you will know that chuck of code isnt really running. in order to do that, I will need to obfuscate the code a bit and remove HTML comment tags (<!-- and -->) in order to encapsulate the duplicate code in one big HTML comment.
so it will work like:
you go to your headers editor. immediately the code grabs everything from the header, replaces HTML comments inside with some tracable marker, wraps HTML comments tag around it with some explanation of why its all in there twice. repeats process for footers. stores both chunks somewhere hidden so you dont actually see it. You make your edits to what was already in the headers/footers. when you hit save, it adds back in the chunks at the very bottom of each section.
if you look at your page source at this point, you will see all your header and footer codes duplicated, but the second set will be all commented out with an explanation its part of a backup system.
lets say you made a mistake in your footers and want to revert back. you go back into the same editor you were in. the code will look to see if a saved chunk already exists, and if it does it will store it somewhere hidden and remove it from the section so you dont see duplicates. the code will again create a new backup based off what you currently have (which we know is bad, so we will end up not keeping it). there will be a new button under the header or footer box that says "REVERT". clicking that button will take the saved chunk we got earlier, put back all the comment tags to normal, and replace everything you see in the section with it.
I have some of the basic ideas layed out, but I havent started on the code just yet (countdown script made me its *brought to you by the letter b* the last couple days). I also need to do EXTENSIVE testing on this because all it takes is for something to go wrong and all the headers/footers go poof. I need to make sure there is always an escape plan. converting comments is going to be the tricky part since someone always finds a way to screw things up by making things like "<!--" part of their damn board title or something. I hate when ppl use reserved words.
if this works out, I can guarantee it WONT work with coes like hack manager and "the governer" because those codes already do a bunch of stuff to the codes already and it will send things spiraling into a cold dark hell for a user.
and I can already see the support questions from craig now... "Why do you have every code duplicated in your headers and footers"?
so hopefully the description I put in there will appease support helpers.
|
|
|
Post by Wormopolis on Aug 12, 2010 0:00:45 GMT -8
ok.. I have a working model of this if anyone wants to volunteer to test it. I suggest putting it on a test forum and not something you care about in case I havent worked all the bugs out. I have it working in IE and FF currently, and it does what I said above.
Anyone feeling like beta testing?
|
|