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

#626 2012-02-17 16:00:41

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

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

technoboy10 wrote:

Can I use the 'target' parameter with it?

... good question. Let me take a look at the code a sec..

EDIT: Yes. The target parameter is applicable to all API calls of the action=onlineStatus type  smile

Last edited by sparks (2012-02-17 16:02:26)


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

Offline

 

#627 2012-02-17 16:03:09

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

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

sparks wrote:

iampie wrote:

sparks wrote:

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.

www.blocks.scratchr.org/API.php?action= … om/88rht6t

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

I got it, nvm!! Look at the siggy!! Random abandon thread anis!!! Although, I would like to make the code smaller. The API that I put in is reeeeally long, so I would like more room for words.

Last edited by iampie (2012-02-17 16:03:46)


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

Offline

 

#628 2012-02-17 16:12:27

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

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

sparks wrote:

technoboy10 wrote:

Can I use the 'target' parameter with it?

... good question. Let me take a look at the code a sec..

EDIT: Yes. The target parameter is applicable to all API calls of the action=onlineStatus type  smile

Cool, thanks!


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

Offline

 

#629 2012-02-17 16:38:53

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

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

iampie wrote:

sparks wrote:

iampie wrote:


Here you go... all the images, in very good and working (I tested them) links.


Just give me the straight-up code.

www.blocks.scratchr.org/API.php?action= … om/88rht6t

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

I got it, nvm!! Look at the siggy!! Random abandon thread anis!!! Although, I would like to make the code smaller. The API that I put in is reeeeally long, so I would like more room for words.

Well done! Very cool!

And you can tinyurl it to make it smaller! Try this link: http://tinyurl.com/7m32p3u

http://tinyurl.com/7m32p3u

Last edited by sparks (2012-02-17 16:39:55)


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

Offline

 

#630 2012-02-17 17:02:33

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

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

Thanks for the help, sparks!


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

Offline

 

#631 2012-02-17 17:16:01

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

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

No problem, technoboy  smile   Btw, every time I see Sporks! Save me! I think it says Sparks  tongue


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

Offline

 

#632 2012-02-17 17:24:14

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

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

XD Sparks! Save me from boring sigs!


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

Offline

 

#633 2012-02-17 19:16:41

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

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

sparks wrote:

iampie wrote:

sparks wrote:

www.blocks.scratchr.org/API.php?action= … om/88rht6t

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

I got it, nvm!! Look at the siggy!! Random abandon thread anis!!! Although, I would like to make the code smaller. The API that I put in is reeeeally long, so I would like more room for words.

Well done! Very cool!

And you can tinyurl it to make it smaller! Try this link: http://tinyurl.com/7m32p3u

http://tinyurl.com/7m32p3u

I will try that.
EDIT: Wow!!! Thanks sooooo much!!!

Last edited by iampie (2012-02-17 19:21:48)


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

Offline

 

#634 2012-03-14 20:18:16

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

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

Explain the HTML...  http://scratch.mit.edu/forums/viewtopic.php?id=91769
Also your code is down   see sig

Last edited by Squawkers13 (2012-03-14 20:27:29)


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

Offline

 

#635 2012-03-14 21:15:53

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

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

I see nothing wrong. It must be back up. What HTML would you like explained?

[post 3999]


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

Offline

 

#636 2012-03-14 21:23:06

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

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

I cannot display &num=2!
I have 2 projects up!


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

Offline

 

#637 2012-03-16 19:02:44

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

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

Squawkers13 wrote:

I cannot display &num=2!
I have 2 projects up!

SPARKS PLEASE FIX THIS!!!


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

Offline

 

#638 2012-03-17 03:58:08

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

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

My second-newest project, http://blocks.scratchr.org/API.php?user=sparks&action=projects&type=newest&return=text&num=2 : http://blocks.scratchr.org/API.php?user=sparks&action=projects&type=newest&return=image&num=2

Seems to work fine.

I'm afraid why your name is having trouble with the API is beyond me, it has nothing to do with my code but may be to do with the coding on the Scratch-end of the site.

Last edited by sparks (2012-03-17 04:00:43)


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

Offline

 

#639 2012-03-17 14:07:59

joefarebrother
Scratcher
Registered: 2011-04-08
Posts: 1000+

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

what happens if you put "...&num=(a number more than the number of projects you have)" ?


My latest project is called http://tinyurl.com/d2m8hne! It has http://tinyurl.com/d395ygk views, http://tinyurl.com/cnasmt7 love-its, and http://tinyurl.com/bwjy8xs comments.
http://tinyurl.com/756anbk   http://tinyurl.com/iplaychess

Offline

 

#640 2012-03-17 14:55:21

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

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

joefarebrother wrote:

what happens if you put "...&num=(a number more than the number of projects you have)" ?

Nothing is stopping you from trying, joefarebrother!

My 10,000th-newest project, http://blocks.scratchr.org/API.php?user=sparks&action=projects&type=newest&return=text&num=10000 : http://blocks.scratchr.org/API.php?user=sparks&action=projects&type=newest&return=image&num=10000


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

Offline

 

#641 2012-03-17 15:54:25

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

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

Is there any way to have certain dates have certain images? Such as 3/14 with an image of Pi, 3/17 with a shamrock, etc.


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

Offline

 

#642 2012-03-23 20:37:07

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

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

technoboy10 wrote:

Is there any way to have certain dates have certain images? Such as 3/14 with an image of Pi, 3/17 with a shamrock, etc.

Using PHP this is certainly possible, but considering the once-a-year occurance of a date, I'm pretty sure it's easier to update your sig yourself on that day  tongue


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

Offline

 

#643 2012-03-26 08:57:03

Splodgey
Scratcher
Registered: 2011-04-26
Posts: 500+

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

Wait, Is it possible to do this for the latest projects in galleries?

Offline

 

#644 2012-03-26 09:40:58

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

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

sparks wrote:

technoboy10 wrote:

Is there any way to have certain dates have certain images? Such as 3/14 with an image of Pi, 3/17 with a shamrock, etc.

Using PHP this is certainly possible, but considering the once-a-year occurance of a date, I'm pretty sure it's easier to update your sig yourself on that day  tongue

Ok, thanks. BTW, how do you do PHP in your sig?
EDIT: Clarification: How would you do that code and make it into an image link? (Sorry, don't know much about PHP  tongue )

Last edited by technoboy10 (2012-03-26 09:43:27)


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

Offline

 

#645 2012-03-28 23:44:39

LiquidMetal
Scratcher
Registered: 2011-06-15
Posts: 500+

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

Hey sparks! I was wondering if it would be possible to get a different picture (eg; with a "NEW!" badge) if a project is less then X weeks old? (for my signature.)

Offline

 

#646 2012-03-29 15:33:38

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

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

Hmm... yes, it should be. I could pull the date from the project. I think it would probably have one of these two formats:

d=0&w=2&m=0&y=0

or

age=00,02,00,00

I think the second one looks neater, what do you guys think?

I think I would have it so that if the age of the project is greater than your input it would return one link/image/text, another if it is equal to that (optional) and another if it is less than that.

I won't be able to start work on any of the suggested API updates until next month though, I have one piece of coursework left!


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

Offline

 

#647 2012-03-30 09:50:12

joefarebrother
Scratcher
Registered: 2011-04-08
Posts: 1000+

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

hey just wondering: would it be possible to print multiple lines of text with the text renderer?


My latest project is called http://tinyurl.com/d2m8hne! It has http://tinyurl.com/d395ygk views, http://tinyurl.com/cnasmt7 love-its, and http://tinyurl.com/bwjy8xs comments.
http://tinyurl.com/756anbk   http://tinyurl.com/iplaychess

Offline

 

#648 2012-03-30 13:32:14

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

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

I suppose so, yes, but the current one can't I may have to redo it to support multiline at some point.


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

Offline

 

#649 2012-03-31 23:26:50

LiquidMetal
Scratcher
Registered: 2011-06-15
Posts: 500+

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

Hi sparks,
I just updated my signature, and while I was playing around with it, I noticed it can be slow to load, and does not load all at once.  I was wondering if you could make a single call script to get an image that links directly to the project.  You would put all the images in one call to the api, and there would be less overhead.  I'll explain more in depth if you need it.

Thanks!

Offline

 

#650 2012-04-01 03:50:08

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

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

LiquidMetal wrote:

Hi sparks,
I just updated my signature, and while I was playing around with it, I noticed it can be slow to load, and does not load all at once.  I was wondering if you could make a single call script to get an image that links directly to the project.  You would put all the images in one call to the api, and there would be less overhead.  I'll explain more in depth if you need it.

Thanks!

Hey! I like the new sig!

I understand that loading time would be much reduced, but it may lower the level of customisation available. I suppose it could be done in one image using a really long url like

http://www.blocks.scratchr.org/API.php?type=myProjects&display=nlfd&number=1&lovesImage=anImageUrl&favesImage=urlToImage&downloadsImage=urlToImage&background=urlToImage

or something. (nlfd would tell it to display name, loves, faves and downloads in that order)my main worry with this is that it would still be accessing image urls for all the parts of the sig, which would slow down the loading of the one image so that whole sig would take longer to load...


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

Offline

 

Board footer