Advertisement:

Author Topic: Post Template Mod  (Read 45547 times)

Offline jhaagmans

  • Semi-Newbie
  • *
  • Posts: 23
Post Template Mod
« on: August 17, 2009, 04:42:27 AM »
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!

Offline Costa

  • SMF Hero
  • ******
  • Posts: 3,047
  • Gender: Male
  • Do NOT feed the trolls...
Re: Post Template Mod
« Reply #1 on: August 17, 2009, 05:56:20 AM »
Cool cool, nice mod!
Thank's for sharing this with us.

Farewell
-Costa
Hugo "Costa" Fernandes
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."

Offline jhaagmans

  • Semi-Newbie
  • *
  • Posts: 23
Re: Post Template Mod
« Reply #2 on: August 17, 2009, 07:13:08 AM »
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.

Offline Blinker

  • Full Member
  • ***
  • Posts: 472
  • Gender: Male
Re: Post Template Mod
« Reply #3 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. :)

Offline jhaagmans

  • Semi-Newbie
  • *
  • Posts: 23
Re: Post Template Mod
« Reply #4 on: August 17, 2009, 11:02:57 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.

Offline Jessikard

  • Jr. Member
  • **
  • Posts: 236
Re: Post Template Mod
« Reply #5 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 ?

error: the package is invalid or damaged  :o
« Last Edit: August 17, 2009, 11:54:38 AM by Jessikard »

Offline jhaagmans

  • Semi-Newbie
  • *
  • Posts: 23
Re: Post Template Mod
« Reply #6 on: August 17, 2009, 01:13:02 PM »
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
Code: [Select]
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.

Quote
error: 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.

Offline Jessikard

  • Jr. Member
  • **
  • Posts: 236
Re: Post Template Mod
« Reply #7 on: August 17, 2009, 02:00:37 PM »
 ;D perfect - it works

and it is wonderful to get one text for one board

great mod - thx

Offline Sabre™

  • SMF Hero
  • ******
  • Posts: 2,527
  • Gender: Male
  • IF IT AINT BROKE, I CAN FIX IT TILL IT IS!!
Re: Post Template Mod
« Reply #8 on: August 18, 2009, 02:15:42 AM »
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 ;)


Offline fals

  • Jr. Member
  • **
  • Posts: 287
  • Gender: Male
  • bouncing through codes...
    • Large Scale Forum Denmark
Re: Post Template Mod
« Reply #9 on: August 31, 2009, 04:47:46 PM »
Thanks !
500fan.dk - SMF 2.0 ~ custom theme
ls-forum.dk - SMF 2.0.2 ~ custom theme and custom iPhone theme

Offline 4b11l

  • Jr. Member
  • **
  • Posts: 355
Re: Post Template Mod
« Reply #10 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.

Offline JakJak

  • Semi-Newbie
  • *
  • Posts: 23
  • Gender: Male
Re: Post Template Mod
« Reply #11 on: September 08, 2009, 02:13:28 AM »
Nice mod. Except it doesn't let me upload it.  ::)

Offline jhaagmans

  • Semi-Newbie
  • *
  • Posts: 23
Re: Post Template Mod
« Reply #12 on: September 08, 2009, 03:10:36 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.

Offline jhaagmans

  • Semi-Newbie
  • *
  • Posts: 23
Re: Post Template Mod
« Reply #13 on: September 08, 2009, 03:11:00 AM »
Nice mod. Except it doesn't let me upload it.  ::)
Tell me what happens.

Offline JakJak

  • Semi-Newbie
  • *
  • Posts: 23
  • Gender: Male
Re: Post Template Mod
« Reply #14 on: September 08, 2009, 03:21:40 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.

Offline jhaagmans

  • Semi-Newbie
  • *
  • Posts: 23
Re: Post Template Mod
« Reply #15 on: September 08, 2009, 07:52:20 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.

Offline 4b11l

  • Jr. Member
  • **
  • Posts: 355
Re: Post Template Mod
« Reply #16 on: September 08, 2009, 11:33:54 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.

Offline jhaagmans

  • Semi-Newbie
  • *
  • Posts: 23
Re: Post Template Mod
« Reply #17 on: September 08, 2009, 11:38:29 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.

Offline Mraza

  • Full Member
  • ***
  • Posts: 510
  • Gender: Male
  • I ♥ SMF
Re: Post Template Mod
« Reply #18 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
« Last Edit: September 10, 2009, 12:17:25 AM by Mraza »
Signature:
Old Software Engineers Never Dies, They Just Log Out...
! ! ! ! ! 5 Best Movies Thread ! ! ! ! !

Offline jhaagmans

  • Semi-Newbie
  • *
  • Posts: 23
Re: Post Template Mod
« Reply #19 on: September 10, 2009, 04:49:43 AM »
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.