vForums Support > Programming & Coding :: Code Requests & Support :: > Logged in as recreate

Logged in as recreate - Posted By Aiken (ionfortuna) on 10th Jan 10 at 7:37pm
Code:
 
  1. <script>
  2. var UG;
  3. for(i = 0; i <= vf_usergroup.length; i++){
  4. UG += 'group' + vf_usergroup[i]
  5. if(i != vf_usergroup.length){
  6. UG += ' ';
  7. }
  8. }
  9. document.write('Logged in as: <a href="/action/view_profile/user/' + vf_username + '" class="' + UG + '">' + vf_displayname + '</a>');
  10. get('user_table','id').style.display = 'none';
  11. </script>
 


The only problem I am having is with group# class, right now the output is a normal link

Re: Logged in as recreate - Posted By Michael (wrighty) on 10th Jan 10 at 11:10pm
Code:
 
  1. <script>
  2. var UG = 'group' + vf_usergroup.join(' group');
  3. document.write('Logged in as: <a href="/action/view_profile/user/' + vf_username + '" class="' + UG + '">' + vf_displayname + '</a>');
  4. get('user_table','id').style.display = 'none';
  5. </script>
 


Try that! {Smile}

Re: Logged in as recreate - Posted By Aiken (ionfortuna) on 10th Jan 10 at 11:25pm
Works

Re: Logged in as recreate - Posted By Michael (wrighty) on 11th Jan 10 at 12:06am
{Smile}
Glad to know.