Default title for PMs
2 posters
Page 1 of 1
Default title for PMs
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
like: "(no title)"
is there any code?
thank you
Re: Default title for PMs
PM's without a title will not be sent. Are you asking for a way to add a tag to the titles?
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Default title for PMs
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?
Guest- Guest
Re: Default title for PMs
to be there before the user tries to send the pm
the language is greek.
Here is a test account:
the language is greek.
Here is a test account:
- Spoiler:
- name: testaccount
password: testaccount1
Re: Default title for PMs
I cant connect with that account. This is the error I got:
- Code:
Πιθανόν δώσατε λάθος όνομα χρήστη-κωδικό ή δεν είστε ενεργοποιημένο μέλος
Για να ξαναδοκιμάσετε πατήστε εδώ
Πατήστε εδώ για να επιστρέψετε στην Αρχική σελίδα
Guest- Guest
Re: Default title for PMs
Add this Javascript code with the placement on all pages:
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:
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;
}
});
})
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)";
Guest- Guest
Re: Default title for PMs
Problem solved & topic archived.
|
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Similar topics
» How to change the default rank title size with CSS?
» Perfix from Modification Title to title
» Changed title, title won't update.
» default avatar
» default message
» Perfix from Modification Title to title
» Changed title, title won't update.
» default avatar
» default message
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum