[TH] Article Manager [Deleted]

This is maybe one of the most important addons; unfortunately they have not finished it like other ones also.
In Model/Category/getCategoryBreadcrumb you have to change two time full:articles-category to full:articles/category to have a breadcrump at the article-pages.
 
If you also use RM it makes sense to take css and stuff for rating from the RM; the one from TH is in my testforum not useable, because the stars move while mouse-over. Now i have it identical to the RM.

in public function canRateArticles
you can set

if ($article['user_id'] == $viewingUser['user_id'])
{
return true;
}

to rate for your articels also.
 
In public function actionEditSave()
it makes sense to add user_id, username, discussion_thread_id, and also to the article_edit_form with something like if is="{$visitor}=='1'" or whatever you need.

In the both templates for index and cat_view you have to move the upper part for showing "selected" to the same place.
 
This addon is free, so we should be happy to use it. Unfortunately it is also only a beta like shop or credits with many problems. Is there someone who has solved some of them? So we may share some ideas and solutions.

In my articles i have now:
  • correct links to cats
  • show rating like in XF
  • show filters for prefixes, reduce prefix filter to cats
  • likes/unlikes
  • delete queries i dont need
  • show icon at detail
  • show liked also in list
  • dont show empty line for chosing cats (makes problems on ipad)
the most thing are cosmetic.

Now i am searching for the problem with checkbox => change prefixes (missing array)


With comments and rating i am not sure how to change it.
I dont like that the rating is not changeable; and probably i will add the rating text as a comment and delete old rating and text with a new rating without showing the popup with ratings. Maybe the rating should be also shown at the new comment.
 
Problem was missing $categories in
model/inlinemod/article

public function canEditArticlesData(array $articles, array $categories, &$errorKey = '', array $viewingUser = null)
...
if (!$articleModel->editArticles($article, $categories, $errorKey, $viewingUser))
 
The count of articles at index can be wrong if a prefix is chosen in cp/articles/actionindex

foreach ($categories AS $category)
{
$totalArticles += $category['article_count'];
}

This just counts the complete number of articles in cats.
But with a prefix we may have to show less articles, so the number has not to be the same like the number of articles in cats.

Because of this the pagination can be wrong.
 
Last edited:
also here: in cp/articles/actionindex

$article = $articleModel->getAndMergeAttachmentsIntoArticle($article, $article['article_id']);

this means that we need extra queries to fetch attachment for every single article, but we are at the index page and dont need any attachments. So the whole queries are just for nothing as long you dont want to show them here.
 
Last edited:
In the attached download i miss a file
\library\Faqe\Articles\Model\InlineMod\Article.php

This file is used in my web from 2.8.
 
Top Bottom