Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: SVG image plugin?  (Read 8373 times)

0 Members and 1 Guest are viewing this topic.

brynn

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 198
    • Inkscape Commmunity
SVG image plugin?
« on: September 24, 2013, 02:12:45 am »

Hi Friends,
Rather than post in an over 1 year old topic, I'm starting a new one.  Here's a link to that topic:  http://forum.coppermine-gallery.net/index.php/topic,68246.0.html.

I also would like to be able to upload and display SVG images in my gallery.  In Reply #10 of that topic, a link is given to a plugin that is said to provide SVG support (by which I mean the ability to upload SVG images and display them in the gallery).  Here is that link:  http://coppermine.svn.sourceforge.net/viewvc/coppermine/branches/cpg1.5.x/plugins/svg_support/?view=tar.  However, it seems to be redirected to:  http://sourceforge.net/p/coppermine/code/HEAD/tree/.  On that page, I'm not sure which, if any, of those files, is the one I need.

Also, I've looked through the Plugins page (http://coppermine-gallery.net/plugins.php?cpg_version=both).  Either it's not there, I missed it, or it's identified with some technical language that I don't understand.

So I ask the same questions again.  Can SVG images be uploaded and displayed in CPG 1.5x?  If so, where may I find the files and instructions?

Thank you very much  :)
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4822
    • Windsurf.me
Re: SVG image plugin?
« Reply #1 on: September 24, 2013, 08:20:37 am »

You will find the SVG support plugin on this page of the SVN - http://sourceforge.net/p/coppermine/code/HEAD/tree/branches/cpg1.5.x/plugins/

I am not sure of the current state of it however.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

brynn

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 198
    • Inkscape Commmunity
Re: SVG image plugin?
« Reply #2 on: September 24, 2013, 10:01:42 am »

Ah, well I'll be glad to let you know, if I can manage to install it.  I'm still quite a newbie.

It looks like the file configuration.php would be the one I want, since I'm not using the film strip feature in my gallery.  It's uploaded into plugins, but does not show up in the Plugin Manager.  How should I go about installing it?

Thanks  :)
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15760
Re: SVG image plugin?
« Reply #3 on: September 27, 2013, 09:23:16 pm »

You need to download all of the plugin's files (just 2, actually) from our SVN repository. Then, create a directory called svg_support in your gallery's plugins directory. Now, upload the downloaded files to that directory and the plugin should appear "as usual" in the plugin manager. It should install without an issue, but as I've created the plugin almost 3 years ago, I'm not sure if it's 100% done. If I remember correctly at least the thumbnail and intermediate-sized view should work as expected.
Logged

brynn

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 198
    • Inkscape Commmunity
Re: SVG image plugin?
« Reply #4 on: September 29, 2013, 11:04:58 am »

Oh ok  :-\  Thanks Andre  :) 

Ok, it's successfully installed -- yay!

However, the uploaded SVG is not displayed as I would expect.  Screenshot attached (icss1.png).  You can see the PNG which was generated from the SVG (in Inkscape) in the same shot.  The fact that the SVG seems slightly larger than the PNG doesn't concern me so much (probably related to Inkscape's native resolution, I'm guessing).  But the fact it's cropped off is discouraging.  Also....I don't know the proper terminology....but it's not clickable.  I don't get "the finger" when I mouseover, and clicking does not take me to the intermediate/file description page, as expected.

And I can tell you a little more about it.  I'm using Firefox (current and updated) with an add-on called AdBlock Plus, which is an ad blocker.  (I can connect you to their website if necessary.)  Anyway, when I mouseover the SVG thumbnail, I get a little button which allows me to block it.  So apparently that Ff add-on is identifying it as an advertisement.  This also doesn't concern me so much (because I can probably whitelilst my domain in the ad blocker).  But I thought I should mention it, just in case it would provide you any helpful info (or whoever might be motivated to update this plugin).

Oh wait.....  Ok, there's more.  I've made a little illustration for you (icss2.png).  I even made a simple illustration of the ad-block button :P   Inside the dashed pink rectangle there's no finger and clicking does nothing.  But for an area roughly shown by dashed green rectangles (to the right and left of the SVG image), the finger is produced, and clicking takes me to the intermediate page (with the file description, comment, etc.)

The intermediate page also has an unexpected display, please see screenshot (icss3.png).  I had to zoom out quite a bit, to get the whole length of the page (actually it's 2 screenshots, 1 on top of the other).  For some reason, the gallery seems to think the image has a whole bunch of white (probably transparent rather than white) space below and to the right.  I wouldn't have a clue why it shows the blank space on the intermediate page and not on the thumbnail.  But hopefully you all might.  Anyway, the tiny ad block button always appears at the top right corner of an ad.  So I've drawn it in where it appears on the actual page, so you can get an idea about the width of the area.

Since that is the full size of that image, I can't test that feature.  But I certainly could test a larger image, if you like.

Oh, I see more info!  The context menu indicates that there's a frame.  When I right click on it (on both intermediate page and thumbnail) one of the options is "This Frame".  It has a submenu of its own, with 9 options, and clicking on some of them does open the image in a new window, tab, etc.  So I suppose.....well, I'm not sure.  I guess if these problems can't be fixed, at least getting the full size image from right-click > This Frame would be better than nothing.  But it would be nice to have a display like the raster formats.

Oooohh, I'll bet it's the frame that makes Ff think it's an ad!  I wouldn't be surprised if getting rid of the frame solves all the above problems.  Well, IF it can be gotten rid of.  While I know Inkscape pretty well, I don't have much experience putting SVG images onto the internet.....I don't think the frame is a requirement....but I'd have to defer to others on that point.

Let me see, I think I have IE 9 or 10.  Ok yes, exactly the same behavior in IE, except for the ad block issue.

Ok then!  Sorry for the wall of text here.  I tend to think more info is better than sketchy info.  But I apologize if it annoys anyone  :P 

Please let me know if you need anything else.  I could provide an SVG for testing, if it would be helpful.

And thanks again  :)
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15760
Re: SVG image plugin?
« Reply #5 on: October 04, 2013, 11:37:45 am »

Honestly, I don't want to dive into this subject again, as I never worked with vector graphics and thus have less clue than you ;) If I remember correctly the only way to embed and SVG image to a website is by using an object tag and that's probably the reason Adblock detects it as blockable item.
Logged

brynn

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 198
    • Inkscape Commmunity
Re: SVG image plugin?
« Reply #6 on: October 04, 2013, 01:53:13 pm »

Well, as I said, that particular issue is not a big concern, as far as the Ff AdBlock extension.

Even on the intermediate page, where the page somehow gets stretched out, isn't a huge concern, because after all, the image is still completely visible.

The main concern is the thumbnail getting cropped.

But I understand if you don't want to investigate further.  Do you mind if I leave the topic open, in case someone else might be interested?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15760
Re: SVG image plugin?
« Reply #7 on: October 04, 2013, 01:58:40 pm »

Maybe someone is really interested in this topic and improves the plugin, but I think it's quite unlikely.
Logged

brynn

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 198
    • Inkscape Commmunity
Re: SVG image plugin?
« Reply #8 on: October 04, 2013, 02:22:48 pm »

Ok, I appreciate your comments.

I will think positive, that someone might come along.  Since Inkscape is an SVG editor, it really would be nice to be able to display files in their native format.  And certainly it must be possible.

Maybe some Inkscape user will know how to fix it?  It seems to me like it might just need a little tweak, rather than a major rewrite.  (Not that I really know for sure  ::) )  If I can find someone to fix it, I will surely to share the files with you.  And I'll be sure to close this topic, if that happens.

And meanwhile, if anyone is interested, let me know what you might need, and I'll help in any way I can.

Thank you very much  :)
Logged

brynn

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 198
    • Inkscape Commmunity
Re: SVG image plugin?
« Reply #9 on: October 06, 2013, 03:45:38 pm »

Just a quick thought.

If I were to provide the html needed for the proper display, would that make it very easy for someone here (either here, or anyone with the proper skills) to write or edit the plugin?

With some study, I probably can work out the html.  I just would have no idea how to write the plugin.

Thanks  :)
Logged

Niecher

  • LocalSupporter
  • Coppermine frequent poster
  • ***
  • Country: es
  • Offline Offline
  • Gender: Male
  • Posts: 191
Re: SVG image plugin?
« Reply #10 on: October 06, 2013, 04:53:55 pm »

Hello brynn,

You try to adjust the size of the intermediate image at 400px or 450px approx. Perhaps this can reduce that space.

This can be done from the configuration of the gallery.

Regards.
Logged

brynn

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 198
    • Inkscape Commmunity
Re: SVG image plugin?
« Reply #11 on: October 06, 2013, 04:59:43 pm »

But wouldn't that affect all images, not just SVG images?

However, your comment does give me a clue about what's wrong on that page.

I'm pretty sure I can figure out the html.  I just had the thought that if I could provide the html, maybe it would make writing the plugin easier.  So I thought it can't hurt to ask   ;D
Logged

Niecher

  • LocalSupporter
  • Coppermine frequent poster
  • ***
  • Country: es
  • Offline Offline
  • Gender: Male
  • Posts: 191
Re: SVG image plugin?
« Reply #12 on: October 06, 2013, 05:05:27 pm »

Yes, that will affect all images.

But consider the intermediate image as a sample of what the user registered or unregistered (as configured in groups) can view by clicking and opening the full size.

Regards.
Logged

Niecher

  • LocalSupporter
  • Coppermine frequent poster
  • ***
  • Country: es
  • Offline Offline
  • Gender: Male
  • Posts: 191
Re: SVG image plugin?
« Reply #13 on: October 06, 2013, 05:28:11 pm »

I'm pretty sure I can figure out the html.  I just had the thought that if I could provide the html, maybe it would make writing the plugin easier.  So I thought it can't hurt to ask   ;D

I mean, it's not always necessary to write code to solve something. The gallery has many useful options which resolve easily.

Regards.
Logged

brynn

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 198
    • Inkscape Commmunity
Re: SVG image plugin?
« Reply #14 on: October 06, 2013, 06:11:24 pm »

I don't understand what you mean.  I thought the problems with the display of SVG images was because the plugin needs to be edited or rewritten.

If there is any way to fix these problems without a rewriting the plugin, of course, I would be interested to know how!

But as far as changing the intermediate image size, that is going to affect PNGs as well as SVGs, isn't it?  (Those are primarily the formats we'll be uploading.)  And there's no problems with PNGs.
Logged

Niecher

  • LocalSupporter
  • Coppermine frequent poster
  • ***
  • Country: es
  • Offline Offline
  • Gender: Male
  • Posts: 191
Re: SVG image plugin?
« Reply #15 on: October 06, 2013, 07:03:23 pm »

I'll try to explain better.

I'm seeing svg files are documents of type image/svg+xml. If you see the file information for a sgv file, the dimensions are 0x0.

And I understand that there is no possibility to change the dimensions to a document file type.

Though modern browsers display an image, but the gallery meant that handles a document.

For this reason I thought the option to adjust the intermediate image force to reduce the space to display svg image.

Regards
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 20 queries.