XenZine Articles [Deleted]

What would this be for, is it to split the article content into a left and right side?
Yes but better if we could option to select part of the content rather than whole article. I realise this is maybe too fussy.

PLEASE - are you interested in the user's own articles feature I described above?
 
PLEASE - are you interested in the user's own articles feature I described above?

I'm not sure I understand it, right now I'm still getting the basic things done and making look and feel professional. To be honest, there are still many things that need to be done (see the to-do list), so customisations aren't going to be high priority for now. But I don't understand your request enough to know if this is a customisation or something everyone would want
 
I don't understand your request enough to know if this is a customisation or something everyone would want

Thank you for your patience.
This is about users creating their own Articles.
So I think they should have a page generated showing all their Article (like the Resource Manager does here for each developer)

I am suggesting admin can have option to enable Category/ Members
Users assigned to a usergroup which has Super Editor permission automatically gets their Articles in this Category/ Members - each user has a subCategory.
 
Users can create their own articles, this is permissions based (I'm just clarifying for anyone reading)

What you are asking for, is a page to display all of the users articles... that already exists (find all articles by x, look at the bottom of an article, or via a members card), but these return "search results". There is also the users articles listed on the members page. But I think what you want is the masonry article list, this would be like a "members filter" on the article list. That's not unreasonable to do, and people will want this (I might do this at the same time I do tagging / filters).

The other thing you want sounds like a restricted category, only users with certain permissions can submit to this category?

On top of that, you want articles automatically to get put into this category, this sounds more like a customisation (not something everyone would want)
 
Last edited:
Im getting the following error when trying to create an article and click on Category

Code:
The following error occurred:
Invalid argument supplied for foreach()

    XenForo_Application::handlePhpError() in XenZine/Model/Category.php at line 134
    XenZine_Model_Category->getFirstSubcategory() in XenZine/ControllerPublic/Article.php at line 1363
    XenZine_ControllerPublic_Article->actionCategory() in XenForo/FrontController.php at line 337
    XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
    XenForo_FrontController->run() in C:/wamp/www/XF12/index.php at line 13

This is on a fresh install of XF 1.2 (data imported from VB) with no other addons. I deleted all the default categories and added my own. Each category has a forum association.

When I click on Category List, I see all the categories I created. The associated forums and already contain threads (those threads will be move into this addon).


Dont know if this is related, but saw the following errors in the server logs

Code:
Server Error Log
Error Info
ErrorException: Invalid argument supplied for foreach() - library\XenZine\Model\Category.php:134
Generated By: admin, Today at 7:06 PM
Stack Trace

#0 C:\wamp\www\XF12\library\XenZine\Model\Category.php(134): XenForo_Application::handlePhpError(2, 'Invalid argumen...', 'C:\wamp\www\XF1...', 134, Array)
#1 C:\wamp\www\XF12\library\XenZine\ControllerPublic\Article.php(1363): XenZine_Model_Category->getFirstSubcategory(Array)
#2 C:\wamp\www\XF12\library\XenForo\FrontController.php(337): XenZine_ControllerPublic_Article->actionCategory()
#3 C:\wamp\www\XF12\library\XenForo\FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#4 C:\wamp\www\XF12\index.php(13): XenForo_FrontController->run()
#5 {main}

Request State

array (size=3)
  'url' => string 'http://localhost/XF12/index.php?xz-articles/category&&_xfRequestUri=%2FXF12%2Findex.php%3Fxz-articles%2Fsubmit-new-article&_xfNoRedirect=1&_xfToken=1%2C1375571195%2Cf08149b205f3e06daa06f1e03d26862d677ec958&_xfResponseType=json' (length=226)
  '_GET' =>
    array (size=5)
      'xz-articles/category' => string '' (length=0)
      '_xfRequestUri' => string '/XF12/index.php?xz-articles/submit-new-article' (length=46)
      '_xfNoRedirect' => string '1' (length=1)
      '_xfToken' => string '1,1375571195,f08149b205f3e06daa06f1e03d26862d677ec958' (length=53)
      '_xfResponseType' => string 'json' (length=4)
  '_POST' =>
    array (size=0)
      empty

and

Code:
Error Info
ErrorException: Undefined index: children - library\XenZine\Model\Category.php:134
Generated By: admin, Today at 7:06 PM
Stack Trace

#0 C:\wamp\www\XF12\library\XenZine\Model\Category.php(134): XenForo_Application::handlePhpError(8, 'Undefined index...', 'C:\wamp\www\XF1...', 134, Array)
#1 C:\wamp\www\XF12\library\XenZine\ControllerPublic\Article.php(1363): XenZine_Model_Category->getFirstSubcategory(Array)
#2 C:\wamp\www\XF12\library\XenForo\FrontController.php(337): XenZine_ControllerPublic_Article->actionCategory()
#3 C:\wamp\www\XF12\library\XenForo\FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#4 C:\wamp\www\XF12\index.php(13): XenForo_FrontController->run()
#5 {main}

Request State

array (size=3)
  'url' => string 'http://localhost/XF12/index.php?xz-articles/category&&_xfRequestUri=%2FXF12%2Findex.php%3Fxz-articles%2Fsubmit-new-article&_xfNoRedirect=1&_xfToken=1%2C1375571195%2Cf08149b205f3e06daa06f1e03d26862d677ec958&_xfResponseType=json' (length=226)
  '_GET' =>
    array (size=5)
      'xz-articles/category' => string '' (length=0)
      '_xfRequestUri' => string '/XF12/index.php?xz-articles/submit-new-article' (length=46)
      '_xfNoRedirect' => string '1' (length=1)
      '_xfToken' => string '1,1375571195,f08149b205f3e06daa06f1e03d26862d677ec958' (length=53)
      '_xfResponseType' => string 'json' (length=4)
  '_POST' =>
    array (size=0)
      empty
 
Last edited:
I have converted a number of threads to articles (This features ROCKS) and now I would like to
  1. Edit an article
  2. Convert and article back to a thread
Im logged as the admin and gave myself all permissions and dont see the options to do the above.
 
Just a suggestion, but maybe change the following
Can Threads To Articles:
Can Articles To Threads:
to
Can Convert Threads To Articles:
Can Convert Articles To Threads:
 
Great work @tenants, this looks fantastic on our 1.2 forums. We're using it for our own embedded video posts :)

I came across 3 (same) errors in the logs so far, not sure of it, as it seems to relate to a totally unrelated thread in another forum section.

Code:
ErrorException: Undefined property: XenForo_ControllerResponse_Redirect::$params - library/XenZine/ControllerPublic/Thread.php:21

Generated By: SomeUser, Today at 10:05 AM

Stack Trace

#0 /home/public_html/forum/library/XenZine/ControllerPublic/Thread.php(21): XenForo_Application::handlePhpError(8, 'Undefined prope...', '/home...', 21, Array)
#1 /home/public_html/forum/library/XenForo/FrontController.php(337): XenZine_ControllerPublic_Thread->actionIndex()
#2 /home/public_html/forum/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#3 /home/public_html/forum/index.php(13): XenForo_FrontController->run()
#4 {main}

Request State

array(3) {
  ["url"] => string(73) "http://domain.com/threads/Unrelated-Thread-Name.13011/"
  ["_GET"] => array(1) {
    ["/threads/Unrelated-Thread-Name.13011/"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}
 
I have threads in my forums that have been converted to articles.

Here is the structure

My Forums
-Forum Articles
--DIY Articles
--Tech Articles
--Misc Articles

In this addon, I created three categories

DIY Articles
Tech Articles
Misc Articles

Each one of these categories is associated to their respective article forums.

When I browse the article forums, I see a "Post New Thread" button. How can I change this to a "Post New Article" button (linked to "index.php?xz-articles/submit-new-article")? Thanks.
 
My categories are setup to use the author's avatar as the default category image. When I convert an existing thread to an article, I see the avatar in the "Convert Thread to Article" overlay. However, once the thread is converted, the author's avatar does not appear next to the article summary.
 
One request if possible - can a view counter be added to the individual articles? around the summary info area or such.
 
I have converted a number of threads to articles (This features ROCKS) and now I would like to
  1. Edit an article
  2. Convert and article back to a thread
I'm logged as the admin and gave myself all permissions and don't see the options to do the above.


In order to convert an article back to a thread, that article must be in a category that has an associated forum (otherwise, there is no forum to put it), and the user must have "Can Article To Thread" permissions

If you have problems, can you try to reproduce it on my test forum (I'll IM you the url)

Just a suggestion, but maybe change the following
Can Threads To Articles:
Can Articles To Threads:
to
Can Convert Threads To Articles:
Can Convert Articles To Threads:

Agreed, I've made the change
 
Great work @tenants, this looks fantastic on our 1.2 forums. We're using it for our own embedded video posts :)

I came across 3 (same) errors in the logs so far, not sure of it, as it seems to relate to a totally unrelated thread in another forum section.

Code:
ErrorException: Undefined property: XenForo_ControllerResponse_Redirect::$params - library/XenZine/ControllerPublic/Thread.php:21

Generated By: SomeUser, Today at 10:05 AM

Stack Trace

#0 /home/public_html/forum/library/XenZine/ControllerPublic/Thread.php(21): XenForo_Application::handlePhpError(8, 'Undefined prope...', '/home...', 21, Array)
#1 /home/public_html/forum/library/XenForo/FrontController.php(337): XenZine_ControllerPublic_Thread->actionIndex()
#2 /home/public_html/forum/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#3 /home/public_html/forum/index.php(13): XenForo_FrontController->run()
#4 {main}

Request State

array(3) {
  ["url"] => string(73) "http://domain.com/threads/Unrelated-Thread-Name.13011/"
  ["_GET"] => array(1) {
    ["/threads/Unrelated-Thread-Name.13011/"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}

What this suggests is that the thread you are looking at has no $responseView->params (so it's not a normal thread), I suspect another add-on is not returning params (the parent response should almost always be returned). But in this case, what I can do is validate that the response type is an instance of the XenForo_ControllerResponse_View and only check for the params if that's the case (else return the parent.. which would then return the other add-ons response), do you know what other add-on might be changing the thread response for this thread (so I can test the fix)?
 
I have threads in my forums that have been converted to articles.

Here is the structure

My Forums
-Forum Articles
--DIY Articles
--Tech Articles
--Misc Articles

In this addon, I created three categories

DIY Articles
Tech Articles
Misc Articles

Each one of these categories is associated to their respective article forums.

When I browse the article forums, I see a "Post New Thread" button. How can I change this to a "Post New Article" button (linked to "index.php?xz-articles/submit-new-article")? Thanks.

I see, for these particular forums, you would like these forums to only post articles (instead of posting threads), and thus change the button to "post new article".
Basically, you want these will be strict article forums...

Or do you want both buttons "post new article" "post new thread"

It's a good idea (having either method), and I can probably add that option in the ACP. For you to customise this, it wont be as easy (since you need to determine which forum is an article forum)

I'll add this to my to-do list
 
What this suggests is that the thread you are looking at has no $responseView->params (so it's not a normal thread), I suspect another add-on is not returning params (the parent response should almost always be returned). But in this case, what I can do is validate that the response type is an instance of the XenForo_ControllerResponse_View and only check for the params if that's the case (else return the parent.. which would then return the other add-ons response), do you know what other add-on might be changing the thread response for this thread (so I can test the fix)?
The only mods that really do anything to threads are
Post Ratings 1.6.0 http://xenforo.com/community/resources/post-ratings-taking-likes-to-the-next-level.410/
similar threads http://xenforo.com/community/threads/show-similar-threads-on-thread-creation-paid.54163/
and the latest BD Medals beta https://xfrocks.com/medal-system/threads/bd-medal-v1-4-3.77/

but only this one thread seems to throw the errors. It's nothing special, just a typical thread.
 
It could be anyone of those

Can you just try something for me, rename this file to Thread.old.php (so you have a back up)
library\XenZine\ControllerPublic\Thread.php
and place this file in it's place:

Then navigate to the thread and see if it still causes the issue (if it does, what is the exception now)
 

Attachments

Back
Top Bottom