News:

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

Main Menu

Quick New Topic Button

Started by Sesquipedalian, April 10, 2019, 08:42:25 AM

Previous topic - Next topic

Sesquipedalian

Link to the mod

Quick New Topic Button

A modification for Simple Machines Forum 2.1 that adds a button to the main forum menu to start a new topic.

Clicking the button takes the user straight to the post authoring form. The form will include a select menu where the user must choose a board in which to post the new topic.

There are benefits and drawbacks to installing this button. On the one hand, not forcing users to navigate to a board before they can post makes it easier for inexperienced users to get involved in your community. On the other hand, this also increases the likelihood that users will post a new topic before reading the existing topics in a board. So whether this button is helpful or unhelpful will depend on the nature of your community.

The button is not shown to anyone when you first install the mod. It must be toggled on for specific members or membergroups (see below) before it will appear.


Settings

There is one administrator setting, Membergroups that see New Topic button in main menu by default, available in Administration Center ► Features and Options ► Layout. Groups selected in this setting will see the button by default, while unselected groups will not. So if you want to show the button to new members but not to more experienced ones (or vice versa), you can do that here.

Note that the administrator setting merely sets defaults. Individual members can always override these defaults using the Show New Topic button in main menu setting, available in Profile ► Look and Layout.

Also note that the button will never be shown to members who are not allowed to post anywhere in the forum (e.g. banned members).


License

Quick New Topic Button is released under the MIT License. A full copy of this license is included in the package file.


Changelog

Version 1.3:
  • Added Turkish translation

Version 1.2:
  • Fixes undefined index error when viewing new member theme options

Version 1.1:
  • Added Latin Spanish translation

Version 1.0:
  • Initial release
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

Pipke

good job havent test it, this was on my project, still weird this isnt default/core on smf2.1
"If something is wrong, fix it if you can. But train yourself not to worry: Worry never fixes anything."

Click here to view my mods for SMF

Hey 👋 Did i helped... you like what i do. You can now buy me a coffee! ☕

Arantor

I love the idea but I can see hw this really shouldn't be core because it can really encourage people to post things in the wrong place without even trying, especially on bigger forums like this one with hundreds of boards.

Seyit replikacep.com

#3
they did not accept as I did before

I already did the same.   i did it before you
https://custom.simplemachines.org/mods/index.php?mod=4201

http://www.smf.gen.tr/smf/index.php?topic=2623.0


they did not approve without reason.

no one does not help because of tiny things did not approve

they didn't help me
because they're already removed from the checklist

Arantor

Odds are you were advised and that the advice given was too difficult to implement, based on previous history where I've given up trying to help you.

Seyit replikacep.com

Quote from: Arantor on April 10, 2019, 01:36:15 PM
Odds are you were advised and that the advice given was too difficult to implement, based on previous history where I've given up trying to help you.

If you add this type, unfortunately you did not say I would accept.


Anyway, I'm not sharing it anymore, and I'm just doing it for myself.

GigaWatt

Quote from: Arantor on April 10, 2019, 09:01:55 AM
I love the idea but I can see hw this really shouldn't be core because it can really encourage people to post things in the wrong place without even trying, especially on bigger forums like this one with hundreds of boards.

Mhm, fair point.

Though, as you said, like the concept ;).

@Replikacep: That image you attached, that's part of a private conversation between you and the SMF staff and that is not meant for the public. Don't actually know what the team policy is on this, but personally, I'm against this. Private messages are called private for a reason!
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Seyit replikacep.com

#7

https://www.simplemachines.org/community/index.php?topic=564509.0


Anyway, there's nothing to prolong.

I'm going to share what I do now only smf.gen.tr in this direction. Smf.gen.tr 
I will only share on this site

-Rock Lee-

Good job and thank you very much for taking the time @Sesquipedalian. I leave the translation to Latin Spanish as usual :P.


Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!


Sesquipedalian

Quote from: Rock Lee on April 10, 2019, 02:19:54 PM
Good job and thank you very much for taking the time @Sesquipedalian. I leave the translation to Latin Spanish as usual :P.

Thanks! I've added your translation to version 1.1. :)


Quote from: Arantor on April 10, 2019, 09:01:55 AM
I can see hw this really shouldn't be core because it can really encourage people to post things in the wrong place without even trying, especially on bigger forums like this one with hundreds of boards.

Exactly.


Quote from: Replikacep on April 10, 2019, 01:19:02 PM
* complaints about failing the mod approval process, etc. *

I'm not sure what to tell you, man.


Quote from: Arantor on April 10, 2019, 09:01:55 AM
I love the idea
Quote from: Pipke on April 10, 2019, 09:01:06 AM
good job havent test it, this was on my project
Quote from: GigaWatt on April 10, 2019, 01:53:15 PM
like the concept
Quote from: Study Force on April 10, 2019, 03:46:08 PM
Like it!

Glad to hear it, folks. :)
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

Shades.

Just tested this on 2.1RC4 and get this error when clicking on "New Topic":

QuoteType of error
Undefined_vars
Error message
8: Undefined index: current_board
File
/home2/*****/public_html/*****/Sources/Class-SimTopics.php
Line
85
URL of page causing the error
https://*****/index.php?action=post

Backtrace information
#0: smf_error_handler()
Called from /home2/*****/public_html/*****/Sources/Class-SimTopics.php on line 85
#1: menuButtons()
Called from /home2/*****/public_html/*****/Sources/Subs.php on line 5149
#2: call_integration_hook()
Called from /home2/*****/public_html/*****/Sources/Subs.php on line 4890
#3: setupMenuContext()
Called from /home2/*****/public_html/*****/Sources/Subs.php on line 3703
#4: setupThemeContext()
Called from /home2/*****/public_html/*****/Sources/Subs.php on line 3860
#5: template_header()
Called from /home2/*****/public_html/*****/Sources/Subs.php on line 3483
#6: obExit()
Called from /home2/*****/public_html/*****/index.php on line 190
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Sesquipedalian

That's a bug in whatever mod supplied the Class-SimTopics.php file. It is assuming that there is always already a board selected when the user goes to the post editor. That was true in 2.0, but it is not in 2.1. That mod's author needs to update it to account for this difference in 2.1.

Note that the Quick New Topic Button mod didn't create this change in functionality. It just adds some UI to make the changed functionality more accessible. You can accomplish the same thing simply by typing "http://url.of.forum/index.php?action=post" directly into the browser address bar.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

Shades.

I'll have to look at this later but wonder if that would be the similar topics mod? So maybe these two mods are not compatible?
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Arantor

It's not an incompatibility, it's a straight-up bug in the similar topics mod. Other mods will likely trip it up too.

gevv

Hi,

@Sesquipedalian  There is incompatibility with SMF Post Prefix

Prefix selection section not showing.

Is there a solution.

Thanks
ElkArte is a modern, powerful community building forum software. https://www.elkarte.net/

Kindred

That would actually be on the post prefix author, IMO  - since this mod kicks off the new-post dialogue and it sound slike the post-prefix dialogue is being triggered by something else.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

More of a fundamental question: if prefixes are per board, and this takes you to the posting page without being in a board, what prefixes should it offer you?

Sesquipedalian

Kindred and Arantor are completely correct. The SMF Post Prefix mod needs to be updated in order to work properly with SMF 2.1 itself.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

Diego Andrés

It does work, it's just what arantor says, mod works per board prefix

SMF Tricks - Free & Premium Responsive Themes for SMF.

Sesquipedalian

#20
Quote from: Diego Andrés on February 10, 2022, 12:16:29 PMIt does work, it's just what arantor says, mod works per board prefix
The SMF Post Prefix mod needs some logic to handle the case where $board is empty. A simple way to do that would be to simply test that it isn't empty before proceeding; this would result in the prefix logic not operating when a post is created from the boardless posting page. A more thorough way to handle the situation might involve using JavaScript and AJAX calls to dynamically change the list of available prefixes based on which board the user selects in the "Post in" select menu.

... But none of this is relevant to the Quick New Topic mod.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

Diego Andrés

Quote from: Sesquipedalian on February 10, 2022, 12:29:31 PMusing JavaScript and AJAX calls to dynamically change the list of available prefixes based on which board the user selects

That's the plan, and then do the checking when saving.
Will not check this soon though, it's not really a feature for either mod

SMF Tricks - Free & Premium Responsive Themes for SMF.

Sesquipedalian

Well, you might want to do it sooner rather than later. Your mod's issue is with SMF 2.1 itself. You'll see the same issue crop up simply by going to ?action=post (as opposed to ?action=post;board=1) on any SMF 2.1 forum that has SMF Post Prefix installed, regardless whether Quick New Topic Button is installed. I'd recommend putting out a quick update now that just checks that $board isn't empty, and then later putting out another update with the more thorough fix.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

Seyit replikacep.com

fashion, can you add the language Turkish
I added it as a plugin.You cannot view this attachment.

Sesquipedalian

Thank you for this, Replikacep. 

I noticed two mistakes in your translation file:

  • There is a comment in the file that explains who created the Spanish translation. If you want to replace that with a comment about who created the Turkish translation, please feel free to do so. Otherwise, I will just remove the comment, since it doesn't apply to this file.
  • You forgot to translate part of the $helptxt string. Specifically, the phrase "(e.g. banned members)" is still in English.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

Seyit replikacep.com

I've completed the deficiencies.

You cannot view this attachment.

Sesquipedalian

Lovely. Thank you. I will add this to the next version.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

Wellwisher

Nice mod. funnily enough, I will be commissioning a similar work for my custom 2.1 theme. Convenience & speed are important tools for growing a community. If something isn't easy to use, members will drop like flies. My idea is to have a post box on the index page. User choses the boards to post in and bam! Post is published. I got the idea from reddit (see attached).

serdo

Is the plugin working?
I downloaded it but it doesn't show on the forum

Steve

It works fine. Did you select the membergroups that would be able to see it (including Administrator)?

Admin -> Configuration -> Features and Options -> Layout Tab
DO NOT pm me for support!

serdo


serdo


Steve

DO NOT pm me for support!

davo88

Drafts button not appearing when topic started with Quick New Topic Button
v2.1.4 fresh install
Mods - Quick New Topic button

I have been testing drafts and noticed the Drafts button did not always appear.
So did a fresh install of 2.1.4 with only the Quick New Topic Button mod installed.
When logged in as a Regular Member, if I start a new topic from within the General Discussion forum using the standard New Topic button

You cannot view this attachment.

I see the Drafts button as normal.

You cannot view this attachment.

If I then return to the main page and choose to start a new topic using the New topic mod button.

You cannot view this attachment.

The posting window opens but there is no Drafts button.

You cannot view this attachment.

Anyone else experiencing this ?

davo88

Forgot to mention... When logged in as Admin and topic started using Quick New Topic Button, the Drafts button does appear as normal.

Sesquipedalian

This isn't due to anything in the mod. It's just part of SMF's inherent behaviour.

Permission to save drafts depends on the board. But when a user goes to the boardless posting page (i.e. ?action=post as opposed to ?action=post;board=1), no board-based permissions apply. The one exception to this rule is administrators, who always have all permissions, which means that they always have board-based permissions even when outside a board.

You will see the same behaviour if you uninstall the mod and then manually type those URLs into your browser's address bar.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

davo88

Thanks for clearing that up Sesquipedalian. I had been going around and around all the permission settings for drafts and couldn't figure out what I had missed.

Sesquipedalian

I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

Advertisement: