• Welcome to Simple Machines Community Forum. Please login or sign up.
September 23, 2021, 10:09:12 AM

News:

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


Post Template Mod

Started by jhaagmans, August 17, 2009, 04:42:27 AM

Previous topic - Next topic

jhaagmans

Link to Mod

This mod will enable you to set a default text for new topics in a board. This can come in very handy if you have specific rules about how to post in certain boards, for example when you have a download board or a board in which you can buy or sell items.

The mod will only change the post template of a board for which you set such a template and can be changed in the Manage Board screen.

Untested with 2.0, any comments are highly appreciated!

Costa

Cool cool, nice mod!
Thank's for sharing this with us.

Farewell
-Costa
Hugo Costa
Todas as MP's a pedir ajuda são sujeitas a radioactividade, microondas, queimadas e atiradas borda fora.

"At least someone appreciates the fact that I am doing and not thinking..."
"Laziness is counter-revolutionary."

jhaagmans

No problem, I'm glad to help :)

I will of course make more mods in the future. We're running a forum that needs quite a few custom-made modifications. I will work on a version for 2.0 as we're planning on moving to it in the future.

Blinker

Hi jhaagmans

I just wanted to thank you for this absolutely brilliant mod!

SMF has needed something like this for a long time. I wanted a mod to perform this function a while ago and the best I could find were the rather messy workarounds here - http://www.simplemachines.org/community/index.php?topic=117088.0

Your mod is simple and elegant. It also installed FLAWLESSLY on a very heavily modded 1.1.10 (with no custom theme edits required either...that's always a bonus!). Credit where it's due for a job well done. :)

jhaagmans

Quote from: Blinker on August 17, 2009, 08:53:12 AM
Hi jhaagmans

I just wanted to thank you for this absolutely brilliant mod!

SMF has needed something like this for a long time. I wanted a mod to perform this function a while ago and the best I could find were the rather messy workarounds here - http://www.simplemachines.org/community/index.php?topic=117088.0

Your mod is simple and elegant. It also installed FLAWLESSLY on a very heavily modded 1.1.10 (with no custom theme edits required either...that's always a bonus!). Credit where it's due for a job well done. :)
Thank you very much. Nice to hear! The reason why it works on a heavily modded board is that we also have many mods installed, so I had to find some workarounds to make it work on our board and on a clean board. The only known issue is with the Age and Gender mod, which adds one comma too many somewhere. The only way to work around that issue is in fact editing the Age and Gender mod.

Jessikard

August 17, 2009, 11:31:12 AM #5 Last Edit: August 17, 2009, 11:54:38 AM by Jessikard
 8) would be nice - screenshots available to see ?
and is it possible o choose the boards where you want to use it ?

error: the package is invalid or damaged  :o

jhaagmans

Quote from: Jessikard on August 17, 2009, 11:31:12 AM
8) would be nice - screenshots available to see ?
and is it possible o choose the boards where you want to use it ?
I can't post screenshots right now, will get to that soon. Basically the only field it adds is a post template text area on your Board Management page.

It's not only possible to choose the board you want to use it, you can specify the default post template for every specific board! Downside is that you can't specify one forum-wide post template, I might include that option in the future. If you want a forum-wide post template, you will have to edit every board individually or run the MySQL query UPDATE smf_boards SET post_template = 'The text to add' WHERE post_template = NULL or something like that using phpMyAdmin. This will keep any post templates that are already set up intact.

Quoteerror: the package is invalid or damaged  :o
Try and use the .zip package on the mod page as an alternative. I've just added it and it might fix this.

Jessikard

 ;D perfect - it works

and it is wonderful to get one text for one board

great mod - thx

Sabre™

Nice 8)

Keep up the good work :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


fals







500fan.dk - SMF 2.0 ~ custom theme
ls-forum.dk - SMF 2.0.2 ~ custom theme and custom iPhone theme

4b11l

Excellent mod!

Will there be a chance that we can apply a template for replies in a certain thread? Or to reply/threads in a board?

I have a board setup where I have 5 threads where people post reviews. The board is a reply only type board and an addition like this to just the replies on a thread would be great!

If it's an easy fix, will you be able to help me implement it? Thanks. :)

If not, hopefully a new version comes out soon.

JakJak

Nice mod. Except it doesn't let me upload it.  ::)

jhaagmans

Quote from: 4b11l on September 08, 2009, 12:27:17 AM
Excellent mod!

Will there be a chance that we can apply a template for replies in a certain thread? Or to reply/threads in a board?

I have a board setup where I have 5 threads where people post reviews. The board is a reply only type board and an addition like this to just the replies on a thread would be great!

If it's an easy fix, will you be able to help me implement it? Thanks. :)

If not, hopefully a new version comes out soon.
It could be done. I don't have time for it ATM and you would have to expand the mod for it.

As a hack to this mod, you could make a select list that says "apply to new topic, apply to reply, apply to both" and set the post template mod in replies as well. But it's not pretty.

jhaagmans

Quote from: JakJak on September 08, 2009, 02:13:28 AM
Nice mod. Except it doesn't let me upload it.  ::)
Tell me what happens.

JakJak

Quote from: jhaagmans on September 08, 2009, 03:11:00 AM
Quote from: JakJak on September 08, 2009, 02:13:28 AM
Nice mod. Except it doesn't let me upload it.  ::)
Tell me what happens.

It says one of the files can't do the edits.

jhaagmans

Quote from: JakJak on September 08, 2009, 03:21:40 AM
Quote from: jhaagmans on September 08, 2009, 03:11:00 AM
Quote from: JakJak on September 08, 2009, 02:13:28 AM
Nice mod. Except it doesn't let me upload it.  ::)
Tell me what happens.

It says one of the files can't do the edits.
Could you give me some more information? Which file and what other mods do you have installed? It's probably a problem with another mod, so I might not be able to help you. It's nearly impossible to keep a mod from colliding with any other mod. However, this has been tested along with many other mods.

4b11l

Quote from: jhaagmans on September 08, 2009, 03:10:36 AM
Quote from: 4b11l on September 08, 2009, 12:27:17 AM
Excellent mod!

Will there be a chance that we can apply a template for replies in a certain thread? Or to reply/threads in a board?

I have a board setup where I have 5 threads where people post reviews. The board is a reply only type board and an addition like this to just the replies on a thread would be great!

If it's an easy fix, will you be able to help me implement it? Thanks. :)

If not, hopefully a new version comes out soon.
It could be done. I don't have time for it ATM and you would have to expand the mod for it.

As a hack to this mod, you could make a select list that says "apply to new topic, apply to reply, apply to both" and set the post template mod in replies as well. But it's not pretty.

Thanks. Hopefully a new update will come out soon.

jhaagmans

Quote from: jhaagmans on September 08, 2009, 07:52:20 AM
Quote from: JakJak on September 08, 2009, 03:21:40 AM
Quote from: jhaagmans on September 08, 2009, 03:11:00 AM
Quote from: JakJak on September 08, 2009, 02:13:28 AM
Nice mod. Except it doesn't let me upload it.  ::)
Tell me what happens.

It says one of the files can't do the edits.
Could you give me some more information? Which file and what other mods do you have installed? It's probably a problem with another mod, so I might not be able to help you. It's nearly impossible to keep a mod from colliding with any other mod. However, this has been tested along with many other mods.

In addition to this: there's a known problem with the Age & Gender Board Filter mod. That mod has a comma that shouldn't be there. I'm sure there are more problems than this, but it's quite a light mod, so it should have no problem with most other mods.

Mraza

September 09, 2009, 08:38:38 PM #18 Last Edit: September 10, 2009, 12:17:25 AM by Mraza
awesome work.... works great... thanks

A question.. is that possible for you to make that template not editable. i mean if i will start a new topic there is the template of my message which i saved in setting and now i wants to write content in front of them like:

First Name: (here i can write) 

and the first name: which i store in my template is not editable in editor.?...can you do this plz... thanks
Signature:
Old Software Engineers Never Dies, They Just Log Out...
! ! ! ! ! 5 Best Movies Thread ! ! ! ! !

jhaagmans

Quote from: Mraza on September 09, 2009, 08:38:38 PM
awesome work.... works great... thanks

A question.. is that possible for you to make that template not editable. i mean if i will start a new topic there is the template of my message which i saved in setting and now i wants to write content in front of them like:

First Name: (here i can write) 

and the first name: which i store in my template is not editable in editor.?...can you do this plz... thanks
Hi,

No, that's not what I intended to do. I wanted this to be flexible so that it actually is a template. For what you want you'd need to add fields that users can fill in and you would need a new table in your database to fill these fields. I have no time to do this ATM.

Advertisement: