Previous Thread
Next Thread
Print Thread
Page 2 of 116 1 2 3 4 115 116
#82092 - 10/10/12 11:24 PM Re: Questions, suggestions or requests topic [Re: Shideravan]  
Joined: Mar 2008
Posts: 1,026
Shideravan Offline
Very Senior Member
Shideravan  Offline
Very Senior Member

Joined: Mar 2008
Posts: 1,026
With so many improvements in note templates area, I'll be happy if note manu bar could have a option to hide itself smile (and could be reabilited in right-button menu for example)
smile


"A user interface is like a joke. If you have to explain it, it's not that good."
#82095 - 10/11/12 07:01 AM Re: Questions, suggestions or requests topic [Re: Shideravan]  
Joined: May 2008
Posts: 4,827
qmc2 Offline
qmc2  Offline

Very Senior Member

Joined: May 2008
Posts: 4,827
Germany
Originally Posted By Shideravan
But I can't say if the system have a image entry in one of the websites.

The point is: QMC2 doesn't know either smile! It's all up to QtWebKit...


A mind is like a parachute. It doesn't work unless it's open. [Frank Zappa]

We're searching for QMC2 translators and support for existing translations. Interested? See here!
#82098 - 10/11/12 10:56 AM Re: Questions, suggestions or requests topic [Re: Shideravan]  
Joined: May 2008
Posts: 4,827
qmc2 Offline
qmc2  Offline

Very Senior Member

Joined: May 2008
Posts: 4,827
Germany
I tried using this simple JavaScript function in the template to check if an image URL exists / is valid:

Code:
<script language="JavaScript">
function imageExists(url) 
{
        var img = new Image();
        img.src = url;
        return img.height != 0;
}
</script>

Then do something like this to react on the result of the check:

Code:
<script>
if ( imageExists("http://some.domain.net/snaps/$ID$.png") )
        document.write("<img src=\"http://some.domain.net/snaps/$ID$.png\">");
else
        document.write("<img src=\"$GHOST_IMAGE$\">");
</script>

Works nicely here!


A mind is like a parachute. It doesn't work unless it's open. [Frank Zappa]

We're searching for QMC2 translators and support for existing translations. Interested? See here!
#82114 - 10/13/12 01:43 PM Re: Questions, suggestions or requests topic [Re: Shideravan]  
Joined: May 2008
Posts: 4,827
qmc2 Offline
qmc2  Offline

Very Senior Member

Joined: May 2008
Posts: 4,827
Germany
I've been asked to add a PDF viewer several times in the past, and though it's basically not too difficult with libraries like poppler or MuPDF, the common issue with all of them is that they have many library-dependencies. Now I found a nice Mozilla pet-project (PDF.js) which allows me to do it with QtWebKit smile!

This is the outcome from my tests:


(It's exactly what's available on their demo-page, just integrated into QMC2's source tree.)

It's a bit slow at the moment and has some obvious bugs (mostly known to the developers), however, it's still already doing a nice job and I think it's probably the best alternative I have! What do you think?


A mind is like a parachute. It doesn't work unless it's open. [Frank Zappa]

We're searching for QMC2 translators and support for existing translations. Interested? See here!
#82115 - 10/13/12 01:48 PM Re: Questions, suggestions or requests topic [Re: Shideravan]  
Joined: May 2012
Posts: 412
remax Offline
Senior Member
remax  Offline
Senior Member

Joined: May 2012
Posts: 412
France
Nice, that could be a good way to include the manual archive from progettosnaps.

#82116 - 10/13/12 01:55 PM Re: Questions, suggestions or requests topic [Re: Shideravan]  
Joined: May 2008
Posts: 4,827
qmc2 Offline
qmc2  Offline

Very Senior Member

Joined: May 2008
Posts: 4,827
Germany
Right, that's what it's meant for in the first place smile! I will actually not use it in the MiniWebBrowser itself (that was just to do a basic integration test), but I will create a new "manuals" game/machine detail-widget which will use the same technique (and also allow you to select the PDFs and probably other files like image- and text-files). The idea is to have a folder for each game/machine with one or more documents in it...


A mind is like a parachute. It doesn't work unless it's open. [Frank Zappa]

We're searching for QMC2 translators and support for existing translations. Interested? See here!
#82122 - 10/13/12 05:17 PM Re: Questions, suggestions or requests topic [Re: Shideravan]  
Joined: Mar 2008
Posts: 1,026
Shideravan Offline
Very Senior Member
Shideravan  Offline
Very Senior Member

Joined: Mar 2008
Posts: 1,026
I'll add manual support for pdf in the templates soon smile

Just for curiosity, new versions of QMC2 already have support for open new windows in notes, like it does in MiniWebBrowser?


"A user interface is like a joke. If you have to explain it, it's not that good."
#82123 - 10/13/12 06:00 PM Re: Questions, suggestions or requests topic [Re: Shideravan]  
Joined: May 2008
Posts: 4,827
qmc2 Offline
qmc2  Offline

Very Senior Member

Joined: May 2008
Posts: 4,827
Germany
Originally Posted By Shideravan
I'll add manual support for pdf in the templates soon smile

That wouldn't work smile.

Originally Posted By Shideravan
Just for curiosity, new versions of QMC2 already have support for open new windows in notes, like it does in MiniWebBrowser?

Yes, but it depends on how you do it (normal link works). It doesn't work through a button with JavaScript, though, because I can only support JS while loading from a template, not when editing (nearly all editing functions are JS based, so that's used internally).


A mind is like a parachute. It doesn't work unless it's open. [Frank Zappa]

We're searching for QMC2 translators and support for existing translations. Interested? See here!
#82126 - 10/13/12 06:16 PM Re: Questions, suggestions or requests topic [Re: qmc2]  
Joined: Mar 2008
Posts: 1,026
Shideravan Offline
Very Senior Member
Shideravan  Offline
Very Senior Member

Joined: Mar 2008
Posts: 1,026
Originally Posted By qmc2

Originally Posted By Shideravan
Just for curiosity, new versions of QMC2 already have support for open new windows in notes, like it does in MiniWebBrowser?

Yes, but it depends on how you do it (normal link works). It doesn't work through a button with JavaScript, though, because I can only support JS while loading from a template, not when editing (nearly all editing functions are JS based, so that's used internally).

That means that maybe QMC2 notes never will support buttons that open windows (just normal links) or maybe that could come someday?


"A user interface is like a joke. If you have to explain it, it's not that good."
#82127 - 10/13/12 06:20 PM Re: Questions, suggestions or requests topic [Re: Shideravan]  
Joined: May 2008
Posts: 4,827
qmc2 Offline
qmc2  Offline

Very Senior Member

Joined: May 2008
Posts: 4,827
Germany
It means right now this isn't supported. I know what I'd have to do to make it work, but the HTML editor doesn't support this in the same way as the browser right now (simply because it was never meant to be used like a browser wink ).


A mind is like a parachute. It doesn't work unless it's open. [Frank Zappa]

We're searching for QMC2 translators and support for existing translations. Interested? See here!
Page 2 of 116 1 2 3 4 115 116

Moderated by  qmc2 

Who's Online Now
7 registered members (MAMEBase, Pernod, Praxis, R. Belmont, AJR, 2 invisible), 20 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,381
Posts108,482
Members4,750
Most Online225
May 26th, 2014
Powered by UBB.threads™ PHP Forum Software 7.6.0
Page Time: 0.032s Queries: 14 (0.011s) Memory: 5.0309 MB (Peak: 5.2874 MB) Zlib enabled. Server Time: 2017-07-22 00:42:13 UTC