форум vBSupport.ru > Форумные движки и CMS (Порталы) > CMS (Portals) > WordPress
  • »
VBsupport перешел с домена .ORG на родной .RU Ура! Пожалуйста, обновите свои закладки - VBsupport.ru
 
 
 
 
arafat
Простоузер
Default last posts в шаблон wordpress
0

Сайт на вордпресе. форум отдельно без интеграции. Как сделать, чтобы послдение топики из определенных разделов отображались в ВП?
Bot
Yandex Bot Yandex Bot is online now
 
Join Date: 05.05.2005
Реклама на форуме А что у нас тут интересного? =)
 
 
Kristof
Эксперт
 
Kristof's Avatar
Default
0

Оффтоп
 
 
Fedcomp
На доске почёта
клон maJic
 
banned nax
Default
0

Есть тут такая тема, lastxpost
PHP Code:
<?php
$result 
$vbulletin->db->query_read("
                           SELECT threadid, lastposter, title, T.lastpost as lastpostdate, replycount, U.userid as userid
                           FROM "
$pref ."thread T
                           LEFT JOIN "
$pref ."user U ON (T.lastposter = U.username)
                           WHERE T.forumid not in (4,5,34,151)
                           ORDER BY T.lastpost DESC
                           LIMIT 5"
);
while (
$row $db->fetch_array($result))
{
   print 
'тема:&nbsp;<a style="text-decoration:none;" href="'.$forumdir.'/showthread.php?goto=newpost&t='.$row['threadid'].'">
   '
.$row['title'].'</a>&nbsp;<strong>['.$row['replycount'].']</strong>';
      if (
$row['userid'])
      {
          print 
'<br>автор:&nbsp;<a style="text-decoration:none;" href="'.$forumdir.'/member.php?action=getinfo&userid='.$row['userid'].'">
          '
.$row['lastposter'].'</a>';
      }
      else
      {
          print 
'<br>автор:&nbsp;'.$row['lastposter'];
      }
   print 
'<br>дата:&nbsp;'.date("d.m.y, H:i",$row['lastpostdate']).'<br />';
}
?>
Вот код, выводит 5 последних сообщения, с ВП знаком не очень, но можно попытаться вставить, там-же есть пример для создания модуля на основе Hello Dolly
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT +4. The time now is 11:27 AM.


Powered by vBulletin® Version 3.5.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Loading...