Welcome to Geeklog Sunday, September 15 2019 @ 06:29 pm EDT

Geeklog Forums

Customize admin's searchmenu


Status: offline

OMAL

Forum User
Regular Poster
Registered: 06/12/17
Posts: 89
Article.php under admin displays select menu.
PHP Formatted Code
<form action="{form_url}" method="post" class="uk-form">
  <div class="admin-list-search">
    <div class="search-part">
      {filter}
    </div>

I want to customize this parameter, "filter". Because the website has hundreds topics and thousand of stories, default behavior is not suitable for the situation.

1. When admin is logged-in, the specific topic that is used most by admin, should be placed first of the drop-down list.
2 . When other members are logged-in, only the topic of the logged-in member should be listed.

How can I do that?
I tried to customize TOPIC_getTopicListSelect() function, but I coudn't understand it enough and didn't worked.


Status: offline

Laugh

Site Admin
Admin
Registered: 27/09/05
Posts: 1376
1. When admin is logged-in, the specific topic that is used most by admin, should be placed first of the drop-down list.

How is that to be decided?

2 . When other members are logged-in, only the topic of the logged-in member should be listed.

It should only list topics they have access to. I have a feeling this includes both read and edit access.
One of the Geeklog Core Developers.

Status: offline

OMAL

Forum User
Regular Poster
Registered: 06/12/17
Posts: 89
Quote by: Laugh

1. When admin is logged-in, the specific topic that is used most by admin, should be placed first of the drop-down list.

How is that to be decided?


In my situation, every active admin frequently uses only one topic, topic A, for posting articles. It doesn't change, it is always topic A. But select options for topics are more than 500 hundreds, so every time they have to search to select topic A from the hundreds of list. What I want to do is to place the topic A at the top of the list. So I want some advice to do that.

I think I could do that with dirty hack like picking up topic A from $_TOPIC and array shifting it. But I want to know easier way, if possible.


2 . When other members are logged-in, only the topic of the logged-in member should be listed.

It should only list topics they have access to. I have a feeling this includes both read and edit access.[/p]

I just want to know if you have some way to list options for topics the member have access to.

Thanks.

Status: offline

Laugh

Site Admin
Admin
Registered: 27/09/05
Posts: 1376
It does only list topics that the user has access too, Topics that the user has read only (with no edit) access and topics that they have Edit (that includes read) access. If the user does not have access to the topic at all, it will not be displayed.

That being said (and maybe a feature request here for a checkbox in the search to toggle this option), if you only want to show topics for the filter that the user has edit access only

then try changing the line found in the file \admin\article.php and the function liststories (around line 122)

PHP Formatted Code
$seltopics = TOPIC_getTopicListSelect($current_topic, 2);


changing it to:

PHP Formatted Code
$seltopics = TOPIC_getTopicListSelect($current_topic, 2, false, '', false, 0, 2);


should show only topics they have edit access to. I think this will help since your writers should only have edit access to the topics they write for.

Let me know if this works as I cannot test it at the moment.
One of the Geeklog Core Developers.

All times are EDT. The time is now 06:29 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content