vForums Support > Programming & Coding :: Code Requests & Support :: > [F] Pesonal text in profile options

[F] Pesonal text in profile options - Posted By Graystorm (warriorfreak) on 15th Jan 08 at 4:43am
There is no place to put personal text and I would like a code that enables that. {Smile}

Re: Pesonal text in profile options - Posted By Michael (wrighty) on 15th Jan 08 at 7:44am
I could write a code to allow something similar to this tonight! {Smile}

Re: Pesonal text in profile options - Posted By Michael (wrighty) on 15th Jan 08 at 7:41pm
Code:
 
  1. <script>
  2. /*Personal Message
  3. Created By Wrighty
  4. support.virtualforums.co.uk*/
  5.  
  6. function load(){
  7.     f.psm.value=(f.hidden.value.match(/{psm:(.+?)}/))?RegExp.$1:'';
  8.     f.hidden.value = f.hidden.value.replace(/{psm:(.+?)}/g,'');
  9. }
  10. function save(){
  11.     f.hidden.value = "{psm:"+f.psm.value+"}" + f.hidden.value;
  12. }
  13.  
  14. if(document.profile_form && document.profile_form.signature){
  15.     var f=document.profile_form;
  16.     var insert_after=f.location.parentNode.parentNode.parentNode;
  17.     var insert=insert_after.cloneNode(true);
  18.     insert.childNodes[0].firstChild.innerHTML='Personal Message:';
  19.     insert.childNodes[1].innerHTML='<input type="text" name="psm" size="25" maxlength="1000" value="" />';
  20.     insert.childNodes[2].firstChild.innerHTML='This is your own personal message that will appear in your Mini Profile.';
  21.     insert_after.parentNode.insertBefore(insert, insert_after.nextSibling);
  22.     load();
  23.     if(document.addEventListener){
  24.         f.addEventListener('submit', save,false);
  25.     }else{
  26.         f.attachEvent('onsubmit', save);
  27.     }
  28. }
  29.  
  30. if(location.href.match(/\/view/i)){
  31.     psm = (document.getElementById('hidden_vars').innerHTML.match(/{psm:(.+?)}/))?RegExp.$1:'';
  32.     var d = document.getElementsByTagName('td');
  33.     for(i=0; i<d.length;i++){
  34.         if(d[i].className.match(/window(1|2)/) &&             d[i].innerHTML.match(/posts/i) && !d[i].innerHTML.match(/Date Registered/) && psm!=''){
  35.             d[i].getElementsByTagName('font')[0].innerHTML+= '<br><center>'+psm+'</center>';
  36.         }
  37.     }
  38. }
  39. </script>
 



Happy Present day! {Tongue Out}
Global Footer

Re: Pesonal text in profile options - Posted By BizzD (0wnzer) on 15th Jan 08 at 11:56pm
Should that be in the database? Or am i mistaken.

Re: Pesonal text in profile options - Posted By Michael (wrighty) on 16th Jan 08 at 12:00am
meh I haven't submitted it to the database! {Tongue Out}

I posted it here cause he requested it! {Tongue Out}

Re: Pesonal text in profile options - Posted By BizzD (0wnzer) on 16th Jan 08 at 12:02am
I still don't fully get the code index. I thought any code made is 'BAM' in there. {Shocked}

Re: Pesonal text in profile options - Posted By Michael (wrighty) on 16th Jan 08 at 12:11am
no... not always... I will add this one soon... but until then it's not added! {Tongue Out}
Cr0w's working on something anyway, so I'm not going to add many/any codes until he's sorted that.

Re: Pesonal text in profile options - Posted By Marc (cr0w) on 16th Jan 08 at 2:49am
 
no... not always... I will add this one soon... but until then it's not added! {Tongue Out}
Cr0w's working on something anyway, so I'm not going to add many/any codes until he's sorted that.


Should hopefully be done by the end of next week. {Smile}