vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   stop threads bumping in certain forum (https://vborg.vbsupport.ru/showthread.php?t=37200)

DPerley 04-11-2002 07:47 PM

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

Logician 04-12-2002 07:46 PM

Quote:

Originally posted by Bald Bouncer
all sounds nice but whats the sql_field_name_for_date?
"dateline" it is..

Bald Bouncer 04-13-2002 12:17 PM

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 


Logician 04-14-2002 02:07 PM

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..

Bald Bouncer 04-14-2002 04:58 PM

that did it fantastic job Logician thanks!

Pinocchi 04-16-2002 06:20 PM

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

Logician 04-16-2002 07:00 PM

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


All times are GMT. The time now is 01:42 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.01117 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
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete