Topic Solved Mod

Started by Grudge, March 07, 2004, 07:51:18 AM

Previous topic - Next topic

Grudge

Are you sure? Do your global moderators have the permission to moderatre the forum? What about if you replace the original instances of $user_info['is_gmod'] with:

in_array('2', $user_info['groups'])
I'm only a half geek really...

oscar2001

Sorry no go either only causes a parse error as did the previous suggestion. (The first suggestion you gave to sixpack didnt cause any parse errors when I tried that one, just wont show the topic solved options for Gmods like with admins)
I have the Gmods set to moderate any board within the form

Grudge

There's a difference between not doing anything and causing an error! Please post the code you changed it to for the allowedTo example.
I'm only a half geek really...

oscar2001

Ok worked why I was getting the parse errors (had too many brackets)

Still both wont show the topic solved mod for gmods

post.php
if ($ID_MEMBER != $ID_MEMBER_POSTER && !isset($user_info['is_admin']) && allowedTo('moderate_forum'))


Display.template.php
if (($context['user']['started'] || allowedTo('moderate_forum') || $context['user']['is_admin']) && isset($context['topicSolved']))

Grudge

Well - the first code block is wrong, it should be !allowedTo on that line (Post.php)

if ($ID_MEMBER != $ID_MEMBER_POSTER && !isset($user_info['is_admin']) && !allowedTo('moderate_forum'))


In display that should work though. Can you do this quick query for me in phpMyAdmin:
SELECT addDeny FROM smf_board_permissions WHERE permission = 'moderate_forum'

thanks,
Grudge
I'm only a half geek really...

oscar2001

QuoteYour SQL-query has been executed successfully (Query took 0.0006 sec)

Fixed the post.php with the !

Still the same though,,
Sorry for all the hassle

Thanks :)

Grudge

Can you tempoarily add this to Display.template.php and post what you see, add it just before the "if" statement:

if ($user_info['is_admin'])
echo '<br />started:' . $context['user']['started'] . '<br />allowed:' . allowedTo('moderate_forum') . '<br />admin:' . $context['user']['is_admin'] . '<br />solved:' . isset($context['topicSolved']) . '<br />ALL:' . (($context['user']['started'] || allowedTo('moderate_forum') || $context['user']['is_admin']) && isset($context['topicSolved']));
I'm only a half geek really...

oscar2001

Is this right?
if ($user_info['is_admin'])
echo '<br />started:' . $context['user']['started'] . '<br />allowed:' . allowedTo('moderate_forum') . '<br />admin:' . $context['user']['is_admin'] . '<br />solved:' . isset($context['topicSolved']) . '<br />ALL:' . (($context['user']['started'] || allowedTo('moderate_forum') || $context['user']['is_admin']) && isset($context['topicSolved'])); 
if (($context['user']['started'] || allowedTo('moderate_forum') || $context['user']['is_admin']) && isset($context['topicSolved']))

Still the same and cant see anything out of the ordinary adding that line...

Thx :)

Grudge

What about taking away the "if" line (Leave just the echo). Bear in mind this will display some debug info to EVERYONE, so put it in, post the result, then take it out ;)
I'm only a half geek really...

oscar2001

Doing that gives me this but no other errors that I can see



Grudge

What are you logged in as there though?? You're not logged in as an admin as you don't have the IP showing. Can you go into your profile on your board and verify using "Show Permissions" that you have permission to moderate_forum
I'm only a half geek really...

oscar2001

#31
This is my view from my admin login



When I veiw the profile of my testing Global moderater account and look in permmisions I see this amongst the list
moderate_board
Moderate board  Given by: Global Moderator

heres the rest incase you its needed

Show Permissions 
General Permissions
Permission (denied permissions are struck out) 
calendar_edit_any
Edit events in the calendar - Any events  Given by: Global Moderator 
calendar_post
Create events in the calendar  Given by: Global Moderator 
calendar_view
View the calendar  Given by: Global Moderator 
karma_edit
Change other people's karma  Given by: Global Moderator 
manage_boards
Manage boards and categories  Given by: Global Moderator 
pm_read
Read personal messages  Given by: Global Moderator 
pm_send
Send personal messages  Given by: Global Moderator 
profile_extra_own
Edit additional profile settings - Own profile  Given by: Global Moderator 
profile_identity_own
Edit account settings - Own profile  Given by: Global Moderator 
profile_remote_avatar
Choose a remotely stored avatar  Given by: Global Moderator 
profile_remove_own
Delete account - Own account  Given by: Global Moderator 
profile_title_own
Edit custom title - Own profile  Given by: Global Moderator 
profile_view_any
View profile summary and stats - Any profile  Given by: Global Moderator 
search_posts
Search for posts and topics  Given by: Global Moderator 
view_mlist
View the memberlist  Given by: Global Moderator 
view_stats
View forum statistics  Given by: Global Moderator 
who_view
View Who's Online  Given by: Global Moderator 
Board specific permissions for:  All boards --------------------------- General Discussion test 
Permission (denied permissions are struck out) 
delete_any
Remove topics - Any topics  Given by: Global Moderator
Boards: All 
delete_own
Remove topics - Own topic  Given by: Global Moderator
Boards: All 
lock_any
Lock topics - Any topic  Given by: Global Moderator
Boards: All 
lock_own
Lock topics - Own topic  Given by: Global Moderator
Boards: All 
make_sticky
Make topics sticky  Given by: Global Moderator
Boards: All 
mark_any_notify
Request notification on replies  Given by: Global Moderator
Boards: All 
mark_notify
Request notification on new topics  Given by: Global Moderator
Boards: All 
merge_any
Merge any topic  Given by: Global Moderator
Boards: All 
moderate_board
Moderate board  Given by: Global Moderator
Boards: All 
modify_any
Modify posts - Any post  Given by: Global Moderator
Boards: All 
modify_own
Modify posts - Own post  Given by: Global Moderator
Boards: All 
modify_replies
Modify replies to own topics  Given by: Global Moderator
Boards: All 
move_any
Move topic - Any topic  Given by: Global Moderator
Boards: All 
move_own
Move topic - Own topic  Given by: Global Moderator
Boards: All 
poll_add_any
Add poll to topics - Any topics  Given by: Global Moderator
Boards: All 
poll_add_own
Add poll to topics - Own topics  Given by: Global Moderator
Boards: All 
poll_edit_any
Edit polls - Any poll  Given by: Global Moderator
Boards: All 
poll_edit_own
Edit polls - Own poll  Given by: Global Moderator
Boards: All 
poll_lock_any
Lock polls - Any poll  Given by: Global Moderator
Boards: All 
poll_lock_own
Lock polls - Own poll  Given by: Global Moderator
Boards: All 
poll_post
Post polls  Given by: Global Moderator
Boards: All 
poll_remove_any
Remove polls - Any poll  Given by: Global Moderator
Boards: All 
poll_remove_own
Remove polls - Own poll  Given by: Global Moderator
Boards: All 
poll_view
View polls  Given by: Global Moderator
Boards: All 
poll_vote
Vote in polls  Given by: Global Moderator
Boards: All 
post_attachment
Post attachments  Given by: Global Moderator
Boards: All 
post_new
Post new topics  Given by: Global Moderator
Boards: All 
post_reply_any
Post replies to topics - Any topic  Given by: Global Moderator
Boards: All 
post_reply_own
Post replies to topics - Own topic  Given by: Global Moderator
Boards: All 
remove_any
Delete posts - Any post  Given by: Global Moderator
Boards: All 
remove_own
Delete posts - Own post  Given by: Global Moderator
Boards: All 
remove_replies
Delete replies to own topics  Given by: Global Moderator
Boards: All 
report_any
Report posts to the moderators  Given by: Global Moderator
Boards: All 
send_topic
Send topics to friends  Given by: Global Moderator
Boards: All 
split_any
Split any topic  Given by: Global Moderator
Boards: All 
view_attachments
View attachments  Given by: Global Moderator
Boards: All 




oscar2001

Quote from: Grudge on November 30, 2004, 05:32:21 PM
What are you logged in as there though?? You're not logged in as an admin as you don't have the IP showing. Can you go into your profile on your board and verify using "Show Permissions" that you have permission to moderate_forum
Quote from: oscar2001 on November 30, 2004, 10:46:59 PM
SOrry I was logged in as a testinh Gmod(its also a testing forum Im using
This is my view from my admin login



When I veiw the profile of my testing Global moderater account and look in permmisions I see this amongst the list
moderate_board
Moderate board Given by: Global Moderator

heres the rest incase you its needed

Show Permissions
General Permissions
Permission (denied permissions are struck out)
calendar_edit_any
Edit events in the calendar - Any events Given by: Global Moderator
calendar_post
Create events in the calendar Given by: Global Moderator
calendar_view
View the calendar Given by: Global Moderator
karma_edit
Change other people's karma Given by: Global Moderator
manage_boards
Manage boards and categories Given by: Global Moderator
pm_read
Read personal messages Given by: Global Moderator
pm_send
Send personal messages Given by: Global Moderator
profile_extra_own
Edit additional profile settings - Own profile Given by: Global Moderator
profile_identity_own
Edit account settings - Own profile Given by: Global Moderator
profile_remote_avatar
Choose a remotely stored avatar Given by: Global Moderator
profile_remove_own
Delete account - Own account Given by: Global Moderator
profile_title_own
Edit custom title - Own profile Given by: Global Moderator
profile_view_any
View profile summary and stats - Any profile Given by: Global Moderator
search_posts
Search for posts and topics Given by: Global Moderator
view_mlist
View the memberlist Given by: Global Moderator
view_stats
View forum statistics Given by: Global Moderator
who_view
View Who's Online Given by: Global Moderator
Board specific permissions for: All boards --------------------------- General Discussion test
Permission (denied permissions are struck out)
delete_any
Remove topics - Any topics Given by: Global Moderator
Boards: All
delete_own
Remove topics - Own topic Given by: Global Moderator
Boards: All
lock_any
Lock topics - Any topic Given by: Global Moderator
Boards: All
lock_own
Lock topics - Own topic Given by: Global Moderator
Boards: All
make_sticky
Make topics sticky Given by: Global Moderator
Boards: All
mark_any_notify
Request notification on replies Given by: Global Moderator
Boards: All
mark_notify
Request notification on new topics Given by: Global Moderator
Boards: All
merge_any
Merge any topic Given by: Global Moderator
Boards: All
moderate_board
Moderate board Given by: Global Moderator
Boards: All
modify_any
Modify posts - Any post Given by: Global Moderator
Boards: All
modify_own
Modify posts - Own post Given by: Global Moderator
Boards: All
modify_replies
Modify replies to own topics Given by: Global Moderator
Boards: All
move_any
Move topic - Any topic Given by: Global Moderator
Boards: All
move_own
Move topic - Own topic Given by: Global Moderator
Boards: All
poll_add_any
Add poll to topics - Any topics Given by: Global Moderator
Boards: All
poll_add_own
Add poll to topics - Own topics Given by: Global Moderator
Boards: All
poll_edit_any
Edit polls - Any poll Given by: Global Moderator
Boards: All
poll_edit_own
Edit polls - Own poll Given by: Global Moderator
Boards: All
poll_lock_any
Lock polls - Any poll Given by: Global Moderator
Boards: All
poll_lock_own
Lock polls - Own poll Given by: Global Moderator
Boards: All
poll_post
Post polls Given by: Global Moderator
Boards: All
poll_remove_any
Remove polls - Any poll Given by: Global Moderator
Boards: All
poll_remove_own
Remove polls - Own poll Given by: Global Moderator
Boards: All
poll_view
View polls Given by: Global Moderator
Boards: All
poll_vote
Vote in polls Given by: Global Moderator
Boards: All
post_attachment
Post attachments Given by: Global Moderator
Boards: All
post_new
Post new topics Given by: Global Moderator
Boards: All
post_reply_any
Post replies to topics - Any topic Given by: Global Moderator
Boards: All
post_reply_own
Post replies to topics - Own topic Given by: Global Moderator
Boards: All
remove_any
Delete posts - Any post Given by: Global Moderator
Boards: All
remove_own
Delete posts - Own post Given by: Global Moderator
Boards: All
remove_replies
Delete replies to own topics Given by: Global Moderator
Boards: All
report_any
Report posts to the moderators Given by: Global Moderator
Boards: All
send_topic
Send topics to friends Given by: Global Moderator
Boards: All
split_any
Split any topic Given by: Global Moderator
Boards: All
view_attachments
View attachments Given by: Global Moderator
Boards: All





Grudge

Ahhh... ok. Change moderate_forum in the code I posted to moderate_board, my mistake
I'm only a half geek really...

oscar2001

Quote from: Grudge on December 02, 2004, 06:22:09 PM
Ahhh... ok. Change moderate_forum in the code I posted to moderate_board, my mistake
Cool all working now :) thanks for all the help :)

Alexandre P.

I've installed the mod, and I don't see anything changed :o  http://www.livresanspage.net/forum/index.php

I applied the mod with the Package Manager, and runned TopicSolveddb.php.  Then, I did create (and marked) a new board for Topic Solved, but I can't see any new button or option for creating a question !
Aucun support par M.P., courriel ou messagerie instantanée / No support by P.M., email or I.M.

Grudge

On a topic solved board, it doesn't add new buttons per se, but when you add a topic it should put accept/reject links next to every post in that topic, then to make a topic as solved you meerly "accept" a post. When you accept a post it should go green and the icon change to a thumbs up (This can be set from @Feature Settings"). Basically, the mod uses normal topics, just adds the functionality to accept and reject answers
I'm only a half geek really...

Sixpack

Got it working as well.

Thanks Grudge and oscar2001 :D

hxxp:www.theoscarspot.com [nonactive]

johnm

just a quick one i have just installed this and it has only been applied to the default theme what files do i need to edit to get this to work on all of my themes

thanks

Grudge

Open up the package file (tar.gz) and inside look at the .mod file inside. Most "custom" themes will only have modified the MessageIndex and probably Display templates. Basically, go down through the mod file, looking for the changes to these files (MessageIndex.template.php and Display.template.php) and follow the search/replace instructions for each of the themes you have.
I'm only a half geek really...

Advertisement: