SimplePortal

Customization => Blocks and Modifications => Mod Requests => Topic started by: wiecher on December 02, 2010, 08:52:26 AM

Title: automatically shoutbox messages in a topic
Post by: wiecher on December 02, 2010, 08:52:26 AM
Hello
Is there an option to automatically shoutbox messages in a topic to post?

Gr wiecher
Title: Re: automatically shoutbox messages in a topic
Post by: grafitus on December 02, 2010, 09:54:03 AM
./Sources/Subs-Portal.php
Code: (Find) [Select]
global $smcFunc, $user_info;

if ($user_info['is_guest'])
Code: (Replace) [Select]
global $smcFunc, $user_info, $sourcedir;

if ($user_info['is_guest'])

Code: (Find) [Select]
$shoutbox['num_shouts']++;
if ($shoutbox['num_shouts'] > $shoutbox['num_max'])
Code: (Replace) [Select]
$board_id = 76; // EDIT
$subject = 'New Shout!'; // EDIT

require_once($sourcedir . '/Subs-Post.php');

$msgOptions = array(
'subject' => $subject,
'body' => $shout,
);
$topicOptions = array(
'board' => $board_id,
'mark_as_read' => false,
);
$posterOptions = array(
'id' => $user_info['id'],
'name' => $user_info['name'],
'email' => $user_info['email'],
'update_post_count' => !$user_info['is_guest'],
);

createPost($msgOptions, $topicOptions, $posterOptions);

$shoutbox['num_shouts']++;
if ($shoutbox['num_shouts'] > $shoutbox['num_max'])
Title: Re: automatically shoutbox messages in a topic
Post by: wiecher on December 02, 2010, 09:57:53 AM
Ok thanks.
Which topic is it of ours?

Gr Wiecher
Title: Re: automatically shoutbox messages in a topic
Post by: wiecher on December 02, 2010, 06:37:48 PM
Here is mine subs.portal.php.
Can you please help me ?

Title: Re: automatically shoutbox messages in a topic
Post by: grafitus on December 04, 2010, 11:48:07 AM
Which topic is it of ours?
What you mean?
Title: Re: automatically shoutbox messages in a topic
Post by: wiecher on December 04, 2010, 04:18:24 PM
Which topic is it of ours?
What you mean?
Can you take a look at mine attachment please ?
Title: Re: automatically shoutbox messages in a topic
Post by: grafitus on December 04, 2010, 04:37:22 PM
Not Subs-Post.php. You'll look at Subs-Portal.php.
Title: Re: automatically shoutbox messages in a topic
Post by: wiecher on December 04, 2010, 04:54:35 PM
Not Subs-Post.php. You'll look at Subs-Portal.php.

Ok thanks.
Where do the messages are?
They come in a topic?
SimplePortal 2.3.8 © 2008-2024, SimplePortal