Who is viewing this topic [Deleted]

would be good if you add:
1. who read this thread ( bottom left )
2. moderator of this thread ( bottom right )
 
Update v1.0.0.2 :
  • Fixed warning message [E_NOTICE] Trying to access array offset on value of type null!
  • Implemented Who has read the thread feature.
 

Attachments

  • whohasread.webp
    whohasread.webp
    19.3 KB · Views: 21
it's fixed for me !
Thank you..
Did you updated or just reinstalled?
I'm pretty sure there is null on array variable when there are not registered members visiting a topic or the registered member are not yet registered on SessionActivit and error triggered. In this update should be fixed in template modification :).
 
Did you updated or just reinstalled?
I'm pretty sure there is null on array variable when there are not registered members visiting a topic or the registered member are not yet registered on SessionActivit and error triggered. In this update should be fixed in template modification :).
i'm first update it's giving mysql error. i don't remember good but it say not forund thread_views table i think.
and i reinstall 1.0.0.2 it's giving e_notice error. And after i upgrade 1.0.0.3 not problem here.
What about for if user group have custom css? https://xenforo.com/community/resources/liam-w-rip-global-name-styling.5749/
 
i'm first update it's giving mysql error. i don't remember good but it say not forund thread_views table i think.
and i reinstall 1.0.0.2 it's giving e_notice error. And after i upgrade 1.0.0.3 not problem here.
What about for if user group have custom css? https://xenforo.com/community/resources/liam-w-rip-global-name-styling.5749/
There is glitch in update setup file in 1.0.0.2 when updating for some reason id did not create table...

For user group styling that feature is not yet implemented in Who is viewing widget nor which members was read the topic widget.
I was thinking to implement this feature but based on user group css color if set.
 
@RisteD, I'd recommend you read Resource standards and Developer docs. This add-on violates at least the 11th, 19th, 23rd, and 25th clauses of the Resource Standards.

11th: there is no prefix in your database table that would make it clear that it refers to your add-on and XenForo installation in general.

19th: I have nothing to say, just show:
  • /src/addons/whoviewtopic/Entity/User.php (which should be in /src/addons/whoviewtopic/XF/Entity/User.php):
    PHP:
    class User extends \XF\Entity\User
    You must extend XFCP_User instead of XF\Entity\User.
  • /src/addons/whoviewtopic/XF/Pub/Controller/XFCP_Thread.php:
    PHP:
    class XFCP_Thread extends \XF\Pub\Controller\Thread
    WTF?
23rd: you are extending the XF:Thread controller that can return an instance of XF\Mvc\Reply\Error or XF\Mvc\Reply\Redirect, and these classes do not have a setParam method, so it could be caused errors.

There are also "sins" in template modifications:
  1. You don't use phrases.
  2. You are not using the xf:username tag and hardcoded HTML directly, which again causes incompatibility with other add-ons.
  3. You should pluck the usernames from the array and use the join filter to list the usernames, or use the "listInline--comma" CSS class (example in the "widget_members_online" template), but definitely don't insert a comma inside xf:foreach.
I have many more comments on the code of this add-on, but, perhaps, I'll stop there.
 
@RisteD, I'd recommend you read Resource standards and Developer docs. This add-on violates at least the 11th, 19th, 23rd, and 25th clauses of the Resource Standards.

11th: there is no prefix in your database table that would make it clear that it refers to your add-on and your XenForo installation in general.

19th: I have nothing to say, just show:
  • /src/addons/whoviewtopic/Entity/User.php (which should be in /src/addons/whoviewtopic/XF/Entity/User.php):
    PHP:
    class User extends \XF\Entity\User
    You must extend XFCP_User instead of XF\Entity\User.
  • /src/addons/whoviewtopic/XF/Pub/Controller/XFCP_Thread.php:
    PHP:
    class XFCP_Thread extends \XF\Pub\Controller\Thread
    WTF?
23rd: you are extending the XF:Thread controller that can return an instance of XF\Mvc\Reply\Error or XF\Mvc\Reply\Redirect, and these classes do not have a setParam method, so it could be caused errors.

There are also "sins" in template modifications:
  1. You don't use phrases.
  2. You are not using the xf:username tag and hardcoded HTML directly, which again causes incompatibility with other add-ons.
  3. You should pluck the usernames from the array and use the join filter to list the usernames, or use the "listInline--comma" CSS class (example in the "widget_members_online" template), but definitely don't insert a comma inside xf:foreach.
I have many more comments on the code of this add-on, but, perhaps, I'll stop there.
There are no widgets, just template modification to the Thread template & extending the thread controller by passing parameters that can be used in template. Phrases for now i don't need 'em.
where setParam could cause errors? i have my addon on my website as well, nothing occurs plus i have addons 3rd party and nothing happens.
 
Phrases for now i don't need 'em.
If this is an add-on for you, why was it posted here? 🤔
where setParam could cause errors? i have my addon on my website as well, nothing occurs plus i have addons 3rd party and nothing happens.
If you did not receive errors, this does not mean that your add-on cannot cause them. I see that a bunch of errors will fall down here in any non-standard situation.

Anyway, maybe @Chris D can help decide who's right ...?
 
Back
Top Bottom