1.41 question

General discussion of anything. Discuss a topic in and out of IntegraMOD

Moderator: Integra Moderator

1.41 question

PostAuthor: Dioncecht » Fri Aug 11, 2006 2:27 am

I wasn't real sure where this topic belonged, so I stuck it here. Just as a point of curiosity, I was wondering (hoping) if the Future post bug has been fixed in 1.41? I know you have been busy with all different areas of the new release, but this is my biggest concern because I've had to disable it for everyone because every single future post shows up clear as day in users Digests if they subscribe to that particular topic. Kind of defeats the whole point of future posts.

Just wondering (and hoping)....
Last edited by Dioncecht on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
'We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths.' - Walt Disney

[img=left]http://rpghq.org/banner2.jpg[/img]
[url=http]The RPG Headquarters. The RPG capitol of the net![/url]
User avatar
Dioncecht
Sr Integra Member
Sr Integra Member
 
Posts: 244
Likes: 0 post
Liked in: 0 post
Joined: Sun Apr 09, 2006 4:23 pm
Cash on hand: 0.00

PostAuthor: Unregistered » Fri Aug 11, 2006 2:54 am

141 related question shud be posted here
http://integramod.com/forum/viewtopic.php?t=1691
Last edited by Unregistered on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
J O N H | P L A Y E R

Unregistered
Sr Integra Member
Sr Integra Member
 
Posts: 254
Likes: 0 post
Liked in: 0 post
Joined: Wed Jun 07, 2006 1:51 pm
Cash on hand: 0.00

PostAuthor: Adrian Rea » Fri Aug 11, 2006 2:57 am

I personally was not aware whether it had. Of course you could test the beta yourself and for that you could go to http://integramod.com/forum/viewtopic.php?t=1691 and test it if you can. I suspect it may not have been tested as there would need to be a system fully set up. I will ask around

The place to post the issue if you still find it will be in http://integramod.com/forum/viewforum.php?f=52

A
Last edited by Adrian Rea on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
User avatar
Adrian Rea
Sr Integra Member
Sr Integra Member
 
Posts: 1263
Likes: 0 post
Liked in: 0 post
Joined: Sat Mar 11, 2006 11:59 pm
Cash on hand: 0.00

Re: 1.41 question

PostAuthor: evolver » Sat Aug 12, 2006 2:18 am

I've never seen this problem...
But that's because I haven't realy used the 'delayed topics' option yet...

I have taken a little look at the responsible code...

In mail_digests.php, this is where the data is pulled:
Code: Select all
 $sql = 'SELECT c.cat_order, f.forum_order, f.forum_name, t.topic_views, t.topic_replies, t.topic_title, u.username, p. * , pt. * ' .         ' FROM ' . CATEGORIES_TABLE . ' c, ' .             FORUMS_TABLE . ' f, ' .             TOPICS_TABLE . ' t, ' .             USERS_TABLE . ' u, ' .             POSTS_TABLE . ' p, ' .             POSTS_TEXT_TABLE .  ' pt' .         ' WHERE c.cat_id = f.cat_id            AND f.forum_id = t.forum_id            AND t.topic_id = p.topic_id            AND p.poster_id = u.user_id            AND p.post_id = pt.post_id            AND t.topic_status <> 2 ' .             $filter_users .             $post_time .             $auth_forums . '            AND t.topic_time <= '.time() .       ' ORDER BY c.cat_order, f.forum_order, p.post_time ASC';

The digest is limited for posts till today in the line:
AND t.topic_time <= '.time() .
It's the time() function that catches my eye here...
The time() function will offcourse only read servertime...

My guess is that future posts will only show up in digests when a user is at a different timezone... Right?
So, this might be another timezone problem to fix... <img>
Just a quick guess, I might be wrong...
Last edited by evolver on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
ImageAlways remember you're unique, just like everyone else.
We are born naked, wet and hungry. Then things get worse.
Don't take life too seriously, you won't get out alive.
User avatar
evolver
Sr Integra Member
Sr Integra Member
 
Posts: 420
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 12:46 pm
Cash on hand: 0.00
Location: Oostende

PostAuthor: Adrian Rea » Sat Aug 12, 2006 2:32 am

Interesting thinking, I hope that is the cause of the issue, but I suspect that these posts are more than 24 hours in the future otherwise why would it be a problem?

Thanks for looking into it tho evolver [flash=,:1zfay1yc]http://integramod.com/forum/images/icon/icon14.gif[/flash:1zfay1yc]


A
Last edited by Adrian Rea on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
User avatar
Adrian Rea
Sr Integra Member
Sr Integra Member
 
Posts: 1263
Likes: 0 post
Liked in: 0 post
Joined: Sat Mar 11, 2006 11:59 pm
Cash on hand: 0.00

Re: 1.41 question

PostAuthor: evolver » Sat Aug 12, 2006 3:40 am

Then maybe, it is a problem with the structure it gets from the time() function...
I will try to echo $post_time and time() to compare them.
They should have the same format in order to work...wouldn't you think?...
Last edited by evolver on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
ImageAlways remember you're unique, just like everyone else.
We are born naked, wet and hungry. Then things get worse.
Don't take life too seriously, you won't get out alive.
User avatar
evolver
Sr Integra Member
Sr Integra Member
 
Posts: 420
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 12:46 pm
Cash on hand: 0.00
Location: Oostende

PostAuthor: Dioncecht » Sat Aug 12, 2006 9:52 am

Does that particular time function also look at the date?
Last edited by Dioncecht on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
'We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths.' - Walt Disney

[img=left]http://rpghq.org/banner2.jpg[/img]
[url=http]The RPG Headquarters. The RPG capitol of the net![/url]
User avatar
Dioncecht
Sr Integra Member
Sr Integra Member
 
Posts: 244
Likes: 0 post
Liked in: 0 post
Joined: Sun Apr 09, 2006 4:23 pm
Cash on hand: 0.00

PostAuthor: evolver » Sat Aug 12, 2006 10:09 am

"Dioncecht";p="13570" wrote:Does that particular time function also look at the date?


Yes, I have compared them and it looks similar, there's no format involved...

But the structure of the quiery looks a little strange with the time() function inside...
Last edited by evolver on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
ImageAlways remember you're unique, just like everyone else.
We are born naked, wet and hungry. Then things get worse.
Don't take life too seriously, you won't get out alive.
User avatar
evolver
Sr Integra Member
Sr Integra Member
 
Posts: 420
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 12:46 pm
Cash on hand: 0.00
Location: Oostende

Re: 1.41 question

PostAuthor: evolver » Sat Aug 12, 2006 12:15 pm

OK...

I have changed and tested this, and it seems to work fine on my testsite...
Done the test with a normal message and with a delayed topic (only 2 hours in future)...
only the normal message turned up in digest... :ra: Please confirm if it works for you as well:

In mail_digests.php]FIND[/b]
Code: Select all
 $sql = 'SELECT c.cat_order, f.forum_order, f.forum_name, t.topic_views, t.topic_replies, t.topic_title, u.username, p. * , pt. * ' .         ' FROM ' . CATEGORIES_TABLE . ' c, ' .             FORUMS_TABLE . ' f, ' .             TOPICS_TABLE . ' t, ' .             USERS_TABLE . ' u, ' .             POSTS_TABLE . ' p, ' .             POSTS_TEXT_TABLE .  ' pt' .         ' WHERE c.cat_id = f.cat_id            AND f.forum_id = t.forum_id            AND t.topic_id = p.topic_id            AND p.poster_id = u.user_id            AND p.post_id = pt.post_id            AND t.topic_status &lt;&gt; 2 ' .             $filter_users .             $post_time .             $auth_forums . '            AND t.topic_time &lt;= '.time() .       ' ORDER BY c.cat_order, f.forum_order, p.post_time ASC';

REPLACE WITH
Code: Select all
    // Filter to hide future posts by delayed topics         $topics_till_now = " AND t.topic_time <= " . $current_time;    $sql = 'SELECT c.cat_order, f.forum_order, f.forum_name, t.topic_views, t.topic_replies, t.topic_title, u.username, p. * , pt. * ' .         ' FROM ' . CATEGORIES_TABLE . ' c, ' .             FORUMS_TABLE . ' f, ' .             TOPICS_TABLE . ' t, ' .             USERS_TABLE . ' u, ' .             POSTS_TABLE . ' p, ' .             POSTS_TEXT_TABLE .  ' pt' .         ' WHERE c.cat_id = f.cat_id             AND f.forum_id = t.forum_id             AND t.topic_id = p.topic_id             AND p.poster_id = u.user_id             AND p.post_id = pt.post_id             AND t.topic_status <> 2 ' .             $filter_users .             $post_time .             $auth_forums .             $topics_till_now .        ' ORDER BY c.cat_order, f.forum_order, p.post_time ASC';


The replacement is placed in a code-box here, because the quotes (" ") are still changing to &quote when placed in a PHP-box on this site.
Last edited by evolver on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
ImageAlways remember you're unique, just like everyone else.
We are born naked, wet and hungry. Then things get worse.
Don't take life too seriously, you won't get out alive.
User avatar
evolver
Sr Integra Member
Sr Integra Member
 
Posts: 420
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 12:46 pm
Cash on hand: 0.00
Location: Oostende

PostAuthor: Dioncecht » Tue Aug 15, 2006 2:26 am

Thanks Evolver.. I am testing now, I'll let you know when my next digest hits
Last edited by Dioncecht on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
'We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths.' - Walt Disney

[img=left]http://rpghq.org/banner2.jpg[/img]
[url=http]The RPG Headquarters. The RPG capitol of the net![/url]
User avatar
Dioncecht
Sr Integra Member
Sr Integra Member
 
Posts: 244
Likes: 0 post
Liked in: 0 post
Joined: Sun Apr 09, 2006 4:23 pm
Cash on hand: 0.00

PostAuthor: Dioncecht » Wed Aug 16, 2006 4:15 am

Looks like that was the ticket! Thank you sir!
Last edited by Dioncecht on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
'We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths.' - Walt Disney

[img=left]http://rpghq.org/banner2.jpg[/img]
[url=http]The RPG Headquarters. The RPG capitol of the net![/url]
User avatar
Dioncecht
Sr Integra Member
Sr Integra Member
 
Posts: 244
Likes: 0 post
Liked in: 0 post
Joined: Sun Apr 09, 2006 4:23 pm
Cash on hand: 0.00


Return to General Discussion

Who is online

Registered users: Google [Bot], Helter, Vendethiel