TinyPortal

Development => Support => Topic started by: minormike on October 18, 2020, 03:00:05 PM

Title: Articles styling
Post by: minormike on October 18, 2020, 03:00:05 PM
Link to my forum: https://forum dot mmoc dot org dot uk
SMF version: 2.0.17
TP version: 2.0.0
Default Forum Language: English
Theme name and version: Default
Browser Name and Version: Chrome
Mods installed: various
Related Error messages: N/A

I'm a bit lost with how to stylise my articles under TinyPortal other than with the very limited options available in the wysiwyg html editor or the even more limited bb codes. I'd like to style my articles outside of TinyPortal and import the content either with inline css or referencing an external stylesheet, but I can't figure how I might do that. Am I having a blonde moment, or can this be done?
Title: Re: Articles styling
Post by: tino on October 18, 2020, 04:19:12 PM
It can be done in multiple ways, you can use raw html in the html editor if you change it to view source.

Or you can reference an external php file.

https://www.tinyportal.net/docs/index.php?page=Creating-an-article

Is a good reference of what you can do.

Title: Re: Articles styling
Post by: lurkalot on October 18, 2020, 04:25:41 PM
Quote from: minormike on October 18, 2020, 03:00:05 PM
Link to my forum: https://forum dot mmoc dot org dot uk
SMF version: 2.0.17
TP version: 2.0.0
Default Forum Language: English
Theme name and version: Default
Browser Name and Version: Chrome
Mods installed: various
Related Error messages: N/A

I'm a bit lost with how to stylise my articles under TinyPortal other than with the very limited options available in the wysiwyg html editor or the even more limited bb codes. I'd like to style my articles outside of TinyPortal and import the content either with inline css or referencing an external stylesheet, but I can't figure how I might do that. Am I having a blonde moment, or can this be done?

Hi Mike.

You can do either, as long as the ccs styling doesn't clash with the css used to control the rest of the site.  I would advise you to turn off the wysiwyg editor though so it doesn't mess with your custom code in the article.

TinyPortal Admin, click the settings icon with the pen on it.  Uncheck the box next to, Use the WYSIWYG editor, and then save.  This will enable you to add you html code as you like.
Title: Re: Articles styling
Post by: minormike on October 19, 2020, 11:07:59 AM
That's brilliant - I can put all my styles in a css file on the root of the forum and just call it from inside the articles as required. Thanks again
Title: Re: Articles styling
Post by: @rjen on October 19, 2020, 12:02:42 PM
Quote from: minormike on October 19, 2020, 11:07:59 AM
That's brilliant - I can put all my styles in a css file on the root of the forum and just call it from inside the articles as required. Thanks again

There is a special css file for that you can add the styles to : tp-custom.css