Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link support #126

Closed
guydk opened this issue Jun 7, 2012 · 19 comments
Closed

Link support #126

guydk opened this issue Jun 7, 2012 · 19 comments

Comments

@guydk
Copy link

guydk commented Jun 7, 2012

I would like to have ability to use links in text. So that i could use a text button as a short cut to a frame. Also external links would be nice.

How could i do this?

@aumouvantsillage
Copy link
Collaborator

SVG provides the "a" element like in HTML:
http://www.w3.org/TR/SVG11/linking.html#Links

AFAIK, in Inkscape, the only way to add links to a document is to use the XML editor.

@Gulpen
Copy link

Gulpen commented Jul 19, 2012

Do I understand correctly that a solution to the original question would imply that it is possible to use Sozi/Inkscape to create whole websites?

If so, this is a feature that I have been dreaming about for a while now. I'd love to be able to create a .svg website where links bring you to specific frames and/or to external websites. In fact, I truly believe that this could lead to a whole new generation of websites! [I think the whole Sozi website as .svg may be a good candidate!]

If I interpreted the above correctly, then I would really strongly like to request to include such 'link making' in the GUI. Firstly, because I can also use it then, but secondly, because such a feature may truly lead to some as yet unforeseen developments in browser/website development.

@Gulpen
Copy link

Gulpen commented Jul 19, 2012

Ps. I found a discussion over at the Inkscape forum, but the sample websites given there are clearly pre-Sozi ideas (and not quite what I had in mind):
http://www.inkscapeforum.com/viewtopic.php?f=28&t=527

@Gulpen
Copy link

Gulpen commented Jul 19, 2012

Ps2. Ok, now I'm really getting excited... Imagine that clicking a link can result in: changing frame + playing audio + moving objects around. This is sampled here: http://svg-wow.org/camera/camera.xhtml (though you can't click on a link there..) No more Flash for sure! I'm just dreaming aloud here...

@aumouvantsillage
Copy link
Collaborator

@Gulpen I had the same idea some time ago. I wish I had time to redesign the website of Sozi using Sozi itself.

However, I don't see how this feature could be added to the GUI of Sozi.

Like audio and video, links are not directly related to the presentation logic and I beleive this feature should be provided either by Inkscape itself, or by a separate extension.

@Gulpen
Copy link

Gulpen commented Jul 20, 2012

@SENSHU Actually, I recall seeing people clicking on links in powerpoint presentations! That is, they would navigate through their slides with by clicking on certain words which would then cause a jump to a specific slide. Again, they would click om a home link to bring them back to the index slide. IF this would be included in Sozi and would be implemented using 'external links' (that is, jump to frames using the 'anchors' in the URL) then a side-effect would be the possibility of linking to other websites as well. In fact, being able to click on a link which takes you to a website is not too strange a feature for presentations.

But, I do understand your hesitation. The main problem being that MORE website-related features may be requested and, hence, distort the purpose of the Sozi project. I can already imagine the request for embedding portions of HTML code (eg for fields or even php). However, I truly think the above-mentioned feature could also fit within the Sozi project and merely this feature would already allow me to implement my website ideas. Maybe afterwards, if people want to develop this idea further, a Sozi-web fork would start being appropriate.

The other problem whether it falls in Sozi or Inkscape. I have to readily admit I have no knowledge about this.

@aumouvantsillage
Copy link
Collaborator

There is another issue that I would like to address: currently, frame URLs are formed using frame numbers.

This can lead to problems when frames are inserted, removed, reordered, etc.
I have already added support for frame IDs, but ID-based URLs are not supported yet.

So basically, the roadmap for better link support could be:

  • ID support in URLs
  • allow to change frame IDs in the GUI
  • a separate inkscape extension to easily add links to Sozi frames or any other URL

@aumouvantsillage
Copy link
Collaborator

The third item was the easiest to implement.

I have pushed a new inkscape extension in the "dev" branch.
Files editors/inkscape/sozi_extras_link.inx and editors/inkscape/sozi_extras_link.py must be copied to your Inkscape extensions folder.
They are completely independent from the rest of Sozi.

The extension is very basic:

  • select an element of your SVG document
  • run the extension "Sozi extras / Create link"
  • fill the URL field with either a full URL or a hash
  • click "Apply" and "Close"

@Gulpen
Copy link

Gulpen commented Jul 20, 2012

Wow you are fast :) This is great! I will inform you if I encounter any bugs, etc. Thank you very much.

@lovesozi
Copy link

Hi senshu, doesn't seems to work (I'm on winXP....) Can't load the extension...

@aumouvantsillage
Copy link
Collaborator

@lovesozi No idea.

What do you observe?
Is the menu item "Sozi Extras / Create link" present or missing?
Is there an error message?

@lovesozi
Copy link

thanks for your answer,
simply item menu missing, no error message.....

@aumouvantsillage
Copy link
Collaborator

It's strange.
The most likely cause is that the extension is not correctly installed.

You should have two files named "sozi_extras_link.inx" and "sozi_extras_link.py" in your Inkscape extension folder.
C:\Program Files\Inkscape\share\extensions

If they are missing or corrupted, you can download them again from these links:
https://github.com/senshu/Sozi/raw/dev/editors/inkscape/sozi_extras_link.inx
https://github.com/senshu/Sozi/raw/dev/editors/inkscape/sozi_extras_link.py

@lovesozi
Copy link

Ok, now it works, thank you very much.
My fault, I firstly downloded the files from https://github.com/senshu/Sozi/tree/dev/editors/inkscape
and they're quite differents...

Very useful extension, thank you!

@aumouvantsillage
Copy link
Collaborator

Another user observed that Inkscape already allows to create, edit and remove links.

Right-click on an element and use the appropriate item in the pop-up menu: "Create Link", "Link Properties", "Remove Link".

The extension "Sozi extras/Create Link" is considered deprecated and will no longer be available in the next release.

@lovesozi
Copy link

Thank you very much
Date: Tue, 9 Oct 2012 02:45:11 -0700
From: notifications@github.com
To: Sozi@noreply.github.com
CC: masspern@hotmail.it
Subject: Re: [Sozi] Link support (#126)

Another user observed that Inkscape already allows to create, edit and remove links.

Right-click on an element and use the appropriate item in the pop-up menu: "Create Link", "Link Properties", "Remove Link".

The extension "Sozi extras/Create Link" is considered deprecated and will no longer be available in the next release.

          —

          Reply to this email directly or view it on GitHub.

@magicvince
Copy link

Yes the Create Link function works fine directly in Inkscape.

Tips for noobs like me :

  • you can jump to a sozi frame using #number_of_the_frame as Href url
  • use clone object for a common object of many frame (like a "home" icon for example)

@Gulpen
Copy link

Gulpen commented Jun 29, 2013

Alright people, thank you so much for all the insights! I finally found the time again to work on my SVG-Sozi website and got very far with the above information. However, I encountered a new problem: when jumping frames 1,2,3,4, in immediate consecutive order Sozi jumps perfectly using the time settings I entered via GUI. However, when jumping frames in order 1, 3, 2, 4, 1 (i.e. non-consecutive), Sozi ignores all the settings I entered and uses a "default 1 second" time setting instead of what I specified for each frame. Fix: Sozi must always use the entered settings.
The only sensible exception that I can see to Suzi always following the entered settings (and which is already implemented) is when jumping back exactly one frame: 4, 3, 2, 1, because Sozi then uses a "quick jump". I would already be happy if this exception is maintained, even though it is not ideal in all situations.
From a web-design point of view the ideal situation would be the ability to customise the "quick back jumping" time settings: enabling it in one situation (overulling the entered settings when going back one frame), disabling it in another (always respecting entered settings, even when going back one frame). But perhaps this latter is asking too much.
Best.

@aumouvantsillage
Copy link
Collaborator

@Gulpen This is an old thread that has been closed 6 months ago. You should open a new issue so that I can keep your request on my todo list.

Currently, transition settings are applicable when following the sequence of frames in consecutive order.
For the sake of consistency, when moving backwards, from frame n to frame n-1, we use the settings from frame n (see #148).

Fix: Sozi must always use the entered settings

I understand your concern, but it is not obvious that a transition between consecutive frames should have the same duration as a transition through a link. A better fix, IMHO, would be to attach specific transition settings to each link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants