Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.

Site Feedback

Site Feedback
243 posts | Last Activity on 05-09-2023 17:31 by magorium
M
magorium 05-09-2023 17:31, 8 months ago
Re: Testing new prism js code
[quote name=amigamia post=2251] I am well aware of the issue and I am doing my best to fix it. So, please have patience and if you know of a way then report back, otherwise hang tight.[/quote] Sorry if I came across as being impatient (about your progress). It's not that I am but more that I am frustrated about simple base functionality that should simply work out of the box and unable to find a single hint, tip, trick, documentation, bug-report, or thread on such a topic on their whole website (and support links). I have literally wasted hours reading for something that should at least have been mentioned somewhere. PS: as a new phenomenon, if I preview my post the tags do not get rendered at all (I almost removed the quote tags because of that).
D
deadwood 05-09-2023 02:50, 8 months ago
Re: Testing new prism js code
@amigamia Thanks again for working on this. Just for clarity it is not that I need code tag to work different, but I need "something" that allows the following: 1) Not eating spaces used for indentation 2) Displaying text in fixed-with font 3) Not trying to colour the text Maybe instead of changing "code" tag, there can be another tag added? Just an idea. Also a technical question: are spaces present in the data that is in database? In other words, are they removed when inserting to database or when displaying from database?
amigamia
amigamia 04-09-2023 13:13, 8 months ago
Re: Testing new prism js code
@magorium, I never said that prismjs was the actual issue but that prismjs plugin was in question and not TinyMCE as deadwood and I initially thought it was. Prismjs is the plugin used for the code tag inside the forums text editor (which is not TinyMCE). I am still understanding how it is implemented and what function is responsible for removing the white spaces in the indentation for ths code. All I know is that on this page you can generate a new prism.js and a new prism.css with supported languages and extra features: [url]https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript[/url] One of the extra features that seems to be responsible for the normalization of the white spaces is: [url]https://prismjs.com/plugins/normalize-whitespace/[/url] However, how the plugin is disabled is not clear from the php code on the CMS. What you see below is the class which is supposed to be added but I am not sure where (which file) exactly. There are 3 more .php files that provide integration of the BB Code Code in the CMS. [i]The plugin can be disabled for a particular code block by adding the class no-whitespace-normalization to either the <pre> or <code> tag.[/i] I am well aware of the issue and I am doing my best to fix it. So, please have patience and if you know of a way then report back, otherwise hang tight.
M
magorium 02-09-2023 19:32, 8 months ago
Re: Testing new prism js code
@amigamia: Perhaps I am daft but that plugin you mentioned (prism) isn't it the issue that prism /expects/ code tagged text to be formatted /any which way possible/ ? (I was unable to locate support in prism for not applying any formatting (or instruct it to simple leave it as plain ascii)). afaik that is the issue (from deadwood) to begin with: being able to post some text that is left alone by any forum software/plugin and/or any form of formatting. Instead the forum software tries to interpret it (wrongful) which result in these (excuse me taking a pun) hilarious results. As you mentioned at least there is some improvement (no cutoffs and not completely white anymore in preview mode :thumbsup: ).
amigamia
amigamia 01-09-2023 16:42, 8 months ago
Re: Testing new prism js code
[code] [i]if (preg_match("//forum//i", FUSION_REQUEST)) { if ($tid) { $result = dbquery("SELECT p.post_id, t.thread_id FROM ".DB_FORUM_POSTS." p INNER JOIN ".DB_FORUM_THREADS." t ON t.thread_id = p.thread_id WHERE p.thread_id=:tid AND p.post_id=:pid AND post_hidden='0'[/i] [/code]
amigamia
amigamia 01-09-2023 16:34, 8 months ago
Re: Testing new prism js code
[code]) if (preg_match("//forum//i", FUSION_REQUEST)) { if ($tid) { $result = dbquery("SELECT p.post_id, t.thread_id FROM ".DB_FORUM_POSTS." p INNER JOIN ".DB_FORUM_THREADS." t ON t.thread_id = p.thread_id WHERE p.thread_id=:tid AND p.post_id=:pid AND post_hidden='0' [/code]
amigamia
amigamia 01-09-2023 15:38, 8 months ago
Re: Testing new prism js code
[quote name=amigamia post=2237]@amigamia - [quote name=deadwood post=2236]@deadwood - Is there anything special needed to enable the prism js "code"? As you can see above using it default approach still produces wrong output :([/quote] Oh I know. I am still testing things and see where the changes that I apply take effect. Fact is it's the prism plugin. I also tried to search on phpfusion.com but their search isn't working since they merged the co.uk domain with the .com.[/quote] I think I found it but still struggling to find where I can turn it off. I can generate new prismjs and prism.css files from [url]https://prismjs.com/download.html?#themes=prism-coy&languages=markup+css+clike+javascript+c+cpp+kotlin+less+markup-templating+php+php-extras+python+sass+sql+stylus+swift+twig&plugins=line-numbers+treeview[/url] As you can see I was able to adjust the theme within the code block. At least I solved the preview problem where everything was white. The component responsible for the removal of the white spaces is this: [url]https://prismjs.com/plugins/normalize-whitespace/[/url]. However, I completely removed it from the prism .css and .js and it's still not working. Still looking into the files to see where I can add [code]no-whitespace-normalization[/code]
amigamia
amigamia 01-09-2023 15:11, 8 months ago
Re: Testing new prism js code
[quote name=deadwood post=2236]@deadwood - Is there anything special needed to enable the prism js "code"? As you can see above using it default approach still produces wrong output :([/quote] Oh I know. I am still testing things and see where the changes that I apply take effect. Fact is it's the prism plugin. I also tried to search on phpfusion.com but their search isn't working since they merged the co.uk domain with the .com.
D
deadwood 01-09-2023 02:37, 8 months ago
Re: Testing new prism js code
Is there anything special needed to enable the prism js "code"? As you can see above using it default approach still produces wrong output :(
D
deadwood 01-09-2023 02:36, 8 months ago
Re: Testing new prism js code
[code] AROS ABIv11 20230430-1 changes: Functionalities: Implemented network driver for certain nVidia chipsets (Neil) Synchronize Zune configuration across all builds (deadwood) Restore build and functioning on pc-x86_64 AROS (deadwood) Make native kernel more reselient in case of early error (deadwood, Kalamatee) Added broadcom4400.device network driver (Neil) Synchronize on use of ISO-8859-2 for Polish across all builds (deadwood) First working version of nvme.device is available (Kalamatee) Implemented FORMAT64 and SEEK64 commands in ahci.device (Kalamatee) Stabilized handling of WARM reset, implemented missing shutdown handlers (Kalamatee) Requesters add scroll bars if too much text is shown (Kalamatee) 64-bit support: Correct size of fpos_t and ino_t C library types (deadwood) [/code]
amigamia
amigamia 31-08-2023 19:26, 8 months ago
Re: Testing new prism js code
[code]<?php /*-------------------------------------------------------+ | PHPFusion Content Management System | Copyright (C) PHP Fusion Inc | https://phpfusion.com/ +--------------------------------------------------------+ | Filename: b_bbcode_include_var.php | Author: Core Development Team +--------------------------------------------------------+ | This program is released as free software under the | Affero GPL license. You can redistribute it and/or | modify it under the terms of this license which you | can read by viewing the included agpl.txt or > | at www.gnu.org/licenses/agpl.html. Removal of this | copyright header is strictly prohibited without | written permission from the original author(s). +--------------------------------------------------------*/ defined('IN_FUSION') || exit; $__BBCODE__[] = [ "description" => $locale["bb_b_description"], "value" => "b", "bbcode_start" => "[b]", "bbcode_end" => "[/b]", "usage" => "[b]".$locale["bb_b_usage"]."[/b]", "svg" => '<i class="fa fa-bold fa-lg"></i>' ];[/code]
amigamia
amigamia 31-08-2023 17:47, 8 months ago
Re: code tag in editor
[quote name=deadwood post=2223]@deadwood - Thanks for working on this. Indeed it's quite annoying.[/quote] So it's not the tinyMCE editor which is only when submitting news. The forums in here use BB codes and in particular the BB code code plugin. That is not a duplicate :) Looking into the javascript code to see if I can figure it out. Anyone good with Javascript in here? [url]https://prismjs.com/[/url]
Responded in code tag in editor
AMIGASYSTEM
AMIGASYSTEM 19-08-2023 10:06, 8 months ago
Re: Specific Threads dedicated to AROS One
If you like it I have created this Banner that could fit on any background, I can try to make it in other colors too if you are interested.
AMIGASYSTEM
AMIGASYSTEM 19-08-2023 09:42, 8 months ago
Re: Specific Threads dedicated to AROS One
Strange I recreated the black outlines, I tried pasting the image I sent you with "Transparency" on a White background and the Eyes are clearly visible, see screenshoot. Check that your image is not left in the Browser Cache or by mistake you inserted your image ! Yes I can help you, but consider that I do all the graphics by hand, my creations are totally handmade :) [img]https://www.arosworld.org/infusions/forum/attachments/banner_1.png[/img]
amigamia
amigamia 19-08-2023 08:57, 8 months ago
Re: Specific Threads dedicated to AROS One
Hi AmigaSystem, I uploaded it and I see no difference but maybe it's me not noticing it? I think for it to be working with a dark and light theme, the surrounding area of the eyes has to have some sort of border or frame or something so regardless of the dark or light background, the eyes do not depend on the surrounding color from the theme. I think it'd be cool if the eyes had some sort of mask ala zorro or some similar. Where the mask is a checkered flag but instead of red and white, it's blue or another color that we use the most for AROS. When I created it, I did not take in consideration a light theme until you asked ;). As soon as I find the vector based graphic, I'll send you that if you want to help.
D
deadwood 19-08-2023 02:50, 8 months ago
Re: code tag in editor
Thanks for working on this. Indeed it's quite annoying.
Responded in code tag in editor
amigamia
amigamia 18-08-2023 19:09, 8 months ago
Re: code tag in editor
So I installed a LAMP and set the whole PHP-Fusion up on a local computer. I also found where the tinyMCE.init is and tried to disable the paste plugin but it's not making any difference. Looks like there are other people with this problem and seems to be associated with tinyMCE. I am still playing and testing for now. Hopefully I get a breakthrough soon because it is annoying.
Responded in code tag in editor
amigamia
amigamia 18-08-2023 19:04, 8 months ago
Re: Specific Threads dedicated to AROS One
Thank you Amigasystem. I'll upload it and test.
AMIGASYSTEM
AMIGASYSTEM 18-08-2023 18:12, 8 months ago
Re: Specific Threads dedicated to AROS One
amigamia, I tried to adjust your "Cat Eyes" logo, it should look good on both Dark and Light background !
AMIGASYSTEM
AMIGASYSTEM 17-08-2023 08:43, 8 months ago
Re: Specific Threads dedicated to AROS One
Ok, now everything seems to be working well !
You can view all discussion threads in this forum.
You cannot start a new discussion thread in this forum.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
Moderator: Administrator

Filter by Tags

Popular Threads This Week

AROS One x86 Work In Progressby AMIGASYSTEM 140 posts
Tiny Aros DistrĂ²by Amiwell79 100 posts
ADoom3 benchmarkby retrofaza 39 posts
Development Planby deadwood 32 posts
The Fulcrum Scene Demoby Farox 16 posts
Odyssey Resourceby Amiwell79 15 posts
Sign In
Not a member yet? Click here to register.
Forgot Password?
Users Online Now
Guests Online 8
Members Online 0

Total Members: 224
Newest Member: Zhule
Member Polls
Should AROSWorld continue with AROS-Exec files (SMF based)?
Yes44 %
44% [12 Votes]
No26 %
26% [7 Votes]
Not sure30 %
30% [8 Votes]