Nick Very Senior Member
    
![[Avatar]](http://uploads.vforums.co.uk/forums/support/f_5e7b1402b305d883af97446b2fedc6c2_1-eog.jpeg) Posts: 3,013 Status: Offline Gender: Male Location: vForums Age: 35 Joined:
pmwww | [F] REQUEST :Ross: Current skin in MP (23rd Jan 08 at 2:56pm UTC) | | Hey Ross, since we have Multiple skins now, can you convert your "Current skin in Mini Profile" code:
 Code: - <script type="text/javascript">
- <!--
- /* current skin in miniprofile - ross */
- var re = /\[ss:(.+?)\]/;
- if(document.modifyForm) {
- document.modifyForm.personaltext.value = document.modifyForm.personaltext.value.replace(re,'');
- document.modifyForm.onsubmit = function() {
- var ss = document.modifyForm.skin.options[document.modifyForm.skin.selectedIndex].innerHTML;
- document.modifyForm.personaltext.value += '[ss:'+ ss +']';
- return true;
- }
- }
- var td = document.getElementsByTagName('td');
- for(i=0; i<td.length; i++) {
- if(td.item(i).width == '20%' && td.item(i).innerHTML.match(re)) {
- var skin = '<br />Skin: '+RegExp.$1;
- td.item(i).innerHTML = td.item(i).innerHTML.replace(re,'') + skin;
- }
- }
- //-->
- </script>
Thanks, Darkmage | |
|
Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | Re: REQUEST :Ross: Current skin in MP (23rd Jan 08 at 6:07pm UTC) | | I'll see if I have time to do this later tonight for you when I get back! | |
|
Nick Very Senior Member
    
![[Avatar]](http://uploads.vforums.co.uk/forums/support/f_5e7b1402b305d883af97446b2fedc6c2_1-eog.jpeg) Posts: 3,013 Status: Offline Gender: Male Location: vForums Age: 35 Joined:
pmwww | Re: REQUEST :Ross: Current skin in MP (23rd Jan 08 at 8:08pm UTC) | | I was mainly asking for Ross But ok. Thanks. | |
|
Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | Re: REQUEST :Ross: Current skin in MP (23rd Jan 08 at 9:11pm UTC) | | Does it matter if I do it? | |
|
Nick Very Senior Member
    
![[Avatar]](http://uploads.vforums.co.uk/forums/support/f_5e7b1402b305d883af97446b2fedc6c2_1-eog.jpeg) Posts: 3,013 Status: Offline Gender: Male Location: vForums Age: 35 Joined:
pmwww | Re: REQUEST :Ross: Current skin in MP (23rd Jan 08 at 10:50pm UTC) | | no it dont matter, thats why I said I was mainly asking for Ross But ok. Thanks. | |
|
Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | Re: REQUEST :Ross: Current skin in MP (23rd Jan 08 at 11:01pm UTC) | | Global Footer
Also, allows you to change what the text before the skin says: Currently it's set to 'Skin:'
No need to edit anything else... automatically adds it to the profile too so long as they have modified their profile since the code was added.
 Code: - <script>
- /*Current Skin
- Created By Wrighty
- support.virtualforums.co.uk*/
-
- var pref = 'Skin: ';
-
- //======================DO NOT EDIT========================
- function load(){
- f.hidden.value = f.hidden.value.replace(/{cur_skin:(.+?)}/g,'');
- }
- function save(){
- f.hidden.value = "{cur_skin:"+ f.skin.options[f.skin.selectedIndex].innerHTML+"}" + f.hidden.value;
- }
-
- if(document.profile_form && document.profile_form.signature){
- var f=document.profile_form;
- f.hidden.value = f.hidden.value.replace(/{cur_skin:(.+?)}/g,'');
- if(document.addEventListener){
- f.addEventListener('submit', save,false);
- }else{
- f.attachEvent('onsubmit', save);
- }
- }
-
- if(location.href.match(/\/view/i)){
- cur_skin = (document.getElementById('hidden_vars').innerHTML.match(/{cur_skin:(.+?)}/))?RegExp.$1:'';
- var d = document.getElementsByTagName('td');
- for(i=0; i<d.length;i++){
- if(d[i].className.match(/window(1|2)/) && d[i].innerHTML.match(/posts/i) && !d[i].innerHTML.match(/Date Registered/) && cur_skin!=''){
- d[i].getElementsByTagName('font')[0].innerHTML+= '<br>'+pref + cur_skin;
- }
- }
- }
- </script>
| |
|
Nick Very Senior Member
    
![[Avatar]](http://uploads.vforums.co.uk/forums/support/f_5e7b1402b305d883af97446b2fedc6c2_1-eog.jpeg) Posts: 3,013 Status: Offline Gender: Male Location: vForums Age: 35 Joined:
pmwww | Re: REQUEST :Ross: Current skin in MP (24th Jan 08 at 1:23am UTC) | | Thanks wrighty | |
|
Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | Re: REQUEST :Ross: Current skin in MP (24th Jan 08 at 7:47am UTC) | | Welcome | |
|