The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Anyway to enable post templates?

View previous topic View next topic Go down

In progress Anyway to enable post templates?

Post by Mario 2.0 on November 19th 2013, 8:20 pm

Is there an option when creating a forum that when a user creates a topic in that forum, the topic is filled in with a post template the member can fill in?

Mario 2.0
Forumember

Male Posts : 60
Reputation : 3
Language : English
Location : Virginia

Back to top Go down

In progress Re: Anyway to enable post templates?

Post by Ikerepc on November 19th 2013, 8:26 pm

Hello,

Yes, but you need edit all templates, and you will have bugs, but you can create html page for it.

Ikerepc
Active Poster

Male Posts : 1114
Reputation : 152
Language : Croatian, HTML, CSS, jQuery, JavaScript, PHP, SQL, Bascom, Python, C, FBD & LAD for PLC and more... Little English :D
Location : Around electronics and progmamming ;)

http://help.forumotion.com

Back to top Go down

In progress Re: Anyway to enable post templates?

Post by Ultron's Vision on November 19th 2013, 8:29 pm

As Zyon said, your safest bet is to create HTML pages to do that.

You could edit your templates, but that's not really viable for every forum, so it's only for certain cases.

JavaScript is also unreliable because the user can always disable it.

Ultron's Vision
Forumember

Male Posts : 634
Reputation : 45
Language : English | German | HTML | JavaScript | PHP | C++ | Perl | Java
Location : Vienna, Austria

http://duelacademy.net

Back to top Go down

In progress Re: Anyway to enable post templates?

Post by Ikerepc on November 19th 2013, 8:38 pm

And you can edit in templates new topic for each forum, and set html page, only you need to have few html pages for each forum.

But if you edit templates it will have A LOT OF BUGS, and with editing it too, so it is best to create html page, like on this forum, when you click up on link create tutorial (up, in navbar), you get html page with template for that, and when you choose sent, it sent topic direct to tutorials proposal. If you think on that. Also you can add more options of corse Smile

Ikerepc
Active Poster

Male Posts : 1114
Reputation : 152
Language : Croatian, HTML, CSS, jQuery, JavaScript, PHP, SQL, Bascom, Python, C, FBD & LAD for PLC and more... Little English :D
Location : Around electronics and progmamming ;)

http://help.forumotion.com

Back to top Go down

In progress Re: Anyway to enable post templates?

Post by Ange Tuteur on November 19th 2013, 9:23 pm

You could try this script:
Administration Panel > Modules > HTML & JAVASCRIPT > Javascript codes management
Name: What you wish
Placement: In all the pages
Source:
Code:
jQuery(function() {
if (document.location.href.indexOf('/post?f=1&mode=newtopic') > -1) {
jQuery('#text_editor_textarea').text('[b]Field 1:[/b]\n[b]Field 2:[/b]\n[b]Feild 3:[/b]');
}
});
What you need to edit:
You'll need to edit the underlined value to your forums FID(Forum ID).
('/post?f=1&mode=newtopic')

You can see this in the address bar while in your forum, or creating a new topic. It needs to be the forum where you'll want this script to work.


Lastly is the text inserted into the SCEditor textarea.
Code:
.text('[b]Field 1:[/b]\n[b]Field 2:[/b]\n[b]Feild 3:[/b]')
I already have 3 simple fields set up for you to fiddle with. If you need to add line breaks write '\n' the texts after that will display on a new line.

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum