vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Plz help (https://vborg.vbsupport.ru/showthread.php?t=51760)

Carnage540 04-18-2003 04:46 AM

Plz help
 
Hello guy..i want to include a latest forum post thing on my main page of my website. is there a hack or a way to do it. thanks.

it would look like this

Latest forum post
>> Hey guys
>> Welcome to the forum
>> Another forum post

and if it could limit character so if the subject is long it goes:

>> Hey guy wh...

etc.

Thanks!!

mr e 04-18-2003 08:45 AM

PHP Code:

$posttext $DB_site->query_first('SELECT text FROM post ORDER BY dateline');

if (
strlen($posttext) > NUMBER) {
  
$posttext substr($posttext, -3);
  
$posttext .= '...';


sorry, it's late so this is a general idea of what to do :)

Carnage540 04-19-2003 07:03 AM

I don't get it. is there any site i can just download a .php file to include. or a code...i don't think that works on the main page.

I want to do it like your site ( i think it your site)


http://www.sitetutor.net/

The " Latest Threads " on the right...

mr e 04-19-2003 07:51 AM

i help out the guy who owns it, but is this more what your looking for? just put this inside any php file where you want the text to go

PHP Code:

$getthreads $DB_site->query('SELECT threadid, title, lastposter, lastpost FROM thread ORDER BY dateline DESC LIMIT 10');
print 
'<table>';

while(
$threads $DB_site->fetch_array($getthreads)) {
     print 
'<tr><td><a href="FORUMURL/showthread.php?s='.$session['sessionhash'].'&goto=newpost&threadid='.$threads['threadid'].'">'.$threads['title'].'</a><br />';
     print 
'Last Post by: '.$threads['lastposter'].'<br />';
     print 
'Posted on: '.vbdate($dateformat$threads['lastpost']).'</td></tr>';
}
print 
'</table>'



All times are GMT. The time now is 01:41 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.01014 seconds
  • Memory Usage 1,722KB
  • 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
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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