Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic NicerPostForm 1.1 (Read 3884 times)
Carsten
God Member
*****
Offline


...to much YaMS

Posts: 3281
Location: Langå
Joined: Aug 2nd, 2002
Gender: Male
NicerPostForm 1.1
Jan 3rd, 2004 at 5:21am
Print Post  
NicerPostForm 1.1 - with Add Smilies Leight

This mod
- removes the "field focus on mouse-over"
- add a "remaining characters" counter and a "warning-led"
- check if all required fields are filled and valid before submitting posts/IM's
- if enabled it copies the message to the clipboard after every 50 characters/10 sec.(if message has been changed) (only IE 4+)
- copies the message to the clipboard on submit (only IE 4+) (inspired by Flicker)
- add a "characters copied to clipboard" counter and a "led" to show if all message-text has been copied to clipboard

www.cd-profil.dk/yabb/ams_lt.gif

www.cd-profil.dk/yabb/nicepost03.gif

New in ver. 1.1: Added option to enable/disable auto_copy to clipboard.

New in ver. 0.95: "Warning-led" for "less than 100 and less than 50" remaining characters. "Led" to show if all message-text has been copied to the clipboard. A few bugs fixed.

New in ver. 0.9: More advanced validation of e-mail address using regex in the javascript.

New in ver. 0.8: Copies the message to the clipboard after every 50 characters/10 sec.(if message has been changed)/submit (inspired by Flicker)

New in ver. 0.7: The zip package now includes "Add Smilies Leight" - let users select additional smilies. This should be considered a "Leight version" of Add More Smilies for those who dont want all the advanced functions of AMS.

Download NicerPostForm

Test it here
« Last Edit: Jan 25th, 2004 at 9:11pm by Carsten »  

If you knock your head against a brick wall and hear a hollow sound, it's not necessarily coming from the wall.
Back to top
 
IP Logged
 
Jungle Jim
God Member
*****
Offline



Posts: 1015
Location: The Fridge
Joined: Apr 7th, 2003
Gender: Male
Re: NicerPostForm 1.0
Reply #1 - Jan 16th, 2004 at 12:15pm
Print Post  
That IS sweet - now we just raid all the smilies we want and throw em in the folder Cheesy lol
  
Back to top
 
IP Logged
 
Jungle Jim
God Member
*****
Offline



Posts: 1015
Location: The Fridge
Joined: Apr 7th, 2003
Gender: Male
Re: NicerPostForm 1.1
Reply #2 - Apr 2nd, 2004 at 1:48am
Print Post  
Umm, i think i have the like the first one u made, before adding the disable copy-to-clipboard.  Thing is, i have no idea how to reverse edit it from my board, if i try and "upgrade" ill be finding code that already exists and will miss subtle changes which will inevitably cause problems.

Can you suggest any way I can disable the clipboard function without making any drastic changes - otherwise im stumped up the tree sideways.....

Plz ? ...

The rest of the mod works 100% for me - its ideal for our use, cept that copy to clipboard, some of my users have directed a few swear words my way.

Cheers in advance Wink
  
Back to top
 
IP Logged
 
Carsten
God Member
*****
Offline


...to much YaMS

Posts: 3281
Location: Langå
Joined: Aug 2nd, 2002
Gender: Male
Re: NicerPostForm 1.1
Reply #3 - Apr 14th, 2004 at 11:09pm
Print Post  
@DMF_Admin - that really depends on the version you installed - but let's have a go:

In Post.pl:

Code
Select All
------
Find and remove:

if (ie) { theForm.message.createTextRange().execCommand("Copy"); }

------
Find and remove:

      <img src="$imagesdir/green1.gif" name="savewarn" height="8" width="8" border="0" vspace="0" hspace="0" align="absmiddle">
      <font size="1">$txt{'664b'} <input value="0" size="3" name="msgCB" class="windowbg2" style="border: 0px; font-size: 11px; width: 40px; padding: 1px" disabled></font>

------
Find and remove:

            if (ie) autoSaveMsg()

------
Find and remove:

            if(ie) { calcCharSaved() }

------
Find and remove:

      var savedcnt = document.postmodify.message.value.length
      var savedsec = 0
      var savedtxt
      var savealert = false

      function onKeyDown() {
            if (ie) {
                  var pressedKey = String.fromCharCode(event.keyCode).toLowerCase();
                  if (event.ctrlKey && (pressedKey == "c")) {
                        document.postmodify.msgCB.value = 0;
                        document.images.savewarn.src="$imagesdir/red1.gif";
                        savealert = true;
                        tick();
                  }
            }
      }

      function calcCharSaved() {
            if (document.postmodify.message.value != savedtxt) {
                  if ( savealert ) { savealert = false; document.images.savewarn.src="$imagesdir/red1.gif"; }
                  savedsec++
                  if ( document.postmodify.message.value.length > savedcnt || savedsec > 10 ) autoSaveMsg()
            }
            else { savedsec = 0 }
      }

      function autoSaveMsg() {
            document.postmodify.msgCB.value = document.postmodify.message.value.length
            document.postmodify.message.createTextRange().execCommand("Copy")
            savedcnt = document.postmodify.message.value.length + 50
            savedtxt = document.postmodify.message.value
            savedsec = 0
            document.images.savewarn.src="$imagesdir/green1.gif"
            savealert = true
      }


------
Find and remove:

      document.onkeydown=onKeyDown
 


No guarantie - so BACKUP first  Wink
  

If you knock your head against a brick wall and hear a hollow sound, it's not necessarily coming from the wall.
Back to top
 
IP Logged
 
Jungle Jim
God Member
*****
Offline



Posts: 1015
Location: The Fridge
Joined: Apr 7th, 2003
Gender: Male
Re: NicerPostForm 1.1
Reply #4 - Apr 15th, 2004 at 2:37am
Print Post  
On first reflection and testing - seems to have worked a treat - AWESOME Thank You SO much Cheesy

Ill let ya know if anything crops up... but so far SO GOOD !! Cheesy

Btw, do u realise (speaks to the IE users out there)... that yabb forums apprear to run about 4x faster, and a lot smoother in Mozilla !! - Wierd...

And Carsten ...... THANK YOU
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint