How do you enable HTML preference for all members by default + no post screen?
3 posters
Page 1 of 1
How do you enable HTML preference for all members by default + no post screen?
Hello Forumotion, it's been a while.
I'd like to know how can I have the "Always Allow HTML: Yes" preference enabled for all members. Currently, they have to enable it themselves.
Also, what was the Javascript code so when you post you're sent directly to the post, and not the the "post successful" page.
Thank you.
I'd like to know how can I have the "Always Allow HTML: Yes" preference enabled for all members. Currently, they have to enable it themselves.
Also, what was the Javascript code so when you post you're sent directly to the post, and not the the "post successful" page.
Thank you.
Re: How do you enable HTML preference for all members by default + no post screen?
There is not an option to set HTML for all members. It is one of the options that they have to set in their profiles.
You can only activate it for the forum.
You can only activate it for the forum.
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: How do you enable HTML preference for all members by default + no post screen?
Hi @Ramdaman,
It should be possible via AJAX, give this a try :
Administration Panel > Modules > JavaScript codes management > Create a new script
Placement : In all the pages
That should send 1 request to the profile preferences and serialize the form data. If that form data contains autohtml=0, we'll update that to 1 and send another request to submit the updated preferences. To prevent multiple requests, a cookie is set after the first check.
It should be possible via AJAX, give this a try :
Administration Panel > Modules > JavaScript codes management > Create a new script
Placement : In all the pages
- Code:
// auto enable HTML in the preferences
(function($) {
if (my_getcookie('faAutoHTML') != 'checked') {
$.get('/profile?mode=editprofile&page_profil=preferences', function(d) {
d = $('#ucp', d).serialize(); // serialize form data for submission
/allowhtml=0/.test(d) && $.post('/profile', d.replace(/allowhtml=0/, 'allowhtml=1') + '&submit=1'); // if HTML is disabled we'll submit the modified form data
my_setcookie('faAutoHTML', 'checked'); // set a cookie to prevent constant checks
});
}
})(jQuery);
// par ange tuteur
That should send 1 request to the profile preferences and serialize the form data. If that form data contains autohtml=0, we'll update that to 1 and send another request to submit the updated preferences. To prevent multiple requests, a cookie is set after the first check.
Re: How do you enable HTML preference for all members by default + no post screen?
@Ange Tuteur - The code did not work, there is still a page when you post asking if you want to go back to the topic or go back to the forum.
Re: How do you enable HTML preference for all members by default + no post screen?
Oh sorry, I missed the last part. That code I gave you was to auto enable HTML.
Add this script in all the pages for the immediate redirection :
Add this script in all the pages for the immediate redirection :
- Code:
$("meta[http-equiv='refresh'][content]:first").each(function(){window.location.href=$(this).attr("content").replace(/^.*;url=/,"")});
Re: How do you enable HTML preference for all members by default + no post screen?
It still appears for a quick second, is there a way I can completely skip that page?
Re: How do you enable HTML preference for all members by default + no post screen?
It appears instantaneous for me. You can try the following which utilizes native JavaScript rather than jQuery, it'll probably be marginally faster.
Which device and browser are you using ?
- Code:
(function(a) {
for (var b = document.getElementsByTagName('META'), c, i = 0; c = b[i]; i++) {
if (/refresh/i.test(c.httpEquiv)) {
a.location.href = c.content.replace(/^.*?;url=/, '');
break;
}
}
})(window);
Which device and browser are you using ?
Re: How do you enable HTML preference for all members by default + no post screen?
It's on my Windows 8 Laptop. I'm using Chrome by the way.
Re: How do you enable HTML preference for all members by default + no post screen?
Did the script I give you work, or was it the same ? From what I recall, people using Chrome have had trouble with this method. I don't know why, because it works on both Firefox and Chrome, along with a few other browsers I use for testing.
Similar topics
» Enable HTML for old members
» Enable HTML in signature
» Enable HTML for old members
» How to enable the edit post on members thread
» The new editor: Is there any way to enable "NON WYSIWYG display" as default?
» Enable HTML in signature
» Enable HTML for old members
» How to enable the edit post on members thread
» The new editor: Is there any way to enable "NON WYSIWYG display" as default?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum