default message
5 posters
Page 1 of 2
Page 1 of 2 • 1, 2
default message
i sued this tutorial http://www.fmcodes.com/t797-set-default-message-in-a-textarea but when i went to create a enw topic nothing showed up
btw my forum version is punbb
btw my forum version is punbb
Last edited by darkgoku on October 18th 2014, 20:18; edited 2 times in total
darkgoku- Forumember
- Posts : 340
Reputation : 3
Language : English
Re: default message
it is not it is punbb
darkgoku- Forumember
- Posts : 340
Reputation : 3
Language : English
Re: default message
i just noticed the version difference but is there a way i can do it for punbb
darkgoku- Forumember
- Posts : 340
Reputation : 3
Language : English
Re: default message
You must change f=FORUMID to the ID of the forum you want this to work in.
Did you change the "f=FORUMID" ?
Re: default message
my forum version is punbb is there a way i can change the code to work for punbb
darkgoku- Forumember
- Posts : 340
Reputation : 3
Language : English
Re: default message
i did that it did not work maybe u can provide me with example
darkgoku- Forumember
- Posts : 340
Reputation : 3
Language : English
Re: default message
its down at the bottom the suggestions forum
darkgoku- Forumember
- Posts : 340
Reputation : 3
Language : English
Re: default message
If you can't help me, I can't help you. Please provide me with a link to your forum, and which forum inside your forum do you want this to be for.
Also, paste the code you're using here in a [code] bbcode as I cannot see the code on that link.
Also, paste the code you're using here in a [code] bbcode as I cannot see the code on that link.
Re: default message
- Code:
$(function() {
if (document.location.href.indexOf('post?f=FORUMID&mode=newtopic') > -1) {
$('#text_editor_textarea').val('CONTENT');
}
});
http://www.academyofeca.forumotion.com the forum i want with this is the Suggestions forum at the bottom
darkgoku- Forumember
- Posts : 340
Reputation : 3
Language : English
Re: default message
Try this:
Replace "CONTENT" with the content needed. Don't remove the ' ' though.
- Code:
$(function() {
if (document.location.href.indexOf('post?f=10&mode=newtopic') > -1) {
$('#text_editor_textarea').val('CONTENT');
}
});
Replace "CONTENT" with the content needed. Don't remove the ' ' though.
Re: default message
$(function() {
if (document.location.href.indexOf('post?f=10&mode=newtopic') > -1) {
$('#text_editor_textarea').val('TestTreest');
}
});
if (document.location.href.indexOf('post?f=10&mode=newtopic') > -1) {
$('#text_editor_textarea').val('TestTreest');
}
});
darkgoku- Forumember
- Posts : 340
Reputation : 3
Language : English
Re: default message
You didn't add any content.
Try this:
I believe "\n" is needed for breaks, otherwise the script won't work well.
- Code:
val('');
Try this:
- Code:
$(function() {
if (document.location.href.indexOf('post?f=10&mode=newtopic') > -1) {
$('#text_editor_textarea').val('[B]Field:[/b] Answer-Here\n
[b]Field2:[/b]Answer-Here\n');
}
});
I believe "\n" is needed for breaks, otherwise the script won't work well.
Last edited by Ramdaman on October 18th 2014, 19:54; edited 1 time in total
Re: default message
can u add the link for me then ill add the other stuff
darkgoku- Forumember
- Posts : 340
Reputation : 3
Language : English
Re: default message
i dont want it in one thread but when someones creates a new thread in suggestions
darkgoku- Forumember
- Posts : 340
Reputation : 3
Language : English
Re: default message
- Code:
jQuery(function() {
if (document.location.href.indexOf('/post?f=8&mode=newtopic') > -1) {
jQuery('#text_editor_textarea').text('[b]Website Name[/b]:\n[b]Web Address[/b]:\n[b]Language[/b]:\n[b]Description[/b]:');
}
});
In the script you must modify the if statement to the forum you want this to apply to :
Example change the number to your forum suggestions
if (document.location.href.indexOf('/post?f=33&mode=newtopic')
If you don't know how then post your link here
Re: default message
For it to go to the suggestions, it would be this:
- Code:
jQuery(function() {
if (document.location.href.indexOf('/post?f=10&mode=newtopic') > -1) {
jQuery('#text_editor_textarea').text('[b]Website Name[/b]:\n[b]Web Address[/b]:\n[b]Language[/b]:\n[b]Description[/b]:');
}
});
Re: default message
Hmm, it should work, but maybe it needs optimization for PunBB.
I already placed the correct Forum ID. "/post?f=10"
Is WYSIWYG mode enabled? And do you have any other JavaScripts which might intervene in this script working?
I already placed the correct Forum ID. "/post?f=10"
Is WYSIWYG mode enabled? And do you have any other JavaScripts which might intervene in this script working?
Re: default message
Is WYSIWYG mode enabled? And do you have any other JavaScripts which might intervene in this script working?
Re: default message
Mati wrote:Only edit the id and it should work simple as that.
Unfortunately it doesn't.
No it is not enabled. As for the javascripts i wouldn't have any idea if someone intervene the script. I know almost nothing about javascripts.Ramdaman wrote:Is WYSIWYG mode enabled? And do you have any other JavaScripts which might intervene in this script working?
Page 1 of 2 • 1, 2
Page 1 of 2
Permissions in this forum:
You cannot reply to topics in this forum