vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Help with daysprune in forumdisplay.php (https://vborg.vbsupport.ru/showthread.php?t=33653)

bira 12-31-2001 03:12 AM

No Parker, don't do that. Revert back to the original 2,2,0 code and then change ONLY:

Code:

        $checkdate = time() - ($daysprune*86400);
        $datecut='AND lastpost >= '.$checkdate;

With

Code:

[high]    if ($daysprune=='-2') {
        $datecut='AND lastpost >= '.$bbuserinfo[lastvisit];       
    } else {[/high]
        $checkdate = time() - ($daysprune*86400);
        $datecut='AND lastpost >= '.$checkdate;
    [high]}[/high]

Don't touch the rest

Parker Clack 12-31-2001 03:30 AM

Bira:

Ok, that's fixed. I knew there was a right bracket that was extra I just didn't know which one.

Ok in the members.php file I have changed:

if ($bbuserinfo[daysprune]==-1) {
$daysdefaultselected="selected";
} else {
$dname="days".$bbuserinfo[daysprune]."selected";
$$dname="selected";
}

to this:

if ($bbuserinfo[daysprune]==-1) {
$daysdefaultselected="selected";
} elseif ($bbuserinfo[daysprune]==-2){
$dayslastvisitselected="selected";
} else {
$dname="days".$bbuserinfo[daysprune]."selected";
$$dname="selected";
}

and added the -2 to the modifyoptions template so that -2 is placed in the user table.

now in forumdisplay.php you have

if (!isset($daysprune) or $daysprune==0 or $daysprune==-1) {
if ($bbuserinfo['daysprune']>0) {
$daysprune = $bbuserinfo['daysprune'];
} else {
$daysprune = iif($foruminfo['daysprune'], $foruminfo['daysprune'], 30);
}
}

is this where I want to check for the $daysprune==-2 to set this to the member's option they chose?

Parker


All times are GMT. The time now is 06:02 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.01082 seconds
  • Memory Usage 1,713KB
  • 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)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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