Laternenpfahl wrote:
Hi! First of all, I would like to tell you how important this API is to many scratchers. Really, it is very hard to find a important topic without any of this!
However, I would really love a simple link which just shows stuff like "My newest Project, blahblah, has blahblah views, blahblah love-its, and blahblah downloads" in the style of my signature.
Oh, and sparks, can I use the thing you have in your sig until then? Thanks!
That's a great idea! I'll create one that lists everything in text format, it'll only need your username (Then add optional things that let you choose which ones to show).
You're welcome to use my signature style
Offline
Fix your like button: http://scratch.mit.edu/forums/viewtopic … 24#p943624
Offline
Thanks!
also, how do you make multiple lines in the text?
Offline
Laternenpfahl wrote:
Thanks!
also, how do you make multiple lines in the text?
I was messing around with it, but couldn't quite accomplish. I thought that maybe we could use str_replace, but I have nothing to replace it with.
Actually, I just thought of a way. I'm going to try it.
Last edited by ProgrammingFreak (2011-10-06 17:37:42)
Offline
sparks wrote:
^ home
Project links, thumbs and info
Project thumnails
This API lets you show your newest projects in your sig! When you add a new project it will appear as num=1 automatically and all the other project images will slide back! For example, my newest project has this thumbnail:http://blocks.scratchr.org/API.php?user … &num=1
action value:projects
type value:
newest
return value:
image
parameters:
user, num
Code:
[url]http://blocks.scratchr.org/API.php?user=USERNAMEHERE&action=projects&type=newest&return=image&num=NUMBER[/url]setting num to 1 will return your newest project, setting it to 2 will return your second newest and so on.
___________________________________________________________________________________
Project links
This API lets you link to your n'th newest projects in your signature! For example, my newest project has this link: My newest project
action value:projects
type value:
newest
return value:
link
parameters:
user, num
Code:
[url]http://blocks.scratchr.org/API.php?user=USERNAMEHERE&action=projects&type=newest&return=link&num=NUMBER[/url]setting num to 1 will return your newest project, setting it to 2 will return your second newest and so on.
________________________________________________________________________________
if you want to create a thumbnail to go with the link to your newest project, the parameters and method are exactly the same for the link version but you put it into [ url] tags and return=link is replaced with return=image.
For example:
http://blocks.scratchr.org/API.php?user … &num=1Code:
[url=http://blocks.scratchr.org/API.php?user=USERNAMEHERE&action=projects&type=newest&return=link&num=1][url]http://blocks.scratchr.org/API.php?user=USERNAMEHERE&action=projects&type=newest&return=image&num=1[/url][/url]___________________________________________________________________________________
Project info
This API returns info about your num'th project as an image of the name. For example, my newest project, http://www.blocks.scratchr.org/API.php? … &num=1 has http://www.blocks.scratchr.org/API.php? … &num=1 love-it's and http://www.blocks.scratchr.org/API.php? … &num=1 favouriters, http://www.blocks.scratchr.org/API.php? … &num=1 comments, http://www.blocks.scratchr.org/API.php? … &num=1 downloads and http://www.blocks.scratchr.org/API.php? … &num=1 remixes!
action value:projects
type value:
newest
return value:
text, loves, faves, comments, remixes, downloads
parameters:
user, num, return
Code:
[url]http://blocks.scratchr.org/API.php?user=USERNAMEHERE&action=projects&type=newest&return=RETURNVALUE&num=NUMBER[/url]There are several return values for this action:
text -return the project name
loves - return the number of love-it's
faves - return the number of favouriters
comments - return the number of comments
remixes - return the number of remixes
downloads - return the number of downloads
Can someone help me transfer this into HTML?
Offline
pokemongardevoir wrote:
sparks wrote:
stuff he said
Can someone help me transfer this into HTML?
I'm not quite sure what you mean
Offline
ProgrammingFreak wrote:
Laternenpfahl wrote:
Thanks!
also, how do you make multiple lines in the text?I was messing around with it, but couldn't quite accomplish. I thought that maybe we could use str_replace, but I have nothing to replace it with.
Actually, I just thought of a way. I'm going to try it.
Yay!
Offline
sparks wrote:
rookwood101 wrote:
\n is a new line
He's talking about newlines in the text-as-image system. You actually need to code in the coordinates for a new line rather than using \n
oh. Yeh that's annoying. I think there's a way of working out the height of letters in a font. yep you can http://php.net/manual/en/function.imagefontheight.php
Offline
sparks wrote:
@ pokemongardeviour:
Simply replace as followsCode:
[url=stuff]Stuff[/url] with <a href = "stuff">Stuff</a> [url]stuff[/url] with <img src="stuff" />
Tried that, didn't work.
Offline
You need to change Rum to Rook and the button has to be linked to rookwood101.tk.
Offline
I was trying to use the custom online/offline sig, but it wouldn't display.
Last edited by scimonster (2011-11-03 05:22:48)
Offline
is there a newest project in gallery one?
Offline
shiguy101 wrote:
is there a newest project in gallery one?
I don't believe so.
Offline
rookwood101 wrote:
shiguy101 wrote:
is there a newest project in gallery one?
I don't believe so.
can some one make one?
Offline
You should add views to project info.
Offline
sparks wrote:
My newest project, http://blocks.scratchr.org/API.php?user … &num=1 currently has http://blocks.scratchr.org/API.php?user … &num=1 loves.
Was that a test?
Also, look at my above post.
Offline