Advertisement
ItsDanyAndre

05 - Gentle Sea: Profile_view_body

Dec 20th, 2020
402
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 4.67 KB | None | 0 0
  1. <script type="text/javascript">
  2.     $(document).ready(function(){
  3.     $('.page-title span').each(function(){
  4.     var membercolour = $(this).css('color');
  5.     $(this).parents('').attr('style','--gscoloruser:' + membercolour + ';');
  6.     });
  7.     });
  8. </script>
  9.  
  10. <!-- BEGIN switch_user_logged_in -->
  11. <p class="right rightside">{LAST_VISIT_DATE}</p>
  12. <!-- END switch_user_logged_in -->
  13. <p>{CURRENT_TIME}</p>
  14.  
  15. <h1 class="page-title">{L_VIEWING_PROFILE}</h1>
  16.  
  17.  
  18.  
  19. <div class="gsperfilcont">
  20.   <div class="gsperfilcont1">
  21.     <div class="gsperfilavatar">{AVATAR_IMG}</div>  
  22.     <div class="gsperfilcontacto">
  23.         <div class="gsperfilcontacto1" id="field_id{contact_field.ID}">
  24.             <!-- BEGIN contact_field -->
  25.             {contact_field.CONTENT}
  26.             <!-- END contact_field -->
  27.         </div>
  28.     </div>
  29.   </div>
  30.   <div class="gsperfilcont2">
  31.     <div class="gsperfilnombre">
  32.       <div class="gsperfilname1">{PUSERNAME}</div>
  33.       <div class="gsperfilname2">{POSTER_RANK}</div>
  34.     </div>
  35.     <div class="gsperfilcampos">
  36.         <!-- BEGIN profile_field -->
  37.         <div class="gsperfilcampos1" id="field_id{profile_field.ID}">
  38.             <div class="gsperfilabel">{profile_field.LABEL}</div>
  39.             <div class="gsperfifield">{profile_field.CONTENT}</div>
  40.         </div>
  41.         <!-- END profile_field -->
  42.     </div>
  43.     <div class="gsperfilbarra"></div>
  44.   </div>
  45. </div>
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69. <!-- BEGIN switch_rpg -->
  70. <h1 class="page-title">{L_VIEWING_RPG}</h1>
  71. <div class="panel bg1">
  72.     <div class="inner"><span class="corners-top"><span></span></span>
  73.  
  74.     <p style="text-align: center;">{RPG_IMAGE}</p>
  75.     <hr />
  76.  
  77.     <!-- BEGIN rpg_fields_left -->
  78.     <div class="column1">
  79.         <dl class="details">
  80.             <dt>{switch_rpg.rpg_fields_left.F_NAME} :</dt>
  81.             <dd>{switch_rpg.rpg_fields_left.F_VALUE_NEW}</dd>
  82.         </dl>
  83.     </div>
  84.     <!-- END rpg_fields_left -->
  85.  
  86.     <!-- BEGIN rpg_fields -->
  87.     <div class="column2">
  88.         <dl class="details">
  89.             <dt>{switch_rpg.rpg_fields.F_NAME} :</dt>
  90.             <dd>{switch_rpg.rpg_fields.F_VALUE_NEW}</dd>
  91.         </dl>
  92.     </div>
  93.     <!-- END rpg_fields -->
  94.     <div class="clear"></div>
  95.     <fieldset class="submit-buttons">
  96.         {U_ADMIN_RPG_NEW}
  97.     </fieldset>
  98.     <span class="corners-bottom"><span></span></span></div>
  99. </div>
  100. <!-- END switch_rpg -->
  101. <script src="{JQUERY_ROOT}json/jquery.json-1.3.min.js" type="text/javascript"></script>
  102. <script type="text/javascript">
  103. //<![CDATA[
  104.     $(document).ready(function(){
  105.         $('[id^=field_id]').each(function(){
  106.             if ( $(this).find('.field_editable').is('span, div') )
  107.             {
  108.                 $(this).hover(function()
  109.                 {
  110.                     if( $(this).find('.field_editable.invisible').is('span, div') )
  111.                     {
  112.                         $(this).find('.field_editable').prev().addClass('ajax-profil_hover').parent().addClass('ajax-profil_parent').append('<div class="ajax-profil_edit"><img src="{AJAX_EDIT_IMG}" /></div>');
  113.                         $(this).find('.ajax-profil_edit').attr({
  114.                                 alt: "{L_FIELD_EDIT_VALUE}",
  115.                                 title: "{L_FIELD_EDIT_VALUE}"
  116.                             }).click(function(){
  117.                             $(this).prev().prev().removeClass('ajax-profil_hover').addClass('invisible').next().removeClass('invisible').append('<img src="{AJAX_VALID_IMG}" class="ajax-profil_valid" />').find('input,select');
  118.                             $(this).prev().find('.ajax-profil_valid').attr({
  119.                                 alt: "{L_VALIDATE}",
  120.                                 title: "{L_VALIDATE}"
  121.                             }).click(function(){
  122.                                 var content = new Array();
  123.                                 $(this).parent().find('[name]').each(function(){
  124.                                     var type_special = $(this).is('input[type=radio],input[type=checkbox]');
  125.                                     if ( (type_special && $(this).is(':checked')) || !type_special )
  126.                                     {
  127.                                         content.push(new Array($(this).attr('name'), $(this).attr('value')));
  128.                                     }
  129.                                 });
  130.                                 var id_name = $(this).parents('[id^=field_id]').attr('id');
  131.                                 var id = id_name.substring(8, id_name.length);
  132.                                 $.post(
  133.                                     "{U_AJAX_PROFILE}",
  134.                                     {id:id,user:"{CUR_USER_ID}",active:"{CUR_USER_ACTIVE}",content:$.toJSON(content),tid:"{TID}"},
  135.                                     function(data){
  136.                                         $.each(data, function(i, item){
  137.                                             $('[id=field_id' + i + ']').find('.field_uneditable').html(item).end().find('.ajax-profil_valid').remove().end().find('.field_editable').addClass('invisible').end().find('.field_uneditable').removeClass('invisible');
  138.                                         });
  139.                                     },
  140.                                     "json"
  141.                                 );
  142.                             });
  143.                             $(this).remove();
  144.                         });
  145.                     }
  146.                 },function()
  147.                 {
  148.                     if( $(this).find('.field_editable.invisible').is('span, div') )
  149.                     {
  150.                         $(this).find('.field_editable').prev().removeClass('ajax-profil_hover');
  151.                         $(this).find('.ajax-profil_edit').remove();
  152.                     }
  153.                 });
  154.             }
  155.         });
  156.     });
  157. //]]>
  158. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement