vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Code Requests & Support :: [F]Profile Spoiler Area - View Topic (Page 1 of 2)Page: 1 2
Topic Rating: *****
Printable View
dog199200
Guest
[F]Profile Spoiler Area (18th Apr 08 at 4:14pm UTC)
OK this shouldn't be hard, but i need a code that will add an edit area to the modify profile called E-Stuff, and then when they put something in here is calls a spoiler drop down at the top of the sig.

Basically if this help, i need s system that adds an area in the modify profile area that when you add stuff to it it will add to a drop down at the top of the sig, but also if possible (not required) can you make it so taht is they dont have anything in the area then the drop down doesn't show.
Michael
Moderator
*****

[Avatar]
Recoding the future

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

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Profile Spoiler Area (18th Apr 08 at 4:52pm UTC)
The options will probably have to seperated by a comma (when entering them!). But other than that, should be fine! ^_^
dog199200
Guest
Re: Profile Spoiler Area (18th Apr 08 at 5:03pm UTC)
ok np, but for the description of the field you might want to add that in {Smile}
dog199200
Guest
Re: Profile Spoiler Area (20th Apr 08 at 6:50pm UTC)
bump
Michael
Moderator
*****

[Avatar]
Recoding the future

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

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Profile Spoiler Area (21st Apr 08 at 9:48pm UTC)
I know of this. Been very busy with my new camera. So please, bare with me and wait for once in a while! {Smile}
dog199200
Guest
Re: Profile Spoiler Area (22nd Apr 08 at 1:18am UTC)
i am waiting...and i understand, i just bump in case someone else wants to take a crack at it
Michael
Moderator
*****

[Avatar]
Recoding the future

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

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Profile Spoiler Area (25th Apr 08 at 4:48pm UTC)
Try this. It's a hell of a long code!!!

Code:
 
  1. <script>
  2. /*Profile Spoiler Area in Signature
  3. Created By Wrighty
  4. support.virtualforums.co.uk*/
  5.  
  6. var d;
  7. function save(){
  8.     if(!f.vf_mp.value == "" ){
  9.         f.hidden.value = '{w_spoiler:'+f.vf_mp.value+'}' + f.hidden.value;
  10.     }
  11. }
  12. if(document.profile_form && document.profile_form.hidden){
  13.     var f  = document.profile_form;
  14.     r = f.avatar_height.parentNode.parentNode.parentNode.parentNode.insertRow(8);
  15.     r.insertCell(0).innerHTML = '<font size=2>Personal Spoiler:</font>';
  16.     r.insertCell(1).innerHTML = '<input type="text" size="25" name="vf_mp">';
  17.     r.insertCell(2).innerHTML = '<font size=1>Seperate each item by a comma.</font>';
  18.     f.vf_mp.value=(f.hidden.value.match(/{w_spoiler:(.+?)}/))?RegExp.$1:'';
  19.     f.hidden.value = f.hidden.value.replace(/{w_spoiler:(.+?)}/,'');
  20.     if(document.addEventListener){
  21.         f.addEventListener('submit', save,false);
  22.     }else{
  23.         f.attachEvent('onsubmit', save);
  24.     }
  25. }
  26. if(location.href.match(/view/)) {
  27.     var x=document.getElementsByTagName('tr');
  28.     for(i=0;i<x.length;i++){
  29.         if(x[i].innerHTML.match(/hidden_vars/)){
  30.             var s = x[i].getElementsByTagName('span');
  31.             for(ui=0;ui<s.length;ui++){
  32.                 if(s[ui].id.match(/hidden_vars/)){
  33.                     d = s[ui];
  34.                 }
  35.             }
  36.             for(z=0;z<x[i].getElementsByTagName('td').length;z++){
  37.                 if((x[i].getElementsByTagName('td')[z].className.match(/signature/) || x[i].getElementsByTagName('td')[z].getElementsByTagName('div')[0] &&  x[i].getElementsByTagName('td')[z].getElementsByTagName('div')[0].id.match(/signature/)) && d.innerHTML.match(/{w_spoiler:(.+?)}/) && RegExp.$1 != ''){
  38.                     var d_ub = document.createElement('SELECT');
  39.                     var w_ub = [];
  40.                     w_ub = RegExp.$1.split(/,/);
  41.                     for (ar=0;ar<w_ub.length;ar++) {
  42.                         d_ub.options[d_ub.options.length] = new Option(w_ub[ar]);
  43.                     }
  44.                     if(x[i].getElementsByTagName('td')[z].getElementsByTagName('div')[0]){
  45.                         x[i].getElementsByTagName('td')[z].getElementsByTagName('div')[0].insertBefore(d_ub, x[i].getElementsByTagName('td')[z].getElementsByTagName('div')[0].firstChild);
  46.                     }else{
  47.                         x[i].getElementsByTagName('td')[z].insertBefore(d_ub, x[i].getElementsByTagName('td')[z].getElementsByTagName('font')[0]);
  48.                     }
  49.                 }
  50.             }
  51.             break;
  52.         }
  53.     }
  54. }
  55. </script>
 


Global Footer

I'm 99% sure that's what you want... But if not, we can go from it at least
dog199200
Guest
Re: Profile Spoiler Area (25th Apr 08 at 9:10pm UTC)
{Smile} its not showing up in mine
Michael
Moderator
*****

[Avatar]
Recoding the future

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

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Profile Spoiler Area (28th Apr 08 at 9:11pm UTC)
ok use this code, edit your profile, don't enter any information into any EXTRA boxes (if it's already there, delete it!)

and then save.
Then remove this code!

<script>
get('hidden','name')[0].value = '';
</script>
dog199200
Guest
Re: Profile Spoiler Area (29th Apr 08 at 1:15am UTC)
i'm... i cant find where taht is
Michael
Moderator
*****

[Avatar]
Recoding the future

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

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Profile Spoiler Area (29th Apr 08 at 6:44am UTC)
add that code , then remove it...
dog199200
Guest
Re: Profile Spoiler Area (29th Apr 08 at 7:40pm UTC)
ah ok

Edit:

ok use this code

<script>
get('hidden','name')[0].value = '';
</script>

and place it in the global footers, then edit my profile and remove any text in the spoiler box, then save and the remove this cide

<script>
get('hidden','name')[0].value = '';
</script>

right? if so that doesn't work, the spoiler tag still only shows in melody's sig... (Thats when i go back and re add the text)
dog199200
Guest
Re: Profile Spoiler Area (6th May 08 at 4:08am UTC)
bump
dog199200
Guest
Re: Profile Spoiler Area (7th May 08 at 11:04pm UTC)
bump
dog199200
Guest
Re: Profile Spoiler Area (12th May 08 at 2:31am UTC)
bump
 Printable View
Page: 1 2

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