New post count on index

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
updown
Registered User
Posts: 542
Joined: Sat Jan 05, 2008 6:53 am

Re: New post count on index

Post by updown » Thu Jul 17, 2008 11:34 pm

Fisch.666 wrote:Mhhh, ok. Are there any other alternatives for this?
I see only one alternative: Just leave it as it is! :roll:

Hey, come on, where's the need to tell the user about how many new posts there are? He's just one click away from finding out...

And by the way, there are still other good statistic-mods out there, e.g. telling the number of posts in the last 24 hours or showing the latest posts - they are all doing a good job to tell a user what has happend while he's beeing away - more practically and with much less need of ressources...!

Fisch.666
Registered User
Posts: 219
Joined: Sat Jul 30, 2005 10:58 am

Re: New post count on index

Post by Fisch.666 » Fri Jul 18, 2008 6:04 am

Hi!

That was an request from my users... ;) :D

RoutersTR
Registered User
Posts: 19
Joined: Mon Dec 24, 2007 11:02 am

Re: New post count on index

Post by RoutersTR » Thu Aug 28, 2008 9:07 pm

this mod wrong..

because ;

Code: Select all

      WHERE post_time > ' . $user->data['user_lastvisit'] . '
    AND poster_id != ' . $user->data['user_id'];
this all topic see..

but not auth topic exclude ?

jagjag
Registered User
Posts: 10
Joined: Sun Aug 03, 2008 4:34 am

Re: New post count on index

Post by jagjag » Fri Sep 12, 2008 6:36 am

updown wrote:...Besides the existing problems: Has anybody thought about not counting posts from forums where the user has no access to? :roll:

To do it right, you would need half the code from search.php to check if the user has the proper rights to read the posts. That's exactly what searching for New Posts does, when the total number of New Posts is shown at the end of the query. That means in the end, on every time you load the index-page (in prosilver, in subsilver every page!), you practically have to run the search for counting New Posts the same time instantly. That's insane, folks! :o
I don't know about the resources consumed by the code, but I do know that the source code consumes an inordinate amount of my resources, when I struggle to work with it. Yes, to do it right, you have to run half the code from search.php. That in itself would not be a problem if only the code was written better. 1000+ lines of spaghetti code, without a single function! It would be a lot easier to modify this software if it was more modular, so that you could combine several functions to create a new utility. As it is, it's a mess.

Now wouldn't it be nice if there was a function "countnewposts()" in search.php that contained all of the code needed to count, exclude etc. and return the no. of new posts? Then all you'd have to do is make a single function call to get the number.

Danaldinho
Registered User
Posts: 675
Joined: Sat Aug 11, 2007 8:43 pm

Re: New post count on index

Post by Danaldinho » Sun Sep 28, 2008 10:05 am

I installed this MOD, but it shows 5 posts which are new in brackets, then I click on the link and there is only 4 posts there and it won't dissappear once they are read

Anyasha
Registered User
Posts: 704
Joined: Mon Aug 07, 2006 4:02 am
Name: Anyasha

Re: New post count on index

Post by Anyasha » Sun Oct 05, 2008 7:09 am

^ I am having the same problem.
Kiss me, I'm Polish!

mils
Registered User
Posts: 5
Joined: Sun Nov 02, 2008 1:44 am

Re: New post count on index

Post by mils » Sun Nov 02, 2008 1:50 am

Hi I installed this mod, but it didn't do anything.

The bit i don't get is the instructions say to create a Post count entry field in the index.php

but what gets told to use that entry?

Is the latest download missing something? or the instructions borked?

Richazey
Registered User
Posts: 823
Joined: Mon Oct 27, 2008 9:03 pm

Re: New post count on index

Post by Richazey » Wed Nov 05, 2008 10:03 pm

Hi installed the mod but nothing shows on my index page heres the code ive entered if you tell where ive gone wrong:

Code: Select all

$sql = 'SELECT COUNT(post_id) as count
    FROM ' . POSTS_TABLE . ' 
		WHERE post_time > ' . $user->data['user_lastvisit'] . '
    AND poster_id != ' . $user->data['user_id'];

$result = $db->sql_query($sql);
$post_count = $db->sql_fetchfield('count', false, $result);
$db->sql_freeresult($result);

			
// Assign index specific vars
$template->assign_vars(array(
and

Code: Select all

'BIRTHDAY_LIST'	=> $birthday_list,
  'NEW_POST_COUNT' => $post_count ,

User avatar
Lisbon
Registered User
Posts: 825
Joined: Wed Jan 30, 2008 12:28 pm
Location: Zermatt

Re: New post count on index

Post by Lisbon » Thu Nov 06, 2008 9:52 am

Instructions for Subsilver2. please.

Tks

User avatar
DeathValley
Registered User
Posts: 16
Joined: Mon Aug 04, 2008 8:23 pm
Location: Pais de Llavallol

Re: New post count on index

Post by DeathValley » Wed Dec 03, 2008 10:23 am

Thanks!

User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: New post count on index

Post by RMcGirr83 » Wed Dec 03, 2008 11:24 am

Danaldinho wrote:I installed this MOD, but it shows 5 posts which are new in brackets, then I click on the link and there is only 4 posts there and it won't dissappear once they are read
That's because the code uses your last visit date in the sql. The last visit date isn't updated until you leave the forum and your cookie expires per the ACP time (eg 3600 or one hour).
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

sard
Registered User
Posts: 10
Joined: Fri Nov 28, 2008 2:28 am

Re: New post count on index

Post by sard » Tue Dec 16, 2008 9:11 am

I will apreciate Instructions for subsilver based themes :) .

User avatar
Velnias
Registered User
Posts: 37
Joined: Fri Jan 25, 2008 8:13 am
Location: Lithuania
Contact:

Re: New post count on index

Post by Velnias » Wed Dec 17, 2008 6:58 am

Is it validated for 3.0.4 version?
Pagarbiai/Regards,
Velnias

User avatar
potku
Registered User
Posts: 850
Joined: Wed Dec 22, 2004 10:26 pm
Location: Tampere, Finland
Contact:

Re: New post count on index

Post by potku » Sun Dec 21, 2008 12:54 am

We're running 3.0.4, and this MOD is working well.

Now, some people have complained about this MOD eating up resources. Theoretically, at least, that would definitely seem so. We have had this for just an hour or two, and it's nighttime now, so I cannot say anything about that - except MySQL seems to be working a lot harder than usually.

My question is this: Could someone with a big board (+500 posts a day) state some actual numbers regarding this MOD? I am interested to know how hungry this MOD really is.

Otherwise, kewl MOD! 8-)
Potku.net

"Before I speak, I have something important to say."

- Groucho Marx

User avatar
DragonMaster1
Registered User
Posts: 994
Joined: Tue Aug 17, 2004 11:04 am
Name: Terry
Contact:

Re: New post count on index

Post by DragonMaster1 » Thu Dec 25, 2008 3:41 am

sard wrote:I will apreciate Instructions for subsilver based themes :) .

BUMP?

Locked

Return to “[3.0.x] MOD Database Releases”