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
I'll see if I have time to do this later tonight for you when I get back!![]()
I was mainly asking for Ross But ok. Thanks.
Does it matter if I do it?![]()
no it dont matter, thats why I saidI was mainly asking for Ross But ok. Thanks.
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>
Thanks wrighty
Welcome