vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Code Requests & Support :: [F] |Support| Current skin in MP - View Topic
Topic Rating: *****
Printable View
This topic was locked 21st Mar 08 at 12:11am by Michael
Nick
Very Senior Member
*****

[Avatar]

Posts: 3,013
Status: Offline
Gender: Male
Location: vForums
Age: 35
Joined:  
Reputation: 62%  


pmwww
[F] |Support| Current skin in MP (20th Mar 08 at 11:52pm UTC)
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
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: |Support| Current skin in MP (20th Mar 08 at 11:55pm UTC)
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}
 Printable View

All times are GMT+0 :: The current time is 10:24am
Page generated in 0.1441 seconds
This Forum is Powered By vForums (v2.4)
Create a Forum for Free | Find Forums