Announcement

Collapse
No announcement yet.

Making Actinic layout code readable.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Making Actinic layout code readable.

    If you're wanting to see what some of these posts containing

    if="%3cactinic%3avariable%20name%3d%22SectionNamePrev%22%20%2f%3e%20%21%3d%20%22%22"

    actually looks like to humans then the following will help.

    Copy / paste the following into a textfile and save it on your desktop or server as e.g. descape.html. Then add it to your favourites.

    Now open that page and copy / paste your cryptic code into the top box and see the results in the lower one.

    Code:
    <html>
    <head>
    <title>Make Actinic code readable</title>
    <script>
    function dowrap(button){
    	if ( button.value == 'Wrap' )
    		{
    		document.forms.fixit.actinic.setAttribute('wrap','soft');
    		document.forms.fixit.readable.setAttribute('wrap','soft');
    		button.value = 'UnWrap'
    		}
    	else
    		{
    		document.forms.fixit.actinic.setAttribute('wrap','off');
    		document.forms.fixit.readable.setAttribute('wrap','off');
    		button.value = 'Wrap'
    		}
    }
    </script>
    </head>
    <body>
    <form name="fixit">
    Source code
    <br/>
    <textarea wrap="off" name="actinic" cols=100 rows=20 onchange="document.forms.fixit.readable.value=unescape(document.forms.fixit.actinic.value);"></textarea>
    <br/>
    <br/>
    Readable code <input type="button" value="Display" onclick="document.forms.fixit.readable.value=unescape(document.forms.fixit.actinic.value);">
    <input type="button" value="Clear" onclick="document.forms.fixit.readable.value='';document.forms.fixit.actinic.value='';">
    <input type="button" name="wrapit" value="Wrap" onclick="dowrap(this);" />
    <textarea wrap="off" name="readable" cols=100 rows=20></textarea>
    </form>
    <script>
    	document.forms.fixit.actinic.setAttribute('wrap','off');
    	document.forms.fixit.readable.setAttribute('wrap','off');
    	document.forms.fixit.wrapit.value = 'Wrap';
    </script>
    </body>
    </html>
    Updated 9-2-9 (nice palindromic date) - added Wrap button (only works in IE).
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    #2
    lets have this implimented at the vbulletin level chris?

    Comment


      #3
      What - you mean maybe a pop-up windoe in vbulletin to do this? Not a bad idea.

      Comment


        #4
        It'd be great at post level IMO, it really is difficult when you copy paste them into a thread.

        Comment


          #5
          Would adding it at post level mean you could still C&P it though?

          Comment


            #6
            it micht be possible to write a [ACTINIC] [/ACTINIC] type block, looking into the way vbulletin handles things.

            Comment


              #7
              I'm afraid you are rather flattering me by thinking I would even know how to do any kind of customisations like that to vbulletin.

              I must admit, when people post big chunks of code into the community, I just copy and paste it into Actinic to try and make sense of it.

              Anyway, I'll see if I can figure out how to add a translator to the community.

              Comment


                #8
                What a fabulous utility.

                Thanks Norman!
                Kind Regards
                Sean Williams

                Calamander Ltd

                Comment


                  #9
                  Bumping post for Darren in case he hasn't found it (will remove later )
                  Tracey

                  Comment


                    #10
                    Thank you T - i was searching for block code and stuff.

                    Comment

                    Working...
                    X