Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Time in Recent Post Widget
Avatar
Hari
Member
Free Members
sp_UserOfflineSmall Offline
Jan 9, 2016 - 5:27 am

MrPapa, thanks for the answer.

There are different issues here. I try to structure my post into 4 sections, to prevent mixing different issues:

(1) "Item" vs topic or post

I used the undefinded phrase "Item", because that is what you yourself use in the comment section of the sp-recentposts-tag.php, to explain what the count is supposed to do:

limit: How many items to show in the list number

I was not able to find a concret reference, whether "items" are "topics" or "posts" and that was part of my question. Maybe you should change that comment/explanation, to be more precise.

(2) Conclusion from your information

From your answer I understand, that "items" means posts. Meaning in a concrete example:

Assuming I have set the limit to "20" and the last 20 posts in the forum, spread over 8 topics only , then the Recent Post Widget will only show 8 entries in the sidebar.

Is this a correct conclusion?

(3) "Bug" with the change proposed from Yellow Swordfish?

Yellow Swordfish was so nice above, to provide code to add a timestamp to the date in the recent post widget.

This is *very* important in my setup, many user were complaining, because navigation of the latest posts in my setup is in most cases done via this sidebar. Without the timestamp, you never know, whether the same author posted another post in a given topic - or not. As I said, many were complaining, I could send you a long list in german. 😉

With the change from Yellow Swordfish, that I incorporated into sp-recentposts-tag.php, everything seemed to work fine at the first glance.

But....

Now I always have *only* 17 entries in the sidebar. And that independent of whether I put 30, 50 or even 100 in the limit.

I added a picture of the widget settings as an attachement, with "100" as limit. Still I only get "17" topics displayed.

And no, please believe me, there are much more topics than 17 as part of the last 100 posts. I checked that. Something is going wrong with the change I did as proposed by Yellow Swordfish.

(4) Request to add the "time" as option into the core

Yellow Swordfish made clear above, that there is no way to automate the changes made and preventing me from doing this change over and over again with every update. Reason seems to be, that the core is involved here.

On the other hand, to me it is an important feature and it seems, as if it is not much work to include the "time" as an option into the widget.

Therefore I hereby respectfully request to add the "time" as an display option to the widget in the core.

Thanks! Hari

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jan 9, 2016 - 5:48 pm

# 2 yes, that is the correct conclusion...

# 3 I see now way for Andy's change to have affected the number of recent posts shown - it does not affect a count, it simply adds more time to display to the existing entries...  Are you saying you have confirmed if you remove Andy's change that you get a different count of entries???

@yellow-swordfish  any chance topic cache (ie https://simple-press.com/suppo.....3/#p158376) could be involved here?

Avatar
Hari
Member
Free Members
sp_UserOfflineSmall Offline
Jan 10, 2016 - 11:04 am

Mr Papa,

First: you are right, the problem has nothing to do with the added line for "time" as proposed by Andy. As a test, I reversed to the orginal version and that had no effect on above behaviour. Obviously it got my attention first after the change, but had nothing to do with it.

Second: But the strange behaviour persists. As of now, I have 19 entries, even after I changed the limit to 1.000 (thousand) posts as a test. You can be sure, I have far more than 19 topics in the forum, even within the last week.

But independend of what I put into the limit, the number of topics shown in the sidebar stays the same, no difference between a limit of 40 and a limit of 1.000

Also I should note, that the timespan that is shown, is always 2 full days plus a few hours. Today is sunday evening here, so shown topics go back to midth of friday as of now, but not beyond, even not with a "thousand" as limit.

Question: So obviously, there must be "something" restricting the number of topics shown. The behaviour looks like a time-limit, with for example, posts beyond 52 hours not displayes any more.

But you said, there is no such thing as a time limit in the plugin. But "something" must be there, otherwise, with a limit of 1.000, I should get hundreds of topics, but not just 19 as of now.

What can that be? And how do I remove this limit?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 10, 2016 - 11:10 am

It would be a staggering coincidence but might you have the same issue as this user:

https://simple-press.com/suppo.....3/#p158376

andy-signature.png
YELLOW
SWORDFISH
Avatar
Hari
Member
Free Members
sp_UserOfflineSmall Offline
Jan 10, 2016 - 11:21 am

Thanks. I was already aware of this thread when searching for a possible cause, but never really understood what the user meant with "not showing on my homepage".

To clarify, I have no odd behaviour on new posts in the forum. They show up, they count, everything seems fine as far as I recognize things, just the recent post plugin stops to display them after 2 days plus some hours.

But just to be sure, I as of this moment checked via PHPMyAdmin the database table you mentioned in that thread.

I can only see one instance of meta-type = topic_cache.

So it seems, as if this is something different. I am open to all suggestions. Maybe you could test the scenario on your forum. If you put a large number in the limit, what happens? Does the plugin show topics that are a week old too?

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jan 10, 2016 - 12:38 pm

yes it does...  simple to change ours to say 100 instead of  5 (in our footer) and it goes as far back as needed...

and the db query for this post list (based on list topic class) has no way to limit the date in anyway...  you can limit it by forum, topic or limit (count) but not date... it will get as many entries as it can...

I guess we would have to do some debugging to see what is going on...  but that would likely require ftp access (as well as sp admin access to site) so we could add the debug code...

Avatar
Hari
Member
Free Members
sp_UserOfflineSmall Offline
Jan 10, 2016 - 1:55 pm

I see, thanks for your offer. I might come back to this in 1-2 weeks, if I cant nail down the problem by myself.

Having a third person outside my sphere, acting uncontrolled with admin access during Live-Hours in the background, makes me a bit nervous. Don´t take this as personal misstrust, there is none. I would have that reaction, even if Tim Cook himself would offer to debug my code - maybe even more with him, than with you - lol.

Call it technical paranoia resulting from 30 years experience with murphys law. 😉

So I will try to do some additional tests and checks by myself, but might come back to your nice offer as a last resort later.

Thanks again, Hari

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jan 10, 2016 - 3:05 pm

nope. no issue... understand fully...

first thing I would do is get a look at the query... then the results...

you could add a filter on sph_topic_list_query to see what db query is (or just dump it out in sp-list-topic-class.php...

then look at the $records that gets returned from the $spdb->select() query in that class...

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 10, 2016 - 3:41 pm

You can review the sql being used and the data being returned by the query using the data inspector in our toolbox. The widget uses the Topic List View to query and populate the data object.

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626