Advertisement:

Author Topic: Recent Forum Topics on Boardindex  (Read 56595 times)

Offline Pipke

  • Full Member
  • ***
  • Posts: 478
    • [NRNS]
Re: Recent Forum Topics on Boardindex
« Reply #140 on: May 14, 2018, 08:19:33 AM »
iam this error

https://.../index.php?action=forum;start=%1
2: A non-numeric value encountered
D:/.../Sources/RecentForumTopics.php
Line: 170
Code: [Select]
167: $query_this_board = '{query_wanna_see_board}' . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? '
168: AND b.id_board != {int:recycle_board}' : ''). '
169: AND m.id_msg >= {int:max_id_msg}';
==>170: $query_parameters['max_id_msg'] = max(0, $modSettings['maxMsgID'] - 100 - $_REQUEST['start'] * 6);
171: $query_parameters['recycle_board'] = $modSettings['recycle_board'];
172:
173: $context['page_index'] = constructPageIndex($scripturl . '?action=forum', $_REQUEST['start'], min(100, $modSettings['totalTopics']), $rft_per_page, false);
174: }

How to fix it.


SMF 2.0.15 , PHP 7.1.15

It seems that in PHP 7.1, a Warning will be emitted if a non-numeric value is encountered.

Here is the relevant portion that pertains to the Warning notice you are getting:

New E_WARNING and E_NOTICE errors have been introduced when invalid strings are coerced using operators expecting numbers or their assignment equivalents. An E_NOTICE is emitted when the string begins with a numeric value but contains trailing non-numeric characters, and an E_WARNING is emitted when the string does not contain a numeric value.

working on it later, should be easy to fix.

Offline Pipke

  • Full Member
  • ***
  • Posts: 478
    • [NRNS]
Re: Recent Forum Topics on Boardindex
« Reply #141 on: May 14, 2018, 04:23:24 PM »
@minimono, how did you get to this url -> https://.../index.php?action=forum;start=%1
because the % character shouldn't be there and thats why you are getting the error, whats your forum url?

Offline minimono

  • Semi-Newbie
  • *
  • Posts: 32
Re: Recent Forum Topics on Boardindex
« Reply #142 on: May 15, 2018, 01:14:42 AM »
บุคคลทั่วไป
 
2: A non-numeric value encountered
D:/.../Sources/RecentForumTopics.php
บรรทัด: 170


SMF 2.0.15 , PHP 7.1.15 on Windows host
« Last Edit: May 16, 2018, 03:07:37 AM by br360 »
SMF 2.0.15 | PHP 7.X | MySql 5.6 | Softer theme | SMFAds

Offline Pipke

  • Full Member
  • ***
  • Posts: 478
    • [NRNS]
Re: Recent Forum Topics on Boardindex
« Reply #143 on: May 15, 2018, 04:06:25 PM »
บุคคลทั่วไป
 

2: A non-numeric value encountered
D:/.../Sources/RecentForumTopics.php
บรรทัด: 170


SMF 2.0.15 , PHP 7.1.15 on Windows host

Here's the fix for now:

in Sources/RecentForumTopics.php

Find around line 30
Code: (find) [Select]
if (isset($_REQUEST['start']) && $_REQUEST['start'] > 95)
$_REQUEST['start'] = 95;

Add this code after it:
Code: (add after) [Select]
// Make sure start are numbers.
if (isset($_REQUEST['start']))
{
// Make sure its a string and not something else like an array
$_REQUEST['start'] = (string) $_REQUEST['start'];

// If there's a slash in it, we've got a start value! (old, compatible links.)
if (strpos($_REQUEST['start'], '/') !== false)
list ($_REQUEST['start'], $_REQUEST['start']) = explode('/', $_REQUEST['start']);

// Now make absolutely sure it's a number.
$_REQUEST['start'] = isset($_REQUEST['start']) ? (int) $_REQUEST['start'] : 0;
}
// Well, start is going to be a number no matter what.
else
$_REQUEST['start'] = 0;
« Last Edit: May 16, 2018, 03:08:07 AM by br360 »

Offline minimono

  • Semi-Newbie
  • *
  • Posts: 32
Re: Recent Forum Topics on Boardindex
« Reply #144 on: May 22, 2018, 05:07:08 AM »
Past 7 days for fix A non-numeric value encountered is Ok. ;D

Today new Error Log.
Code: [Select]

IP address 144.48xxx.   
https://xxx.com/index.php?m=member&c=index&a=register&siteid=1
The database value you're trying to insert does not exist: category_list
Function: rft_mainbasic
file : D:/Inetpub/vhosts/xxx.com/httpdocs/Sources/RecentForumTopics.php
Line: 85

IP address 144.48xxx.   
https://xxx.com/index.php?m=member&c=index&a=register&siteid=1
2: Invalid argument supplied for foreach()
file : D:/Inetpub/vhosts/xxx.com/httpdocs/Sources/RecentForumTopics.php
Line: 53

IP address 144.48xxx.   
https://xxx.com/index.php?m=member&c=index&a=register&siteid=1
2: explode() expects parameter 2 to be string, array given
file : D:/Inetpub/vhosts/xxx.com/httpdocs/Sources/RecentForumTopics.php
Line: 52

IP address 144.48xxx.   
https://xxx.com/index.php?m=member&c=index&a=register&siteid=1
The database value you're trying to insert does not exist: category_list
Function: rft_mainbasic
file : D:/Inetpub/vhosts/xxx.com/httpdocs/Sources/RecentForumTopics.php
Line: 85

IP address 144.48xxx.   
https://xxx.com/index.php?m=member&c=index&a=register&siteid=1
2: Invalid argument supplied for foreach()
file : D:/Inetpub/vhosts/xxx.com/httpdocs/Sources/RecentForumTopics.php
Line: 53

IP address 144.48xxx.   
https://xxx.com/index.php?m=member&c=index&a=register&siteid=1
2: explode() expects parameter 2 to be string, array given
file : D:/Inetpub/vhosts/xxx.com/httpdocs/Sources/RecentForumTopics.php
Line: 52

my file RecentForumTopics.php
Thanks you.
SMF 2.0.15 | PHP 7.X | MySql 5.6 | Softer theme | SMFAds

Offline Pipke

  • Full Member
  • ***
  • Posts: 478
    • [NRNS]
Re: Recent Forum Topics on Boardindex
« Reply #145 on: May 22, 2018, 07:41:40 AM »
@minimono i cannot help with that if the user goes with IP address 144.48xxx goes to
https://xxx.com/index.php?m=member&c=index&a=register&siteid=1
that site isnt save.

Offline minimono

  • Semi-Newbie
  • *
  • Posts: 32
Re: Recent Forum Topics on Boardindex
« Reply #146 on: May 25, 2018, 03:18:18 AM »
image on this error log http://postto.me/1r/24w



Sorry iam not good at English. Use translate by google.co.th
SMF 2.0.15 | PHP 7.X | MySql 5.6 | Softer theme | SMFAds

Offline Pipke

  • Full Member
  • ***
  • Posts: 478
    • [NRNS]
Re: Recent Forum Topics on Boardindex
« Reply #147 on: May 25, 2018, 06:16:23 AM »
this request -> ?m=member&c=index&a=register&siteid=1
has nothing todo with my mod and its also not a standard request that smf by default in core uses, sorry i cant help you with that, you need to find out from where the link is coming from, maybe from other mod idk?

Offline minimono

  • Semi-Newbie
  • *
  • Posts: 32
Re: Recent Forum Topics on Boardindex
« Reply #148 on: May 26, 2018, 12:21:50 AM »
Thanks you.
 :-[
SMF 2.0.15 | PHP 7.X | MySql 5.6 | Softer theme | SMFAds

Offline jakes_t

  • Semi-Newbie
  • *
  • Posts: 30
Re: Recent Forum Topics on Boardindex
« Reply #149 on: May 30, 2018, 01:14:08 AM »
Hi, very nice mod. I like how it exposes some of the topics immediately without having to dig. Just one issue - it's not responsive when viewed on a phone (if you have the responsive curve mod installed). Would it be hard to fix?

Offline Pipke

  • Full Member
  • ***
  • Posts: 478
    • [NRNS]
Re: Recent Forum Topics on Boardindex
« Reply #150 on: May 30, 2018, 04:50:37 AM »
Hi, very nice mod. I like how it exposes some of the topics immediately without having to dig. Just one issue - it's not responsive when viewed on a phone (if you have the responsive curve mod installed). Would it be hard to fix?

fix for that is in this topic a view pages back:
https://www.simplemachines.org/community/index.php?topic=522114.msg3806914#msg3806914

and

https://www.simplemachines.org/community/index.php?topic=522114.msg3806942#msg3806942

Offline jack208

  • Semi-Newbie
  • *
  • Posts: 43
Re: Recent Forum Topics on Boardindex
« Reply #151 on: June 26, 2018, 01:12:21 AM »
I've implemented this mod and it's working fine on my 2.0.15 site. Love the mod. Has a very nicely structured layout with paging for the list of recent topics.

One que (or issue). During our migration (from IPBoard), we did a lot of review/re-formatting of some posts (due to HTML/BBCode compatibility) and those topics are being shown in the list of recent topics (even tho there is no "reply" to those topics since the migration). This resulted in a rather long list of recent topics (13 pages in total).

Is there a way for us to reset the list (flush some cut-off date?) so that this list starts with zero topics (yeah we might lose one or two "real" recent topics, but that's fine for us)? TQ

Offline Pipke

  • Full Member
  • ***
  • Posts: 478
    • [NRNS]
Re: Recent Forum Topics on Boardindex
« Reply #152 on: June 26, 2018, 08:02:48 AM »
I've implemented this mod and it's working fine on my 2.0.15 site. Love the mod. Has a very nicely structured layout with paging for the list of recent topics.

One que (or issue). During our migration (from IPBoard), we did a lot of review/re-formatting of some posts (due to HTML/BBCode compatibility) and those topics are being shown in the list of recent topics (even tho there is no "reply" to those topics since the migration). This resulted in a rather long list of recent topics (13 pages in total).

Is there a way for us to reset the list (flush some cut-off date?) so that this list starts with zero topics (yeah we might lose one or two "real" recent topics, but that's fine for us)? TQ

The recent forum topics are getting renewed(updated) when there are made new topics or replies, you only have to wait for that if it has about 100 new ones, if you have a busy forums that will happen within a week then or so, its better to wait for that instead of implenting a code to query after certain date. just my view on it.

Offline dekatria

  • Jr. Member
  • **
  • Posts: 105
  • Leave Nothing
    • roulette30 on Facebook
    • roulette30 on LinkedIn
    • @@roulette30 on Twitter
    • How to play Roulette
Re: Recent Forum Topics on Boardindex
« Reply #153 on: July 17, 2018, 05:25:21 AM »
I use Recent Forum Topics Extended.

I get too many errors in the error log.

Undefined index: poster_time

Code: [Select]
=>1250:
'delete_possible' => ($row['id_first_msg'] != $row['id_msg'] || $row['id_last_msg'] == $row['id_msg']) && (empty($modSettings['edit_disable_time']) || $row['poster_time'] + $modSettings['edit_disable_time'] * 60 >= time()),

Offline Pipke

  • Full Member
  • ***
  • Posts: 478
    • [NRNS]
Re: Recent Forum Topics on Boardindex
« Reply #154 on: July 17, 2018, 08:32:25 AM »
I use Recent Forum Topics Extended.

I get too many errors in the error log.

Undefined index: poster_time

Code: [Select]
=>1250:
'delete_possible' => ($row['id_first_msg'] != $row['id_msg'] || $row['id_last_msg'] == $row['id_msg']) && (empty($modSettings['edit_disable_time']) || $row['poster_time'] + $modSettings['edit_disable_time'] * 60 >= time()),

you can delete/remove that line entirely(1250), it has no function or purpose.

Offline dekatria

  • Jr. Member
  • **
  • Posts: 105
  • Leave Nothing
    • roulette30 on Facebook
    • roulette30 on LinkedIn
    • @@roulette30 on Twitter
    • How to play Roulette
Re: Recent Forum Topics on Boardindex
« Reply #155 on: July 19, 2018, 08:31:02 AM »
Thanks.
Waiting for the official version.

Offline EthanR

  • Semi-Newbie
  • *
  • Posts: 27
Re: Recent Forum Topics on Boardindex
« Reply #156 on: September 04, 2018, 09:40:01 PM »
Working nicely on 2.0.15. :)

Offline FishingManMatt

  • Semi-Newbie
  • *
  • Posts: 52
  • Gender: Male
Re: Recent Forum Topics on Boardindex
« Reply #157 on: October 24, 2018, 03:17:06 PM »
Hi!

IMHO this is one of the greatest SMF mods!
Many thanks for sharing it with us!

Recently one of my moderators has noticed that on some mobile devices the RFT table extends past the right edge of the container. Please, take a look at my screenshot taken from the Chrome DevTools.
I'm using the default SMF template.

Is there anything I can do to fit the table to the main content section?

Offline GigaWatt

  • The Smiley Guy
  • Support Specialist
  • SMF Hero
  • *
  • Posts: 2,104
  • Gender: Male
    • Macedonian electronics forum
Re: Recent Forum Topics on Boardindex
« Reply #158 on: October 24, 2018, 06:31:47 PM »
Did this start happening over night or was it always like this?
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Offline Pipke

  • Full Member
  • ***
  • Posts: 478
    • [NRNS]
Re: Recent Forum Topics on Boardindex
« Reply #159 on: October 25, 2018, 04:25:56 AM »
Is there anything I can do to fit the table to the main content section?

Can you provide a link to your forum, so we can see this behavior in action. At GigaWatt's site this looks all fine.