News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Is this possible

Started by The Domain Shop, November 01, 2010, 06:19:29 PM

Previous topic - Next topic

The Domain Shop

I want to make a board for registered members only, but want it to be visible to guests. i only want guests to see it but not allowed to have access into it until they register. Is this possible?

Oya

look for view only boards mod i think

The Domain Shop


Hj Ahmad Rasyid Hj Ismail

Have you look deeper into its support threads? You might find this: http://www.simplemachines.org/community/index.php?topic=146964.msg2734095#msg2734095 which is compatible for RC3.

The Domain Shop

Thanks ahrasis but im now using Rc4 just posted in that thread to see if it is going to be updated for RC4 http://www.simplemachines.org/community/index.php?topic=146964.520

Hj Ahmad Rasyid Hj Ismail

RC3 mod should work with RC4. You just need to emulate. You can do this at the (browse) package page, at the bottom right there is a button "advanced" where you can emulate your version to RC3. Install any RC3 mod using that. You can revert it back to RC4 whenever you want.

The Domain Shop

Quote from: ahrasis on November 10, 2010, 08:58:32 AM
RC3 mod should work with RC4. You just need to emulate. You can do this at the (browse) package page, at the bottom right there is a button "advanced" where you can emulate your version to RC3. Install any RC3 mod using that. You can revert it back to RC4 whenever you want.

Ha i see, only thing now is that i get Test failed errors.

./Sources/Load.php

Find
// Load the mod cache so we can know what additional boards they should see, but no sense in doing it for admins and guests

Add before
//-View Only Boards MOD- Start $user_info['view_only_boards'] = array(); $result = $smcFunc['db_query']('', ' SELECT b.id_board FROM {db_prefix}boards as b WHERE (FIND_IN_SET(' . implode(', b.member_groups_view) OR FIND_IN_SET(', $user_info['groups']) . ', b.member_groups_view)) AND NOT ' . $user_info['query_see_board'] ); while ($row = $smcFunc['db_fetch_row']($result)) $user_info['view_only_boards'][] = $row[0]; $query_see_board = $user_info['query_see_board']; if ($user_info['query_see_board'] != '1=1' && (empty($_REQUEST['action']) || !in_array($_REQUEST['action'], array('recent','profile','.xml','search','search2')))) if (!$user_info['is_guest']) $user_info['query_see_board'] = substr($query_see_board,0,-1) . ' OR FIND_IN_SET(\'' . implode('\', b.member_groups_view) OR FIND_IN_SET(\'', $user_info['groups']) . '\', b.member_groups_view))'; else $user_info['query_see_board'] = '(' . $query_see_board . ' OR FIND_IN_SET(-1, b.member_groups_view))'; //-View Only Boards MOD- End


./Themes/default/Recent.template.php

Find
foreach ($context['topics'] as $topic) { // Calculate the color class of the topic. $color_class = ''; if (strpos($topic['class'], 'sticky') !== false) $color_class = 'stickybg'; if (strpos($topic['class'], 'locked') !== false) $color_class .= 'lockedbg'; $color_class2 = !empty($color_class) ? $color_class . '2' : ''; echo ' <tr>

Replace
foreach ($context['topics'] as $topic) { // Calculate the color class of the topic. $color_class = ''; if (strpos($topic['class'], 'sticky') !== false) $color_class = 'stickybg'; if (strpos($topic['class'], 'locked') !== false) $color_class .= 'lockedbg'; $color_class2 = !empty($color_class) ? $color_class . '2' : ''; echo ' <tr ', $topic['board']['protected'] ? 'class="vob_protected"' : '' ,'>
   

Should i had this before installing or after?

Hj Ahmad Rasyid Hj Ismail

In case of error like this and you are using emulate, I think you better not proceed. I will look into that mod personally and see whether I can help upgrade it for RC4. In the meantime, also check if RC4 have such as a feature built-in (as I haven't go through it in depth yet myself :p).

The Domain Shop

Ok ahrasis thanks for your help :)

Hj Ahmad Rasyid Hj Ismail


The Domain Shop

Excellent ahrasis, all installed perfect thanks  ;)

Don't suppose you would like to put your magic into hide tag special  http://custom.simplemachines.org/mods/index.php?mod=118  quite a few members want this but no replies from author http://www.simplemachines.org/community/index.php?topic=32954.1340

Hj Ahmad Rasyid Hj Ismail

That is a top mod. I think the mod author and his team is also active. I better pass on that.  :)

The Domain Shop

Ok thanks for your help anyhow ;)

Advertisement: