The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Customize RPG sheet on profile

View previous topic View next topic Go down

Solved Customize RPG sheet on profile

Post by Hert on January 25th 2015, 1:37 am

Hello!

I've been having some trouble with pictures added in the character sheet (RPG sheet) stretching out the forum. I do not like to crop the picture people put in there because some of them put a lot of effort in them and making them smaller might ruin the picture.
So I thought, maybe I could edit the RPG sheet.
Right now it's something like this: [ link ]
I would like it to be something like this: [ link ] (I made the image a little bit smaller because it wouldn't fit otherwise in Paint)
Seperating the sheet into two collums isn't really nescessary, but I thought it would look nicer that way. The main thing I want to do is to get the RPG image under the list.

Hopefully somebody can help me with this!

Love & Rockets,
Hert


Last edited by Hert on January 27th 2015, 1:00 am; edited 1 time in total

Hert
Forumember

Posts : 81
Reputation : 3
Language : Dutch and English

http://afterthefall.actieforum.com/

Back to top Go down

Solved Re: Customize RPG sheet on profile

Post by Hert on January 25th 2015, 5:19 pm

Sorry for the dp! But I figured something out on my own, so progress!
I managed to get the picture under the sheet and it's all centered: [ link ]
But I would still like to make like two columns, so if somebody could maybe help me with that? Since I really have no idea how to do that.

Here's the edited template:
Code:
<table width="100%" border="0" cellspacing="2" cellpadding="0" align="center">
<tr>
<td><span class="nav"><a class="nav" href="{U_INDEX}">{L_INDEX}</a></span></td>
</tr>
</table>

<div class="ffs">
<table width="100%" border="0" cellspacing="1" cellpadding="0" align="center">
  <tr>
      <th class="thHead" colspan="2" nowrap="nowrap" height="25">{L_VIEWING_PROFILE}</th>
  </tr>
  <tr>
      <td class="catLeft" align="center" width="40%" height="28"><b><span class="gen">{L_USER_PRESENCE}</span></b></td>
      <td class="catRight" width="60%" align="center"><b><span class="gen">{INTERESTS}</span></b></td>
  </tr>
  <tr>
      <td class="row1" align="center" valign="top" height="120">
        <table width="100%" border="0" cellspacing="1" cellpadding="0">
            <tr>
              <td valign="middle" nowrap="nowrap" align="right" width="20%"><span class="gen"></span></td>
              <td width="80%"><b><span class="gen">{AVATAR_IMG}</span></b></td>
            </tr>
            <tr>
              <td valign="middle" nowrap="nowrap" align="right"><span class="gen"></span></td>
              <td><b><span class="gen">{POSTER_RANK}</span></b></td>
            </tr>
            <!-- BEGIN switch_show_status -->
            <tr>
              <td valign="middle" nowrap="nowrap" align="right"><span class="gen"></span></td>
              <td><b><span class="gen">{USER_ONLINE}</span></b></td>
            </tr>
            <tr>
              <td valign="middle" nowrap="nowrap" align="right"><span class="gen"></span></td>
              <td><b><span class="gen">{PM_IMG}</span></b></td>
            </tr>                         
                     
            <!-- END switch_show_status -->
            <!-- BEGIN switch_allow_friendsfoes -->
            <tr>
              <td valign="middle" nowrap="nowrap" align="right"><span class="gen"></span></td>
              <td><span class="gen"></span></td>
            </tr>
            <!-- END switch_allow_friendsfoes -->
            <!-- BEGIN switch_auth_user -->
            <tr>
              <td valign="middle" nowrap="nowrap" align="right"><br /><span class="gen"></span></td>
              <td><br /><strong><span class="gen">{ADMINISTRATE_USER}{BAN_USER}</span></strong></td>
            </tr>
            <!-- END switch_auth_user -->
        </table>
      </td>
      <td class="row1" valign="top">
        <table width="100%" border="0" cellspacing="1" cellpadding="0">
            <tr>
              <td align="right" valign="top" nowrap="nowrap"><span class="gen">{L_LAST_VISITED}:  </span></td>
              <td><b><span class="gen">{LAST_VISIT_TIME}</span></b></td>
            </tr>
            <!-- BEGIN switch_dhow_mp -->
            <tr>
              <td align="right" valign="middle" nowrap="nowrap"><span class="gen">{L_PRIVATE_MSG}:  </span></td>
              <td><b><span class="gen">{PRIVATE_MSG}</span></b></td>
            </tr>
            <!-- END switch_dhow_mp -->
            <!-- BEGIN profile_field -->
            <tr id="field_id{profile_field.ID}">
              <td width="40%" align="right" valign="top" nowrap="nowrap"><span class="gen">{profile_field.LABEL} &nbsp;</span></td>
              <td width="60%"><div class="gen" style="font-weight:bold;">{profile_field.CONTENT}</div><!-- BEGIN profil_type_user_posts -->
              <span class="genmed">
              <a rel="nofollow" class="genmed" href="/sta/{PUSERNAME}">{L_TOPICS}</a> || <a rel="nofollow" class="genmed" href="/spa/{PUSERNAME}">{L_POSTS}</a>
              </span><!-- END profil_type_user_posts --></td>
            </tr>
            <!-- END profile_field -->
        </table>
      </td>
  </tr>
 </table>
</div>
<br />
<!-- BEGIN switch_rpg -->
<div class="ffs">
<table width="100%" border="0" cellspacing="1" cellpadding="0" align="center">
  <tr>
          <th class="thHead" colspan="2" nowrap="nowrap" height="25">{USERNAME}</th>
  </tr>
<tr>
  <td>
   
 
         <table width="100%" border="0" cellspacing="1" cellpadding="0">
            <!-- BEGIN rpg_fields_left -->
            <tr>
               <td align="right" valign="middle" nowrap="nowrap">
               <span class="gen">{switch_rpg.rpg_fields_left.F_NAME} : </span>
               </td>
               <td width="100%" valign="middle" nowrap="nowrap">
               <b><span class="gen">{switch_rpg.rpg_fields_left.F_VALUE_NEW}</span></b>
               </td>
            </tr>
            <!-- END rpg_fields_left -->
         </table>

         <table border="0" cellspacing="1" cellpadding="0" align="center">
            <!-- BEGIN rpg_fields -->
            <tr>
               <td align="right" valign="middle" nowrap="nowrap">
                  <span class="gen">{switch_rpg.rpg_fields.F_NAME} : </span>
               </td>
               <td valign="baseline">
                  <b><span class="gen">{switch_rpg.rpg_fields.F_VALUE_NEW}</span></b>
               </td>
            </tr>
            <!-- END rpg_fields -->
         </table>
  <center>{RPG_IMAGE}</center><br /><br />
    </td>
  </tr>
   <tr>
      <td colspan="2" align="center" class="row1">
         {U_ADMIN_RPG}
      </td>
   </tr>

  <!-- END switch_rpg -->
</table>
</div>

 
<br />
<script src="{JS_DIR}jquery/json/jquery.json-1.3.min.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
  $(document).ready(function(){
      $('[id^=field_id]').each(function(){
        if ( $(this).find('.field_editable').is('span, div') )
        {
            $(this).hover(function()
            {
              if( $(this).find('.field_editable.invisible').is('span, div') )
              {
                  $(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>');
                  $(this).find('.ajax-profil_edit').attr({
                        alt: "{L_FIELD_EDIT_VALUE}",
                        title: "{L_FIELD_EDIT_VALUE}"
                    }).click(function(){
                    $(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');
                    $(this).prev().find('.ajax-profil_valid').attr({
                        alt: "{L_VALIDATE}",
                        title: "{L_VALIDATE}"
                    }).click(function(){
                        var content = new Array();
                        $(this).parent().find('[name]').each(function(){
                          var type_special = $(this).is('input[type=radio],input[type=checkbox]');
                          if ( (type_special && $(this).is(':checked')) || !type_special )
                          {
                              content.push(new Array($(this).attr('name'), $(this).attr('value')));
                          }
                        });
                        var id_name = $(this).parents('[id^=field_id]').attr('id');
                        var id = id_name.substring(8, id_name.length);
                        $.post(
                          "{U_AJAX_PROFILE}",
                          {id:id,user:"{CUR_USER_ID}",active:"{CUR_USER_ACTIVE}",content:$.toJSON(content),tid:"{TID}"},
                          function(data){
                              $.each(data, function(i, item){
                                $('[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');
                              });
                          },
                          "json"
                        );
                    });
                    $(this).remove();
                  });
              }
            },function()
            {
              if( $(this).find('.field_editable.invisible').is('span, div') )
              {
                  $(this).find('.field_editable').prev().removeClass('ajax-profil_hover');
                  $(this).find('.ajax-profil_edit').remove();
              }
            });
        }
      });
  });
//]]>
</script>

Hert
Forumember

Posts : 81
Reputation : 3
Language : Dutch and English

http://afterthefall.actieforum.com/

Back to top Go down

Solved Re: Customize RPG sheet on profile

Post by SarkZKalie on January 26th 2015, 9:10 am

Image for uploading? Not a field style, right?

SarkZKalie
Forumember

Male Posts : 419
Reputation : 73
Language : English

http://rotavn.nstars.org/

Back to top Go down

Solved Re: Customize RPG sheet on profile

Post by Ange Tuteur on January 26th 2015, 11:00 pm

Sorry, I cannot see what you mean, because the images don't appear working. I know phpbb2 uses a table type layout so to make two columns you'd need to create a row with two cells. For example :
Code:
<tr>
  <td>Column 1</td>
  <td>Column 2</td>
</tr>

They'd appear side by side like so :
Column 1Column 2
Content content..More content...
Content content..More content...

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2681
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Customize RPG sheet on profile

Post by Hert on January 26th 2015, 11:19 pm

I got it working a little bit, but for some reason the two columns don't align well: [ link ]
As you can see the left one is lower than the right one.
Here's the edited template:
Code:
<table width="100%" border="0" cellspacing="2" cellpadding="0" align="center">
<tr>
<td><span class="nav"><a class="nav" href="{U_INDEX}">{L_INDEX}</a></span></td>
</tr>
</table>

<div class="ffs">
<table width="100%" border="0" cellspacing="1" cellpadding="0" align="center">
  <tr>
      <th class="thHead" colspan="2" nowrap="nowrap" height="25">{L_VIEWING_PROFILE}</th>
  </tr>
  <tr>
      <td class="catLeft" align="center" width="40%" height="28"><b><span class="gen">{L_USER_PRESENCE}</span></b></td>
      <td class="catRight" width="60%" align="center"><b><span class="gen">{INTERESTS}</span></b></td>
  </tr>
  <tr>
      <td class="row1" align="center" valign="top" height="120">
        <table width="100%" border="0" cellspacing="1" cellpadding="0">
            <tr>
              <td valign="middle" nowrap="nowrap" align="right" width="20%"><span class="gen"></span></td>
              <td width="80%"><b><span class="gen">{AVATAR_IMG}</span></b></td>
            </tr>
            <tr>
              <td valign="middle" nowrap="nowrap" align="right"><span class="gen"></span></td>
              <td><b><span class="gen">{POSTER_RANK}</span></b></td>
            </tr>
            <!-- BEGIN switch_show_status -->
            <tr>
              <td valign="middle" nowrap="nowrap" align="right"><span class="gen"></span></td>
              <td><b><span class="gen">{USER_ONLINE}</span></b></td>
            </tr>
            <tr>
              <td valign="middle" nowrap="nowrap" align="right"><span class="gen"></span></td>
              <td><b><span class="gen">{PM_IMG}</span></b></td>
            </tr>                         
                     
            <!-- END switch_show_status -->
            <!-- BEGIN switch_allow_friendsfoes -->
            <tr>
              <td valign="middle" nowrap="nowrap" align="right"><span class="gen"></span></td>
              <td><span class="gen"></span></td>
            </tr>
            <!-- END switch_allow_friendsfoes -->
            <!-- BEGIN switch_auth_user -->
            <tr>
              <td valign="middle" nowrap="nowrap" align="right"><br /><span class="gen"></span></td>
              <td><br /><strong><span class="gen">{ADMINISTRATE_USER}{BAN_USER}</span></strong></td>
            </tr>
            <!-- END switch_auth_user -->
        </table>
      </td>
      <td class="row1" valign="top">
        <table width="100%" border="0" cellspacing="1" cellpadding="0">
            <tr>
              <td align="right" valign="top" nowrap="nowrap"><span class="gen">{L_LAST_VISITED}:  </span></td>
              <td><b><span class="gen">{LAST_VISIT_TIME}</span></b></td>
            </tr>
            <!-- BEGIN switch_dhow_mp -->
            <tr>
              <td align="right" valign="middle" nowrap="nowrap"><span class="gen">{L_PRIVATE_MSG}:  </span></td>
              <td><b><span class="gen">{PRIVATE_MSG}</span></b></td>
            </tr>
            <!-- END switch_dhow_mp -->
            <!-- BEGIN profile_field -->
            <tr id="field_id{profile_field.ID}">
              <td width="40%" align="right" valign="top" nowrap="nowrap"><span class="gen">{profile_field.LABEL} &nbsp;</span></td>
              <td width="60%"><div class="gen" style="font-weight:bold;">{profile_field.CONTENT}</div><!-- BEGIN profil_type_user_posts -->
              <span class="genmed">
              <a rel="nofollow" class="genmed" href="/sta/{PUSERNAME}">{L_TOPICS}</a> || <a rel="nofollow" class="genmed" href="/spa/{PUSERNAME}">{L_POSTS}</a>
              </span><!-- END profil_type_user_posts --></td>
            </tr>
            <!-- END profile_field -->
        </table>
      </td>
  </tr>
 </table>
</div>
<br />
<!-- BEGIN switch_rpg -->
<div class="ffs">
<table width="100%" border="0" cellspacing="1" cellpadding="0" align="center">
  <tr>
          <th class="thHead" colspan="2" nowrap="nowrap" height="25">{USERNAME}</th>
  </tr>
<tr>
  <td>
<table align="center">   
  <tr>
    <td>
         <table width="100%" border="0" cellspacing="1" cellpadding="0" style="padding-right: 25px;">
            <!-- BEGIN rpg_fields_left -->
            <tr>
               <td align="center">
                                          <b><span class="gen">{switch_rpg.rpg_fields_left.F_NAME}<br/></span></b>
               <span class="pls">{switch_rpg.rpg_fields_left.F_VALUE_NEW}</span>
               </td>
            </tr>
            <!-- END rpg_fields_left -->
         </table>
    </td>
  <td>
         <table width="100%" border="0" cellspacing="1" cellpadding="0">
            <!-- BEGIN rpg_fields -->
                          <tr>
               <td align="center">
                                          <b><span class="gen">{switch_rpg.rpg_fields.F_NAME}</span></b>
                                          <br />
               
                  <span class="gen">{switch_rpg.rpg_fields.F_VALUE_NEW}</span>
               </td>
            </tr>
            <!-- END rpg_fields -->
         </table>
    </td>
  </tr>
    </table>
   
  <center>{RPG_IMAGE}</center><br /><br />
    </td>
  </tr>
   <tr>
      <td colspan="2" align="center" class="row1">
         {U_ADMIN_RPG}
      </td>
   </tr>

  <!-- END switch_rpg -->
</table>
</div>

 
<br />
<script src="{JS_DIR}jquery/json/jquery.json-1.3.min.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
  $(document).ready(function(){
      $('[id^=field_id]').each(function(){
        if ( $(this).find('.field_editable').is('span, div') )
        {
            $(this).hover(function()
            {
              if( $(this).find('.field_editable.invisible').is('span, div') )
              {
                  $(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>');
                  $(this).find('.ajax-profil_edit').attr({
                        alt: "{L_FIELD_EDIT_VALUE}",
                        title: "{L_FIELD_EDIT_VALUE}"
                    }).click(function(){
                    $(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');
                    $(this).prev().find('.ajax-profil_valid').attr({
                        alt: "{L_VALIDATE}",
                        title: "{L_VALIDATE}"
                    }).click(function(){
                        var content = new Array();
                        $(this).parent().find('[name]').each(function(){
                          var type_special = $(this).is('input[type=radio],input[type=checkbox]');
                          if ( (type_special && $(this).is(':checked')) || !type_special )
                          {
                              content.push(new Array($(this).attr('name'), $(this).attr('value')));
                          }
                        });
                        var id_name = $(this).parents('[id^=field_id]').attr('id');
                        var id = id_name.substring(8, id_name.length);
                        $.post(
                          "{U_AJAX_PROFILE}",
                          {id:id,user:"{CUR_USER_ID}",active:"{CUR_USER_ACTIVE}",content:$.toJSON(content),tid:"{TID}"},
                          function(data){
                              $.each(data, function(i, item){
                                $('[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');
                              });
                          },
                          "json"
                        );
                    });
                    $(this).remove();
                  });
              }
            },function()
            {
              if( $(this).find('.field_editable.invisible').is('span, div') )
              {
                  $(this).find('.field_editable').prev().removeClass('ajax-profil_hover');
                  $(this).find('.ajax-profil_edit').remove();
              }
            });
        }
      });
  });
//]]>
</script>

As you can see there is a custom class in there that I made, these are the CSS codes:
Code:
.pls {
  font-size: 12px;
  color: #00000;
  width: 300px;
  overflow: auto;
  display: block;
}

I hope the forum will load okay so you guys can see it!

Hert
Forumember

Posts : 81
Reputation : 3
Language : Dutch and English

http://afterthefall.actieforum.com/

Back to top Go down

Solved Re: Customize RPG sheet on profile

Post by Ange Tuteur on January 26th 2015, 11:51 pm

On your left column add valign="top" to your table cell. exemple :
Code:
<td valign="top">

This will make sure that the content in that cell is vertically aligned to the top. Wink

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2681
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Customize RPG sheet on profile

Post by Hert on January 27th 2015, 12:01 am

Oh I forgot to mention that I've already tried that, for some reason it doesn't budge :'(
I've also tried putting a style element in the code and change the top, but it just stays in the same place for some reason.

edit 0.02 I've also tried valign: bottom - just to test if it would actually do something, but nothing happens - it also doesn't matter if I put 0 or 100px for the top, it just stays 'locked' in that place.

Hert
Forumember

Posts : 81
Reputation : 3
Language : Dutch and English

http://afterthefall.actieforum.com/

Back to top Go down

Solved Re: Customize RPG sheet on profile

Post by Ange Tuteur on January 27th 2015, 12:35 am

See if this works :
Code:
<table width="100%" border="0" cellspacing="2" cellpadding="0" align="center">
<tr>
<td><span class="nav"><a class="nav" href="{U_INDEX}">{L_INDEX}</a></span></td>
</tr>
</table>

<div class="ffs">
<table width="100%" border="0" cellspacing="1" cellpadding="0" align="center">
  <tr>
      <th class="thHead" colspan="2" nowrap="nowrap" height="25">{L_VIEWING_PROFILE}</th>
  </tr>
  <tr>
      <td class="catLeft" align="center" width="40%" height="28"><b><span class="gen">{L_USER_PRESENCE}</span></b></td>
      <td class="catRight" width="60%" align="center"><b><span class="gen">{INTERESTS}</span></b></td>
  </tr>
  <tr>
      <td class="row1" align="center" valign="top" height="120">
        <table width="100%" border="0" cellspacing="1" cellpadding="0">
            <tr>
              <td valign="middle" nowrap="nowrap" align="right" width="20%"><span class="gen"></span></td>
              <td width="80%"><b><span class="gen">{AVATAR_IMG}</span></b></td>
            </tr>
            <tr>
              <td valign="middle" nowrap="nowrap" align="right"><span class="gen"></span></td>
              <td><b><span class="gen">{POSTER_RANK}</span></b></td>
            </tr>
            <!-- BEGIN switch_show_status -->
            <tr>
              <td valign="middle" nowrap="nowrap" align="right"><span class="gen"></span></td>
              <td><b><span class="gen">{USER_ONLINE}</span></b></td>
            </tr>
            <tr>
              <td valign="middle" nowrap="nowrap" align="right"><span class="gen"></span></td>
              <td><b><span class="gen">{PM_IMG}</span></b></td>
            </tr>                       
                   
            <!-- END switch_show_status -->
            <!-- BEGIN switch_allow_friendsfoes -->
            <tr>
              <td valign="middle" nowrap="nowrap" align="right"><span class="gen"></span></td>
              <td><span class="gen"></span></td>
            </tr>
            <!-- END switch_allow_friendsfoes -->
            <!-- BEGIN switch_auth_user -->
            <tr>
              <td valign="middle" nowrap="nowrap" align="right"><br /><span class="gen"></span></td>
              <td><br /><strong><span class="gen">{ADMINISTRATE_USER}{BAN_USER}</span></strong></td>
            </tr>
            <!-- END switch_auth_user -->
        </table>
      </td>
      <td class="row1" valign="top">
        <table width="100%" border="0" cellspacing="1" cellpadding="0">
            <tr>
              <td align="right" valign="top" nowrap="nowrap"><span class="gen">{L_LAST_VISITED}:  </span></td>
              <td><b><span class="gen">{LAST_VISIT_TIME}</span></b></td>
            </tr>
            <!-- BEGIN switch_dhow_mp -->
            <tr>
              <td align="right" valign="middle" nowrap="nowrap"><span class="gen">{L_PRIVATE_MSG}:  </span></td>
              <td><b><span class="gen">{PRIVATE_MSG}</span></b></td>
            </tr>
            <!-- END switch_dhow_mp -->
            <!-- BEGIN profile_field -->
            <tr id="field_id{profile_field.ID}">
              <td width="40%" align="right" valign="top" nowrap="nowrap"><span class="gen">{profile_field.LABEL} &nbsp;</span></td>
              <td width="60%"><div class="gen" style="font-weight:bold;">{profile_field.CONTENT}</div><!-- BEGIN profil_type_user_posts -->
              <span class="genmed">
              <a rel="nofollow" class="genmed" href="/sta/{PUSERNAME}">{L_TOPICS}</a> || <a rel="nofollow" class="genmed" href="/spa/{PUSERNAME}">{L_POSTS}</a>
              </span><!-- END profil_type_user_posts --></td>
            </tr>
            <!-- END profile_field -->
        </table>
      </td>
  </tr>
 </table>
</div>
<br />
<!-- BEGIN switch_rpg -->
<div class="ffs">
<table width="100%" border="0" cellspacing="1" cellpadding="0" align="center">
  <tr>
          <th class="thHead" colspan="2" nowrap="nowrap" height="25">{USERNAME}</th>
  </tr>
<tr>
  <td>
<table align="center"> 
  <tr>
    <td>
        <table width="100%" border="0" cellspacing="1" cellpadding="0" style="padding-right: 25px;">
            <!-- BEGIN rpg_fields_left -->
            <tr>
              <td valign="top" align="center">
                                          <b><span class="gen">{switch_rpg.rpg_fields_left.F_NAME}<br/></span></b>
              <span class="pls">{switch_rpg.rpg_fields_left.F_VALUE_NEW}</span>
              </td>
            </tr>
            <!-- END rpg_fields_left -->
        </table>
    </td>
  <td>
        <table width="100%" border="0" cellspacing="1" cellpadding="0">
            <!-- BEGIN rpg_fields -->
                          <tr>
              <td align="center">
                                          <b><span class="gen">{switch_rpg.rpg_fields.F_NAME}</span></b>
                                          <br />
             
                  <span class="gen">{switch_rpg.rpg_fields.F_VALUE_NEW}</span>
              </td>
            </tr>
            <!-- END rpg_fields -->
        </table>
    </td>
  </tr>
    </table>
 
  <center>{RPG_IMAGE}</center><br /><br />
    </td>
  </tr>
  <tr>
      <td colspan="2" align="center" class="row1">
        {U_ADMIN_RPG}
      </td>
  </tr>

  <!-- END switch_rpg -->
</table>
</div>

 
<br />
<script src="{JS_DIR}jquery/json/jquery.json-1.3.min.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
  $(document).ready(function(){
      $('[id^=field_id]').each(function(){
        if ( $(this).find('.field_editable').is('span, div') )
        {
            $(this).hover(function()
            {
              if( $(this).find('.field_editable.invisible').is('span, div') )
              {
                  $(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>');
                  $(this).find('.ajax-profil_edit').attr({
                        alt: "{L_FIELD_EDIT_VALUE}",
                        title: "{L_FIELD_EDIT_VALUE}"
                    }).click(function(){
                    $(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');
                    $(this).prev().find('.ajax-profil_valid').attr({
                        alt: "{L_VALIDATE}",
                        title: "{L_VALIDATE}"
                    }).click(function(){
                        var content = new Array();
                        $(this).parent().find('[name]').each(function(){
                          var type_special = $(this).is('input[type=radio],input[type=checkbox]');
                          if ( (type_special && $(this).is(':checked')) || !type_special )
                          {
                              content.push(new Array($(this).attr('name'), $(this).attr('value')));
                          }
                        });
                        var id_name = $(this).parents('[id^=field_id]').attr('id');
                        var id = id_name.substring(8, id_name.length);
                        $.post(
                          "{U_AJAX_PROFILE}",
                          {id:id,user:"{CUR_USER_ID}",active:"{CUR_USER_ACTIVE}",content:$.toJSON(content),tid:"{TID}"},
                          function(data){
                              $.each(data, function(i, item){
                                $('[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');
                              });
                          },
                          "json"
                        );
                    });
                    $(this).remove();
                  });
              }
            },function()
            {
              if( $(this).find('.field_editable.invisible').is('span, div') )
              {
                  $(this).find('.field_editable').prev().removeClass('ajax-profil_hover');
                  $(this).find('.ajax-profil_edit').remove();
              }
            });
        }
      });
  });
//]]>
</script>

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2681
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Customize RPG sheet on profile

Post by Hert on January 27th 2015, 12:42 am

I've replaced the codes, but still nothing has changed - I've dubble checked if I published the codes and I have, so sadly it's not me being forgetfull :'(

Hert
Forumember

Posts : 81
Reputation : 3
Language : Dutch and English

http://afterthefall.actieforum.com/

Back to top Go down

Solved Re: Customize RPG sheet on profile

Post by Ange Tuteur on January 27th 2015, 12:44 am

Oooooh I've put it on the wrong cell lol!

Okay, try this one :
Code:
<table width="100%" border="0" cellspacing="2" cellpadding="0" align="center">
<tr>
<td><span class="nav"><a class="nav" href="{U_INDEX}">{L_INDEX}</a></span></td>
</tr>
</table>

<div class="ffs">
<table width="100%" border="0" cellspacing="1" cellpadding="0" align="center">
  <tr>
      <th class="thHead" colspan="2" nowrap="nowrap" height="25">{L_VIEWING_PROFILE}</th>
  </tr>
  <tr>
      <td class="catLeft" align="center" width="40%" height="28"><b><span class="gen">{L_USER_PRESENCE}</span></b></td>
      <td class="catRight" width="60%" align="center"><b><span class="gen">{INTERESTS}</span></b></td>
  </tr>
  <tr>
      <td class="row1" align="center" valign="top" height="120">
        <table width="100%" border="0" cellspacing="1" cellpadding="0">
            <tr>
              <td valign="middle" nowrap="nowrap" align="right" width="20%"><span class="gen"></span></td>
              <td width="80%"><b><span class="gen">{AVATAR_IMG}</span></b></td>
            </tr>
            <tr>
              <td valign="middle" nowrap="nowrap" align="right"><span class="gen"></span></td>
              <td><b><span class="gen">{POSTER_RANK}</span></b></td>
            </tr>
            <!-- BEGIN switch_show_status -->
            <tr>
              <td valign="middle" nowrap="nowrap" align="right"><span class="gen"></span></td>
              <td><b><span class="gen">{USER_ONLINE}</span></b></td>
            </tr>
            <tr>
              <td valign="middle" nowrap="nowrap" align="right"><span class="gen"></span></td>
              <td><b><span class="gen">{PM_IMG}</span></b></td>
            </tr>                     
                 
            <!-- END switch_show_status -->
            <!-- BEGIN switch_allow_friendsfoes -->
            <tr>
              <td valign="middle" nowrap="nowrap" align="right"><span class="gen"></span></td>
              <td><span class="gen"></span></td>
            </tr>
            <!-- END switch_allow_friendsfoes -->
            <!-- BEGIN switch_auth_user -->
            <tr>
              <td valign="middle" nowrap="nowrap" align="right"><br /><span class="gen"></span></td>
              <td><br /><strong><span class="gen">{ADMINISTRATE_USER}{BAN_USER}</span></strong></td>
            </tr>
            <!-- END switch_auth_user -->
        </table>
      </td>
      <td class="row1" valign="top">
        <table width="100%" border="0" cellspacing="1" cellpadding="0">
            <tr>
              <td align="right" valign="top" nowrap="nowrap"><span class="gen">{L_LAST_VISITED}:  </span></td>
              <td><b><span class="gen">{LAST_VISIT_TIME}</span></b></td>
            </tr>
            <!-- BEGIN switch_dhow_mp -->
            <tr>
              <td align="right" valign="middle" nowrap="nowrap"><span class="gen">{L_PRIVATE_MSG}:  </span></td>
              <td><b><span class="gen">{PRIVATE_MSG}</span></b></td>
            </tr>
            <!-- END switch_dhow_mp -->
            <!-- BEGIN profile_field -->
            <tr id="field_id{profile_field.ID}">
              <td width="40%" align="right" valign="top" nowrap="nowrap"><span class="gen">{profile_field.LABEL} &nbsp;</span></td>
              <td width="60%"><div class="gen" style="font-weight:bold;">{profile_field.CONTENT}</div><!-- BEGIN profil_type_user_posts -->
              <span class="genmed">
              <a rel="nofollow" class="genmed" href="/sta/{PUSERNAME}">{L_TOPICS}</a> || <a rel="nofollow" class="genmed" href="/spa/{PUSERNAME}">{L_POSTS}</a>
              </span><!-- END profil_type_user_posts --></td>
            </tr>
            <!-- END profile_field -->
        </table>
      </td>
  </tr>
 </table>
</div>
<br />
<!-- BEGIN switch_rpg -->
<div class="ffs">
<table width="100%" border="0" cellspacing="1" cellpadding="0" align="center">
  <tr>
          <th class="thHead" colspan="2" nowrap="nowrap" height="25">{USERNAME}</th>
  </tr>
<tr>
  <td>
<table align="center">
  <tr>
    <td valign="top">
        <table width="100%" border="0" cellspacing="1" cellpadding="0" style="padding-right: 25px;">
            <!-- BEGIN rpg_fields_left -->
            <tr>
              <td align="center">
                                          <b><span class="gen">{switch_rpg.rpg_fields_left.F_NAME}<br/></span></b>
              <span class="pls">{switch_rpg.rpg_fields_left.F_VALUE_NEW}</span>
              </td>
            </tr>
            <!-- END rpg_fields_left -->
        </table>
    </td>
  <td>
        <table width="100%" border="0" cellspacing="1" cellpadding="0">
            <!-- BEGIN rpg_fields -->
                          <tr>
              <td align="center">
                                          <b><span class="gen">{switch_rpg.rpg_fields.F_NAME}</span></b>
                                          <br />
           
                  <span class="gen">{switch_rpg.rpg_fields.F_VALUE_NEW}</span>
              </td>
            </tr>
            <!-- END rpg_fields -->
        </table>
    </td>
  </tr>
    </table>
 
  <center>{RPG_IMAGE}</center><br /><br />
    </td>
  </tr>
  <tr>
      <td colspan="2" align="center" class="row1">
        {U_ADMIN_RPG}
      </td>
  </tr>

  <!-- END switch_rpg -->
</table>
</div>

 
<br />
<script src="{JS_DIR}jquery/json/jquery.json-1.3.min.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
  $(document).ready(function(){
      $('[id^=field_id]').each(function(){
        if ( $(this).find('.field_editable').is('span, div') )
        {
            $(this).hover(function()
            {
              if( $(this).find('.field_editable.invisible').is('span, div') )
              {
                  $(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>');
                  $(this).find('.ajax-profil_edit').attr({
                        alt: "{L_FIELD_EDIT_VALUE}",
                        title: "{L_FIELD_EDIT_VALUE}"
                    }).click(function(){
                    $(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');
                    $(this).prev().find('.ajax-profil_valid').attr({
                        alt: "{L_VALIDATE}",
                        title: "{L_VALIDATE}"
                    }).click(function(){
                        var content = new Array();
                        $(this).parent().find('[name]').each(function(){
                          var type_special = $(this).is('input[type=radio],input[type=checkbox]');
                          if ( (type_special && $(this).is(':checked')) || !type_special )
                          {
                              content.push(new Array($(this).attr('name'), $(this).attr('value')));
                          }
                        });
                        var id_name = $(this).parents('[id^=field_id]').attr('id');
                        var id = id_name.substring(8, id_name.length);
                        $.post(
                          "{U_AJAX_PROFILE}",
                          {id:id,user:"{CUR_USER_ID}",active:"{CUR_USER_ACTIVE}",content:$.toJSON(content),tid:"{TID}"},
                          function(data){
                              $.each(data, function(i, item){
                                $('[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');
                              });
                          },
                          "json"
                        );
                    });
                    $(this).remove();
                  });
              }
            },function()
            {
              if( $(this).find('.field_editable.invisible').is('span, div') )
              {
                  $(this).find('.field_editable').prev().removeClass('ajax-profil_hover');
                  $(this).find('.ajax-profil_edit').remove();
              }
            });
        }
      });
  });
//]]>
</script>

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2681
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Customize RPG sheet on profile

Post by Hert on January 27th 2015, 12:58 am

That did the trick, yay!

Thank you very much, I shall mark this topic as solved ~

Hert
Forumember

Posts : 81
Reputation : 3
Language : Dutch and English

http://afterthefall.actieforum.com/

Back to top Go down

Solved Re: Customize RPG sheet on profile

Post by Ange Tuteur on January 27th 2015, 1:57 am

You're welcome ^^

Topic archived

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2681
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum