This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#601 2012-01-28 18:52:20

kayybee
Scratcher
Registered: 2009-12-07
Posts: 1000+

Re: ITopic: self-updating images and links in posts!

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?

Offline

 

#602 2012-02-01 17:02:14

PullJosh
Scratcher
Registered: 2011-08-01
Posts: 500+

Re: ITopic: self-updating images and links in posts!

I was wondering if you could make one that says the name of your newest project. If you could, I would love it.  cool


http://www.blocks.scratchr.org/API.php?action=text&string=I'm_on_vacation!&xpos=155&ypos=90&font_size=30&bgimage=http://imageshack.us/a/img339/7215/sspeechsigapiforwords.png

Offline

 

#603 2012-02-01 18:41:24

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: ITopic: self-updating images and links in posts!

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.  cool

Yup! It's even demonstrated in the first post! Your newest project is http://www.blocks.scratchr.org/API.php?action=projects&type=newest&return=text&user=PullJosh&num=1. You second newest is http://www.blocks.scratchr.org/API.php?action=projects&type=newest&return=text&user=PullJosh&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

Last edited by sparks (2012-02-01 18:42:01)


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#604 2012-02-02 08:28:31

iampie
Scratcher
Registered: 2011-10-30
Posts: 72

Re: ITopic: self-updating images and links in posts!

Hey, is there an API for a random piece of text?


Don't tell me I've lost my sanity...can't lose what you never had.  tongue http://tinyurl.com/7m32p3u

Offline

 

#605 2012-02-02 14:19:00

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: ITopic: self-updating images and links in posts!

You'll need to use tinyurl for that one since you would be combining two parts of the api.

Code:

http://blocks.scratchr.org/API.php?action=text&string=this_API

which gives you text like so: http://blocks.scratchr.org/API.php?action=text&string=this_API

and the random image API:

Code:

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


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#606 2012-02-07 10:55:47

iampie
Scratcher
Registered: 2011-10-30
Posts: 72

Re: ITopic: self-updating images and links in posts!

...What? I'm not real techie, sorry... I just want the siggy to say something different every time you look at it.


Don't tell me I've lost my sanity...can't lose what you never had.  tongue http://tinyurl.com/7m32p3u

Offline

 

#607 2012-02-07 13:20:22

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: ITopic: self-updating images and links in posts!

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  smile


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#608 2012-02-08 08:34:17

iampie
Scratcher
Registered: 2011-10-30
Posts: 72

Re: ITopic: self-updating images and links in posts!

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  smile

Kk!

Edit: lol that's something you're gonna wanna fix!

Last edited by iampie (2012-02-08 08:35:23)


Don't tell me I've lost my sanity...can't lose what you never had.  tongue http://tinyurl.com/7m32p3u

Offline

 

#609 2012-02-08 09:44:01

technoboy10
Scratcher
Registered: 2007-08-25
Posts: 1000+

Re: ITopic: self-updating images and links in posts!

Quick question - Is there an online image API for the TBGs?


So long, 1.4.
http://goo.gl/3JEV9

Offline

 

#610 2012-02-08 10:30:31

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: ITopic: self-updating images and links in posts!

Yes.

At the very bottom of the online/offline API parameters post, you'll see that all you need to do is add

Code:

target=all

to include TBG status

or

Code:

target=tbg

to only look at status in the tbg forum!

for example:

Code:

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  smile  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  smile

Last edited by sparks (2012-02-08 10:35:34)


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#611 2012-02-08 10:54:01

technoboy10
Scratcher
Registered: 2007-08-25
Posts: 1000+

Re: ITopic: self-updating images and links in posts!

Cool, thanks!


So long, 1.4.
http://goo.gl/3JEV9

Offline

 

#612 2012-02-10 07:15:08

PullJosh
Scratcher
Registered: 2011-08-01
Posts: 500+

Re: ITopic: self-updating images and links in posts!

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.  cool

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!


http://www.blocks.scratchr.org/API.php?action=text&string=I'm_on_vacation!&xpos=155&ypos=90&font_size=30&bgimage=http://imageshack.us/a/img339/7215/sspeechsigapiforwords.png

Offline

 

#613 2012-02-15 18:51:15

Squawkers13
Scratcher
Registered: 2010-11-20
Posts: 500+

Re: ITopic: self-updating images and links in posts!

Squawkers13 newest project link does not work!

Last edited by Squawkers13 (2012-02-19 12:51:53)


http://pekkit.net/banners/pekkit.png

Offline

 

#614 2012-02-15 22:00:08

iampie
Scratcher
Registered: 2011-10-30
Posts: 72

Re: ITopic: self-updating images and links in posts!

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  smile

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.


Don't tell me I've lost my sanity...can't lose what you never had.  tongue http://tinyurl.com/7m32p3u

Offline

 

#615 2012-02-15 22:07:16

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: ITopic: self-updating images and links in posts!

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.


Posts: 20000 - Show all posts

Offline

 

#616 2012-02-16 05:48:51

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: ITopic: self-updating images and links in posts!

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  hmm  I have no idea why but I will try to find out.


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#617 2012-02-17 06:45:03

majormax
Scratcher
Registered: 2008-04-06
Posts: 1000+

Re: ITopic: self-updating images and links in posts!

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

 

#618 2012-02-17 07:04:05

TRocket
Scratcher
Registered: 2009-08-18
Posts: 1000+

Re: ITopic: self-updating images and links in posts!

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)


http://i.imgur.com/1QqnHxQ.png

Offline

 

#619 2012-02-17 07:14:30

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: ITopic: self-updating images and links in posts!

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

 

#620 2012-02-17 07:21:10

TRocket
Scratcher
Registered: 2009-08-18
Posts: 1000+

Re: ITopic: self-updating images and links in posts!

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!


http://i.imgur.com/1QqnHxQ.png

Offline

 

#621 2012-02-17 11:48:13

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: ITopic: self-updating images and links in posts!

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!


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#622 2012-02-17 11:54:14

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: ITopic: self-updating images and links in posts!

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  smile

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.

[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]

Code:

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  smile

EDIT: No. I'm afraid it doesn't seem to work with animations, I'm sorry  hmm

Last edited by sparks (2012-02-17 11:55:38)


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#623 2012-02-17 13:05:37

technoboy10
Scratcher
Registered: 2007-08-25
Posts: 1000+

Re: ITopic: self-updating images and links in posts!

I've made a fairly complicated sig and it doesn't seem to work. Here's the code.

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!


So long, 1.4.
http://goo.gl/3JEV9

Offline

 

#624 2012-02-17 13:10:41

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: ITopic: self-updating images and links in posts!

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)


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#625 2012-02-17 15:41:51

technoboy10
Scratcher
Registered: 2007-08-25
Posts: 1000+

Re: ITopic: self-updating images and links in posts!

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)


So long, 1.4.
http://goo.gl/3JEV9

Offline

 

Board footer