vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   last posts in main page in website (https://vborg.vbsupport.ru/showthread.php?t=79972)

q8manar 04-15-2005 07:40 PM

last posts in main page in website
 
Hello

I found some webpages have a last posts on there main pages in web site
these last posts are in tables format

I don't want moving last posts

I need as a pages than I can put them in my main page

is this hack or scripts

Please any body advise me >

q8manar 04-17-2005 06:16 PM

Where is every body
where are the profechonals

I'm sure this is eassy but I couldn't find out it .

Please any body

sabret00the 04-17-2005 06:34 PM

what'a an example of hwat you're talking about?

Trigunflame 04-17-2005 06:44 PM

Quote:

Originally Posted by q8manar
Where is every body
where are the profechonals

I'm sure this is eassy but I couldn't find out it .

Please any body

1. In your php_include template, put

$lastPost = $DB_site->query_first('SELECT * FROM post ORDER BY postid DESC LIMIT 1');

2. wherever you want this stuff to show up, u can use it like

$lastPost[postid]
$lastPost[threadid]
$lastPost[username]
$lastPost[userid]
$lastPost[dateline]
$lastPost[pagetext]

etc..

Enjoy

sabret00the 04-17-2005 06:50 PM

PHP Code:

$lastPost $DB_site->query_first('SELECT * FROM post ORDER BY postid DESC LIMIT 1'); 

should be
PHP Code:

$lastPost $DB_site->query_first("SELECT * FROM " TABLE_PREFIX "post ORDER BY postid DESC LIMIT 1"); 


Trigunflame 04-17-2005 07:36 PM

Quote:

Originally Posted by sabret00the
PHP Code:

$lastPost $DB_site->query_first('SELECT * FROM post ORDER BY postid DESC LIMIT 1'); 

should be
PHP Code:

$lastPost $DB_site->query_first("SELECT * FROM " TABLE_PREFIX "post ORDER BY postid DESC LIMIT 1"); 


oopsie, i always forget that :'(


All times are GMT. The time now is 12:27 PM.

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.00991 seconds
  • Memory Usage 1,730KB
  • 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
  • (4)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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