The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Default title for PMs

2 posters

Go down

Solved Default title for PMs

Post by teliosmetonma1 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 : 247
Reputation : 1
Language : greek

http://www.yugioh.gr

Back to top Go down

Solved Re: Default title for PMs

Post by SLGray 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?


Default title for PMs Slgray10

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

Male Posts : 51576
Reputation : 3525
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: Default title for PMs

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

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

Default title for PMs Ice_sc13
teliosmetonma1
teliosmetonma1
Forumember

Posts : 247
Reputation : 1
Language : greek

http://www.yugioh.gr

Back to top Go down

Solved Re: Default title for PMs

Post by Guest January 7th 2019, 8:08 pm

Hello,

This can be done, but I need your forum address.
avatar
Guest
Guest


Back to top Go down

Solved Re: Default title for PMs

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

teliosmetonma1
teliosmetonma1
Forumember

Posts : 247
Reputation : 1
Language : greek

http://www.yugioh.gr

Back to top Go down

Solved Re: Default title for PMs

Post by Guest 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?
avatar
Guest
Guest


Back to top Go down

Solved Re: Default title for PMs

Post by teliosmetonma1 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:
teliosmetonma1
teliosmetonma1
Forumember

Posts : 247
Reputation : 1
Language : greek

http://www.yugioh.gr

Back to top Go down

Solved Re: Default title for PMs

Post by Guest January 8th 2019, 9:23 pm

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

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

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


Back to top Go down

Solved Re: Default title for PMs

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

try again now.
teliosmetonma1
teliosmetonma1
Forumember

Posts : 247
Reputation : 1
Language : greek

http://www.yugioh.gr

Back to top Go down

Solved Re: Default title for PMs

Post by Guest 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.
avatar
Guest
Guest


Back to top Go down

Solved Re: Default title for PMs

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

Thank you a lot!

SOLVED
teliosmetonma1
teliosmetonma1
Forumember

Posts : 247
Reputation : 1
Language : greek

http://www.yugioh.gr

Back to top Go down

Solved Re: Default title for PMs

Post by Guest January 10th 2019, 6:14 pm

No problem!
avatar
Guest
Guest


Back to top Go down

Solved Re: Default title for PMs

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

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


Default title for PMs Slgray10

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

Male Posts : 51576
Reputation : 3525
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Back to top

- Similar topics

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