Latest topics
» Forumactif Edge - Releases
by Ange Tuteur Tue 03 Sep 2019, 11:49
» GIFActif - Giphy Button for the Editor
by Ange Tuteur Wed 08 May 2019, 17:21
» Forum Closure
by Ange Tuteur Mon 01 Jan 2018, 01:28
» Chit Chat Thread
by Valoish Sun 31 Dec 2017, 19:15
» Font/Text background color.
by Valoish Sun 31 Dec 2017, 19:11
» Forumactif Messenger - Instant Message Application for Forumotion
by Wolfuryo Sun 31 Dec 2017, 18:24
» [GAME] Count to One Million!
by brandon_g Fri 29 Dec 2017, 18:58
» Post Cards
by manikbiradar Wed 20 Dec 2017, 07:50
» [GAME] Countdown from 200,000
by Valoish Wed 13 Dec 2017, 23:22
» GeekPolice Tech Support Forums - GeekPolice.net
by Dr Jay Mon 11 Dec 2017, 19:12
» Asking about some plugin for Forumotion
by Dr Jay Mon 11 Dec 2017, 19:10
» [GAME] What are you thinking right now?
by Van-Helsing Sat 09 Dec 2017, 14:51
» Widget : Similar topics
by ranbac Wed 06 Dec 2017, 18:11
» Change the Background of the Forum and put an image and how to make prefixs?
by Clement Wed 06 Dec 2017, 15:19
» Hello from Western Australia
by SarkZKalie Wed 06 Dec 2017, 05:34
by Ange Tuteur Tue 03 Sep 2019, 11:49
» GIFActif - Giphy Button for the Editor
by Ange Tuteur Wed 08 May 2019, 17:21
» Forum Closure
by Ange Tuteur Mon 01 Jan 2018, 01:28
» Chit Chat Thread
by Valoish Sun 31 Dec 2017, 19:15
» Font/Text background color.
by Valoish Sun 31 Dec 2017, 19:11
» Forumactif Messenger - Instant Message Application for Forumotion
by Wolfuryo Sun 31 Dec 2017, 18:24
» [GAME] Count to One Million!
by brandon_g Fri 29 Dec 2017, 18:58
» Post Cards
by manikbiradar Wed 20 Dec 2017, 07:50
» [GAME] Countdown from 200,000
by Valoish Wed 13 Dec 2017, 23:22
» GeekPolice Tech Support Forums - GeekPolice.net
by Dr Jay Mon 11 Dec 2017, 19:12
» Asking about some plugin for Forumotion
by Dr Jay Mon 11 Dec 2017, 19:10
» [GAME] What are you thinking right now?
by Van-Helsing Sat 09 Dec 2017, 14:51
» Widget : Similar topics
by ranbac Wed 06 Dec 2017, 18:11
» Change the Background of the Forum and put an image and how to make prefixs?
by Clement Wed 06 Dec 2017, 15:19
» Hello from Western Australia
by SarkZKalie Wed 06 Dec 2017, 05:34
Recent Tutorials
Top posting users this month
Top Achievers
Who is online?
In total there are 23 users online :: 0 Registered, 0 Hidden and 23 Guests :: 1 Bot
None
Most users ever online was 515 on Tue 14 Sep 2021, 15:24
None
Most users ever online was 515 on Tue 14 Sep 2021, 15:24
Visitor Messages on All
Page 1 of 1 • Share
Sup. Just want to ask anyone if there is a way to automatically tick All members on the option "Allow visitor messages on my profile"?
I tried the script that @Ange Tuteur gave on his reply (+rep): https://fmdesign.forumotion.com/t526-how-to-embed-games-into-posts#7542
Modified it a bit, but unfortunately, it was a no-no. This is the modified script:
Thank you.
I tried the script that @Ange Tuteur gave on his reply (+rep): https://fmdesign.forumotion.com/t526-how-to-embed-games-into-posts#7542
Modified it a bit, but unfortunately, it was a no-no. This is the modified script:
- Code:
$(function() {
if (_userdata.session_logged_in && !my_getcookie('fa_html_checked')) {
$.get('/profile?mode=editprofile&page_profil=preferences', function(d) {
var form = $('#ucp', d);
if (form[1] && !form[1].profilemsgs[1].checked) {
$.post('/profile', form.serialize().replace(/profilemsgs=1/, 'profilemsgs=2') + '&submit=2', function() {
my_setcookie('fa_html_checked', '2');
});
} else {
my_setcookie('fa_html_checked', '2');
}
});
}
'par ange tuteur';
});
Thank you.
SLGray wrote:Setting things in members' profiles could cause some members to leave. Profile settings should be set by the members themselves.
I think you read it wrong... I'm not changing their settings, I am requesting a script for a default option. They can always change it everytime they want.
@Wilson see if this one works for you :
- Code:
$(function() {
if (_userdata.session_logged_in && !my_getcookie('fa_vm_checked')) {
$.get('/profile?mode=editprofile&page_profil=preferences', function(d) {
var form = $('#ucp', d);
if (form[0] && !form[0].profilemsgs[0].checked) {
$.post('/profile', form.serialize().replace(/profilemsgs=\d/, 'profilemsgs=2') + '&submit=1', function() {
my_setcookie('fa_vm_checked', '1');
});
} else {
my_setcookie('fa_vm_checked', '1');
}
});
}
'par ange tuteur';
});
That is much appreciated @Ange Tuteur, thanks a bunch!Ange Tuteur wrote:@Wilson see if this one works for you :
- Code:
$(function() {
if (_userdata.session_logged_in && !my_getcookie('fa_vm_checked')) {
$.get('/profile?mode=editprofile&page_profil=preferences', function(d) {
var form = $('#ucp', d);
if (form[0] && !form[0].profilemsgs[0].checked) {
$.post('/profile', form.serialize().replace(/profilemsgs=\d/, 'profilemsgs=2') + '&submit=1', function() {
my_setcookie('fa_vm_checked', '1');
});
} else {
my_setcookie('fa_vm_checked', '1');
}
});
}
'par ange tuteur';
});
Sorry too for abusing the General Discussions as a place for my questions, it'll be my last until the Questions forum show up.
Last edited by Wilson on Thu 28 Apr 2016, 08:54; edited 1 time in total
Those are the names that I've given to the cookies. When the request is sent it checks if the specified field has been ticked, if it has it stores a cookie to prevent further requests. If it isn't ticked, the script sends another request that updates the profile and then stores the cookie.
In short, it prevents the request to the /profile page from being sent more than once per session. As long as the cookie lives it'll send no more requests.
In short, it prevents the request to the /profile page from being sent more than once per session. As long as the cookie lives it'll send no more requests.
Ange Tuteur wrote:Those are the names that I've given to the cookies. When the request is sent it checks if the specified field has been ticked, if it has it stores a cookie to prevent further requests. If it isn't ticked, the script sends another request that updates the profile and then stores the cookie.
In short, it prevents the request to the /profile page from being sent more than once per session. As long as the cookie lives it'll send no more requests.
Ahh. Thanks for the in-depth explanation.
- GuestGuest
*** Topic solved, locked and archived ***
- Sponsored content
Similar topics
Create an account or log in to leave a reply
You need to be a member in order to leave a reply.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum