Another thing I'm working on
- Locked due to inactivity on Aug 4, '16 4:29pm
Thread Topic: Another thing I'm working on
-
I'm going to attempt to make it possible to grab an image of your quiz results for easy sharing on forums or elsewhere. Basically, a JPG of the box showing your result. First I have to test out whether it's a realistic possibility. It involves using screen capture software to basically take a picture of how the quiz results look in the browser.
-
Sounds cool.
-
I KNOW HOW TO DO THIS
I CAN HELP
You need the gd library and freetype library in your php.
Basically you need to have the image generated using lines, text, images, and some basic shapes. You'll want freetype to figure out the length of parts of text. Google making image with php for some basic examples.
The general flow of the code should be.
On the results page
< a href=genImage.php?id=$quiz&result1=$result1val >Generate image < / a >
Have result1(nun) all through all of the different results.
On getImage.php it would check for the highest result1. In your php you need code to get the results images and descriptions.
Then you have all the data needed to generate a image which looks almost like the page in a browser.
You will need to completely recode for each theme.
If this sounds rather vague I can code up an example that's open source. -
I appreciate the offer, but I'm trying a different method. There would be a page that displayed the quiz result box only, which would be fed to this screen capture software that would save it as an image. This way I would be able to reuse the existing CSS styles.
-
I gotta use that software o.o looks good.
What if the user is JavaScriptless? -
I've been wanting something like this, actually.
-
I know another quiz site that uses this. I'm sure it'll be nice. :3
-
I've done some successful tests now. Despite being done in javascript, the software is actually run on the server. It doesn't rely on what the user is running.
Here's an example from my testing:
The fonts are a little off, but otherwise it's working quite well! -
_Leah_ NewbieWow, GTQ Guy, you're really good at making this place better!
-
before you know it this place would be full of a bunch of cool updates and stuff
-
You can test this out now on the new style quizzes I've posted. In the "Share This" section there is a link called "screen-cap" to get a screen capture image of your quiz results.
-
Cool!
This thread is locked, therefore no new posts can be made.