News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

View Only Boards

Started by Rudolf, January 31, 2007, 10:45:10 AM

Previous topic - Next topic

Arantor

The changes in the RC2 installer were not done properly.

Substitute the following into DB_2_x.php in the installer zip file.

<?php
/***********************************************************************
View Only Boards MOD - version 1.2
This file makes the necessary changes in the database.
***********************************************************************/
if (!defined('SMF'))
die('<b>Error:</b> Cannot install - please verify you put this in the same place as SMF\'s index.php.');

vob_install();

// Used to avoid collision with variables in the global scope...
function vob_install()
{
global $smcFunc;

db_extend('packages');

$table_columns $smcFunc['db_list_columns']('{db_prefix}boards');

// The column exists so there's nothing to do here ...
if (in_array('member_groups_view'$table_columns))
return;

$vob_column = array(
'name' => 'member_groups_view',
'type' => 'varchar',
'size' => 255,
);

// Are we upgrading from smf 1.x?
if (in_array('memberGroupsView'$table_columns))
return $smcFunc['db_change_column']('{db_prefix}boards''memberGroupsView'$vob_column);

// Add the column the new column
return $smcFunc['db_add_column']('{db_prefix}boards'$vob_columnnull'skip_if_exists');
}
?>

scenerip2k

#461
wow, thank you so much Arantor!! It worked! Attached is the proper working version of the mod.

LondonDragon

Many thanks, just what I was looking for, worked a treat :)

Zmey

Quote from: Dismal Shadow on January 07, 2010, 03:40:32 PM
Quote from: Acer1 on January 07, 2010, 03:35:25 PM
I search this Mod for SMF2 RC2..... ! Nothing ? Sorry for my Bad English !
http://www.simplemachines.org/community/index.php?topic=146964.msg2424309#msg2424309   :)

Some of theme changes are missing in this patch compared to original one.
For example, BoardIndex.template.php is not modified.

LondonDragon

RC3 update in the near future? Thanks

Arantor

It hasn't been updated to even RC1, putting it over a year old... I wouldn't hold your breath for an RC3 update.

LondonDragon

Quote from: Arantor on March 11, 2010, 03:05:46 PM
It hasn't been updated to even RC1, putting it over a year old... I wouldn't hold your breath for an RC3 update.
There is an update to RC2 a few posts back which I was using, so there is hope ;)

Arantor

Not an official one by the author, though...

Rudolf

Hi all,

I'm looking into updating and fixing the mod for SMF2.
Still don't hold your breath. It would take some weeks. :(

Regards,
Rudolf
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

MaNaRa

Thanks a lot for this update!

running in RC3 ;D
mi versión de foro es SMF 2.0

scenerip2k

How to make it work in RC3 version:

1. Download the attached file
2. Install it you will get error message in ManageBoards.template.php
3. Edit your ManageBoards.template.php

Find: // List all the membergroups so the user can choose who may access this board.
foreach ($context['groups'] as $group)
echo '
<label for="groups_', $group['id'], '">
<input type="checkbox" name="groups[]" value="', $group['id'], '" id="groups_', $group['id'], '"', $group['checked'] ? ' checked="checked"' : '', ' class="input_check" />
<span', $group['is_post_group'] ? ' class="post_group" title="' . $txt['mboards_groups_post_group'] . '"' : '', $group['id'] == 0 ? ' class="regular_members" title="' . $txt['mboards_groups_regular_members'] . '"' : '', '>
', $group['name'], '
</span>
</label><br />';
echo '
<em>', $txt['check_all'], '</em> <input type="checkbox" class="input_check" onclick="invertAll(this, this.form, \'groups[]\');" /><br />
<br />
</dd>';


Replace with: // List all the membergroups so the user can choose who may access this board.
foreach ($context['groups'] as $group)
echo '
<input type="checkbox" name="groups[]" value="', $group['id'], '" id="groups_', $group['id'], '"', $group['checked'] ? ' checked="checked"' : '', ' /> <input type="checkbox" name="groupsView[]" value="', $group['id'], '" id="groupsView_', $group['id'], '"', $group['view'] ? ' checked="checked"' : '', ' /> <label for="groups_', $group['id'], '"><span', $group['is_post_group'] ? ' style="border-bottom: 1px dotted;" title="' . $txt['mboards_groups_post_group'] . '"' : '', '>', $group['name'], '</span></label><br />';
echo '
<em>', $txt['check_all'], '</em> <input type="checkbox" class="input_check" onclick="invertAll(this, this.form, \'groups[]\');" /><br />
<br />
</dd>';


4. Enjoy!

Calcricho

Quote from: scenerip2k on June 28, 2010, 01:51:04 AM
How to make it work in RC3 version:

1. Download the attached file
2. Install it you will get error message in ManageBoards.template.php
3. Edit your ManageBoards.template.php



Thanks

Cal   ;)

jaisi

Quote from: scenerip2k on June 28, 2010, 01:51:04 AM
How to make it work in RC3 version:

1. Download the attached file
2. Install it you will get error message in ManageBoards.template.php
3. Edit your ManageBoards.template.php

Find: // List all the membergroups so the user can choose who may access this board.
foreach ($context['groups'] as $group)
echo '
<label for="groups_', $group['id'], '">
<input type="checkbox" name="groups[]" value="', $group['id'], '" id="groups_', $group['id'], '"', $group['checked'] ? ' checked="checked"' : '', ' class="input_check" />
<span', $group['is_post_group'] ? ' class="post_group" title="' . $txt['mboards_groups_post_group'] . '"' : '', $group['id'] == 0 ? ' class="regular_members" title="' . $txt['mboards_groups_regular_members'] . '"' : '', '>
', $group['name'], '
</span>
</label><br />';
echo '
<em>', $txt['check_all'], '</em> <input type="checkbox" class="input_check" onclick="invertAll(this, this.form, \'groups[]\');" /><br />
<br />
</dd>';


Replace with: // List all the membergroups so the user can choose who may access this board.
foreach ($context['groups'] as $group)
echo '
<input type="checkbox" name="groups[]" value="', $group['id'], '" id="groups_', $group['id'], '"', $group['checked'] ? ' checked="checked"' : '', ' /> <input type="checkbox" name="groupsView[]" value="', $group['id'], '" id="groupsView_', $group['id'], '"', $group['view'] ? ' checked="checked"' : '', ' /> <label for="groups_', $group['id'], '"><span', $group['is_post_group'] ? ' style="border-bottom: 1px dotted;" title="' . $txt['mboards_groups_post_group'] . '"' : '', '>', $group['name'], '</span></label><br />';
echo '
<em>', $txt['check_all'], '</em> <input type="checkbox" class="input_check" onclick="invertAll(this, this.form, \'groups[]\');" /><br />
<br />
</dd>';


4. Enjoy!

it's working or not please reply ....

scenerip2k

#473
yeah its working if you follow the steps properly


jaisi

Quote from: scenerip2k on June 28, 2010, 01:51:04 AM
How to make it work in RC3 version:

1. Download the attached file
2. Install it you will get error message in ManageBoards.template.php
3. Edit your ManageBoards.template.php

Find: // List all the membergroups so the user can choose who may access this board.
foreach ($context['groups'] as $group)
echo '
<label for="groups_', $group['id'], '">
<input type="checkbox" name="groups[]" value="', $group['id'], '" id="groups_', $group['id'], '"', $group['checked'] ? ' checked="checked"' : '', ' class="input_check" />
<span', $group['is_post_group'] ? ' class="post_group" title="' . $txt['mboards_groups_post_group'] . '"' : '', $group['id'] == 0 ? ' class="regular_members" title="' . $txt['mboards_groups_regular_members'] . '"' : '', '>
', $group['name'], '
</span>
</label><br />';
echo '
<em>', $txt['check_all'], '</em> <input type="checkbox" class="input_check" onclick="invertAll(this, this.form, \'groups[]\');" /><br />
<br />
</dd>';


Replace with: // List all the membergroups so the user can choose who may access this board.
foreach ($context['groups'] as $group)
echo '
<input type="checkbox" name="groups[]" value="', $group['id'], '" id="groups_', $group['id'], '"', $group['checked'] ? ' checked="checked"' : '', ' /> <input type="checkbox" name="groupsView[]" value="', $group['id'], '" id="groupsView_', $group['id'], '"', $group['view'] ? ' checked="checked"' : '', ' /> <label for="groups_', $group['id'], '"><span', $group['is_post_group'] ? ' style="border-bottom: 1px dotted;" title="' . $txt['mboards_groups_post_group'] . '"' : '', '>', $group['name'], '</span></label><br />';
echo '
<em>', $txt['check_all'], '</em> <input type="checkbox" class="input_check" onclick="invertAll(this, this.form, \'groups[]\');" /><br />
<br />
</dd>';


4. Enjoy!
this code is not there in my Themes/default/BoardIndex.template.php please check once

scenerip2k

Quote from: jaisi on July 06, 2010, 09:03:39 AM
Quote from: scenerip2k on June 28, 2010, 01:51:04 AM
How to make it work in RC3 version:

1. Download the attached file
2. Install it you will get error message in ManageBoards.template.php
3. Edit your ManageBoards.template.php

Find: // List all the membergroups so the user can choose who may access this board.
foreach ($context['groups'] as $group)
echo '
<label for="groups_', $group['id'], '">
<input type="checkbox" name="groups[]" value="', $group['id'], '" id="groups_', $group['id'], '"', $group['checked'] ? ' checked="checked"' : '', ' class="input_check" />
<span', $group['is_post_group'] ? ' class="post_group" title="' . $txt['mboards_groups_post_group'] . '"' : '', $group['id'] == 0 ? ' class="regular_members" title="' . $txt['mboards_groups_regular_members'] . '"' : '', '>
', $group['name'], '
</span>
</label><br />';
echo '
<em>', $txt['check_all'], '</em> <input type="checkbox" class="input_check" onclick="invertAll(this, this.form, \'groups[]\');" /><br />
<br />
</dd>';


Replace with: // List all the membergroups so the user can choose who may access this board.
foreach ($context['groups'] as $group)
echo '
<input type="checkbox" name="groups[]" value="', $group['id'], '" id="groups_', $group['id'], '"', $group['checked'] ? ' checked="checked"' : '', ' /> <input type="checkbox" name="groupsView[]" value="', $group['id'], '" id="groupsView_', $group['id'], '"', $group['view'] ? ' checked="checked"' : '', ' /> <label for="groups_', $group['id'], '"><span', $group['is_post_group'] ? ' style="border-bottom: 1px dotted;" title="' . $txt['mboards_groups_post_group'] . '"' : '', '>', $group['name'], '</span></label><br />';
echo '
<em>', $txt['check_all'], '</em> <input type="checkbox" class="input_check" onclick="invertAll(this, this.form, \'groups[]\');" /><br />
<br />
</dd>';


4. Enjoy!
this code is not there in my Themes/default/BoardIndex.template.php please check once

I edited the code for you.

sharks

Here is how i did it. I installed the mod from scenerip2k's attachment above and then i proceeded to install it even thought it gave me an error. I then edited the file after installation. Is that correct?
Also, it would be great if someone could add a "check all" box for the visibility as well. :)

Thanks everyone for the great work!

Agent 0E

Quote from: Rudolf on May 20, 2007, 03:47:09 PM
In Errors.english.php
$txt['topic_gone'] = 'The topic or board you are looking for appears to be either missing or off limits to you.';

I love this mod. I also modified the errors.php message pointed out above to what I want it to say. However, I would also like to add a link to this error message that would direct members to a page such as FAQ's or some such to explain more in detail how the mod works and which boards are accessible to which membergroups.

IS this possible? If so, how do I go about doing it?

searchgr


Agent 0E

Does anyone know how to add a link?

Advertisement: