"Close Topic"
|
Posted
#77862
(In Topic #15998)
|
|
|---|---|
|
Community saint |
I don't see an option (when logged on as a test user account)… guessing it would be in the drop down box below the message like it is when I am on as admin. But it's not there. I checked the site tree editor and forum editor, and don't see that as something available, so wondering if I am just missing something, or if perhaps it just wasn't implemented. Thanks Paul
Paul
Webmaster: Air-RC An RC Aircraft Community. |
|
Posted
|
|
|
Community saint |
That looked ok, so I worked backwards and found ocf_read_in_topic where it get's the information used in the stuff I mentioned above. That function is in ocf_topicview.php … and it looks ok there as well: Code
if (($topic_info['t_cache_first_member_id']==get_member()) && (has_specific_permission(get_member(),'close_own_topics')) && ($topic_info['t_is_open']==0))
so if the id of the poster of the first message equals the current users ID, and they have permission to close own topics, and the topic is open, then 'may_close_topic' should be set right and show up. So not sure why the option is not showing up for my test user. So I dug in further and found has_specific_permission in permissions.php. That looks ok, it searches *_gsp database… it appears it searches for 'close_own_topics' which is in the database as enabled (a 1) for all usergroups. Though that code is a bit abstract (maybe because it's late) to me. So I pounded my head on the desk a bit, then I went back to the code section from ocf_topicview that I posted above…. I took out one part at a time, and found that if the : Code
($topic_info['t_is_open']==0)
was removed, then it did show up. Then my too late at night brain realized that the above didn't make sense. if is_open is false? That means it's already closed. So I changed that to an is_open==1 and the option to close the topic shows up. Issue fixed/solved. New issue. Selecting 'close thread' and pressing proceed, and the thread does not get closed…. AAAAAAAAAAAARRRRRRRRRRRRGHHHHHHHH! I'll have to pick this up tomorrow.
Paul
Webmaster: Air-RC An RC Aircraft Community. |
|
Posted
|
|
|
Community saint |
So what happens to the 'close_topic' option when it is passed back from that select form? In topics php you find the close_topic function… but that doesn't seem to be it. argh again. I must go to sleep.
Paul
Webmaster: Air-RC An RC Aircraft Community. |
|
Posted
|
|
|
Community saint |
I am assuming so, but sometimes our sleeping brains skip the obvious. I am also guessing you set the Close own topics for all levels of topics (low, mid, and high level), believing that forum posts are mid level. I know, I am likely shooting out things you are already aware of and check out, but just in case you accidently overlooked these things….
Legends of Nor'Ova: A site powered by ocPortal; a role playing community where you can purchase the LofN core rule book and participate in the forum-based RPG.
Like ocPortal? Want to thank Chris and gang somehow? Then help out in the chat room! It really needs your help! Just open it in a tab everytime you open your web browser, and when you hear a "ding", check it out!
"Those who want help should first be willing to give help."
|
|
Posted
|
|
|
Community saint |
Paul
Webmaster: Air-RC An RC Aircraft Community. |
|
Posted
|
|
|
Community saint |
that function calls ofc_edit_topic, which has: Code
if (!ocf_may_moderate_forum($forum_id))
In it, so if any user is not a moderator then the topic is never closed. well may_moderate_forum seems to include edit_own_mid_range as part of it, so I turned that on… still no go. hmm…
Paul
Webmaster: Air-RC An RC Aircraft Community. |
|
Posted
|
|
|
Community saint |
Paul
Webmaster: Air-RC An RC Aircraft Community. |
|
Posted
|
|
|
Community saint |
Code
function ocf_edit_topic($topic_id,$description=NULL,$emoticon=NULL,$validated=NULL,$open=NULL,$pinned=NULL,$sunk=NULL,$cascading=NULL,$reason='',$title=NULL)
Modified : added t_is_open as a return in the array, then if they are not moderator, it checks they posted the first message, it is open and they have permission to close their own topics. if not, then $open is forced to 1 to keep it open. If so, open stays whatever was passed to it. In the case of closing a topic, 0 is passed to it. Works like a charm.
Paul
Webmaster: Air-RC An RC Aircraft Community. |
|
Posted
|
|
|
ocStaff (admin) |
If I answered something that you think should be in the documentation, please take the initiative and add it to the community documentation. We really need people to help out here and build a well-organised large support resource. |
|
Posted
|
|
|
Community saint |
Paul
Webmaster: Air-RC An RC Aircraft Community. |
|
Posted
|
|
|
ocStaff (admin) |
If I answered something that you think should be in the documentation, please take the initiative and add it to the community documentation. We really need people to help out here and build a well-organised large support resource. |
|
Posted
|
|
|
Community saint |
Paul
Webmaster: Air-RC An RC Aircraft Community. |
|
Posted
|
|
|
Community saint |
Bob |
|
Posted
|
|
|
Community saint |
Paul
Webmaster: Air-RC An RC Aircraft Community. |
|
Posted
|
|
|
ocStaff (admin) |
If I answered something that you think should be in the documentation, please take the initiative and add it to the community documentation. We really need people to help out here and build a well-organised large support resource. |
|
Posted
|
|
|
Community saint |
Paul
Webmaster: Air-RC An RC Aircraft Community. |
|
Posted
|
|
|
Well-settled |
I'm hoping that any significant issues will have been found by then and updates files made available so that hopefully there are fewer issues for me to deal with. |
|
Posted
|
|
|
ocStaff (admin) |
All found issues affecting v9 are in the bugs database, this was fixed many versions back. If I answered something that you think should be in the documentation, please take the initiative and add it to the community documentation. We really need people to help out here and build a well-organised large support resource. |
1 guests and 0 members have just viewed this: None
Control functions:







