vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Order by start time and date (https://vborg.vbsupport.ru/showthread.php?t=48971)

remlle 02-16-2003 02:31 AM

Order by start time and date
 
I am totally new to hacking. Infact I have never coded anything and I am not good at all. I would like to sort the threads on my site to be sorted by start date and time. my users are used to this because that is how other boards sort this one does not.
I am used to discusware but this is way better than it. please help me. if you need more info pm me.

amykhar 02-16-2003 02:46 AM

This won't be hard at all.

In newreply.php

Find:

Code:

$DB_site->query("UPDATE forum SET replycount=replycount+1,lastpost='".time()."',lastposter='".addslashes($postusername)."' WHERE forumid IN ($foruminfo[parentlist])");
Replace With:

Code:

$threadstarttime=$DB_site->query_first("SELECT dateline FROM thread WHERE threadid='$threadid'");
$DB_site->query("UPDATE forum SET replycount=replycount+1,lastpost=$threadstarttime,lastposter='".addslashes($postusername)."' WHERE forumid IN ($foruminfo[parentlist])");


amykhar 02-16-2003 02:47 AM

Now, this will mess up the lastpost time that displays on your forum home page. Therefore, I probably wouldn't do it. But, it will ensure that your threads are sorted in chronological order based on the time they were posted.

Amy

remlle 02-16-2003 06:19 PM

ok is there a way to make both work??


All times are GMT. The time now is 10:08 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.00911 seconds
  • Memory Usage 1,710KB
  • 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_code_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