Skocz do zawartości
Hosting webh.pl - 20%

Edycja kodu z userInfoPane - kod z 3.1 w 3.3

Rekomendowane odpowiedzi

Opublikowano

Witam :)

Przerzuciłem kod userInfoPane z wersji 3.1 do userInfoPane z wersji 3.3 i teraz nastąpił problem. Nie wyświetla zdjęcia - próbowałem na różne sposoby i mi się nie udało, więc pisze do Was.

Mój kod ( 3.1 ):

<ul class='user_details'>
 <if test="avatar:|:$author['member_id'] AND $author['avatar']">
  <li class='avatar'><a href="{parse url="showuser={$author['member_id']}" template="showuser" seotitle="{$author['members_seo_name']}" base="public"}" title="{$this->lang->words['view_profile']}">{$author['avatar']}</a></li>
 <else />
  <li class='avatar'>{$author['avatar']}</li>
 </if>
 <if test="membertitle:|:$author['title']">
  <li class='title'>{$author['title']}</li>
 </if>
 <if test="rankimage:|:$author['member_rank_img']">
  <li class='group_icon'>
  <if test="rankimageimage:|:$author['member_rank_img_i'] == 'img'">
<img src='{$author['member_rank_img']}' alt='' />
  <else />
{$author['member_rank_img']}
  </if>
  </li>
 </if>
</ul>
<div style='margin: 0 auto;'>
 <if test="xhtmlftw:|:$this->memberData['member_id'] != $author['member_id'] OR ($author['has_blog'] AND IPSLib::appIsInstalled( 'blog' )) OR ($author['has_gallery'] AND IPSLib::appIsInstalled( 'gallery' ))">
  <ul class='user_controls clear'>
<if test="friendop:|:$this->memberData['member_id'] AND $this->memberData['member_id'] != $author['member_id'] && $this->settings['friends_enabled'] AND $this->memberData['g_can_add_friends'] && $author['member_id']">
 <if test="isfriend:|:IPSMember::checkFriendStatus( $author['member_id'] )">
  <li class='mini_friend_toggle is_friend' id='friend_{$contentid}_{$author['member_id']}'><a href='{parse url="app=members&module=profile&section=friends&do=remove&member_id={$author['member_id']}&secure_key={$this->member->form_hash}" base="public"}' title='{$this->lang->words['remove_friend']}'>{parse replacement="remove_friend"}</a></li>
 <else />
  <li class='mini_friend_toggle is_not_friend' id='friend_{$contentid}_{$author['member_id']}'><a href='{parse url="app=members&module=profile&section=friends&do=add&member_id={$author['member_id']}&secure_key={$this->member->form_hash}" base="public"}' title='{$this->lang->words['add_friend']}'>{parse replacement="add_friend"}</a></li>
 </if>
</if>
<if test="sendpm:|:$this->memberData['g_use_pm'] AND $this->memberData['member_id'] != $author['member_id'] AND $this->memberData['members_disable_pm'] == 0 AND IPSLib::moduleIsEnabled( 'messaging', 'members' ) && $author['member_id']">
 <li class='pm_button' id='pm_{$contentid}_{$author['member_id']}'><a href='{parse url="app=members&module=messaging&section=send&do=form&fromMemberID={$author['member_id']}" base="public"}' title='{$this->lang->words['pm_member']}'>{parse replacement="send_msg"}</a></li>
</if>
<if test="hasblog:|:$author['has_blog'] AND IPSLib::appIsInstalled( 'blog' ) AND $author['has_blog'] != 'recache'">
 <li><a href='{parse url="app=blog&show_members_blogs={$author['member_id']}" base="public"}' title='{$this->lang->words['view_blog']}'>{parse replacement="blog_link"}</a></li>
</if>
<if test="hasgallery:|:$author['has_gallery'] AND IPSLib::appIsInstalled( 'gallery' )">
 <li><a href='{parse url="app=gallery&module=user&section=user&user={$author['member_id']}" base="public"}' title='{$this->lang->words['view_gallery']}'>{parse replacement="gallery_link"}</a></li>
</if>
  </ul>
 </if>
</div>
<ul class='user_fields'>
 <li>
  <span class='ft'>{$this->lang->words['m_group']}</span>
  <span class='fc'>{$author['_group_formatted']}</span>
 </li>
 <if test="ismember:|:$author['member_id']">
  <li>
<span class='ft'>{$this->lang->words['m_posts']}</span>
<span class='fc'>{parse expression="$this->registry->getClass('class_localization')->formatNumber( intval( $author['posts'] ) )"}</span>
  </li>
  <li>
<span class='ft'>{$this->lang->words['m_joined']}</span>
<span class='fc'>{parse date="$author['joined']" format="joined"}</span>
  </li>
 </if>
 <if test="authorcfields:|:$author['custom_fields'] != """>
  <foreach loop="customFieldsOuter:$author['custom_fields'] as $group => $data">
<foreach loop="customFields:$author['custom_fields'][ $group ] as $field">
 <if test="$field != ''">
  <li>
   {$field}
  </li>
 </if>
</foreach>
  </foreach>
 </if>
</ul>
<if test="authorwarn:|:$author['warn_percent'] !== NULL">
 <br class='clear' />
 <div class='warn_panel clear rounded'>
  <if test="$this->settings['warn_show_rating']">
<strong><a href='{parse url="app=members&module=warn&section=warn&do=view&mid={$author['member_id']}" base="public"}' id='warn_link_{$contentid}_{$author['member_id']}' title='{$this->lang->words['warn_view_history']}' class='warn_link'>{$this->lang->words['warn_status']}</a></strong>
<p class='rating_mode user_warn' title='{$this->lang->words['warn_level']} {$author['warn_percent']}%'>
 <if test="changewarn:|:$author['can_edit_warn']">
  <a href='{parse url="app=members&module=warn&section=warn&type=minus&mid={$author['member_id']}&t=0&st=0" base="public"}' title='{$this->lang->words['warn_decrease']}'><img src='{$this->settings['img_url']}/warn_minus.gif' alt='{$this->lang->words['minus']}' class='warn_edit down'  /></a>
 </if>
 < {$this->settings['warn_min']} ( {$author['warn_level']} ) {$this->settings['warn_max']} >
 <if test="changewarn:|:$author['can_edit_warn']">
  <a href='{parse url="app=members&module=warn&section=warn&type=add&mid={$author['member_id']}&t={$this->request['t']}&st={$this->request['st']}" base="public"}' title='{$this->lang->words['warn_increase']}'><img src='{$this->settings['img_url']}/warn_add.gif' alt='{$this->lang->words['add']}' class='warn_edit up' /></a>
 </if>
</p>
  <else />
<if test="changewarn:|:$author['can_edit_warn']">
 <a href='{parse url="app=members&module=warn&section=warn&type=add&mid={$author['member_id']}&t={$this->request['t']}&st={$this->request['st']}" base="public"}' title='{$this->lang->words['warn_increase']}'><img src='{$this->settings['img_url']}/warn_add.gif' alt='{$this->lang->words['add']}' class='warn_edit up' /></a><a href='{parse url="app=members&module=warn&section=warn&type=minus&mid={$author['member_id']}&t=0&st=0" base="public"}' title='{$this->lang->words['warn_decrease']}'><img src='{$this->settings['img_url']}/warn_minus.gif' alt='{$this->lang->words['minus']}' class='warn_edit down'  /></a>
</if>
 <strong><a href='{parse url="app=members&module=warn&section=warn&do=view&mid={$author['member_id']}" base="public"}' id='warn_link_{$contentid}_{$author['member_id']}' title='{$this->lang->words['warn_view_history']}' class='warn_link'>{$this->lang->words['warn_status']}</a></strong>
<if test="highwarn:|:$author['warn_percent'] >= 80">
 <p class='progress_bar user_warn limit' title='{$this->lang->words['warn_level']} {$author['warn_percent']}%'>
<else />
 <p class='progress_bar user_warn' title='{$this->lang->words['warn_level']} {$author['warn_percent']}%'>
</if>
 <span style='width: {$author['warn_percent']}%'><span>{$this->lang->words['warn_level']} {$author['warn_percent']}%</span></span>
</p>
  </if>
 </div>
</if>

Pomógłby mi ktoś przekształcić to, aby poprawnie było wyświetlane w wersji 3.3? Nie chodzi o samo zdjęcie ale też o warny ( jak wiadomo zmieniło się bardzo dużo w związku z warnami )

Sam już zauważyłem, że obydwa kody z userInfoPane nie za bardzo do siebie pasują. Jak już wspomniałem - próbowałem na wszystkie sposoby, żadnych efektów, jedynie rozjechana treść tematu.

Pozdrawiam,

lamusq.

Opublikowano

chcesz uzyskać wygląd ostrzeżeń z IPB3.1 ? Coś czuję że to trudniejsze zadanie niż się wydaje

ipbaddons.com

Opublikowano
  • Autor

Najwyraźniej źle się zrozumieliśmy.

Chce ten kod, który podałem w spoilerze wykorzystać w IP.Board 3.3 lecz są problemy:

- Awatar ( nie wyświetla się )

- Warny ( nie wyświetla się, te nowe[!] )

Mam nadzieję, że teraz mnie zrozumieliście :P

Opublikowano

Proszę mój user info pane jest nr użytkownika , data dołączenia , liczba postów ,status warnów naprawiony :) kompatybilny z 3.3.x

<div itemscope itemtype="http://schema.org/Person" class='user_details'>

<span class='hide' itemprop="name">{$author['members_display_name']}</span>

<ul class='basic_info'>

<if test="membertitle:|:$author['member_title']">

<p class='desc member_title'>{$author['member_title']}</p>

</if>

<if test="avatar:|:$author['member_id']">

<li class='avatar'>

<if test="canSeeProfiles:|:$this->memberData['g_is_supmod'] OR ( $this->memberData['g_mem_info'] && ! IPSMember::isInactive( $author ) )">

<a itemprop="url" href="{parse url="showuser={$author['member_id']}" template="showuser" seotitle="{$author['members_seo_name']}" base="public"}" title="{$this->lang->words['view_profile']}: {$author['members_display_name']}" class='ipsUserPhotoLink'>

</if>

<if test="hasVariable:|:$this->settings['member_topic_avatar_max']">

<img itemprop="image" src='{$author['pp_main_photo']}' class='ipsUserPhoto ipsUserPhoto_variable' />

<else />

<img itemprop="image" src='{$author['pp_thumb_photo']}' class='ipsUserPhoto ipsUserPhoto_large' />

</if>

<if test="canSeeProfiles2:|:$this->memberData['g_is_supmod'] OR ( $this->memberData['g_mem_info'] && ! IPSMember::isInactive( $author ) )">

</a>

</if>

</li>

<else />

<li class='avatar'>

<img itemprop="image" src='{$author['pp_thumb_photo']}' class='ipsUserPhoto ipsUserPhoto_large' />

</li>

</if>

<li class='group_title'>

{$author['_group_formatted']}

</li>

<if test="rankimage:|:$author['member_rank_img']">

<li class='group_icon'>

<if test="rankimageimage:|:$author['member_rank_img_i'] == 'img'">

<img src='{$author['member_rank_img']}' alt='' />

<else />

{$author['member_rank_img']}

</if>

</li>

</if>

<if test="postCount:|:$author['member_id']">

<li class='post_count desc lighter'>

<span class='ft'>Numer Użytkownika:</span>

<span class='fc'>{$author['member_id']}</span>

</li>

Liczba postów: {parse expression="$this->registry->getClass('class_localization')->formatNumber( intval( $author['posts'] ) )"}</li>

</li>

</if>

<span class='ft'>Dołączył:</span>

<span class='fc'>

{parse expression="date( 'd-m-Y', $author['joined'] )"}</span>

</li>

</if>

</ul>

<if test="authorwarn:|:$author['show_warn']">

<if test="$options['wl_id']">

<img src='{$this->settings['img_url']}/warn.png' class='clickable' onclick='warningPopup( this, {$options['wl_id']} )' title='{$this->lang->words['warnings_issued']}' />

</if>

<a class='desc lighter blend_links' href='{parse url="app=members&module=profile&section=warnings&member={$author['member_id']}&from_app={$this->request['app']}&from_id1={$contentid}&from_id2={$options['id2']}" base="public"}' id='warn_link_{$contentid}_{$author['member_id']}' title='{$this->lang->words['warn_view_history']}'>{parse expression="sprintf( $this->lang->words['warn_status'], $author['warn_level'] )"}</a>

</li>

</if>

</ul>

<if test="authorcfields:|:$author['custom_fields'] != """>

<ul class='custom_fields'>

<foreach loop="customFieldsOuter:$author['custom_fields'] as $group => $data">

<foreach loop="customFields:$author['custom_fields'][ $group ] as $field">

<if test="$field != ''">

<li>

{$field}

</if>

</foreach>

</foreach>

</ul>

</if>

</div>

  • 1 miesiąc temu...
Opublikowano
  • Autor

Ponawiam prośbę o pomoc, bo nadal nie udało mi się zrobić tego, co chciałem. Prosiłbym o pokierowanie mnie w jaki sposób wykonać coś takiego jak na screen'ie.

pre_1339321286__ss.png

Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto

Ostatnio przeglądający 0

  • Brak zarejestrowanych użytkowników przeglądających tę stronę.

Szukaj

Szukaj

Skonfiguruj powiadomienia push w przeglądarce

Chrome (Android)
  1. Stuknij ikonę kłódki obok paska adresu.
  2. Stuknij Uprawnienia → Powiadomienia.
  3. Dostosuj swoje ustawienie.
Chrome (Komputer)
  1. Kliknij ikonę kłódki na pasku adresu.
  2. Wybierz Ustawienia witryny.
  3. Znajdź Powiadomienia i dostosuj swoje ustawienie.