Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)

Reply
 
Thread Tools Display Modes
  #1  
Old 08-03-2004, 08:12 AM
ralphuk100 ralphuk100 is offline
 
Join Date: Jul 2004
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default sort threads by dateline for certain forums..

How do I sort threads by dateline descending for individual forums? Thanks.
Reply With Quote
  #2  
Old 08-03-2004, 11:54 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This might help you:
https://vborg.vbsupport.ru/showpost....2&postcount=38
Reply With Quote
  #3  
Old 08-03-2004, 12:41 PM
ralphuk100 ralphuk100 is offline
 
Join Date: Jul 2004
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by KirbyDE
Thanks! That looks spot on...the only thing I am unsure about is part 1 - where do I add the code for the dropdown list? what page? Where...can I add a new option on the ACP?
Reply With Quote
  #4  
Old 08-03-2004, 12:53 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You have to turn on debug mode:

Place $debug = 1; in config.php.

Then go to ACP / vBulletin Options / vBulletin Options / Forum Display Options (forumdisplay) and click Add Setting
Reply With Quote
  #5  
Old 08-03-2004, 02:52 PM
ralphuk100 ralphuk100 is offline
 
Join Date: Jul 2004
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks - will install this hack now
Reply With Quote
  #6  
Old 08-03-2004, 03:11 PM
ralphuk100 ralphuk100 is offline
 
Join Date: Jul 2004
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Im about half way into this hack....can it not be applied to individual forums? Thats really what I need...to be able to have the news forum sorted by created date and all others sorted by last post.
Reply With Quote
  #7  
Old 08-03-2004, 03:16 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, it can be defined on a per-forum basis.
Reply With Quote
  #8  
Old 08-03-2004, 03:32 PM
ralphuk100 ralphuk100 is offline
 
Join Date: Jul 2004
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I completed your hack fine, all instructions followed precisely and now I get this error when I try to view a forum:

Database error in vBulletin 3.0.3:

Invalid SQL:
SELECT threadid
FROM thread AS thread

WHERE forumid = 27
AND sticky = 0
AND visible = 1




ORDER BY sticky DESC, DESC
LIMIT 0, 50

mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DESC
LIMIT 0, 50' at line 11

mysql error number: 1064

Any ideas?
Reply With Quote
  #9  
Old 08-03-2004, 03:42 PM
ralphuk100 ralphuk100 is offline
 
Join Date: Jul 2004
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

UPDATE: The hack works fine but not by setting an option in forumdisplay. This gets errors (thought that was for global changes). If I define a sort order in the individual forum that forum is then ok. Any ideas?

Also - what var do I need to change to have dateline displayed in the last post column on a forum? Thanks.

UPDATE 2: Although updating an individual forums default sort stops errors it does not seem to obey the sort.....url to forums is www.southportforums.com/forumsvb3/ - have a look at news spot...should be sorted by article last post at the moment...obviously is not
Reply With Quote
  #10  
Old 08-03-2004, 04:15 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I guess there is a small mistake in the instructions
The default value in the database should be 0 instead of -1

[sql]ALTER TABLE forum CHANGE defsortfield defsortfield TINYINT( 1 ) DEFAULT 0 NOT NULL [/sql]
[sql]UPDATE forum SET defsortfield=0 WHERE defsortfield=-1[/sql]

Then edit any forum to rebuild the cache.
This should stop the SQL errors.
Reply With Quote
Reply

Thread Tools
Display Modes

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

Forum Jump


All times are GMT. The time now is 05:59 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.04084 seconds
  • Memory Usage 2,241KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete