Prefix Forum Listing

Prefix Forum Listing 1.2.5

No permission to download
Just want to convey a big thankyou Fuhrmann for the update (which I'm about to do) been using this add-on for a while and it's been very useful from day 1. Thanks again and for the continuing updates. :)

Thanks Shelley! It is good to know that my addon is useful for the XenForo community! Maybe another update soon. :)
 
I have a feeds forum which pulls content from a few RSS feeds and applies prefixes. I've set the addon to include the forum but the prefix filter doesn't appear in the forum. Is this because all the threads in the forum were created by feeder accounts? It works normally / as expected in another forum containing threads posted by members. Or could this be because the feeder forum is currently private unlike the public one containing threads by members?
 
I have a feeds forum which pulls content from a few RSS feeds and applies prefixes. I've set the addon to include the forum but the prefix filter doesn't appear in the forum. Is this because all the threads in the forum were created by feeder accounts? It works normally / as expected in another forum containing threads posted by members. Or could this be because the feeder forum is currently private unlike the public one containing threads by members?

I'll take a look lasertits! Thanks for reporting.
 
This breaks my forum home page. I get nothing but this error after upgrading to Xenforo 1.2 Beta. Disabled for now.

Server Error
Mysqli prepare error: Unknown column 'forum_watch.node_id' in 'on clause'

  1. Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
  2. Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
  3. Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
  4. Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 753
  5. Zend_Db_Adapter_Abstract->fetchRow() in XenForo/Model/Forum.php at line 52
  6. XenForo_Model_Forum->getForumByNodeName() in XenForo/ControllerHelper/ForumThreadPost.php at line 183
  7. XenForo_ControllerHelper_ForumThreadPost->getForumOrError() in XenForo/ControllerHelper/ForumThreadPost.php at line 38
  8. XenForo_ControllerHelper_ForumThreadPost->assertForumValidAndViewable() in PrefixForumListing/Extend/ControllerPublic/Forum.php at line 26
  9. PrefixForumListing_Extend_ControllerPublic_Forum->actionIndex() in XenForo/FrontController.php at line 335
  10. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  11. XenForo_FrontController->run() in blahblah/index.php at line 13
 
If you are testing out xF 1.2, I suggest you disable this one. Prevented the node list to display for me. Just an FYI, so you don't have to do them one by one.
 
It seems two months since the dev last visited. So I wonder if it will be updated soon. Will be a roadblock for me to move to 1.2 as I heavily rely on this useful add-on.

Perhaps someone else if not the dev will take this up.
 
A commit has been done to Fuhrmann repository (github). It should work with the beta 1.2. Wait for his confirmation.
 
It does not.
demo_a.webp
Edit: it's possible that the commit didn't work since I've done it on a clone repository. I'm going to do it again.
Edit2: no, the commit is available on my Github and will only be available on Fuhrmann Github if he accepts the commit.
 
Last edited:
I've done a new modification (available on Github) but it would require to be tested on live which I can't do until quite a time.

You might want to include the modification of file "library/PrefixForumListing/Extend/ControllerPublic/Forum.php" FROM (line 16)
The only modification is the removal of variable (array $messages) from the function and it's return... (Else you get an error when editing a thread).
PHP:
	protected function _discussionPostSave(array $messages)
	{
		if ($this->isInsert() || $this->isUpdate())
		{
			if ($this->get('prefix_id'))
			{
				$totalThreadsCache = $this->_getDataRegistryModel()->get('PrefixesThreadsCount'.$this->getExisting('node_id'));
				$totalThreadsCache[$this->get('prefix_id')] = NULL;
				$totalThreadsCache[$this->getExisting('prefix_id')] = NULL;

				if ($this->isChanged('node_id'))
				{
					$this->_getDataRegistryModel()->set('PrefixesThreadsCount'.$this->getNew('node_id'), $totalThreadsCache);
				}

				if ($this->isChanged('prefix_id'))
				{
					$totalThreadsCache[$this->getNew('prefix_id')] = NULL;
				}

				if ($this->isChanged('discussion_state'))
				{
					$totalThreadsCache[$this->get('prefix_id')] = NULL;
				}

				$this->_getDataRegistryModel()->set('PrefixesThreadsCount'.$this->getExisting('node_id'), $totalThreadsCache);
			}
		}
		return parent::_discussionPostSave($messages);
	}

TO
PHP:
	protected function _discussionPostSave()
	{
		if ($this->isInsert() || $this->isUpdate())
		{
			if ($this->get('prefix_id'))
			{
				$totalThreadsCache = $this->_getDataRegistryModel()->get('PrefixesThreadsCount'.$this->getExisting('node_id'));
				$totalThreadsCache[$this->get('prefix_id')] = NULL;
				$totalThreadsCache[$this->getExisting('prefix_id')] = NULL;

				if ($this->isChanged('node_id'))
				{
					$this->_getDataRegistryModel()->set('PrefixesThreadsCount'.$this->getNew('node_id'), $totalThreadsCache);
				}

				if ($this->isChanged('prefix_id'))
				{
					$totalThreadsCache[$this->getNew('prefix_id')] = NULL;
				}

				if ($this->isChanged('discussion_state'))
				{
					$totalThreadsCache[$this->get('prefix_id')] = NULL;
				}

				$this->_getDataRegistryModel()->set('PrefixesThreadsCount'.$this->getExisting('node_id'), $totalThreadsCache);
			}
		}
		return parent::_discussionPostSave();
	}

So far I haven't found any other issues with this add-on on 1.2 Beta 1, I'll do some further testing today.
Note: Do the same for protected function _discussionPostDelete(array $messages) or else you get an error when removing a thread.
 
Last edited:
@Markus, that what I've done two days ago, but I didn't test if doing only this modification prevent to do the another mod.
I see, well with the two different modifications that I did, the one from your github and those two that I mentioned above, the add-on seems to be working perfectly on my board that runs 1.2.0 Beta 1
 
I see, well with the two different modifications that I did, the one from your github and those two that I mentioned above, the add-on seems to be working perfectly on my board that runs 1.2.0 Beta 1

You should send a commit with your fix (I think it's the same that I've done yesterday but I can't find back my commit - I'm quite tired), it would help Furhmann to check the different solutions.
 
Top Bottom