форум vBSupport.ru > vBulletin > vBulletin 4.0.x-4.1.х > Вопросы по vBulletin 4.0.x-4.1.х
  • »
VBsupport перешел с домена .ORG на родной .RU Ура! Пожалуйста, обновите свои закладки - VBsupport.ru
 
 
 
 
Alekzzzander
Простоузер
Default Вывод сообщений из раздела на главную
0

Ищу скриптик следующего свойства:
1. Выдирает заголовок темы
2. Выдирает автора, время публикации первого сообщения
3. Выдирает самое первое сообщения (с bb кодами)

Чтобы его потом его можно было заинклудить на основном сайте, без проблем с изменением дизайна.

Возможно есть такое решение?
Bot
Yandex Bot Yandex Bot is online now
 
Join Date: 05.05.2005
Реклама на форуме А что у нас тут интересного? =)
 
 
kerk
k0t
 
kerk's Avatar
Default
0

Quote:
Originally Posted by Alekzzzander View Post
Возможно есть такое решение?
да
PHP Code:
$threadid 123;
$threadinfo $db->query_first("
     SELECT thread.*, post.*
     FROM " 
TABLE_PREFIX "thread AS thread
     LEFT JOIN " 
TABLE_PREFIX "post AS post ON(post.threadid = thread.threadid)
     WHERE thread.threadid = 
$threadid
"
);

print_r($threadinfo); 
или еще проще

PHP Code:
$threadid 123;
$threadinfo fetch_threadinfo($threadid);
$postinfo fetch_postinfo($threadinfo['firstpostid']);
$info array_merge($threadinfo$postinfo);
print_r($info); 
в обоих случаях получаем массив данных темы + поста
делай с ними что хошь
 


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 10:49 PM.


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