vForums Support > Programming & Coding :: Code Requests & Support :: > Code Please

Code Please - Posted By CåñåÐå™ (canada) on 6th Jun 08 at 2:44am
I'm wondering if this would be possible.

Ok say i'm starting an new thread . And i made the topic title like this : "THE RED BOAT" , is it possible to have a code which will make it this : "The Red Boat", or if it was this : "The red boat" it will make it this : "The Red Boat" . But it will work only for topic titles .

Re: Code Please - Posted By Marc (cr0w) on 6th Jun 08 at 3:19am
So you mean auto-capitalization? I'll do this in a moment. {Smile}

Re: Code Please - Posted By CåñåÐå™ (canada) on 6th Jun 08 at 5:33am
Ok thanks Marc {Grin} .

Re: Code Please - Posted By Marc (cr0w) on 6th Jun 08 at 8:46pm
Code:
 
  1. <script type="text/javascript">
  2. <!--
  3. /*
  4. Auto-Capitalize Post Titles by Marc
  5. Copyright 2008
  6. Do not repost
  7. */
  8.  
  9. var a = get('a','tag');
  10. for(t=0;t<a.length;t++){
  11.     if(a[t].href.match(/\/view_topic\/page\/(\d+)\/(.+?)\//)){
  12.         a[t].innerHTML = a[t].innerHTML.substring(0,1).toUpperCase() + a[t].innerHTML.substring(1,a[t].innerHTML.length).toLowerCase();
  13.     }
  14. }
  15. //-->
  16. </script>
 


Board/Global Footers. {Smile}

Re: Code Please - Posted By CåñåÐå™ (canada) on 6th Jun 08 at 9:07pm
Thank you Marc {Grin} , its working fine . Nice work {Smile} .

Re: Code Please - Posted By Marc (cr0w) on 6th Jun 08 at 10:01pm
No worries. {Smile} Smiley