Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 04-11-2002, 07:47 PM
DPerley DPerley is offline
 
Join Date: Apr 2002
Location: Kelowna, B.C.
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nakkid

If the ? was to me about version I assume you mean version of vb - which for me is 2.2.4. As for the reference to user group/mods I would only use this hack in an advertising forum for regular registered users. Otherwise I'm not sure what you were referring to.

DPerley
Reply With Quote
  #12  
Old 04-12-2002, 07:46 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Bald Bouncer
all sounds nice but whats the sql_field_name_for_date?
"dateline" it is..
Reply With Quote
  #13  
Old 04-13-2002, 12:17 PM
Bald Bouncer's Avatar
Bald Bouncer Bald Bouncer is offline
 
Join Date: Oct 2001
Location: UK
Posts: 228
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

not working mate, tried the below too and it still aint having it

PHP Code:
//stop bumping in release forum
if ($forumid=101) {
  
$sortfield "$thread[dateline]";
}
//stop bumping in release forum 
Reply With Quote
  #14  
Old 04-14-2002, 02:07 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here you go:

1-Edit forumdisplay.php, find:
-- cut --
switch ($sortfield) {
case 'title':
case 'lastpost':
case 'replycount':
case 'views':
case 'postusername':
case 'voteavg':
break;

default:
$sortfield='lastpost';
}
-- cut --

2- After that add:
-- cut --
$sortfield = "dateline";
-- cut --

This will sort all threads in all forums according to the first message date and user's sort field choice is cancelled.

if you want this feature for a specific forum (eg #4), use this instead:
-- cut --
if ($forumid == 4) {$sortfield = "dateline";}
-- cut --

For 4 and 5 and 6 use this:
-- cut ---
if (($forumid == 4) OR ($forumid == 5) OR ($forumid == 6)) {$sortfield = "dateline";}
-- cut --

This is tested and working..

Enjoy..
Reply With Quote
  #15  
Old 04-14-2002, 04:58 PM
Bald Bouncer's Avatar
Bald Bouncer Bald Bouncer is offline
 
Join Date: Oct 2001
Location: UK
Posts: 228
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

that did it fantastic job Logician thanks!
Reply With Quote
  #16  
Old 04-16-2002, 06:20 PM
Pinocchi Pinocchi is offline
 
Join Date: Apr 2002
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well this option sure works, but you would have to edit the file over and over again every time you add another forum you want to be listed that way.

I added some extra rows in a table, added some extra lines into several files and now I can set the order to every forum in the admin script. The only thing I'm still looking at is the query to select all columns in a table. Like that you wouldn't have to manually type the column (and need to know it) but could just select the one you want it to be ordered by.

If somebody would be interested, let me know I've got to figure out again what I did exactly but I'm willing to give it another try.

Thanks,

Erik

------
You can test it out in a few days at the new forum: NewHostingTalk
Reply With Quote
  #17  
Old 04-16-2002, 07:00 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Pinocchi
only thing I'm still looking at is the query to select all columns in a table. Like that you wouldn't have to manually type the column (and need to know it) but could just select the one you want it to be ordered by.
Here you go:

-- cut ---
$mylink = mysql_connect('localhost', 'myname', 'secret');
$tablefields = mysql_list_fields("databasename", "tablename", $mylink);
$columncount = mysql_num_fields($tablefields);
for ($i = 0; $i < $columncount; $i++)
{
echo mysql_field_name($tablefields, $i) . " - ";
}
-- cut ---

Regards,
Logician
Reply With Quote
Reply


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 10:11 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.04220 seconds
  • Memory Usage 2,226KB
  • Queries Executed 11 (?)
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_php
  • (2)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
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)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_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