Default title for PMs

Go down

Solved Default title for PMs

Post by teliosmetonma1 on January 7th 2019, 6:32 pm

Hello, i would like to know if there is a way to have a default title when someone is trying to send a private message

like: "(no title)"

is there any code?

thank you  Hello
teliosmetonma1
teliosmetonma1
Forumember

Posts : 199
Reputation : 1
Language : greek

http://www.yugioh.gr

Back to top Go down

Solved Re: Default title for PMs

Post by SLGray on January 7th 2019, 7:45 pm

PM's without a title will not be sent.  Are you asking for a way to add a tag to the titles?



When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 44835
Reputation : 3163
Language : English
Location : United States

http://fmthemesdesignteam.forumotion.com/

Back to top Go down

Solved Re: Default title for PMs

Post by teliosmetonma1 on January 7th 2019, 7:49 pm

Im saying to press the "Send pm" button and this will be default:

teliosmetonma1
teliosmetonma1
Forumember

Posts : 199
Reputation : 1
Language : greek

http://www.yugioh.gr

Back to top Go down

Solved Re: Default title for PMs

Post by Menim on January 7th 2019, 8:08 pm

Hello,

This can be done, but I need your forum address.
Menim
Menim
Forumember

Posts : 87
Reputation : 12
Language : English

Back to top Go down

Solved Re: Default title for PMs

Post by teliosmetonma1 on January 7th 2019, 8:33 pm

teliosmetonma1
teliosmetonma1
Forumember

Posts : 199
Reputation : 1
Language : greek

http://www.yugioh.gr

Back to top Go down

Solved Re: Default title for PMs

Post by Menim on January 8th 2019, 5:38 pm

Could you please PM me an account on your forum? I dont understand the language. It doesnt have to be admin or mod. Just a simple account that can send PMs. Also, do you want the default title to be inserted when the user tries to send a pm without a title, or do you want that title to be there before the user tries to send the pm?
Menim
Menim
Forumember

Posts : 87
Reputation : 12
Language : English

Back to top Go down

Solved Re: Default title for PMs

Post by teliosmetonma1 on January 8th 2019, 7:05 pm

to be there before the user tries to send the pm


the language is greek.


Here is a test account:


Spoiler:
name: testaccount
password: testaccount1
teliosmetonma1
teliosmetonma1
Forumember

Posts : 199
Reputation : 1
Language : greek

http://www.yugioh.gr

Back to top Go down

Solved Re: Default title for PMs

Post by Menim on January 8th 2019, 9:23 pm

I cant connect with that account. This is the error I got:
Code:
Πιθανόν δώσατε λάθος όνομα χρήστη-κωδικό ή δεν είστε ενεργοποιημένο μέλος

Για να ξαναδοκιμάσετε πατήστε εδώ

Πατήστε εδώ για να επιστρέψετε στην Αρχική σελίδα
Menim
Menim
Forumember

Posts : 87
Reputation : 12
Language : English

Back to top Go down

Solved Re: Default title for PMs

Post by teliosmetonma1 on January 10th 2019, 2:27 pm

try again now.
teliosmetonma1
teliosmetonma1
Forumember

Posts : 199
Reputation : 1
Language : greek

http://www.yugioh.gr

Back to top Go down

Solved Re: Default title for PMs

Post by Menim on January 10th 2019, 5:09 pm

Add this Javascript code with the placement on all pages:
Code:
document.addEventListener("DOMContentLoaded", function(){
if(!/privmsg\?mode=post/.test(location)) return;
var def="(no title)";
var elem=document.querySelector("[name='subject']");
if(elem.value===""){
elem.value=def;
}
elem.addEventListener("focus", function(){
if(elem.value===def){
elem.value="";
}
});
elem.addEventListener("blur", function(){
if(elem.value===""){
elem.value=def;
}
});
})
This will generate the following behaviour:
1.When the page is loaded, if the field is empty, the default text is pasted in.
2.When somebody clicks on the field, the default text dissapears so they can write their title.
3.If one clicks the field but leaves it empty, the default text will be pasted in.

To modify the default text, you have to modify this line in the code:
Code:
var def="(no title)";
The text in the quotes is the default text that will show up.
Menim
Menim
Forumember

Posts : 87
Reputation : 12
Language : English

Back to top Go down

Solved Re: Default title for PMs

Post by teliosmetonma1 on January 10th 2019, 5:41 pm

Thank you a lot!

SOLVED
teliosmetonma1
teliosmetonma1
Forumember

Posts : 199
Reputation : 1
Language : greek

http://www.yugioh.gr

Back to top Go down

Solved Re: Default title for PMs

Post by Menim on January 10th 2019, 6:14 pm

No problem!
Menim
Menim
Forumember

Posts : 87
Reputation : 12
Language : English

Back to top Go down

Solved Re: Default title for PMs

Post by SLGray on January 10th 2019, 6:46 pm

Problem solved & topic archived.
Please read our forum rules:  ESF General Rules



When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 44835
Reputation : 3163
Language : English
Location : United States

http://fmthemesdesignteam.forumotion.com/

Back to top Go down

Back to top


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