HTML in post preview not working
2 posters
Page 1 of 1
HTML in post preview not working
Technical Details
Forum version : #phpBB3
Position : Founder
Concerned browser(s) : Mozilla Firefox, Google Chrome, Opera, Safari
Who the problem concerns : All members
Forum link : http://cadikim.forumpl.net
Description of problem
Hey, I promise this is one of the last questions! Several of the css classes (most of them are --var function) do not work in post preview and in searching all user's posts. However, it works very well in the users post.PA > Allow HTML in User Posts: Enabled
Profile > Always show HTML: Enabled
VIEW IN POST
VIEW IN PREVIEW
VIEW IN ALL USER'S POST SEARCHING
How I can fix it?
Last edited by LeChat on September 30th 2023, 2:26 pm; edited 1 time in total
Re: HTML in post preview not working
Good morning!
I see that the CSS code doesn't see the --grupo-color variable
Are you sure you declared the CSS --grupo-color variable globally (AP - Display - Color & CSS - CSS Stylesheet) and not locally in some template (like viewtopic_body)?
Here I see all your CSS variables
I don't see --grupo-color in that list
But I can see that this variable exists somewhere:
Try adding the --grupo-color variable globally in AP - Display - Colors & CSS - CSS Stylesheet
I see that the CSS code doesn't see the --grupo-color variable
Are you sure you declared the CSS --grupo-color variable globally (AP - Display - Color & CSS - CSS Stylesheet) and not locally in some template (like viewtopic_body)?
Here I see all your CSS variables
I don't see --grupo-color in that list
But I can see that this variable exists somewhere:
Try adding the --grupo-color variable globally in AP - Display - Colors & CSS - CSS Stylesheet
Razor12345- Support Moderator
- Posts : 1586
Reputation : 268
Language : Ukr, Rus, Eng
Location : Ukraine
Re: HTML in post preview not working
--grupo-color is the color of the user's group. I have a script for this variable in viewtopic_body that reads the user's group color. That's why I don't have it in my CSS.
It looks like this:
I tried to add this script in PA > Modules > JS, but it didn't help. :C
Edit: Actually, now I see that in preview and preview of the all posts parent class .post don't exist, that's why this script isn't working. But I don't know JS at all. Can we fix this?
It looks like this:
- Code:
<script>$(document).ready(function(){
$('.name-post span').each(function(){
var grupoColor = $(this).css('color');
$(this).parents('.post').attr('style', '--grupo-color: ' + grupoColor + ';');
});
});</script>
I tried to add this script in PA > Modules > JS, but it didn't help. :C
Edit: Actually, now I see that in preview and preview of the all posts parent class .post don't exist, that's why this script isn't working. But I don't know JS at all. Can we fix this?
Last edited by LeChat on September 30th 2023, 12:51 pm; edited 1 time in total
Re: HTML in post preview not working
You sent a script that will definitely not work because in AP - Modules - Javascript codes management does not use the script tag when inserting code.
Send me a private message with login and password for an account with admin rights
Edit: Actually, now I see that in preview and preview of the all posts parent class .post don't exist, that's why this script isn't working. But I don't know JS at all. Can we fix this?
Send me a private message with login and password for an account with admin rights
Razor12345- Support Moderator
- Posts : 1586
Reputation : 268
Language : Ukr, Rus, Eng
Location : Ukraine
Re: HTML in post preview not working
Now, I tried to copied this script from viewtopic_body to posting_preview but it didn't worked.
I think a classes in posting preview are different than in viewtopic_body, that's why script is not working, but I don't know a JavaScript and I don't know, how to fix it.
Am I right, or there is another problem there too?
Edit:
Ok!
I think a classes in posting preview are different than in viewtopic_body, that's why script is not working, but I don't know a JavaScript and I don't know, how to fix it.
Am I right, or there is another problem there too?
Edit:
Send me a private message with login and password for an account with admin rights
Ok!
Re: HTML in post preview not working
Your PM has been received with thanks.
|
Razor12345- Support Moderator
- Posts : 1586
Reputation : 268
Language : Ukr, Rus, Eng
Location : Ukraine
Razor12345- Support Moderator
- Posts : 1586
Reputation : 268
Language : Ukr, Rus, Eng
Location : Ukraine
Similar topics
» Link Preview Not Working?
» Can't see post formatting when I edit a post or preview.
» Html code doesn't preview
» Allow HTML not working
» [HELP] HTML Not Working
» Can't see post formatting when I edit a post or preview.
» Html code doesn't preview
» Allow HTML not working
» [HELP] HTML Not Working
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum