News:

Wondering if this will always be free?  See why free is better.

Main Menu

Could someone update this?

Started by phiberoptik, April 23, 2015, 09:03:47 PM

Previous topic - Next topic

phiberoptik

For the majority of online gaming communities, from World of Warcraft to Counter-Strike, any group of players whom want to privately recruit new players into their team, have followed this guide: http://www.simplemachines.org/community/index.php?topic=142136.0  Unfortunately 8 years later, this is heavily out of date. Could someone update this for 2015?

margarett

#1
It's not exactly tested :P but here it goes
Sources/MessageIndex.php
Find
WHERE ' . ($pre_query ? 't.id_topic IN ({array_int:topic_list})' : 't.id_board = {int:current_board}') . (!$modSettings['postmod_active'] || $context['can_approve_posts'] ? '' : '
Add after
' . ($board == 1 && count(array_intersect(array(1, 2, 3, 5, 6, 7), $user_info['groups'])) == 0 && !$user_info['is_admin'] ? "AND (t.id_member_started = {int:current_member} OR IFNULL(t.is_sticky, 0) > 0)" : '') . '

Display.php
Find
$topicinfo = $smcFunc['db_fetch_assoc']($request);
$smcFunc['db_free_result']($request);

Add after
if ($board == 1 && !$topicinfo['is_sticky'] && $topicinfo['id_member_started'] != $user_info['id'] && count(array_intersect(array(1, 2, 3, 5, 6, 7), $user_info['groups'])) == 0)
fatal_error('You can only view an application that you started.');


BoardIndex.template.php
Find
if (!empty($board['last_post']['id']))
echo '
<p><strong>', $txt['last_post'], '</strong>  ', $txt['by'], ' ', $board['last_post']['member']['link'] , '<br />
', $txt['in'], ' ', $board['last_post']['link'], '<br />
', $txt['on'], ' ', $board['last_post']['time'],'
</p>';

Replace with:
if (!empty($board['last_post']['id']))
{
global $user_info;
if ($board['id'] == 1 && (in_array('0', $user_info['groups']) || $context['user']['is_guest']))
echo '<p>You cannot view posts in this board.</p>';
else
echo '
<p><strong>', $txt['last_post'], '</strong>  ', $txt['by'], ' ', $board['last_post']['member']['link'] , '<br />
', $txt['in'], ' ', $board['last_post']['link'], '<br />
', $txt['on'], ' ', $board['last_post']['time'],'
</p>';
}
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

phiberoptik

#2
A little late! Thank you for the response, I haven't yet tried it as my team decided to go with phpbb. I'll try out your changes soon!

Edit: The second block of MessageIndex.php should be Display.php I believe.

phiberoptik

Ok so we are getting close but I am still able to read other threads not created by me. Granted it is 4am Ill try again after coffee tomorrow.

Kindred

Why not just use the approve/unapprove feature?

Make all messages in the board require approval.
Make your clan leaders moderators in that board.

Now users can submit applications and read the comments but they can not see any other user's unapproved topics...

Or use the simple desk mod....
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

phiberoptik

Quote from: Kindred on May 09, 2015, 07:19:40 AM
Why not just use the approve/unapprove feature?

Make all messages in the board require approval.
Make your clan leaders moderators in that board.

Now users can submit applications and read the comments but they can not see any other user's unapproved topics...

Or use the simple desk mod....
Because this feature works the best when creating a php form that does php form -> post. The php form -> post
bypasses the need to be approved. Also; simple desk mod doesn't do what I need in a user friendly [read: idiot proof] way as well as provides many more features I don't need/want.





Kindred

I believe that approval status of the post is one of the arguments that can be passed in the createpost function
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

phiberoptik

Quote from: Kindred on May 09, 2015, 10:35:56 AM
I believe that approval status of the post is one of the arguments that can be passed in the createpost function

That's above my pay grade, could you point me in the right direction?

margarett

Quote from: phiberoptik on May 09, 2015, 03:57:06 AM
Ok so we are getting close but I am still able to read other threads not created by me. Granted it is 4am Ill try again after coffee tomorrow.
Do you conform that all changes were performed? If the "old" code worked, this one should too.

Quote from: phiberoptik on May 09, 2015, 02:43:40 AM
Edit: The second block of MessageIndex.php should be Display.php I believe.
Indeed it is, sorry.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

phiberoptik

Quote from: margarett on May 09, 2015, 04:56:47 PM
Do you conform that all changes were performed? If the "old" code worked, this one should too.

Indeed it is, sorry.

I believe so yes, I'll give it another go in a little bit.

Advertisement: