Skip to main content
Topic: Start discussion button (Read 2285 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Start discussion button

I recommended ElkArte on a forum someone I knew started. It was like he want to use a Start Discussion button on home page.

When I checked the calender module, I saw that there is a " Post in " option which gives a list as seen below. Wondering whether we can adopt the code for start discussion button as well ?




Re: Start discussion button

Reply #1

I'd discourage that just for one reason - noobs.
Basically a noob would:
-Hit the button (admitting he can see it)
-Type stuff
-Post the topic in the default/wrong section

At least with separated sections he is forced to at least enter into a section and post there, not that it cures stupidity but at least it tries to.. >:D
~ SimplePortal Support Team ~

Re: Start discussion button

Reply #2

But, do you know how to @Flavio93Zena ?

Re: Start discussion button

Reply #3

I think there was some kind of a mod doing something similar, but I can't remember very well :/
~ SimplePortal Support Team ~

Re: Start discussion button

Reply #4

Could you to tell me which code goes to which template ?

Re: Start discussion button

Reply #5

I guess BoardIndex.template.php. Correct ?

Re: Start discussion button

Reply #6

Yeah that one is for sure unless emanuele got some more surprising hacks such as the last time <.<
~ SimplePortal Support Team ~

Re: Start discussion button

Reply #7

Quote from: Wizard – When I checked the calender module, I saw that there is a " Post in " option which gives a list as seen below. Wondering whether we can adopt the code for start discussion button as well ?
To have the "new topic" button I think you just need a link to:
Code: [Select]
$scripturl . '?action=post;'
and then to run this code:
Code: [Select]
			$context['show_boards_dropdown'] = true;
require_once(SUBSDIR . '/Boards.subs.php');
$context += getBoardList(array('not_redirection' => true, 'allowed_to' => 'post_new'));
$context['boards_current_disabled'] = false;
if (!empty($board))
{
foreach ($context['categories'] as $id => $values)
if (isset($values['boards'][$board]))
{
$context['categories'][$id]['boards'][$board]['selected'] = true;
break;
}
}
somewhere while loading the post page, that should load the select for picking the board.
Bugs creator.
Features destroyer.
Template killer.