TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

March 28, 2024, 08:35:10 AM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,104
  • Total Topics: 21,212
  • Online today: 174
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 169
  • Total: 169

Articles styling

Started by minormike, October 18, 2020, 03:00:05 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

minormike

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?

tino

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.


lurkalot

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.

minormike

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

@rjen

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
Running Latest TP on SMF2.1 at: www.fjr-club.nl