News:

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

Main Menu

auto-move for post in a certain board?

Started by Merv, September 29, 2008, 03:02:45 AM

Previous topic - Next topic

Merv

Hi i am running SMF 1.1.6 and i am trying to have an area on the board where Users can post topics, but not see them. One option was to make them auto move to a board that only admins could see, but if there is a way to just make it so users can post topics and not read in a board that would be good to.

any help and suggestions would be great.

[SiNaN]

Welcome to SMF Merv. :)

You can do that easily I guess, let's try this:

../Sources/Post.php

Find:

if (isset($topicOptions['id']))
$topic = $topicOptions['id'];


Replace:

If you want to move all topics created in every board:

if (isset($topicOptions['id']))
$topic = $topicOptions['id'];

require_once($sourcedir . '/MoveTopic.php');
moveTopics($topic, 'ID_BOARD_TO');


Or if you want to do this for only one board:

if (isset($topicOptions['id']))
$topic = $topicOptions['id'];

if($board == 'ID_BOARD_IN')
{
require_once($sourcedir . '/MoveTopic.php');
moveTopics($topic, 'ID_BOARD_TO');
}


Or if you want to do this for only one board and for users that are not admin:
if (isset($topicOptions['id']))
$topic = $topicOptions['id'];

if($board == 'ID_BOARD_IN' && !allowedTo('admin_forum'))
{
require_once($sourcedir . '/MoveTopic.php');
moveTopics($topic, 'ID_BOARD_TO');
}


Change 'ID_BOARD_TO' as the ID of the board to move the topics and 'ID_BOARD_IN' as the ID of the board that the topics should be moved from.

Or, you consider having a look at SMF 2.0 Beta 4 which has a built-in post-moderation feature.
Former SMF Core Developer | My Mods | SimplePortal

Merv


[SiNaN]

Former SMF Core Developer | My Mods | SimplePortal

Advertisement: