Forum Activity for @tig

TiG
@tig
02 Jun 2020 01:03:04PM
159 posts

Deleting Unwanted Skins


Jamroom Developers

Paul and Douglas

Thanks to you both.
TiG
@tig
02 Jun 2020 11:07:17AM
159 posts

Deleting Unwanted Skins


Jamroom Developers

We have a number of unused skins on our site.

I plan to delete them via the ACP but need to ask this question:

Is there any possibility of affecting the site if I delete an inactive skin?

The answer is no doubt 'no' but I would like to verify same.
updated by @tig: 02 Jun 2020 02:27:18PM
TiG
@tig
01 Jun 2020 11:31:06AM
159 posts

Extending jrCore Icons


Jamroom Developers

Brian

That is what I initially did. Looks like the browser cache messed me up.

Thanks
TiG
@tig
01 Jun 2020 11:12:43AM
159 posts

Extending jrCore Icons


Jamroom Developers

I know we can extend (and override) the core icons by including the appropriate files in the icon_black and icon_white folders in a skin's img folder.

Is there a likewise easy means to add new icons through a module?

In particular, I have a module that would like to introduce and then use a new icon (as if the icon were part of the core set).

Thanks.
updated by @tig: 01 Jun 2020 12:37:04PM
TiG
@tig
28 Apr 2020 03:17:08PM
159 posts

Fixing Errant HTML Content


Jamroom Developers

Brian

I have done extensive testing using
jrUrlScan_get_url_with_wget()
vs. cURL and it seems to be working perfectly. I am now able to access Forbes, et. al. content rather than dealing with a 403 error. Bloomberg remains inaccessible but 9x% of the sites NT uses seem to be within reach.

Nicely done!

Thanks again,
TiG
@tig
28 Apr 2020 09:18:54AM
159 posts

Fixing Errant HTML Content


Jamroom Developers

Brian

jrCore_clean_html($malformed_html);


I did try this function before writing my original post and found that its algorithm for closing tags basically closes them at the end. In my case, I have an unclosed div right in the middle of the HTML. The semantic effect of this unclosed div is to cause the main section of the article to be incorrectly enclosed within an aside block. This is how DOMDocument perceives this flaw and it is also how the clean_html resolves the unclosed tag. (My logic already makes heavy use of DOMDocument.) Since I prune off all aside blocks, this malformed HTML causes the article content (in this case) to be tossed along with the asides.

I can write a routine to fix the HTML as needed, but that seems like reinventing the wheel. Ergo my question about being able to install the Tidy extension to PHP. Tidy claims to have this problem solved.

On another note, I will absolutely switch to
jrUrlScan_get_url_with_wget()
since I have experienced the ill effects of being viewed as a mere bot. So that promises to help substantially.

Thanks yet again to you and Michael for the great info.
TiG
@tig
27 Apr 2020 09:20:56PM
159 posts

Fixing Errant HTML Content


Jamroom Developers

Michael

You have guessed correctly. We are acquiring content from a URL provided by the user and populating articles (e.g. discussions and group discussions). The user then will do some editing, add their own commentary and publish to the NT site for comments.

Tidy is an installed PHP extension:
 https://www.php.net/manual/en/book.tidy.php 

There likely is a reason it was not opted to be installed (HTML Purifier makes use of it when installed). Maybe Brian will weigh in since I think we are moving into his area of focus.

Thanks
TiG
@tig
27 Apr 2020 08:45:15PM
159 posts

Fixing Errant HTML Content


Jamroom Developers

Michael

I have already investigated that functionality. The HTML tag closing is what I described, it works if the closing can be accomplished by simply adding closing tags to the end. In arbitrary HTML that is typically not sufficient - the errant tags are within the document.

We might be unique in the Jamroom community in our use of HTML, but if you folks ever consider installing Tidy functionality we would make use of it. :)

Thanks!
TiG
@tig
27 Apr 2020 07:58:30PM
159 posts

Fixing Errant HTML Content


Jamroom Developers

We are coming across bad content from various sites. This is HTML that is technically wrong - in particular missing end tags. An ideal PHP solution would be to tap into Tidy functionality but that does not seem to be installed. The existing JR functions such as jrCore_closetags() are only good for small fragments where adding tags to the end is semantically correct.

Our problem deals with the raw content of an arbitrary web-page captured via cURL. We are making extensive use of HTMLPurifier but there seems to be no JR-resident function available to configure HTMLPurifier to deal with unclosed tags. DOMDocument, by the way, parses the incorrect HTML and produces an incorrect DOM; so it does not help here.

My question: is there a way within the Jamroom platform to correctly fix unclosed HTML tags in an arbitrary (and typically large) string of HTML?

Thanks
updated by @tig: 30 Apr 2020 12:16:18PM
TiG
@tig
13 Apr 2020 07:39:20PM
159 posts

Javascript Form Message


Jamroom Developers

Michael

All good. That is the info I was asking for. I just do not want to reinvent the wheel (of course).

As always, much appreciated.

TiG
1