Jump to content

Archived

This topic is now archived and is closed to further replies.

capgras

Vectors

Recommended Posts

capgras    1
capgras

Hi, I'm aware that .svg is not supported by wordpress by default, however there are some workarounds, which make using .svg in wordpress possible, these plugins or modifications allow me to upload .svg image files and use them wherever a bitmap image can be used.

The problem is, DMS seems to have a list of supported image extensions somewhere inside also, example: i can upload a .svg image into a gallery and using third party image displaying plugins incorporate .svg into DMS, this is a hassle as most of these third party 'boxes' dont work nicely with DMS as DMS components do, but DMS 'media box' still tells me .svg is not supported as an image file, although, as i said, my wordpress now accepts .svg and i can even use shortcodes to implement .svg into third party components ,not in a DMS 'text box' though.

 

I guess my question is, is there a way to change the default extension image layout for DMS aswell, as my wordpress is now accepting .svg, my DMS still won't. (i can use .svg in those default worpress themes).

  • Like 1

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

HI,

 

To be totally honest, I am not sure. I will need to speak to one of our developers regarding this. I have bookmarked your topic and as soon as I have more information, I will reply here.

 

You could try this:

 

Using FTP or command line if you know how, navigate to the following directory

 

wp-content/themes/dms/editor and open the editor.actions.php file.

 

Navigate to line 302 and you will find the following line of code:

 

$allowed_file_types = array( 'image/jpg','image/jpeg','image/gif','image/png', 'image/x-icon');

 

Replace it with this:

 

$allowed_file_types = array( 'image/jpg','image/jpeg','image/gif','image/png', 'image/svg' 'image/x-icon');

 

and see if that does the trick, reply here if it does and I will do a pull request.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
capgras    1
capgras

i get this:

 

Parse error: syntax error, unexpected ''image/x-icon'' (T_CONSTANT_ENCAPSED_STRING), expecting ')' in C:\wamp\www\oblik2\wp-content\themes\dms\editor\editor.actions.php on line 313

 

the line is obviousely different, its 313 not 302, maybe i should update dms? maybe the list appears somewhere else in the DMS code so it needs to match this one.. just a thought.

Share this post


Link to post
Share on other sites
capgras    1
capgras

$allowed_file_types = array( 'image/jpg','image/jpeg','image/gif','image/png', 'image/svg', 'image/x-icon');a comma was left out in the code you provided, i no longer get a syntax error but the .svg still wont upload

Share this post


Link to post
Share on other sites
capgras    1
capgras

thanks for the help, i hope DMS gets .svg support in the future, it would be awesome...

Share this post


Link to post
Share on other sites
James B    436
James B

Try switching 'image/svg' to 'image/svg+xml'


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

OK, I will need to speak to one of our developers and see if we can add support.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

  • Similar Content

    • TourKick (Clifford P)
      By TourKick (Clifford P)
      SVG image works in "image" section but adding SVG to Menus section > Configuration > Logo does not display the selected SVG from the media library.
    • JawDesigns
      By JawDesigns
      Hello Pagelines,
       
      I'm looking into adding my own icons into a website and the following things are very important to me:
       
      1) Being able to specify size, color, hover, active states using CSS
      2) Easily be able to update and change icons quickly
       
      I'm not sure what is the best way to create icons for a website? I have came across two companies that I'll be researching today 'fontastic' and 'icomoon' which seem good.
       
      Does anyone have any recommendations or advice for me please?
       
      Kind regards,
       
      James 
    • jonesg2
      By jonesg2
      First I want to display my logo as SVG so I can style to resize nicely. When I try to upload an SVG using PageLines logo option it tells me the file type is not supported.

      Second I want to display the site title and description next to the logo as text and not have to make it part of the logo so it will render crisply on all screens and so I can easily update it.
×