Recent content by Anatoliy

  1. Anatoliy

    XF 2.2 Stupid people or too fat fingers?

    Sounds as a solution to me.
  2. Anatoliy

    XF 2.2 How to find the most active members in 2023?

    I guess I could run some sql request in posts table, where date of post > n. That will give me total number of posts. I remember that there is "count" or something, that would give me an array with usernames as keys and post count as value. Can you help with this please?
  3. Anatoliy

    XF 2.2 How to find the most active members in 2023?

    Hi, I'd like to make a post on my forum to list and thank members who were the most active last year. Can anybody suggest how to find them? It's easy for new members who registered in 2023. In ACP -> Users I can filter by the registration period and then sort them by posts number or received...
  4. Anatoliy

    XF 2.2 entity_structure Listener

    I'm re-reading again "Let's build an add-on" and it looks like I may be have to add a class extension for XF\Admin\Controller\User ? But do I really have to do it if in Setup.ph I indicated setDefault(0) for both custom columns? Shouldn't the system just put 0 in both fields without any...
  5. Anatoliy

    XF 2.2 Updating a value in a db table

    no, not fetching one to update. sorry for my english. ) I mean maybe there is something like 'updater' (like finder) in xenForo. something like $user = \XF::updater('XF:User') ->where('user_id', $userId) ->update('av-aw-processed', $someData); $user->save(); )))
  6. Anatoliy

    XF 2.1 remove all thoses useless 301 redirect

    Hey Kirby! I too built myself an add-on that hides from guests all those links to 301 redirects to posts. However i guess google still visit them as they are already in their index. Did you use some way to ask google to drop those posts from the index?
  7. Anatoliy

    XF 2.2 entity_structure Listener

    Oops ... It looks like I missed something. Did I have to modify some standard method like memberCreate or memberSave or something like that? I see an error in ACP MySQL statement prepare error [1054]: Unknown column 'av_aw_processed' in 'field list' Today at 7:22 AM...
  8. Anatoliy

    XF 2.2 Redis for a not active forum - good or bad?

    I have cache and pageCache enabled (Redis) in my config file. And when I test pages with a tool like GMetrix I see that the second run shows better results. So it's not a question that cached pages are loaded faster. Here is what I'm thinking about. My forum has about 1k visits and 2k pageviews...
  9. Anatoliy

    Fixed Reject/Accept cookies causes error (Advanced)

    on a home page only. reminded me a glitch when you log out on a home page and it looks like you are still logged in.
  10. Anatoliy

    XF 2.2 Updating a value in a db table

    I added a custom column av-aw-processed into xf-user table. I want to be able to 'mark' users by updating the field (overwrite with the current timestamp). Is there some built in xF way to do it, like fetching with a finder? Or I should run a usual SQL query like public function...
  11. Anatoliy

    XF 2.2 entity_structure Listener

    Cool! Tank you!!!
  12. Anatoliy

    XF 2.2 entity_structure Listener

    Hmm... but then again... Let's say I "processed" a user and marked him as "Processed" in my add-on. Timestamp got written into av_aw_processed. But if later I'll edit this user profile in ACP the value in av_aw_processed will be overwriten to 0? I'll lose the "mark" that he was already...
  13. Anatoliy

    XF 2.2 entity_structure Listener

    Oh, wait... I just understood. $structure->columns['av_aw_processed'] = ['type' => Entity::UINT, 'default' => time()]; 'default' => time() means that whenever a user will be edited (not with my add-on) the current timestamp will be written into 'av_aw_processed'? That's not what I was...
  14. Anatoliy

    XF 2.2 entity_structure Listener

    Thank you very much! I ended up with this. Do hope nothing will explode. ) <?php namespace AV\ActivityWatcher; use XF\Mvc\Entity\Entity; class Listener { public static function userEntityStructure(\XF\Mvc\Entity\Manager $em, \XF\Mvc\Entity\Structure &$structure) {...
Top Bottom