Administrator
3wProducer
Imagination is more Important than Knowledge
08.05.2017 21:24:16
United States
|
 |
Link: http://poligon.ricoroco.com/fora/smf/index.php?topic=331.msg1208#msg1208
Post #9 |
|
Witam!  Pojawi? si? na powa?niej dopiero po grobkach, okay? Dzi?ki Draco za przeja?nienie. Ci??ko by?o sqma? co mia? na my?li Tomeh. Ja to rozumiem tak: - Jest tabela z grubsza podzielona na dwie cz??ci (lewa i prawa) To tu w zamy?le Tomka by?o zamieni? je miejscami. - Prawa cz??? tabeli, (która ma by? po lewej), sk?ada si? z 3 komórek: 1 - ostatni Topik 2 - Autor 3 - Data To tu komórka Nr.2 (czyli Autor) --> wylatuje i zostaje tylko 1 i 3 - Lewa strona tabeli, (która ma docelowo by? po prawej) ma zawiera? tylko TOP 10 tematów pod wzgl?dem ogl?dalno?ci i docelowo ma mie? tylko 2 komórki czyli: 1 - Topik (o najwi?kszej ogl?dalno?ci) 2 - Autor --> do wyci?cia 3 - Ilo?? wy?wietle? Czyli reasumuj?c kszta?t ostateczny ma by? taki | Ostatnie wiadomo?ci | Top 10 Topics (by Views) |
| Wiadomo?? | Data | Temat | Wy?wietle? |
Zreszt? tak to zrobi?em (fota w za??czniku) Dodatkowo - poprawi?em wy?wietlanie, czyli odst?py wielko?? fonta, grafiki, i w lewej cz??ci jest wyd?u?ona nazwa, natomiast tam gdzie te TOP 10 to ju? go?ciu zakombinowa? i da? skacacz ilo?ci znaków do 18. ?eby to zmieni?, np. ustawi? t? liczb? na 50 znaków, (to w zupe?no?ci wystarczy..), to ju? nale?y wy-edytowa? plik z silnika SMF, tj. z katalogu Sources, plik - BoardIndex.php Trzeba znale?? w tym pliku wpisy od moda czyli to miejsce: // TopStats by www.gorselsanatlar.orgI d?ugo poni?ej b?dzie wpis: // Topic views top 10. $topic_view_result = db_query("
// Created by GeSHi 1.0.8.10 | code: -› [code=PHP] | load:0.015s | speed:3.98 KB/s I w tym wywo?aniu do bazy, par? wierszy po ni?ej znajduje si? ten ogranicznik: censorText($row_topic_views['subject']); $row_topic_views['subject'] = shorten_subject($row_topic_views['subject'], 18);
// Created by GeSHi 1.0.8.10 | code: -› [code=PHP] | load:0.015s | speed:9.78 KB/s Widzisz na ko?cu liczb? 18? to tylko i wy??cznie zmie? t? liczb? na 50 censorText($row_topic_views['subject']); $row_topic_views['subject'] = shorten_subject($row_topic_views['subject'], 50);
// Created by GeSHi 1.0.8.10 | code: -› [code=PHP] | load:0.014s | speed:10.28 KB/s Wtedy b?dziesz mia? w TOP 10 d?u?sz? nazw? topiku. Okay teraz i o ile dobrze Ci? zrozumia?em z t? tabela i tym co ma w niej by?, to poka?? Ci który kawa?ek kodu zamienisz na podobny ode mnie i b?dzie ten efekt. Jednak zanim przejd? do rzeczy, to proponuj? zadaj sobie trud i po adresie twojego forum/ dopisz - ssi_examples.php czyli: forum_tomka.pl/ssi_examples.php i dostaniesz list? funkcji SSI i zobaczysz sam, ?e go?ciu notabene Turek, bez urazy.. troszk? to ponaci?ga?.., a przy najmniej w twoim wypadku.. Mam niemal to samo tutaj na HOME - wykorzystuj? funkcje SSI. Zobacz i si? zastanów nad sensem tego moda, skoro mo?na tak wiele info wyci?gn?? za pomoc? SSI. Wyci?gnij wnioski... A teraz do rzeczy: W stylu default, w pliku BoardIndex.template.php znajd? wpisy od tego moda, - a dok?adnie od tego miejsca (u mnie to oko?o ~ 282 linii): //top stats start. by [url=http://www.gorselsanatlar.org]www.gorselsanatlar.org[/url] // --> od powy?szego miejsca
// Created by GeSHi 1.0.8.10 | code: -› [code=PHP] | load:0.016s | speed:7.18 KB/s do tego miejsca: // Here's where the "Info Center" starts... // do --> powy?szego miejsca
// Created by GeSHi 1.0.8.10 | code: -› [code=PHP] | load:0.018s | speed:4.29 KB/s I to wszystko, ca?y zawarty tam kod, czyli pomi?dzy tymi // komentarzami: //top stats start. by [url=http://www.gorselsanatlar.org]www.gorselsanatlar.org[/url] echo '<br /> <div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'style="width: 100%;"' : '', '> <div class="catbg" style ="padding: 6px; vertical-align: middle; text-align: center; "> <a href ="#" onclick ="shrinkHeaderTOPS(!current_header_tops); return false;"><img id ="upshrink_tops" src ="', $settings['images_url'], '/', empty($options['collapse_header_tops']) ? 'collapse.gif' : 'expand.gif', '" alt ="*" title ="', $txt['upshrink_description'], '" style ="margin-right: 2ex;" align ="right" /></a > ', $txt[645], ' </div > <div id ="upshrinkHeaderTOPS"', empty($options['collapse_header_tops']) ? '' : ' style="display: none;"', '> <table border ="0" width ="100%" cellspacing ="1" cellpadding ="2" class="bordercolor"> <tr > <td class="titlebg" width ="10%" colspan ="2" align ="center">', $txt[302], ' ', $txt[331], '</td> <td class="titlebg" width ="24%" colspan ="2" align ="center">', $txt['top_topics_views'], '</td> <td class="titlebg" width ="66%" colspan ="3" align ="center">', $txt[214], '</td> </tr > <tr > <td class="windowbg2" width ="10%" colspan ="2" valign ="top"><span class="smalltext"><b >', $txt['user'], '</b></span><br />'; foreach ($context['new_members'] as $poster) { echo ' <img alt ="" src ="', $settings['images_url'], '/icons/online.gif', '" width ="12" height ="12" /> <span class="smalltext">',$poster['link'], '</span><br />'; } echo ' </td > <td class="windowbg2" width ="18%" valign ="top"><span class="smalltext"><b >', $txt[64], '</b></span><br />'; foreach ($context['top_topics_views'] as $topic) echo ' <img alt ="" src ="', $settings['images_url'], '/email_sm.gif', '" width ="12" /> <span class="smalltext">', $topic['link'], '</span><br />'; echo '</td> <td class="windowbg2" width ="6%" align ="right" valign ="top"><span class="smalltext"><b >', $txt[301], '</b></span><br />'; foreach ($context['top_topics_views'] as $topic) echo ' <img alt ="" src ="', $settings['images_url'], '/sort_up.gif" width ="8" /> <span class="smalltext">', $topic['num_views'], '</span><br />'; echo '</td> <td class="windowbg2" width ="22%" rowspan ="3" valign ="top"><span class="smalltext"><b >', $txt[64], '</b></span><br />'; if (!empty($context['latest_posts'])) foreach ($context['latest_posts'] as $post) echo ' <img src ="', $settings['images_url'], '/email_sm.gif', '" width ="12" alt ="" /> <span class="smalltext"><a href ="',$post['href'],'">', $post['short_subject'], '</a></span><br />'; echo '</td> <td class="windowbg2" width ="14%" rowspan ="3" valign ="top"><span class="smalltext"><b >', $txt[29], '</b></span><br />'; if (!empty($context['latest_posts'])) foreach ($context['latest_posts'] as $post) echo ' <img alt ="" src ="', $settings['images_url'], '/icons/online.gif', '" width ="12" height ="12" /> <span class="smalltext">', $post['poster']['link'], '</span><br />';
echo ' </td > <td class="windowbg2" width ="20%" rowspan ="3" valign ="top"><span class="smalltext"><b >', $txt[317], '</b></span><br />'; if (!empty($context['latest_posts'])) foreach ($context['latest_posts'] as $post) echo ' <img alt ="" src ="', $settings['images_url'], '/icons/calendar.gif', '" width ="12" /> <span class="smalltext">', $post['time'], '</span><br />'; echo '</td> </tr > <tr > <td class="titlebg" width ="20%" colspan ="2" align ="center">', $txt['top_posters'], '</td> <td class="titlebg" width ="24%" colspan ="2" align ="center">', $txt['top_topics'], '</td> </tr > <tr > <td class="windowbg2" width ="14%" valign ="top"><span class="smalltext"><b >', $txt['user'], '</b></span><br />'; foreach ($context['top_posters'] as $poster) echo ' <img alt ="" src ="', $settings['images_url'], '/icons/online.gif', '" width ="12" height ="12" /> <span class="smalltext">', $poster['link'], '</span><br />'; echo '</td> <td class="windowbg2" valign ="top" align ="right" width ="6%"><span class="smalltext"><b >', $txt[21], '</b></span><br />'; foreach ($context['top_posters'] as $poster) echo ' <img alt ="" src ="', $settings['images_url'], '/sort_up.gif" width ="8" /> <span class="smalltext">', $poster['num_posts'], '</span><br />'; echo '</td> <td class="windowbg2" valign ="top" width ="18%"><span class="smalltext"><b >', $txt['user'], '</b></span><br />'; foreach ($context['top_starters'] as $poster) echo ' <img alt ="" src ="', $settings['images_url'], '/icons/online.gif', '" width ="12" height ="12" /> <span class="smalltext">', $poster['link'], '</span><br />'; echo '</td> <td class="windowbg2" valign ="top" align ="right" width ="6%"><span class="smalltext"><b >', $txt[64], '</b></span><br />'; foreach ($context['top_starters'] as $poster) echo ' <img alt ="" src ="', $settings['images_url'], '/sort_up.gif" width ="8" /> <span class="smalltext">', $poster['num_topics'], '</span><br />'; echo '</td> </tr > </table > </div ></div >'; // Here's where the "Info Center" starts... // Created by GeSHi 1.0.8.10 | code: -› [code=PHP] | load:0.037s | speed:176.09 KB/s --->> zamie? w ca?o?ci na ten kod: //top stats start. by [url=http://www.gorselsanatlar.org]www.gorselsanatlar.org[/url] echo '<br /> <div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'style="width: 100%;"' : '', '> <div class="catbg" style ="padding: 6px; vertical-align: middle; text-align: center; "> <a href ="#" onclick ="shrinkHeaderTOPS(!current_header_tops); return false;"><img id ="upshrink_tops" src ="', $settings['images_url'], '/', empty($options['collapse_header_tops']) ? 'collapse.gif' : 'expand.gif', '" alt ="*" title ="', $txt['upshrink_description'], '" style ="margin-right: 2ex;" align ="right" /></a > ', $txt[645], '</div> <div id ="upshrinkHeaderTOPS"', empty($options['collapse_header_tops']) ? '' : ' style="display: none;"', '> <table width ="100%" cellspacing ="1" cellpadding ="2" class="bordercolor"> <tr >'; echo ' <td class="titlebg" width ="66%" colspan ="2" align ="center" style ="border-right:2px solid #ddd;">', $txt[214], '</td> <td class="titlebg" width ="44%" colspan ="2" align ="center">', $txt['top_topics_views'], '</td> </tr > <tr >'; echo ' <td class="windowbg2" style ="min-width:50%; vertical-align:top;"><span class="smalltext" style ="margin-left:15px; font-size:8pt; font-weight:500;"><b >', $txt[72], '</b></span><br />'; if (!empty($context['latest_posts'])) foreach ($context['latest_posts'] as $post) echo ' <span style ="font-size:8pt; font-weight:500; white-space:nowrap;"><a href ="',$post['href'],'"><img src ="', $settings['images_url'], '/email_sm.gif', '" style ="height:14px; vertical-align:middle;" alt ="Last Post" />', $post['subject'], '</a></span><br />';
echo ' </td > <td class="windowbg2" style ="border-right:2px solid #ddd; max-width:10%; vertical-align:top;"><span style ="margin-left:20px; font-size:8pt;"><b >', $txt[317], '</b></span><br />'; if (!empty($context['latest_posts'])) foreach ($context['latest_posts'] as $post) echo ' <span style ="margin-left:5px; font-size:8pt; font-weight:500;"><img alt ="Data" style ="height:14px; vertical-align:middle;" src ="', $settings['images_url'], '/icons/last_post.gif', '" />', $post['time'], '</span><br />'; echo '</td> <td class="windowbg2" style ="min-width:30%; vertical-align:top;"><span style ="margin-left:15px; font-size:8pt; font-weight:500;"><b >', $txt[70], '</b></span><br />'; foreach ($context['top_topics_views'] as $topic) echo ' <span style ="font-size:8pt; font-weight:500;"><img alt ="Topic" src ="', $settings['images_url'], '/email_sm.gif', '" style ="height:14px; vertical-align:middle;" />', $topic['link'], '</span><br />'; echo '</td> <td class="windowbg2" align ="center" style ="width:auto; vertical-align:top;"><span style ="font-size:8pt; font-weight:500;"><b >', $txt[301], '</b></span><br />'; foreach ($context['top_topics_views'] as $topic) echo ' <span style ="line-height:1.4em; font-size:8pt; font-weight:700;"><img alt ="" src ="', $settings['images_url'], '/sort_up.gif" style ="vertical-align:middle;" /> ', $topic['num_views'], '</span><br />'; echo '</td> </tr > </table > </div ></div >'; // Here's where the "Info Center" starts... // Created by GeSHi 1.0.8.10 | code: -› [code=PHP] | load:0.026s | speed:137.57 KB/s Jak widzisz poda?em to ??cznie z komentarzami, ale to dla lepszego trafienia  Tomeh, poda?em to naprawd? prosto, ?atwizna i spoko dasz rad?, okay? I nie nadpisuj plików na servie tylko zmie? straym nazw? przed wrzuceniem na FTP zmienionych plików, spoko? Edytuj tylko edytorem do kogu php z pod?wietlaniem sk?adni np. Notepad++ Pos?uchasz rad to max w 3 - 5 minut z wgraniem na serva.. tyle to pracy przy tym.. Pozdrawiam i na zdrowie, jak co to pisz  roco
Attention! Testing modifications - Steam Profile
|