vForums Support > Programming & Coding :: Code Requests & Support :: > [F] |Support| Current skin in MP

[F] |Support| Current skin in MP - Posted By Nick (nickb) on 20th Mar 08 at 11:52pm
Code:
 
  1. <script>
  2. /*Current Skin
  3. Created By Wrighty
  4. support.virtualforums.co.uk*/
  5.  
  6. var pref = 'Skin: ';
  7.  
  8. //======================DO NOT EDIT========================
  9. function load(){
  10.     f.hidden.value = f.hidden.value.replace(/{cur_skin:(.+?)}/g,'');
  11. }
  12. function save(){
  13.     f.hidden.value = "{cur_skin:"+ f.skin.options[f.skin.selectedIndex].innerHTML+"}" + f.hidden.value;
  14. }
  15.  
  16. if(document.profile_form && document.profile_form.signature){
  17.     var f=document.profile_form;
  18.     f.hidden.value = f.hidden.value.replace(/{cur_skin:(.+?)}/g,'');
  19.     if(document.addEventListener){
  20.         f.addEventListener('submit', save,false);
  21.     }else{
  22.         f.attachEvent('onsubmit', save);
  23.     }
  24. }
  25.  
  26. if(location.href.match(/\/view/i)){
  27.     cur_skin = (document.getElementById('hidden_vars').innerHTML.match(/{cur_skin:(.+?)}/))?RegExp.$1:'';
  28.     var d = document.getElementsByTagName('td');
  29.     for(i=0; i<d.length;i++){
  30.         if(d[i].className.match(/window(1|2)/) && d[i].innerHTML.match(/posts/i) && !d[i].innerHTML.match(/Date Registered/) && cur_skin!=''){
  31.             d[i].getElementsByTagName('font')[0].innerHTML+= '<br>'+pref + cur_skin;
  32.         }
  33.     }
  34. }
  35. </script>
  36.  
 


The code above does not work with the quick Select skin.

Darkmage

Re: |Support| Current skin in MP - Posted By Michael (wrighty) on 20th Mar 08 at 11:55pm
I know. And unfortunately, there's nothing that can be done about it, unless Ross suddenly introduces Ajax hidden_vars updating. (which would kick ass)!

Sorry! {Sad}