Questions regarding HTML markup support for Site News and Site FAQ properties

For discussion of the Poker Mavens server module and other administration topics
Post Reply
segmentlime
Posts: 25
Joined: Wed Apr 22, 2020 4:39 pm

Questions regarding HTML markup support for Site News and Site FAQ properties

Post by segmentlime »

(Side Note: I had a previous crack at this post and after crafting a very lengthy and detailed explanation of my questions with examples etc. my "Preview" said blocked, and my draft was gone. Very frustrating and big waste of time that caught me by surprise or I would have made a copy before trying so save. Never had anything similar at stack overflow etc. I have no interest to mess with your site. Anyway to place me on some list so this doesn't happen)

Questions:

1) What exactly is the nature of HTML markup supported in the text for these 2 properties. Any info you can provide about this or about how you render that child window that might help and save me time messing around trying stuff that will work in a regular browser but doesn't work there? What tags are supported, support for CSS, support for JS etc.

2) I have developed a nice FAQ webpage and I would be happy to serve it on other ports from my webserver and open it in a new tab in same browser window PM client. I have tried all sorts of approaches and no joy except with an

Code: Select all

<a>
tag, but this of course required user action and leaves the PM child window open. Any way to code it or make it so that the

Code: Select all

Lobby -> Help -> View Site FAQ ...
menu item open an URL in a new browser tab?
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: Questions regarding HTML markup support for Site News and Site FAQ properties

Post by Kent Briggs »

segmentlime wrote: Fri Jun 17, 2022 5:22 pm (Side Note: I had a previous crack at this post and after crafting a very lengthy and detailed explanation of my questions with examples etc. my "Preview" said blocked, and my draft was gone.
It just said "blocked" with no explanation? If I had to guess, the forum software may think you were up to something nefarious if you enter raw HTML without wrapping it in the code tag. I don't know, it's just off-the-shelf phpBB.
1) What exactly is the nature of HTML markup supported in the text for these 2 properties.
Which 2 properties? Site News and Site FAQ I presume?
2) I have developed a nice FAQ webpage and I would be happy to serve it on other ports from my webserver and open it in a new tab in same browser window PM client. I have tried all sorts of approaches and no joy except
You can't get the Site FAQ to open a new tab immediately but you can place an anchor tag in there to do it when clicked. The trick is the target parameter so that it opens a new tab and doesn't overwrite the poker client itself:

Code: Select all

<a href="https://www.example.com" target="_blank">Click here for FAQ</a>
There is a new feature in v7 that allows a direct menu link to a custom page:

System tab -> Client Settings -> Player account URL

This will cause a "Custom" item to be added to the Lobby Account menu.
segmentlime
Posts: 25
Joined: Wed Apr 22, 2020 4:39 pm

Re: Questions regarding HTML markup support for Site News and Site FAQ properties

Post by segmentlime »

Which 2 properties? Site News and Site FAQ I presume?
Yes, the Site News and Site FAQ.

What exactly is the nature of HTML markup supported in the text for these 2 properties. Specifically, what tags are supported: is there support for CSS; what about support for JS, etc.? What information you can provide about this or about how you render that child window that might help and save me time messing around trying stuff that will work in a regular browser but doesn't work there?
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: Questions regarding HTML markup support for Site News and Site FAQ properties

Post by Kent Briggs »

segmentlime wrote: Sun Jun 19, 2022 7:55 pm What exactly is the nature of HTML markup supported in the text for these 2 properties. Specifically, what tags are supported: is there support for CSS; what about support for JS, etc.? What information you can provide about this or about how you render that child window that might help and save me time messing around trying stuff that will work in a regular browser but doesn't work there?
There's no filtering so everything that would work in a regular browser should work. All the windows in the poker client are created with JS and CSS with the help of JQuery. Any reference to local files will be pulled from the WebRoot folder in your data folder.
segmentlime
Posts: 25
Joined: Wed Apr 22, 2020 4:39 pm

Re: Questions regarding HTML markup support for Site News and Site FAQ properties

Post by segmentlime »

There seems to be some differences. As an example, compare results: if the attached knock_fail2.rar file (unzipped) to .html is opened in a browser versus pasting the unzipped html contents into the FAQ property field.
Attachments
knock_fail2.rar
(1.44 KiB) Downloaded 124 times
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: Questions regarding HTML markup support for Site News and Site FAQ properties

Post by Kent Briggs »

segmentlime wrote: Mon Jun 27, 2022 6:00 pm There seems to be some differences. As an example, compare results: if the attached knock_fail2.rar file (unzipped) to .html is opened in a browser versus pasting the unzipped html contents into the FAQ property field.
That's because your file is a complete web page with the doctype declaration, html, head, and body tags that can only appear once. The poker client already has those elements. The markup for the News and FAQ settings are placed inside an existing div tag that already exists inside a complete html document.
segmentlime
Posts: 25
Joined: Wed Apr 22, 2020 4:39 pm

Re: Questions regarding HTML markup support for Site News and Site FAQ properties

Post by segmentlime »

Thank for the replies and the support.

It seems that even if I restrict markup use to

Code: Select all

<h></h>
and

Code: Select all

<p></p>
tags. The rendering seems to be different than in a regular browser, notably there seems to be extra space between paragraphs and headers (versus a browser rendering) and as well larger font headers appear to be truncated below the text and sometimes above. Please see and compare the attached two screenshots which correspond to the following html as rendered in each of the news window and a regular browser page:

Code: Select all

<h2><strong><span style="color: rgb(45, 194, 107);">Upcoming Events:</span></strong></h2>
<h3><span style="color: rgb(53, 152, 219);">Bobcaygeon Poker Club Open Poker&nbsp;</span></h3>
<p>Scheduled Open Poker Play is bi-weekly on Thursday nights.&nbsp; If it is a Thursday and it is not a League night, then it is an Open night.&nbsp; &nbsp;</p>
<p>Next<strong>&nbsp;</strong>scheduled Open play is <strong><span style="color: rgb(53, 152, 219);"><span style="color: rgb(224, 62, 45);">Thursday July 7, 2022 at 7pm</span>.</span></strong></p>
The truncating I mention is subtle in this example, but you may notice the bottom of the letters g and p are partially cut off. I could show you an example of an H1 with a very large font that is notable truncated top and bottom visually like viewing through a slit.

I appreciate your time and help.
Attachments
news_pm_render.png
news_pm_render.png (121.31 KiB) Viewed 2005 times
news_browser_render.png
news_browser_render.png (65.76 KiB) Viewed 2005 times
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: Questions regarding HTML markup support for Site News and Site FAQ properties

Post by Kent Briggs »

segmentlime wrote: Thu Jul 07, 2022 5:00 pm The rendering seems to be different than in a regular browser
That's because most elements inherit styling properties from their parent elements which can cascade all the way down from the body tag. Hence the term CSS (cascading style sheets). You may need to override that inheritance with style attributes directly in the tags. CSS includes all kinds of spacing styles like margins, padding, line height, font size, etc.
segmentlime
Posts: 25
Joined: Wed Apr 22, 2020 4:39 pm

Re: Questions regarding HTML markup support for Site News and Site FAQ properties

Post by segmentlime »

I tried to use inline css with

Code: Select all

style="all: revert;"
on all my paragraph and header elements. This seems to have fixed the upper and lower truncation of header text, but not overriding everything as needed since fonts are still different between a plain default browser and more importantly in terms of the rendering I desire there are still what appear as if extra blank lines are between all headers and paragraphs from that of plain browser. I just cannot figure why these are there and trying to enabling and disabling style settings on up through the hierarchy using chrome developer tools page has yield no joy and clearly not the insight I need on this line thing.

The fonts can be dealt with using inline css, but it is a big hassle, and not too amenable to frequent editing, as the nature of a "News" page might demand.

My biggest stumbling block is the apparent extra line spaces. Any guidance on how to eliminate this result?

Overall, the product is fantastic and excellent value, and I don't want to come off as complaining, please know my interest is just in making a better experience for the users of my site, but given that it is so restrictive without so much overriding, it seems a bit of a stretch to say an unqualified "You may include HTML markup in your text".

If you are the author of the pokerMinJs and pokerMinCss sources then I would figure you certainly have the chops to make the inherited div more like a default browser than it is right now.
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: Questions regarding HTML markup support for Site News and Site FAQ properties

Post by Kent Briggs »

segmentlime wrote: Fri Jul 15, 2022 3:22 pm If you are the author of the pokerMinJs and pokerMinCss sources then I would figure you certainly have the chops to make the inherited div more like a default browser than it is right now.
The poker client is not a web development platform. The Site News and Site FAQ dialogs are only designed for you to provide some text news to your users, and possibly pretty it up a little with color, links, and maybe some small images. You might be better off just putting in a link to your own web page where you have 100% control of the formatting.
Post Reply