vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Recent posts with attachment thumbnails (https://vborg.vbsupport.ru/showthread.php?t=320722)

praveen1980 11-06-2015 07:54 AM

Recent posts with attachment thumbnails
 
Hi,
I am trying to show the recent posts from a specific forum.
All posts in this forum have pictures as attachments.
How do i show them on a custom page or on the sidebar?
I am trying to show them as
<img thumbnail> Title
<img thumbnail> Title
<img thumbnail> Title
<img thumbnail> Title

I managed to get the recent posts using the below code, but i do not know how to modify this to include the thumbs too.

Can you please help?

PHP Code:

$latest_threads_god $vbulletin->db->query_read("SELECT threadid, title, dateline FROM " TABLE_PREFIX "thread WHERE title not like 'Article:%' AND visible='1' AND forumid='97' ORDER BY dateline DESC LIMIT 10");  
$msltg ""
while(
$thread $vbulletin->db->fetch_array($latest_threads_god)){  

    
$replacer "...";  
    if(
strlen($thread[title]) > 45){  
         
$thread[title] = substr($thread[title], 044).$replacer
    } 
$msltg .="<li><a href=\"showthread.php?t=".$thread[threadid]."\">".$thread[title]."</a></li>"
vB_Template::preRegister('navbar',array('msltg' => $msltg)); 



praveen1980 11-16-2015 12:58 PM

Bump...


All times are GMT. The time now is 03:10 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01798 seconds
  • Memory Usage 1,719KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete