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.

default message

Page 1 of 2 1, 2  Next

View previous topic View next topic Go down

Solved default message

Post by darkgoku on October 18th 2014, 3:06 pm

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


Last edited by darkgoku on October 18th 2014, 4:48 pm; edited 2 times in total

darkgoku
Forumember

Posts : 340
Reputation : 3
Language : English

Back to top Go down

Solved Re: default message

Post by Ramdaman on October 18th 2014, 3:07 pm

Is your forum version phpBB3?

Ramdaman
Active Poster

Male Posts : 1614
Reputation : 97
Language : English, Albanian, Macedonian, Russian | HTML, CSS
Location : New York City

http://ndihme.forumotion.com/forum

Back to top Go down

Solved Re: default message

Post by darkgoku on October 18th 2014, 3:08 pm

it is not it is punbb

darkgoku
Forumember

Posts : 340
Reputation : 3
Language : English

Back to top Go down

Solved Re: default message

Post by darkgoku on October 18th 2014, 3:10 pm

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

Back to top Go down

Solved Re: default message

Post by Ramdaman on October 18th 2014, 3:10 pm

You must change f=FORUMID to the ID of the forum you want this to work in.

Did you change the "f=FORUMID" ?

Ramdaman
Active Poster

Male Posts : 1614
Reputation : 97
Language : English, Albanian, Macedonian, Russian | HTML, CSS
Location : New York City

http://ndihme.forumotion.com/forum

Back to top Go down

Solved Re: default message

Post by darkgoku on October 18th 2014, 3:12 pm

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

Back to top Go down

Solved Re: default message

Post by Ramdaman on October 18th 2014, 3:14 pm

It said that it should work on other versions. Did you change the FORUMID?

Ramdaman
Active Poster

Male Posts : 1614
Reputation : 97
Language : English, Albanian, Macedonian, Russian | HTML, CSS
Location : New York City

http://ndihme.forumotion.com/forum

Back to top Go down

Solved Re: default message

Post by darkgoku on October 18th 2014, 3:19 pm

i did that it did not work maybe u can provide me with example

darkgoku
Forumember

Posts : 340
Reputation : 3
Language : English

Back to top Go down

Solved Re: default message

Post by Ramdaman on October 18th 2014, 3:29 pm

Can I get a link to your forum? And which forum do you want this to be for.

Ramdaman
Active Poster

Male Posts : 1614
Reputation : 97
Language : English, Albanian, Macedonian, Russian | HTML, CSS
Location : New York City

http://ndihme.forumotion.com/forum

Back to top Go down

Solved Re: default message

Post by darkgoku on October 18th 2014, 3:31 pm

its  down at the bottom the suggestions forum

darkgoku
Forumember

Posts : 340
Reputation : 3
Language : English

Back to top Go down

Solved Re: default message

Post by Ramdaman on October 18th 2014, 3:33 pm

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.

Ramdaman
Active Poster

Male Posts : 1614
Reputation : 97
Language : English, Albanian, Macedonian, Russian | HTML, CSS
Location : New York City

http://ndihme.forumotion.com/forum

Back to top Go down

Solved Re: default message

Post by darkgoku on October 18th 2014, 3:39 pm

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

Back to top Go down

Solved Re: default message

Post by Ramdaman on October 18th 2014, 3:41 pm

Try this:

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.

Ramdaman
Active Poster

Male Posts : 1614
Reputation : 97
Language : English, Albanian, Macedonian, Russian | HTML, CSS
Location : New York City

http://ndihme.forumotion.com/forum

Back to top Go down

Solved Re: default message

Post by darkgoku on October 18th 2014, 3:46 pm

it did not work

darkgoku
Forumember

Posts : 340
Reputation : 3
Language : English

Back to top Go down

Solved Re: default message

Post by Ramdaman on October 18th 2014, 3:46 pm

Paste the code with "CONTENT" filled in please.

Ramdaman
Active Poster

Male Posts : 1614
Reputation : 97
Language : English, Albanian, Macedonian, Russian | HTML, CSS
Location : New York City

http://ndihme.forumotion.com/forum

Back to top Go down

Solved Re: default message

Post by darkgoku on October 18th 2014, 3:50 pm

$(function() {
    if (document.location.href.indexOf('post?f=10&mode=newtopic') > -1) {
      $('#text_editor_textarea').val('TestTreest');
    }
});

darkgoku
Forumember

Posts : 340
Reputation : 3
Language : English

Back to top Go down

Solved Re: default message

Post by Ramdaman on October 18th 2014, 3:55 pm

You didn't add any content.
Code:
val('');
It's empty.

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, 4:24 pm; edited 1 time in total

Ramdaman
Active Poster

Male Posts : 1614
Reputation : 97
Language : English, Albanian, Macedonian, Russian | HTML, CSS
Location : New York City

http://ndihme.forumotion.com/forum

Back to top Go down

Solved Re: default message

Post by Mati on October 18th 2014, 3:56 pm

Hello,

You need to have the link for that thread you want the message to show.

Mati
Active Poster

Posts : 1883
Reputation : 283
Language : || HTML || CSS || jQuery ||
Location : At the Gym

http://footballforums.forumotion.net/

Back to top Go down

Solved Re: default message

Post by darkgoku on October 18th 2014, 3:58 pm

can u add the link for me then ill add the other stuff

darkgoku
Forumember

Posts : 340
Reputation : 3
Language : English

Back to top Go down

Solved Re: default message

Post by Mati on October 18th 2014, 4:00 pm

Tell me in which thread you wanna it.

Mati
Active Poster

Posts : 1883
Reputation : 283
Language : || HTML || CSS || jQuery ||
Location : At the Gym

http://footballforums.forumotion.net/

Back to top Go down

Solved Re: default message

Post by darkgoku on October 18th 2014, 4:09 pm

i dont want it in one thread but when someones creates a new thread in suggestions

darkgoku
Forumember

Posts : 340
Reputation : 3
Language : English

Back to top Go down

Solved Re: default message

Post by Mati on October 18th 2014, 4:21 pm

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

Mati
Active Poster

Posts : 1883
Reputation : 283
Language : || HTML || CSS || jQuery ||
Location : At the Gym

http://footballforums.forumotion.net/

Back to top Go down

Solved Re: default message

Post by Ramdaman on October 18th 2014, 4:23 pm

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]:');
}
});

Ramdaman
Active Poster

Male Posts : 1614
Reputation : 97
Language : English, Albanian, Macedonian, Russian | HTML, CSS
Location : New York City

http://ndihme.forumotion.com/forum

Back to top Go down

Solved Re: default message

Post by Luffy on October 18th 2014, 4:25 pm

Mati the forum id is 10. Ramdaman the code does not work.






Luffy
Manager
Manager

Male Posts : 4245
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: default message

Post by Ramdaman on October 18th 2014, 4:27 pm

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?

Ramdaman
Active Poster

Male Posts : 1614
Reputation : 97
Language : English, Albanian, Macedonian, Russian | HTML, CSS
Location : New York City

http://ndihme.forumotion.com/forum

Back to top Go down

Solved Re: default message

Post by Luffy on October 18th 2014, 4:29 pm

The tutorial doesn't say anything about any changes for other versions






Luffy
Manager
Manager

Male Posts : 4245
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: default message

Post by Ramdaman on October 18th 2014, 4:29 pm

Is WYSIWYG mode enabled? And do you have any other JavaScripts which might intervene in this script working?

Ramdaman
Active Poster

Male Posts : 1614
Reputation : 97
Language : English, Albanian, Macedonian, Russian | HTML, CSS
Location : New York City

http://ndihme.forumotion.com/forum

Back to top Go down

Solved Re: default message

Post by Mati on October 18th 2014, 4:30 pm

Only edit the id and it should work simple as that.

Mati
Active Poster

Posts : 1883
Reputation : 283
Language : || HTML || CSS || jQuery ||
Location : At the Gym

http://footballforums.forumotion.net/

Back to top Go down

Solved Re: default message

Post by Luffy on October 18th 2014, 4:33 pm

Mati™ wrote:Only edit the id and it should work simple as that.  

Unfortunately it doesn't.

@Ramdaman wrote:Is WYSIWYG mode enabled? And do you have any other JavaScripts which might intervene in this script working?
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. Confused

Luffy
Manager
Manager

Male Posts : 4245
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: default message

Post by Ramdaman on October 18th 2014, 4:33 pm

I guess we should await Ange Tutuer.

Ramdaman
Active Poster

Male Posts : 1614
Reputation : 97
Language : English, Albanian, Macedonian, Russian | HTML, CSS
Location : New York City

http://ndihme.forumotion.com/forum

Back to top Go down

Page 1 of 2 1, 2  Next

View previous topic View next topic Back to top


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