Categories vs. Tags (Bugs)

by Nico Hoffmann @, Sunday, July 17, 2011, 10:37 (4667 days ago)

Hello,

i just installed mlf 2.2.8, then I activated a tagcloud, and then I created some categories.

When logged in as Admin and writing a new entry, I get a drop down menu with categories and text field for tags.
When logged in as User, the text field for tags is missing.

I looked at the page source (HTML source, not the template) - the tag field is indeed missing for users.

Is that an issue in MLF 2.2.8, or need I just some setting in the configuration?


(BTW, here, on mlf also: There is a category menu, but no tag field)

N.

Besides of this, I have to praise MFL2.x. Nice done! Much better than my old mlf 1.7 :-)

Categories vs. Tags

by Nico Hoffmann, Sunday, July 17, 2011, 15:42 (4667 days ago) @ Nico Hoffmann

When logged in as Admin and writing a new entry, I get a drop down menu with categories and text field for tags.
When logged in as User, the text field for tags is missing.

O.K., I had a look at the code. Simple users cannot use tags, and that is no bug. Its intended by design.

to change this behaviour, I needed two modifications:


In forum/themes/default/subtemplates/posting.inc.tpl, line 119

change {if ($admin ||$mod) && $settings.tags} to {if ($admin ||$mod || $user) && $settings.tags}

That opens a textarea for tags for registered users != mod or admin.

Further, I changed in forum/includes/posting.inc.phpm line 643

if(isset($_POST['tags']) && isset($_SESSION[$settings['session_prefix'].'user_type']) && ($_SESSION[$settings['session_prefix'].'user_type']>0))

to

if(isset($_POST['tags']) && isset($_SESSION[$settings['session_prefix'].'user_type']) && ($_SESSION[$settings['session_prefix'].'user_type']>=0))

(The only difference is an additional '=' near the end of the line)

That feeds the tags to parser/database.

I hope I did not damage any other function by my modifications :-)

RSS Feed of thread