max messages count

Is message board greying out your hair (at least what's left of it)? Let us help you here
icepack
Posts: 70
Joined: Mon Oct 15, 2007 1:38 pm

max messages count

Post by icepack »

Script URL:
Version of script:
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:

Write your message below:

hi there,
i currently have the max number of messages set to 200.
when that limit is reached does the count go to 201, 202. etc, or start again from 1, 2...
also, the newest topic will still be displayed at the top right?
any help appreciated.
Thanks!
icepack
Posts: 70
Joined: Mon Oct 15, 2007 1:38 pm

Post by icepack »

sorry just another relating question.
for example if the limit was reached, and the oldest topic was msg number 1, with a reply being 2. what happens to the reply when a new topic is posted? is the entire topic deleted, i.e. posts 1 and 2 are both lost?
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

After that old posts will be deleted (yes, including replies)
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
len
Posts: 7
Joined: Tue Nov 20, 2007 4:50 pm

Page Breaks

Post by len »

Hi
Is it possible to have page breaks
i.e

| 1 2 3 4 of 4 | Next Page >>

On the Mboard?

Many thanks for any help!
:D
Best Regards
Len
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

No, MBoard doesn't support that.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
len
Posts: 7
Joined: Tue Nov 20, 2007 4:50 pm

Many thanks!

Post by len »

Klemen Stirn wrote:No, MBoard doesn't support that.
Hi
Ok many thanks for your reply
it's much appreciated!!!
:)
Best Regards
Len
icepack
Posts: 70
Joined: Mon Oct 15, 2007 1:38 pm

Post by icepack »

hi again
i was wondering if there's a max count limit on mboard.
i.e. after a certain number of counts, i'll need to reset the count or something, or will it just keep on going up to 10000000, etc
is there a way of recycling the numbers. for exmaple if i get the max msg to 200, is there a way of making the count cycle between 1 and 200, so that what would be msg 201 becomes 1.
thanks
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

No limit regarding how high the ID is.

You can try changing

Code: Select all

$count++;
to something like

Code: Select all

if ($count >= 200) {
	$count = 1;
} else {
	$count++;
}
, but I haven't tested it. The above change needs to be made twice inside mboard.php.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
icepack
Posts: 70
Joined: Mon Oct 15, 2007 1:38 pm

Post by icepack »

hi,
and that would limit the posts between 1 and 200?
so after 200 posts, it just goes back to 1 again?
if so i'll change it on my mboard
will new topics still be displayed at the top?
cheers Klemen!!!
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Haven't tesed it, but yes it should. And everything else remains the same.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
icepack
Posts: 70
Joined: Mon Oct 15, 2007 1:38 pm

Post by icepack »

hi Klemen,
made the change and works great so far, one last thing...

In settings.php, I've set the max msg to 200, so should the above code be

if ($count >= 201) {
$count = 1;
} else {
$count++;
}

to accommodate the additional post. or is the old one deleted before the post made?
thanks!
icepack
Posts: 70
Joined: Mon Oct 15, 2007 1:38 pm

Post by icepack »

hello?
does anyone know? please help!
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Yes, that should do it.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
icepack
Posts: 70
Joined: Mon Oct 15, 2007 1:38 pm

Post by icepack »

hello
after i made this change the old posts are not getting deleted automatically. i have to do it manually via admin.
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Told you I haven't tested anything :wink:

Try removing this code:

Code: Select all

/* Delete old posts */
$count -= $settings['maxposts'];
$newfile="msg/".$count.".".$settings['extension'];
if (file_exists($newfile))
    {
        deleteOld($count,$newfile);
    }
Then in line 340, just below

Code: Select all

function createNewFile($name,$mail,$subject,$comments,$count,$date,$other="",$up="0") {
global $settings;
try adding this:

Code: Select all

$newfile="msg/".$count.".".$settings['extension'];
if (file_exists($newfile))
    {
        deleteOld($count,$newfile);
    }
Again haven't tested this...
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Locked