Using html5 Canvas element in a Joomla Custom Html Module - html

How can I use a html5 Canvas element in a Joomla Custom Html Module?
Is there an option I am missing? When ever I put the code in the module takes the canvas elements out.
Please Help If you need anymore information please ask.
Thanks!

There are several ways that your HTML can have tags stripped out.
The Editor
The most common is actually the editor you have set up as default. e.g. if you using JCE this is famous for striping HTML because people haven't altered the default "Editor Profile".
In the JCE Control Panel, click on the Editor Profiles button.
Click on the Profile name that the user, usergroup or component is assigned to, eg: 'Default'
Click on the Editor Parameters tab, then on the Options tab and set it up to suite you.
Joomla Text Filters
Unless you're using a Super User account for everyday access (bad idea) you will need to set the user group of your account to have "No Filtering".
In the Joomla! 3.2 from the Global Configuration, click on the Text Filters tab (last one on the right). Check that your users group has "No Filtering" set, see the image below showing the standard test filter settings in 3.2:
When it still doesn't work
Turn off the editor while working on the module, i.e. go to your User profile and set the Editor to "None". Under "Basic Settings" in User Manager:Edit Profile change the Editor option to "None" as shown below:
That way if you have "No Filtering" set, and no editor set you will be dealing with just the text being stored in the database and there will be nothing between you and the database to change it.

If you are trying to add some HTML or Script elements inside module or Article,
Joomla will automatically remove the scripts and tags is that your issue then take a look at below link it may help you.
How to include html or PHP codes into Joomla article
Hope its helps.

Related

Saving static HTML page generated with ReactJS

Background:
I need to allow users to create web pages for various products, with each page having a standard overall appearance. So basically, I will have a template, and based on the input data I need the HTML page to be generated for each product. The input data will be submitted via a web form, following which the data should be merged with the template to produce the output.
I initially considered using a pure templating approach such as Nunjucks, but moved to ReactJS as I have prior experience with the latter.
Problem:
Once I display the output page (by adding the user input to the template file with placeholders), I am getting the desired output page displayed in the browser. But how can I now obtain the HTML code for this specific page?
When I tried to view the source code of the page, I see the contents of 'public/index.html' stating:
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
Expectedly, the same happens when I try to save (Save As...) the html page via the browser. I understand why the above happens.
But I cannot find a solution to my requirement. Can anyone tell me how I can download/save the static source code for the output page displayed on the browser.
I have read possible solutions such as installing 'React/Redux Development Extension' etc... but these would not work as a solution for external users (who cannot be expected to install these extensions to use my tool). I need a way to do this on production environment.
p.s. Having read the "background" info of my task, do let me know if you can think of any better ways of approaching this.
Edit note:
My app is currently actually just a single page, that accepts user data via a form and displays the output (in a full screen dialog). I don't wish to have these output pages 'published' on the website, and these are simply to be saved/downloaded for internal use. So simply being able to get the "source code" for the dislayed view/page on the browser and saving this to a file would solve my problem. But I am not sure if there is a way to do this?
Its recommended that you use a well-known site generator such as Gatsby or Next for your static sites since "npx create-react-app my-app" is for single page apps.
(ref: https://reactjs.org/docs/create-a-new-react-app.html#recommended-toolchains)
If I'm understanding correctly, you need to generate a new page link for each user. Each of your users will have their own link (http/https) to share with their users.
For example, a scheduling tool will need each user to create their own "booking page", which is a generated link (could be on your domain --> www.yourdomain.com/bookinguser1).
You'll need user profiles to store each user's custom page, a database, and such. If you're not comfortable, I'll use something like an e-commerce tool that will do it for you.
You can turn on the debugger (f12) and go to "Elements"
Then right-click on the HTML tag and press edit as HTML
And then copy everything (ctrl + a)

FIWARE Wirecloud: which template files are actually used?

We are customizing a Wirecloud installation to provide our own branding, text and header links. We have created a subtheme to the 'defaulttheme' and are overlaying our own template, images and sccs files to accomplish our customization.
We have managed to change the header image, landing page and a few other bits, but are hampered by the following:
The generated HTML provides no clues as to which template it originated from (we think?)
Documentation here: https://wirecloud.readthedocs.io/en/stable/development/platform/themes/
specifies a number of template files, but not all of the template. For example we cannot find the place where the 'Sign in' button is defined.
The wirecloud javascripts seem to insert random bits of html for what should be boilerplate stuff. For example a 'Powered by wirecloud' icon appears at the bottom of the screen. The 'get more components' button appears out of nowhere and we cannot disable it.
Many of the generated elements do not have an id, so it is difficult to disable or identify them in a sccs file. The 'get more components' button for example is not relevant for us, but we cannot remove it (so far).
Does anyone have a completed custom theme we can look at? Or can someone point out which template files / sccs files are used for branding and overall look-and-feel?
True, currently WireCloud doesn't print any comment not any other clue for detecting from what template the html was generated.
Some parts are not generated using templates, for example, the "Sign in" button. I recommend you to create a ticket in the issue tracker for each thing you want to customise and you don't find how to do it, so we will be able to give you a better answer, and to create a template if needed.
Remember that you have to include a "Powered by WireCloud" to comply with the WireCloud license. In the other hand, the "get more components" button can be removed by editing the wirecloud/workspace/wallet/wallet.html template, by removing the following code:
<s:southcontainer>
<t:addmore/>
</s:southcontainer>
Well, this can also be discussed and documented. We usually don't use ids because those elements are better located using some kind of selector.
Anyway, we are working to improve the documentation about themes ASAP.

Add custom input form in MediaWiki homepage

Where can I put custom input form code in media wiki homepage?
This is so I can modify it into fewer steps for a user to create a new page. The input form will be for entering the title of the new page.
Currently, when adding a page, the user has to search for a page, and if it doesn't exist, it redirects to another page with a link to add the new page. After that it will load the built-in Wiki editor(will also modify this to default to the Visual Editor extension I integrated instead of Wiki editor).
Any input would be greatly appreciated.
There are a number of extensions that can do what you want:
InputBox, is bundled with recent versions of MediaWiki. It is used with Wikimedia wikis, and thus probably very stable.
CreateBox, specifically for letting users create pages
Create Page, more general aproach
Semantic Forms The most fulfledged, but also the most complex, and requires the Semantic MediaWiki extension
You might also want to combine this with some biolerplate extension, e.g. Preloader
As you are posting on SO, I assume that developing your own extension would also be an option. In that case, have a look at the parser functions manual: https://www.mediawiki.org/wiki/Manual:Parser_functions
The file in which i can add/modify a custom input form in the media wiki homepage would be the /rootWikiDir/skins/Vector.php

Mediawiki: configuring the entry page, adding a new page

Have a wiki installed in our organization, and want to start using it.
Failed to find the answers for the next 2 basic questions:
How do I configure the entry page to show a list of all existing pages
How do I create a new page (!). Only succeeded doing it by typing a url of an non existing page. Guess there are nicer methods for this
Thanks
Gidi
For how to show a list of all pages, look at DynamicPageList, which is part of MediaWiki. (There's a more advanced third-party version, but it's not needed for such a simple task.)
Creating a new page really is exactly as you said: Type a URL and save some edits. Most beginning editors will edit a link into a page, and then use that link to browse to the page, so that they don't accidentally forget the spelling and lose the page to the Ether. (Of course it would show up in the recently edited and other special pages.)
This is more of a webapps.stackexchange.com question though.

Some HTML tags (e.g. IFRAME) and Javascript in Joomla 1.5 articles are automatically removed when using the WYSIWYG editor

When using a WYSIWYG editor in Joomla 1.5 to create website content I am not able to freely insert HTML tags, such as IFRAME as the HTML tags will be automatically removed on saving the article. I can either configure Joomla not to use a WYSIWYG editor which makes editing articles a bit of a pain, or I can force the HTML code into the article using MySQL Query Browser and altering the article content directly in the site's database. Doing this is not only cumbersome but also ineffective, because every time someone edits the article from the Joomla back end WYSIWYG editor, the inserted tags will be removed by the editor again.
Is there a way of inserting an IFRAME (or perhaps JavaScript) into a Joomla 1.5 article, without turning off the WYSIWYG editor or hacking away at the database?
I had the same problem that you are facing. I used Jumi to solve that. It works very well.
Short answer: no. Joomla knows best :P
But seriously, you can turn off the WYSIWYG for just your user. Go to the 'User Manager', select your account, and set the 'User Editor' preference to be 'Editor - No Editor'. That way you can type in whatever tags and code you want, without WYSIWYG borkage. But every other account on the site will still have access to their WYSIWYG's.
Doesn't take too long to toggle the WYWIWYG that way when you need to do a bit of precise HTML/Javascript/etc coding.
Actually, it depends on what you want to put in your IFRAME. If it is a URL, then you can create a "Wrapper" module containing the URL you want. Type a unique name into the "Position" field in the module. Then, you can display the results in an article by inserting the following where you want the results to appear {loadposition XXXX} where XXXX is the unique name you typed into the module's position field.
I think by using JCE Editor in joomla you are able to fix all these problem.
If you use the JCE Editor for joomla It will allow you to customize what tags are allowed. THe default Joomla editor will strip the tags out. I have also ran into issues if you toggle the editor at all it will remove them on submit. I have found the only way to do this is either with a wrapper, or a custom code module.