Button "do góry"

Założony przez  Regman.

wersja skryptu MyBB:
adres forum: gramtu.xaa.pl
na czym polega problem (screen, opis, komunikaty, nazwa stylu/theme/szablonu):

Cześć, jak umieścić button "do góry" przed buttonem zgłoś/report ?
Albo powiedzcie mi jaka jest komenda na ten button bo wiem jak umieścić i gdzie ale nie znam komendy próbowałem komendy {$post['button_top']} i nie działa :C
Bo to nie ma prawa działać, nie ma takiego buttona. Musisz go ręcznie dodać, uprzednio zrobiąc do niego grafikę. I to by wyglądało tak:
<img src="link_do_buttona" alt="Do góry" title="Wróć do góry"/>{$post['report']}
Pokaż postbit_classic to bym Ci to wkleił w kod od razu ;)
To znaczy ja mam już grafikę zrobioną i wrzuconą na ftp.
nazywa się postbist_top.gif

A oto mój pos bist classic:
{$ignore_bit}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style}</span> {$post_visibility}" id="post_{$post['pid']}">
     <tr>

         <td class="trow_post1" width="180px" valign="top" style="white-space: nowrap; text-align: center;"><a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
         <strong><span class="largetext">{$post['profilelink']}</span></strong>{$post['onlinestatus']}</br>
         <span class="smalltext">
             {$post['usertitle']}<br />
<br />
      
             {$post['useravatar']}<br />
{$post['userstars']}
          {$post['user_details']}<br />
<br>
{$post['groupimage']}
         </span>
     </td>
     <td class="trow_post2" valign="top">
         <table width="100%">
             <tr><td>{$post['posturl']}<span class="smalltext"><strong>{$post['icon']} {$post['postdate']} {$post['posttime']}{$post['subject']}{$post['subject_extra']}</strong></span>
             <div id="pid_{$post['pid']}" class="post_body">
                 {$post['message']}
             </div>
             {$post['attachments']}
             {$post['signature']}

             <div style="text-align: left; vertical-align: bottom;" id="post_meta_{$post['pid']}">
                 <div id="edited_by_{$post['pid']}">{$post['editedmsg']}</div>
<br>
<span style="float:right;">{$post['button_rep']}</span></br>
<br>
<span style="float:right;">{$post['iplogged']}</span>
             </div>
         </td></tr>
     </table>
</td>
</tr>
         <table width="100%" border="0" cellpadding="0" cellspacing="0">
             <tr>
<td class="trow1">
                {$post['button_report']}{$post['button_postbit_top']}
                 <span style="float:right;">{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quote']}{$post['button_multiquote']}{$post['button_warn']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']}</span></td>
             </tr>
         </table>
     </td>
</tr>
</table>

A tutaj jest link do tej grafiki:
http://imgur.com/TVD3GKZ

EDIT

Grafika dodana lecz nie działa jak klikam to nie przesuwa się do góry.

tak to zrobiłem:
{$ignore_bit}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style}</span> {$post_visibility}" id="post_{$post['pid']}">
     <tr>

         <td class="trow_post1" width="180px" valign="top" style="white-space: nowrap; text-align: center;"><a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
         <strong><span class="largetext">{$post['profilelink']}</span></strong>{$post['onlinestatus']}</br>
         <span class="smalltext">
             {$post['usertitle']}<br />
<br />
      
             {$post['useravatar']}<br />
{$post['userstars']}
          {$post['user_details']}<br />
<br>
{$post['groupimage']}
         </span>
     </td>
     <td class="trow_post2" valign="top">
         <table width="100%">
             <tr><td>{$post['posturl']}<span class="smalltext"><strong>{$post['icon']} {$post['postdate']} {$post['posttime']}{$post['subject']}{$post['subject_extra']}</strong></span>
             <div id="pid_{$post['pid']}" class="post_body">
                 {$post['message']}
             </div>
             {$post['attachments']}
             {$post['signature']}

             <div style="text-align: left; vertical-align: bottom;" id="post_meta_{$post['pid']}">
                 <div id="edited_by_{$post['pid']}">{$post['editedmsg']}</div>
<br>
<span style="float:right;">{$post['button_rep']}</span></br>
<br>
<span style="float:right;">{$post['iplogged']}</span>
             </div>
         </td></tr>
     </table>
</td>
</tr>
         <table width="100%" border="0" cellpadding="0" cellspacing="0">
             <tr>
<td class="trow1">
                <img src="http://gramtu.xaa.pl/images/audentio/citrus/postbit_top.gif" alt="Do góry" title="Wróć do góry"/>{$post['button_report']}
                 <span style="float:right;">{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quote']}{$post['button_multiquote']}{$post['button_warn']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']}</span></td>
             </tr>
         </table>
     </td>
</tr>
</table>
Spróbuj tak:
{$ignore_bit}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style}</span> {$post_visibility}" id="post_{$post['pid']}">
     <tr>

         <td class="trow_post1" width="180px" valign="top" style="white-space: nowrap; text-align: center;"><a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
         <strong><span class="largetext">{$post['profilelink']}</span></strong>{$post['onlinestatus']}</br>
         <span class="smalltext">
             {$post['usertitle']}<br />
<br />
      
             {$post['useravatar']}<br />
{$post['userstars']}
          {$post['user_details']}<br />
<br>
{$post['groupimage']}
         </span>
     </td>
     <td class="trow_post2" valign="top">
         <table width="100%">
             <tr><td>{$post['posturl']}<span class="smalltext"><strong>{$post['icon']} {$post['postdate']} {$post['posttime']}{$post['subject']}{$post['subject_extra']}</strong></span>
             <div id="pid_{$post['pid']}" class="post_body">
                 {$post['message']}
             </div>
             {$post['attachments']}
             {$post['signature']}

             <div style="text-align: left; vertical-align: bottom;" id="post_meta_{$post['pid']}">
                 <div id="edited_by_{$post['pid']}">{$post['editedmsg']}</div>
<br>
<span style="float:right;">{$post['button_rep']}</span></br>
<br>
<span style="float:right;">{$post['iplogged']}</span>
             </div>
         </td></tr>
     </table>
</td>
</tr>
         <table width="100%" border="0" cellpadding="0" cellspacing="0">
             <tr>
<td class="trow1">
                <a href="#top"><img src="{$mybb->settings['bburl']}/images/audentio/citrus/postbit_top.gif" alt="Do góry" title="Wróć do góry"/></a>{$post['button_report']}
                 <span style="float:right;">{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quote']}{$post['button_multiquote']}{$post['button_warn']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']}</span></td>
             </tr>
         </table>
     </td>
</tr>
</table>
działa dzięki :)
Sepowaty napisał 23.06.2013, 10:58:
[Obrazek: modnotice_thx.png]
Animowana wersja.
W footer na początku dodaj:
<script type="text/javascript">
jQuery.noConflict();
jQuery(function($) {
$(
"#backtop").hide();
  $(
window).scroll(function () {
    if ($(
this).scrollTop() > 400) {
      $(
'#backtop').fadeIn(200);
    } else {
      $(
'#backtop').fadeOut(200);
    }
  });
  $(
'.go-top').click(function () {
    $(
'html,body').animate({
      
scrollTop0
    
}, 1000);
    return 
false;
  });
});
</
script

Po:
{$auto_dst_detection
dodaj:
<div id='backtop'
 <
class='go-top' href='#top' title='Powrót do góry'><img src="{$theme['imgdir']}/scrolltotop.png" /></a
 </
div
Oczywiście musisz sobie dodać obrazek do images o nazwie scrolltotop.png

I to jest lepsze bo nie musi być w poście.
Jeśli Ci pomogłem naciśnij guzik POMÓGŁ lub dodaj PUNKT REPUTACJI



Użytkownicy przeglądający ten wątek:

1 gości