PullJosh wrote:
I was wondering if you could make one that says the name of your newest project. If you could, I would love it.
Yup! It's even demonstrated in the first post! Your newest project is . You second newest is
just put this into an image tag:
http://www.blocks.scratchr.org/API.php?action=projects&type=newest&return=text&user=pullJosh&num=1
Last edited by sparks (2012-02-01 18:42:01)
Offline
You'll need to use tinyurl for that one since you would be combining two parts of the api.
http://blocks.scratchr.org/API.php?action=text&string=this_API
which gives you text like so:
and the random image API:
http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=LINK1&link2=LINK2&link3=LINK3
This can take the urls of up to 10 images and display randomly. So all you need to do is tinyurl the text api for each image, then put the tinyurls into the random image API.
random images are documented here
Offline
iampie wrote:
...What? I'm not real techie, sorry... I just want the siggy to say something different every time you look at it.
Okay, we how about you make some images with text in them, all the ones you want to be in the sig, then post the links to them all here and I will make the random API work for you
Offline
sparks wrote:
iampie wrote:
...What? I'm not real techie, sorry... I just want the siggy to say something different every time you look at it.
Okay, we how about you make some images with text in them, all the ones you want to be in the sig, then post the links to them all here and I will make the random API work for you
Kk!
Edit: lol that's something you're gonna wanna fix!
Last edited by iampie (2012-02-08 08:35:23)
Offline
Quick question - Is there an online image API for the TBGs?
Offline
Yes.
At the very bottom of the online/offline API parameters post, you'll see that all you need to do is add
target=all
to include TBG status
or
target=tbg
to only look at status in the tbg forum!
for example:
blocks.scratchr.org/API.php?user=sparks&action=onlineStatus&target=tbg
will show my online status in the tbg forum area only. replace my name with yours and put it in an img tag to use it You can also use the status to display custom text or images (such as the one in my sig), it's all documented in the linked post
Last edited by sparks (2012-02-08 10:35:34)
Offline
sparks wrote:
PullJosh wrote:
I was wondering if you could make one that says the name of your newest project. If you could, I would love it.
Yup! It's even demonstrated in the first post! Your newest project is http://www.blocks.scratchr.org/API.php? … &num=1. You second newest is http://www.blocks.scratchr.org/API.php? … &num=2
just put this into an image tag:http://www.blocks.scratchr.org/API.php?action=projects&type=newest&return=text&user=pullJosh&num=1
Thanks!
Offline
Squawkers13 newest project link does not work!
Last edited by Squawkers13 (2012-02-19 12:51:53)
Offline
sparks wrote:
iampie wrote:
...What? I'm not real techie, sorry... I just want the siggy to say something different every time you look at it.
Okay, we how about you make some images with text in them, all the ones you want to be in the sig, then post the links to them all here and I will make the random API work for you
Here you go... all the images, in very good and working (I tested them) links.
Tineh Urlz wrote:
http://tinyurl.com/7wt4ffm
http://tinyurl.com/7ycyryb
http://tinyurl.com/88f4fqg
http://tinyurl.com/83prjec
http://tinyurl.com/7t7nxrv
http://tinyurl.com/844dvxx
http://tinyurl.com/88rht6t
http://tinyurl.com/6vv3l9n
Just give me the straight-up code.
Offline
kayybee wrote:
I'm just wondering if it's possible to get the post count of any user.
and if it is, could you please make one? pretty please?
This would be really useful now.
Offline
Squawkers13 wrote:
Squawkers13 newest project link does not work!
see sig.
Squawkers13, for some reason, your username doesn't work with API's. Both the block library login system and my self-updating-images-and-links-in-posts use an API to check usernames but yours isn't working I have no idea why but I will try to find out.
Offline
veggieman001 wrote:
kayybee wrote:
I'm just wondering if it's possible to get the post count of any user.
and if it is, could you please make one? pretty please?This would be really useful now.
So sparks can you make this?
Offline
majormax wrote:
veggieman001 wrote:
kayybee wrote:
I'm just wondering if it's possible to get the post count of any user.
and if it is, could you please make one? pretty please?This would be really useful now.
So sparks can you make this?
chances are it would be possible (by crawling the forums) but this would tell you your actual number of posts(not including deleted posts)
Offline
TRocket wrote:
majormax wrote:
veggieman001 wrote:
This would be really useful now.So sparks can you make this?
chances are it would be possible (by crawling the forums) but this would tell you your actual number of posts(not including deleted posts)
And chances are, that with over a million posts, that would take days. ^^
Offline
scimonster wrote:
TRocket wrote:
majormax wrote:
So sparks can you make this?chances are it would be possible (by crawling the forums) but this would tell you your actual number of posts(not including deleted posts)
And chances are, that with over a million posts, that would take days. ^^
and a mega cpu usage ban!
Offline
majormax wrote:
veggieman001 wrote:
kayybee wrote:
I'm just wondering if it's possible to get the post count of any user.
and if it is, could you please make one? pretty please?This would be really useful now.
So sparks can you make this?
When did this stupid >1000 thing appear on here? I only noticed it yesterday! And sadly no, there is no API for it so I can't find it in any way now that posts don't display the actual number. You could request the API be added to the Scratch Team though!
Offline
iampie wrote:
sparks wrote:
iampie wrote:
...What? I'm not real techie, sorry... I just want the siggy to say something different every time you look at it.
Okay, we how about you make some images with text in them, all the ones you want to be in the sig, then post the links to them all here and I will make the random API work for you
Here you go... all the images, in very good and working (I tested them) links.
Tineh Urlz wrote:
http://tinyurl.com/7wt4ffm
http://tinyurl.com/7ycyryb
http://tinyurl.com/88f4fqg
http://tinyurl.com/83prjec
http://tinyurl.com/7t7nxrv
http://tinyurl.com/844dvxx
http://tinyurl.com/88rht6t
http://tinyurl.com/6vv3l9nJust give me the straight-up code.
[img]www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://tinyurl.com/7ycyryb&link2=http://tinyurl.com/88f4fqg&link3=http://tinyurl.com/83prjec&link4=http://tinyurl.com/7t7nxrv&link5=http://tinyurl.com/844dvxx&link6=http://tinyurl.com/88rht6t[/img]
www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://tinyurl.com/7ycyryb&link2=http://tinyurl.com/88f4fqg&link3=http://tinyurl.com/83prjec&link4=http://tinyurl.com/7t7nxrv&link5=http://tinyurl.com/844dvxx&link6=http://tinyurl.com/88rht6t
Put that inside img tags. I have no idea how well it will work with animated images, I've never tried
EDIT: No. I'm afraid it doesn't seem to work with animations, I'm sorry
Last edited by sparks (2012-02-17 11:55:38)
Offline
I've made a fairly complicated sig and it doesn't seem to work. Here's the code.
[img]http://blocks.scratchr.org/API.php?user=technoboy10&action=onlineStatus&online=http://b.quizlet.com/a/i/online.u5WA.png&offline=http://blocks.scratchr.org/API.php?action=random&return=image&link1=http://blocks.scratchr.org/offline.gif&link2=http://blocks.scratchr.org/offlineSquare.gif[/img]
Thanks!
Offline
technoboy10 wrote:
I've made a fairly complicated sig and it doesn't seem to work. Here's the code.
Code:
[url]http://blocks.scratchr.org/API.php?user=technoboy10&action=onlineStatus&online=http://b.quizlet.com/a/i/online.u5WA.png&offline=http://blocks.scratchr.org/API.php?action=random&return=image&link1=http://blocks.scratchr.org/offline.gif&link2=http://blocks.scratchr.org/offlineSquare.gif[/url]Thanks!
Looks pretty cool, technoboy!
The reason why it isn't working is that the API isn't nestable (You can't insert the API into part of the API) because of how PHP interprets URL data. However, there is a way around this! get the part of the API responsible for the random image and turn it into a tinyurl, then insert that into the outer API like so:
Turn...
http://blocks.scratchr.org/API.php?action=random&return=image&link1=http://blocks.scratchr.org/offline.gif&link2=http://blocks.scratchr.org/offlineSquare.gif
...into a tinyurl.
then put
http://blocks.scratchr.org/API.php?user=technoboy10&action=onlineStatus&online=http://b.quizlet.com/a/i/online.u5WA.png&offline=YOURTINYURL
Done!
(To make everything smaller, you can even tinyurl that second tinyurl!)
Last edited by sparks (2012-02-17 13:11:49)
Offline
Ok, thanks. I can just do goo.gl for this as well, right? Also, can I use the 'target' parameter with it?
Last edited by technoboy10 (2012-02-17 15:43:39)
Offline