Recent content by mgl

  1. M

    XF 2.0 Getting 'error_invalid_class' when adding a code event listener

    Thanks for the suggestion. It certainly sounds better than what I have :)
  2. M

    XF 2.0 Getting 'error_invalid_class' when adding a code event listener

    @Jake B. Thanks! That worked. btw, `\MyCustomStuff\Visitor\Visitor` doesn't sound right... Should I rename my class or namespace to something else?
  3. M

    XF 2.0 Getting 'error_invalid_class' when adding a code event listener

    @Jake B. Class: Visitor Method: visitor_setup
  4. M

    XF 2.0 Getting 'error_invalid_class' when adding a code event listener

    Hi, I'm porting a XF1 addon to XF2. I've created the new addon via the CLI tool which created it in src/addons/MyCustomStuff/Visitor/ Here is my Visitor.php that is in that directory: <?php namespace MyCustomStuff\Visitor; class Visitor { public static function...
  5. M

    Ignore unclosed BBcode tags

    Hello, Currently this text: this is a a sample text Becomes this (everything italic after ): [I] [I]Is there a way to make the BBcode tags work only if there is a matching closing tag? I was looking in library/XenForo/BbCode/parser.php but did not find anything.
  6. M

    Cannot "mark" thread as read after changing last_post_date

    Hello, I'm changing the last_post_date of selected threads to the current time (bumping them): $this->_updateThreadsBulk($threads, $forums, array('last_post_date' => time()), 'threadUP'); The code works. But then the selected threads will always be marked as unread, no matter how many times I...
  7. M

    Changing forum language on-the-fly

    What about non-registered users? Shouldn't the cookie take care of them alone?
  8. M

    Changing forum language on-the-fly

    Hello, I want to change the forum language whenever there is a specific GET parameter. I've tried something like this: public static function Visitor(XenForo_Visitor &$visitor) { ....... if (@$_GET['lang']=="y") { $visitor->setVisitorLanguage(3)...
  9. M

    XenForo_DataWriter_DiscussionMessage not getting called

    Hello, I am doing an add-on to do some processing after a message\thread is deleted. But I can't seem to get my class loaded. Here is my code event: <listener event_id="load_class_datawriter" execute_order="10" callback_class="TK_dataproc_Index" callback_method="LoadProxy" active="1" hint=""...
Top Bottom