HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


SVG Support

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#110238 (In Topic #21957)
Avatar

Fan in training

Customizing Site Logo, PNG loogs terrible, no SVG support?

My logo is created in a vector drawing program.  I exported it to PNG at the desired sizxe and the tyext and drawing look terrible.  I exported to SVG to see if it would look any better but apparently OC doesn't support SVG?  What's up with that? Is it possible to add ".svg" to a list of file types somewhere?

Also it was disappointing that the top nav/??? bar did not adjust to the size of the logo.  Is there a setting or is it necessary to crawl around the code?

Thanks
Rick
Back to the top
 
Posted
Rating:
#110240
Avatar

Hi,

You'll need to be comfortable with working at the level of standard web technologies to customise themes, it's not point and click except for the simplest changes (substituting equivalent images, or changing the colour scheme).

I don't think you can upload an .svg as a theme image, but there's nothing stopping you using whatever custom HTML/CSS/JavaScript you want via templating. You can directly reference uploaded files by URL off course.

I'd love it if it were more point and click, but we would literally need to put in a 6 or 7 figure investment to afford the development work, so it's not currently on the cards.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#110247
Avatar

Fan in training

Chris,
Thanks for your speedy reply.  I have spent the entire day working with OCPortal and I am grateful for your help.


I don't think you can upload an .svg as a theme image, but there's nothing stopping you using whatever custom HTML/CSS/JavaScript you want via templating. You can directly reference uploaded files by URL off course.

I was able to upload an svg file using cpanel and it displays OK after much effort.   It seems as I surmised that ".svg" is simply not on the list of files that can be uploaded.  Is there a reason or is this just an oversight?  Can you tell me where the list resides so that I may modify it?

I'd love it if it were more point and click, but we would literally need to put in a 6 or 7 figure investment to afford the development work, so it's not currently on the cards.

 I never said anything about point and click, to what you are referring?   If you are referring to this comment ...

RickJ said

Also it was disappointing that the top nav/??? bar did not adjust to the size of the logo.  Is there a setting or is it necessary to crawl around the code?

Since there are multiple ways of auto-sizing an area on a web page according to it's contents I was naturally surprised none were employed.
Back to the top
 
Posted
Item has a rating of 5 (Liked by KingBast)  
Rating:
#110252
Avatar

SVG poses a few problems, but mainly it's just because up until relatively recently it was not supported in <img> tags by browsers. New features come into ocPortal generally when a developer needs them on a project and adds them, or a user sponsors them. I don't think anyone had even added about SVG theme images to the tracker.
I have added it to the tracker now 0002059: Support adding of SVG theme images by the Admin Zone - ocPortal feature tracker

Issues with SVG:
  • As a vector format it doesn't neatly fit into ocPortal's concept of an image. Mainly because GD cannot read them, and our concept of an image includes an assumption that they can be thumbnailed (which obviously doesn't make sense for an SVG image). So some more complexity needs to be in the system so it knows how to handle each case / has multiple image definitions for different contexts.
  • IE8 is supported by ocPortal 9 on the front-end, but that doesn't support SVG images. So it's not really in our base line consideration of technologies to target ocPortal against. We won't be supporting IE8 in Composr 10 though, so that changes.
  • There's a big security concern. SVG images can contain JavaScript code which can compromise a site (XSS attack), so if we allow them to be uploaded we have to be very careful to check who is doing it.

Since there are multiple ways of auto-sizing an area on a web page according to it's contents I was naturally surprised none were employed.

For an SVG, stretching is okay. For a raster image, stretching down wastes bandwidth (unless you do a server-side thumbnail, which may lose quality, especially for a JPEG as that's a re-save), and stretching up looks bad. As above, our considerations of how to approach things isn't really designed for SVG as it's not in the baseline browser support. But beyond that the logo in v9 is part of a carefully designed area where the zone menu blends into the logo. For v10 we're dropping that because it has always been problematic for users.
But I talk about point and click because just stretching things is never going to be enough for people. Imagine someone uploads a very thin image, if we stretch that then the entire page might end up filled with that image - so really it would need to have some kind of tool that allows you to position and crop, hence getting into point and click territory. Even a stretched square logo would have this issue.

I'm afraid building systems is never as simple as might be imagined, there are dozens of unforeseen complexities, and the environment is always changing.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#110572
Avatar

Community saint

In agreement with Chris here, this is why fixed width works better for ocPortal than fluid width (IMO), despite fluid width being available.

When theming my site I've always either got rid of the nav bar image, replaced it with my own, or incorporated the nav bar into my logo (as I have done currently). The logo image that ocPortal uses for default containst a part of the nav bar in it -the curved looking part.

Legends of Nor'Ova: A site powered by ocPortal; home of the Legends of Nor'Ova tabletop RPG wiki and community.

Like ocPortal? Want to thank Chris and gang somehow? Then help out in the chat room! It really needs your help! Just open it in a tab everytime you open your web browser, and when you hear a "ding", check it out!

"Those who want help should first be willing to give help."
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: