Top postów po obu stronach

Założony przez  bratmati.

wersja skryptu MyBB: New
adres forum: fcsh.net.pl
na czym polega problem (screen, opis, komunikaty, nazwa i wersja wtyczki):
http://scr.hu/349/rxeym
proszę o pomoc :)

<html>
<head>
<title>{$mybb->settings['bbname']}</title>
{$headerinclude}
<script type="text/javascript">
<!--
    lang.no_new_posts = "{$lang->no_new_posts}";
    lang.click_mark_read = "{$lang->click_mark_read}";
// -->
</script>
</head>
<body>
{$header}


<center><font size="6">LIGA 4V4 RUSZYŁA! </font></center>




<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0" align="center">
    <tr>
        <td valign="top" style="padding-right: 20px" >
            

        
{$inferno_shoutbox}<table width="100%"  border="0">
  <tr>
    <td width="75%" valign="top">{$forums}</td>
    <td width="25%" valign="top">{$top_posters}</td>
  </tr>
</table>
            


{$boardstats}
        </td>
        <td valign="top" width="170">
    <table border="0" cellspacing="0" cellpadding="4" class="tborder">
                <tr>
                    
            
                <tr>

                                                        <td class="thead"><strong>FCSH.TV</strong></td>


                </tr>

                <tr>





                </tr>




            </table>

<img src="images/belka.png" alt="Tu podaj tekst alternatywny" />
<center><iframe width="235" height="205" src="//www.youtube.com/embed/I1QQ1iRGGT4" frameborder="0" allowfullscreen></iframe></center>


<center><iframe width="235" height="205" src="//www.youtube.com/embed/CRewoJF9_a4?rel=0" frameborder="0" allowfullscreen></iframe></center>
<br />

<table border="0" cellspacing="0" cellpadding="4" class="tborder">



                <tr>
                

{$teamonline}
{$latestthreads}


<table border="0" cellspacing="0" cellpadding="4" class="tborder">
                <tr>
                    <td class="thead"><strong>Podgląd TS3</strong></td>
                </tr>
                <tr>


                </tr>

</table>
<iframe src="http://cache.www.gametracker.com/components/html0/?host=178.217.188.172:9987&bgColor=FFFFFF&fontColor=333333&titleBgColor=FFFFFF&titleColor=000000&borderColor=BBBBBB&linkColor=091858&borderLinkColor=5C5C5C&showMap=0&currentPlayersHeight=160&showCurrPlayers=1&showTopPlayers=0&showBlogs=0&width=240" frameborder="0" scrolling="no" width="240" height="348"></iframe>
<br />



                </tr>
</table><br />
        </td>
    </tr>
</table>
        </td>
        




</body>
</html>
Eh. Zupełny bałagan się zrobił. Robimy kilka tematów związanych z 1 szablonem. Po kolei zacznijmy.

index zamień na:
<html>
<
head>

<
title>{$mybb->settings['bbname']}</title>
{
$headerinclude}
<
script type="text/javascript">
<!--
    
lang.no_new_posts "{$lang->no_new_posts}";
    
lang.click_mark_read "{$lang->click_mark_read}";
// -->
</script>
</
head>
<
body>
{
$header}
<
center><font size="6">LIGA 4V4 RUSZYŁA! </font></center>
{
$inferno_shoutbox}
<
br class="clear" />
<
div class="sidebar" style="float: right;width: 25%;">
<
table border="0" cellspacing="{$theme['borderwidth']}cellpadding="{$theme['tablespace']}class="tborder">
<
tr>
<
td class="thead"><strong>
FCSH.TV
</strong></td>
</
tr>
<
tr>
<
td class="trow1">
<
img src="images/belka.png" alt="Tu podaj tekst alternatywny" />
<
center><iframe width="235" height="205" src="//www.youtube.com/embed/I1QQ1iRGGT4" frameborder="0" allowfullscreen></iframe></center>
<
center><iframe width="235" height="205" src="//www.youtube.com/embed/CRewoJF9_a4?rel=0" frameborder="0" allowfullscreen></iframe></center>
<
br />
</
td>
</
tr>
</
table>
{
$teamonline}
{
$top_posters}
{
$latestthreads}
{
$topStats['LastThreads']} 
{
$topStats['MostViews']} 
{
$topStats['Posters']}
{
$topStats['Reputation']}
{
$topStats['Timeonline']}
{
$topStats['NewestUsers']} 
<
table border="0" cellspacing="{$theme['borderwidth']}cellpadding="{$theme['tablespace']}class="tborder">
<
tr>
<
td class="thead"><strong>
Podgląd TS3
</strong></td>
</
tr>
<
tr>
<
td class="trow1">
<
iframe src="http://cache.www.gametracker.com/components/html0/?host=178.217.188.172:9987&bgColor=FFFFFF&fontColor=333333&titleBgColor=FFFFFF&titleColor=000000&borderColor=BBBBBB&linkColor=091858&borderLinkColor=5C5C5C&showMap=0&currentPlayersHeight=160&showCurrPlayers=1&showTopPlayers=0&showBlogs=0&width=240" frameborder="0" scrolling="no" width="240" height="348"></iframe>
<
br />
</
td>
</
tr>
</
table>
</
div>
<
div class="forums" style="float: left;width: 74%;">
{
$forums}
</
div>
<
br class="clear" />
{
$boardstats}
<
br style="clear: both" />
{
$footer}
</
body>
</
html
Prośby na PW dotyczące wsparcia z problemami będą ignorowane. Pomoc poza forum - odpłatna; kontakt: snakemybboard@gmail.com.
Dziękuje bardzo Snake za zainteresowanie
1 krok. Zrobione :)
Shoutbox nie ma być na pełnej szerokości :)
Może lepiej bęzie jak wgram od nowa szablon? :)
Shoutbox jest tak, bo index jest inaczej zrobiony, gdyż tamten był nieco pomieszany, tak spróbuj:
<html>
<
head>

<
title>{$mybb->settings['bbname']}</title>
{
$headerinclude}
<
script type="text/javascript">
<!--
    
lang.no_new_posts "{$lang->no_new_posts}";
    
lang.click_mark_read "{$lang->click_mark_read}";
// -->
</script>
</
head>
<
body>
{
$header}
<
center><font size="6">LIGA 4V4 RUSZYŁA! </font></center>
<
br class="clear" />
<
div class="sidebar" style="float: right;width: 25%;">
<
table border="0" cellspacing="{$theme['borderwidth']}cellpadding="{$theme['tablespace']}class="tborder">
<
tr>
<
td class="thead"><strong>
FCSH.TV
</strong></td>
</
tr>
<
tr>
<
td class="trow1">
<
img src="images/belka.png" alt="Tu podaj tekst alternatywny" />
<
center><iframe width="235" height="205" src="//www.youtube.com/embed/I1QQ1iRGGT4" frameborder="0" allowfullscreen></iframe></center>
<
center><iframe width="235" height="205" src="//www.youtube.com/embed/CRewoJF9_a4?rel=0" frameborder="0" allowfullscreen></iframe></center>
<
br />
</
td>
</
tr>
</
table>
{
$teamonline}
{
$top_posters}
{
$latestthreads}
{
$topStats['LastThreads']} 
{
$topStats['MostViews']} 
{
$topStats['Posters']}
{
$topStats['Reputation']}
{
$topStats['Timeonline']}
{
$topStats['NewestUsers']} 
<
table border="0" cellspacing="{$theme['borderwidth']}cellpadding="{$theme['tablespace']}class="tborder">
<
tr>
<
td class="thead"><strong>
Podgląd TS3
</strong></td>
</
tr>
<
tr>
<
td class="trow1">
<
iframe src="http://cache.www.gametracker.com/components/html0/?host=178.217.188.172:9987&bgColor=FFFFFF&fontColor=333333&titleBgColor=FFFFFF&titleColor=000000&borderColor=BBBBBB&linkColor=091858&borderLinkColor=5C5C5C&showMap=0&currentPlayersHeight=160&showCurrPlayers=1&showTopPlayers=0&showBlogs=0&width=240" frameborder="0" scrolling="no" width="240" height="348"></iframe>
<
br />
</
td>
</
tr>
</
table>
</
div>
<
div class="forums" style="float: left;width: 74%;">
{
$inferno_shoutbox}
{
$forums}
</
div>
<
br class="clear" />
{
$boardstats}
<
br style="clear: both" />
{
$footer}
</
body>
</
html
Prośby na PW dotyczące wsparcia z problemami będą ignorowane. Pomoc poza forum - odpłatna; kontakt: snakemybboard@gmail.com.
Wgrałem jednak od nowa czysty szablon.
http://fcsh.net.pl/index.php
i teraz chcę wgrać ten plugin Recent Threads Sidebar
i gdy go wgrywam tzw. Aktywuje to znow wyskakuje po 2 stronach
Nie jestem pewien, czy to ta zmienna, ale spróbuj po {$teamonline} dodać {$latestthreads}.
Prośby na PW dotyczące wsparcia z problemami będą ignorowane. Pomoc poza forum - odpłatna; kontakt: snakemybboard@gmail.com.
(20.08.2014, 15:05)Snake_ napisał(a): Nie jestem pewien, czy to ta zmienna, ale spróbuj po {$teamonline} dodać {$latestthreads}.


Panel po lewej stronie dalej nie znika
po prawej jest ok
No to pokaż teraz bieżący szablon index, oraz kod pluginu.
Prośby na PW dotyczące wsparcia z problemami będą ignorowane. Pomoc poza forum - odpłatna; kontakt: snakemybboard@gmail.com.
<?php

//Recent Threads Sidebar Mod by Borbole

//Trying to access directly the file, are we :D

if(!defined("IN_MYBB"))
{
    die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}

//Hooking into index_start with our function

$plugins->add_hook("index_end", "sidebarthreads");

//Show some info about our mod
function sidebarthreads_info()
{
    return array(
        "name"            => "Recent Threads Sidebar",
        "description"    => "It shows the recent posts on the sidebar.",
        "website"        => "http://www.forumservices.eu/mybb",
        "version"        => "1.0",
        "author"        => "borbole",
        "authorsite"    => "http://www.forumservices.eu/mybb",
        "compatibility"  => "16*",
        'guid'        => '99c9a5bd8f5ae93cfe6d5fad258df89d'
    );
}

//Activate it
function sidebarthreads_activate()
{
    global $db;

    //Insert the mod settings in the portal settinggroup
    $query = $db->simple_select("settinggroups", "gid", "name='portal'");
    $gid = $db->fetch_field($query, "gid");

    $setting = array(
        'name' => 'sidebar_enable',
        'title' => 'Lates Threads Sidebar',
        'description' => 'Do you wish to show the Lates Threads in the sidebar as well?',
        'optionscode' => 'yesno',
        'value' => '1',
        'disporder' => '90',
        'gid' => intval($gid)
    );
    $db->insert_query('settings',$setting);

    $setting = array(
        "sid" => "NULL",
        "name" => "sidebar_position",
        "title" => "Position",
        "description" => "On which side do you wish to show the Lates Threads in the sidebar?",
        "optionscode" => "select
         1= Right Side
         2= Left Side",
        "value" => "2",
        "disporder" => "91",
        "gid" => intval($gid),
        );
    $db->insert_query("settings", $setting);


    $template = array(
        "tid"        => NULL,
        "title"        => 'thread_sidebar',
        "template"    => '{$showrecentthreads}',
        "sid"        => "-1",
        "version"    => "1.0",
        "dateline"    => time(),
    );

    $db->insert_query("templates", $template);

    rebuild_settings();
}

//Don't want to use it anymore? Let 's deactivate it then and drop the settings and the custom var as well
function sidebarthreads_deactivate()
{
    global $db, $mybb;

    $db->query("DELETE FROM ".TABLE_PREFIX."settings WHERE name='sidebar_enable'");    
    $db->query("DELETE FROM ".TABLE_PREFIX."settings WHERE name='sidebar_position'");
    
    $db->delete_query("templates","title = 'thread_sidebar'");

    rebuild_settings();
}


//Insert our function
function sidebarthreads()
{
   global $db, $mybb, $forums, $templates;

   //Get the recent threads settings from the portal
   if($mybb->settings['portal_showdiscussions'] != 0 && $mybb->settings['portal_showdiscussionsnum'])
   {
       $showrecentthreads = showrecentthreads();
   }
    //Show the recent threads on the sidebar on board index
   if($mybb->settings['sidebar_enable'] == 1)
   {
      
      //Get the template
      eval("\$sidebarposition = \"".$templates->get("thread_sidebar")."\";");

      //Display it on the right side
      if ($mybb->settings['sidebar_position'] == "2")
      {
          $forums ='<table border="0" width="100%">
          <tr>
              <td width="200" valign="top">'. $sidebarposition. '</td>
              <td valign="top">'. $forums. '</td>
         </tr>
         </table>';
      }
      
       //Display it on the left side
     if ($mybb->settings['sidebar_position'] == "1")
     {
        $forums ='<table border="0" width="100%">
        <tr>
            <td valign="top">'. $forums. '</td>
            <td width="200" valign="top">'. $sidebarposition. '</td>
        </tr>
       </table>';
     }
  }
}


//Get the recent threads from the portal to show them on the sidebar in forum index
function showrecentthreads()
{
    global $db, $mybb, $templates, $latestthreads, $lang, $theme, $forum_cache;
    
    // Load global language phrases
    $lang->load("portal");

    // Latest forum discussions
    $altbg = alt_trow();
    $threadlist = '';
    $query = $db->query("
        SELECT t.*, u.username
        FROM ".TABLE_PREFIX."threads t
        LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=t.uid)
        WHERE 1=1 $unviewwhere AND t.visible='1' AND t.closed NOT LIKE 'moved|%'
        ORDER BY t.lastpost DESC
        LIMIT 0, ".$mybb->settings['portal_showdiscussionsnum']
    );
    while($thread = $db->fetch_array($query))
    {
        $forumpermissions[$thread['fid']] = forum_permissions($thread['fid']);

        // Make sure we can view this thread
        if($forumpermissions[$thread['fid']]['canview'] == 0 || $forumpermissions[$thread['fid']]['canviewthreads'] == 0 || $forumpermissions[$thread['fid']]['canonlyviewownthreads'] == 1 && $thread['uid'] != $mybb->user['uid'])
        {
            continue;
        }

        $lastpostdate = my_date($mybb->settings['dateformat'], $thread['lastpost']);
        $lastposttime = my_date($mybb->settings['timeformat'], $thread['lastpost']);
        // Don't link to guest's profiles (they have no profile).
        if($thread['lastposteruid'] == 0)
        {
            $lastposterlink = $thread['lastposter'];
        }
        else
        {
            $lastposterlink = build_profile_link($thread['lastposter'], $thread['lastposteruid']);
        }
        if(my_strlen($thread['subject']) > 25)
        {
            $thread['subject'] = my_substr($thread['subject'], 0, 25) . "...";
        }
        $thread['subject'] = htmlspecialchars_uni($thread['subject']);
        $thread['threadlink'] = get_thread_link($thread['tid']);
        $thread['lastpostlink'] = get_thread_link($thread['tid'], 0, "lastpost");
        eval("\$threadlist .= \"".$templates->get("portal_latestthreads_thread")."\";");
        $altbg = alt_trow();
    }
    if($threadlist)
    {
        // Show the table only if there are threads
        eval("\$latestthreads = \"".$templates->get("portal_latestthreads")."\";");
    }

    return $latestthreads;
}

?>

<html>
<head>

<title>{$mybb->settings['bbname']}</title>
{$headerinclude}
<script type="text/javascript">
<!--
    lang.no_new_posts = "{$lang->no_new_posts}";
    lang.click_mark_read = "{$lang->click_mark_read}";
// -->
</script>
</head>
<body>
{$header}
<center><font size="6">LIGA 4V4 RUSZYŁA! </font></center>
{$inferno_shoutbox}
<br class="clear" />
<div class="sidebar" style="float: right;width: 25%;">
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead"><strong>
FCSH.TV
</strong></td>
</tr>
<tr>
<td class="trow1">
<img src="images/belka.png" alt="Tu podaj tekst alternatywny" />
<center><iframe width="235" height="205" src="//www.youtube.com/embed/I1QQ1iRGGT4" frameborder="0" allowfullscreen></iframe></center>
<center><iframe width="235" height="205" src="//www.youtube.com/embed/CRewoJF9_a4?rel=0" frameborder="0" allowfullscreen></iframe></center>
<br />
</td>
</tr>
</table>
{$teamonline}
{$latestthreads}.

{$top_posters}
{$latestthreads}
{$topStats['LastThreads']}
{$topStats['MostViews']}
{$topStats['Posters']}
{$topStats['Reputation']}
{$topStats['Timeonline']}
{$topStats['NewestUsers']}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead"><strong>
Podgląd TS3
</strong></td>
</tr>
<tr>
<td class="trow1">
<iframe src="http://cache.www.gametracker.com/components/html0/?host=178.217.188.172:9987&bgColor=FFFFFF&fontColor=333333&titleBgColor=FFFFFF&titleColor=000000&borderColor=BBBBBB&linkColor=091858&borderLinkColor=5C5C5C&showMap=0&currentPlayersHeight=160&showCurrPlayers=1&showTopPlayers=0&showBlogs=0&width=240" frameborder="0" scrolling="no" width="240" height="348"></iframe>
<br />
</td>
</tr>
</table>
</div>
<div class="forums" style="float: left;width: 74%;">
{$forums}
</div>
<br class="clear" />
{$boardstats}
<br style="clear: both" />
{$footer}
Szablon zamień na:
<html>
<
head>

<
title>{$mybb->settings['bbname']}</title>
{
$headerinclude}
<
script type="text/javascript">
<!--
    
lang.no_new_posts "{$lang->no_new_posts}";
    
lang.click_mark_read "{$lang->click_mark_read}";
// -->
</script>
</
head>
<
body>
{
$header}
<
center><font size="6">LIGA 4V4 RUSZYŁA! </font></center>
{
$inferno_shoutbox}
<
br class="clear" />
<
div class="sidebar" style="float: right;width: 25%;">
<
table border="0" cellspacing="{$theme['borderwidth']}cellpadding="{$theme['tablespace']}class="tborder">
<
tr>
<
td class="thead"><strong>
FCSH.TV
</strong></td>
</
tr>
<
tr>
<
td class="trow1">
<
img src="images/belka.png" alt="Tu podaj tekst alternatywny" />
<
center><iframe width="235" height="205" src="//www.youtube.com/embed/I1QQ1iRGGT4" frameborder="0" allowfullscreen></iframe></center>
<
center><iframe width="235" height="205" src="//www.youtube.com/embed/CRewoJF9_a4?rel=0" frameborder="0" allowfullscreen></iframe></center>
<
br />
</
td>
</
tr>
</
table>
{
$teamonline}
{
$top_posters}
{
$latestthreads}
{
$topStats['LastThreads']} 
{
$topStats['MostViews']} 
{
$topStats['Posters']}
{
$topStats['Reputation']}
{
$topStats['Timeonline']}
{
$topStats['NewestUsers']} 
<
table border="0" cellspacing="{$theme['borderwidth']}cellpadding="{$theme['tablespace']}class="tborder">
<
tr>
<
td class="thead"><strong>
Podgląd TS3
</strong></td>
</
tr>
<
tr>
<
td class="trow1">
<
iframe src="http://cache.www.gametracker.com/components/html0/?host=178.217.188.172:9987&bgColor=FFFFFF&fontColor=333333&titleBgColor=FFFFFF&titleColor=000000&borderColor=BBBBBB&linkColor=091858&borderLinkColor=5C5C5C&showMap=0&currentPlayersHeight=160&showCurrPlayers=1&showTopPlayers=0&showBlogs=0&width=240" frameborder="0" scrolling="no" width="240" height="348"></iframe>
<
br />
</
td>
</
tr>
</
table>
</
div>
<
div class="forums" style="float: left;width: 74%;">
{
$forums}
</
div>
<
br class="clear" />
{
$boardstats}
<
br style="clear: both" />
{
$footer
I w ustawieniach pluginu ustaw na prawą stronę.
Prośby na PW dotyczące wsparcia z problemami będą ignorowane. Pomoc poza forum - odpłatna; kontakt: snakemybboard@gmail.com.
Gdy wkleiłem tak to cos stało się z forum
Gdzie sa ustawienia Tego pluginu nie widze?
Wszystko się juz pieprzy, nie ogarniam nic.

ok, teraz tak wygląda
[Obrazek: qv0fo8.jpg]

hmm usunąłem
{$showrecentthreads}
i panel znikł lecz zostało puste miejsce
Spróbuj odinstalować i usunąć to:
//Display it on the right side
      
if ($mybb->settings['sidebar_position'] == "2"
      {
          
$forums ='<table border="0" width="100%">
          <tr>
              <td width="200" valign="top">'
$sidebarposition'</td>
              <td valign="top">'
$forums'</td>
         </tr>
         </table>'
;
      }
      
       
//Display it on the left side
     
if ($mybb->settings['sidebar_position'] == "1"
     {
        
$forums ='<table border="0" width="100%">
        <tr>
            <td valign="top">'
$forums'</td>
            <td width="200" valign="top">'
$sidebarposition'</td>
        </tr>
       </table>'
;
     } 
potem zainstalować.
Prośby na PW dotyczące wsparcia z problemami będą ignorowane. Pomoc poza forum - odpłatna; kontakt: snakemybboard@gmail.com.
Parse error: syntax error, unexpected $end in /usr/home/shun123/domains/fcsh.ct8.pl/public_html/inc/plugins/sidebarthreads.php on line 174

Na początka jak wgralem szablon, baze danych, wgralem plugin do ftp wszystko dzialalalo :(
Zrób kopię tamtego pliku i spróbuj użyć tego:
<?php

//Recent Threads Sidebar Mod by Borbole

//Trying to access directly the file, are we :D

if(!defined("IN_MYBB"))
{
    die(
"Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}

//Hooking into index_start with our function

$plugins->add_hook("index_end""sidebarthreads");

//Show some info about our mod
function sidebarthreads_info()
{
    return array(
        
"name"            => "Recent Threads Sidebar",
        
"description"    => "It shows the recent posts on the sidebar.",
        
"website"        => "http://www.forumservices.eu/mybb",
        
"version"        => "1.0",
        
"author"        => "borbole",
        
"authorsite"    => "http://www.forumservices.eu/mybb",
        
"compatibility"  => "16*",
        
'guid'        => '99c9a5bd8f5ae93cfe6d5fad258df89d'
    
);
}

//Activate it
function sidebarthreads_activate()
{
    global 
$db;

    
//Insert the mod settings in the portal settinggroup
    
$query $db->simple_select("settinggroups""gid""name='portal'");
    
$gid $db->fetch_field($query"gid");

    
$setting = array(
        
'name' => 'sidebar_enable',
        
'title' => 'Lates Threads Sidebar',
        
'description' => 'Do you wish to show the Lates Threads in the sidebar as well?',
        
'optionscode' => 'yesno',
        
'value' => '1',
        
'disporder' => '90',
        
'gid' => intval($gid)
    );
    
$db->insert_query('settings',$setting);

    
$template = array(
        
"tid"        => NULL,
        
"title"        => 'thread_sidebar',
        
"template"    => '{$showrecentthreads}',
        
"sid"        => "-1",
        
"version"    => "1.0",
        
"dateline"    => time(),
    );

    
$db->insert_query("templates"$template);

    
rebuild_settings();
}

//Don't want to use it anymore? Let 's deactivate it then and drop the settings and the custom var as well
function sidebarthreads_deactivate()
{
    global 
$db$mybb;

    
$db->query("DELETE FROM ".TABLE_PREFIX."settings WHERE name='sidebar_enable'");    
    
    
$db->delete_query("templates","title = 'thread_sidebar'");

    
rebuild_settings();
}


//Insert our function 
function sidebarthreads()
{
   global 
$db$mybb;

   
//Get the recent threads settings from the portal
   
if($mybb->settings['portal_showdiscussions'] != && $mybb->settings['portal_showdiscussionsnum'])
   {
       
$showrecentthreads showrecentthreads();
   }
}


//Get the recent threads from the portal to show them on the sidebar in forum index
function showrecentthreads()
{
    global 
$db$mybb$templates$latestthreads$lang$theme$forum_cache;
    
    
// Load global language phrases
    
$lang->load("portal");

    
// Latest forum discussions
    
$altbg alt_trow();
    
$threadlist '';
    
$query $db->query("
        SELECT t.*, u.username
        FROM "
.TABLE_PREFIX."threads t
        LEFT JOIN "
.TABLE_PREFIX."users u ON (u.uid=t.uid)
        WHERE 1=1 
$unviewwhere AND t.visible='1' AND t.closed NOT LIKE 'moved|%'
        ORDER BY t.lastpost DESC 
        LIMIT 0, "
.$mybb->settings['portal_showdiscussionsnum']
    );
    while(
$thread $db->fetch_array($query))
    {
        
$forumpermissions[$thread['fid']] = forum_permissions($thread['fid']);

        
// Make sure we can view this thread
        
if($forumpermissions[$thread['fid']]['canview'] == || $forumpermissions[$thread['fid']]['canviewthreads'] == || $forumpermissions[$thread['fid']]['canonlyviewownthreads'] == && $thread['uid'] != $mybb->user['uid'])
        {
            continue;
        }

        
$lastpostdate my_date($mybb->settings['dateformat'], $thread['lastpost']);
        
$lastposttime my_date($mybb->settings['timeformat'], $thread['lastpost']);
        
// Don't link to guest's profiles (they have no profile).
        
if($thread['lastposteruid'] == 0)
        {
            
$lastposterlink $thread['lastposter'];
        }
        else
        {
            
$lastposterlink build_profile_link($thread['lastposter'], $thread['lastposteruid']);
        }
        if(
my_strlen($thread['subject']) > 25)
        {
            
$thread['subject'] = my_substr($thread['subject'], 025) . "...";
        }
        
$thread['subject'] = htmlspecialchars_uni($thread['subject']);
        
$thread['threadlink'] = get_thread_link($thread['tid']);
        
$thread['lastpostlink'] = get_thread_link($thread['tid'], 0"lastpost");
        eval(
"\$threadlist .= \"".$templates->get("portal_latestthreads_thread")."\";");
        
$altbg alt_trow();
    }
    if(
$threadlist)
    { 
        
// Show the table only if there are threads
        
eval("\$latestthreads = \"".$templates->get("portal_latestthreads")."\";");
    }

    return 
$latestthreads;
}

?>
Prośby na PW dotyczące wsparcia z problemami będą ignorowane. Pomoc poza forum - odpłatna; kontakt: snakemybboard@gmail.com.



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

1 gości