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

#526 2011-08-27 11:13:32

Death_Wish
Scratcher
Registered: 2011-07-26
Posts: 1000+

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

I'm not sure if it's been done, but I'd like an api that puts a random project of my Favorite Projects. Or maybe the most recent one, I don't know  tongue


With a straight flush.
http://4.bp.blogspot.com/-FlUhnzmIROE/TgtpjdJl4tI/AAAAAAAABCM/W19pvFTZFaU/s1600/save_the_world.png http://blocsonic.com/images/special/rip-stevejobs.jpg

Offline

 

#527 2011-08-27 15:56:59

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

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

That's not been done because I can't think of a way to get a random project image to have a matching link! Can anyone think of a way? I'd prefer not to use MySQL...

LS97, so how would your "fake directory" suggestion display this?

http://www.blocks.scratchr.org/API.php?action=project&user=sparks&type=newest&return=image

?

Last edited by sparks (2011-08-27 15:58:17)


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

Offline

 

#528 2011-08-27 17:29:12

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

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

sparks wrote:

That's not been done because I can't think of a way to get a random project image to have a matching link! Can anyone think of a way? I'd prefer not to use MySQL...

LS97, so how would your "fake directory" suggestion display this?

http://www.blocks.scratchr.org/API.php?action=project&user=sparks&type=newest&return=image

?

http://www.blocks.scratchr.org/API/project/newest/image/sparks or something!

Offline

 

#529 2011-09-03 07:03:11

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

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

LS97 wrote:

sparks wrote:

That's not been done because I can't think of a way to get a random project image to have a matching link! Can anyone think of a way? I'd prefer not to use MySQL...

LS97, so how would your "fake directory" suggestion display this?

http://www.blocks.scratchr.org/API.php?action=project&user=sparks&type=newest&return=image

?

http://www.blocks.scratchr.org/API/project/newest/image/sparks or something!

i can do that with .htaccess  big_smile
its used on scratch wiki  big_smile

Last edited by comp500 (2011-09-03 07:03:34)


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#530 2011-09-03 07:04:24

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

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

comp500 wrote:

LS97 wrote:

sparks wrote:

That's not been done because I can't think of a way to get a random project image to have a matching link! Can anyone think of a way? I'd prefer not to use MySQL...

LS97, so how would your "fake directory" suggestion display this?

http://www.blocks.scratchr.org/API.php?action=project&user=sparks&type=newest&return=image

?

http://www.blocks.scratchr.org/API/project/newest/image/sparks or something!

i can do that with .htaccess  big_smile
its used on scratch wiki  big_smile

That's my whole point -_-  tongue

Offline

 

#531 2011-09-04 11:41:14

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

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

LS97 wrote:

comp500 wrote:

LS97 wrote:


http://www.blocks.scratchr.org/API/project/newest/image/sparks or something!

i can do that with .htaccess  big_smile
its used on scratch wiki  big_smile

That's my whole point -_-  tongue

tongue


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#532 2011-09-04 12:50:26

Saca312
Scratcher
Registered: 2011-03-24
Posts: 100+

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

comp500 wrote:

LS97 wrote:

comp500 wrote:


i can do that with .htaccess  big_smile
its used on scratch wiki  big_smile

That's my whole point -_-  tongue

tongue

Saca312:P wrote:

tongue

tongue


http://i.imgur.com/AeIvr.png

Offline

 

#533 2011-09-06 07:38:09

cygene
Scratcher
Registered: 2011-05-31
Posts: 100+

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

Thanks for the info  smile  I'm just writing here so that it appears in the "my posts" I use that as my favourite post spot.


http://cygene.wikispaces.com/file/view/clip2.gif/242526033/clip2.gif

Offline

 

#534 2011-09-12 17:30:22

thisisntme
Scratcher
Registered: 2011-04-15
Posts: 63

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

http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=IMAGELINK1&link2=IMAGELINK2


http://i.imgur.com/ngU2P.gif

Offline

 

#535 2011-09-13 04:36:53

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

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

You need to replace IMAGELINK1 and IMAGELINK2 with actual url links to images, thisisnotme  smile


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

Offline

 

#536 2011-09-25 20:58:42

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

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

Just wondering, is there a way to get the love its/views/other info for a specific project?

Offline

 

#537 2011-09-26 14:09:57

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

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

ProgrammingFreak wrote:

I did the online/offline detector:

I'm glad that you're interested in using the Scratch API. We will have quite the adventure. But maybe you're new at all this PHP stuff and need a little guidence on what to do.
Well you've come to the right place.  wink

1 Offline/Online Detector
With this device you will be able to tell if a user is online or not. This is really simple. In a image tag, instead of linking to an image, you link to the api:

Code:

[url]http://blocks.scratchr.org/API.php[/url]

But thats not all. You add a

Code:

?user=USERNAME&action=onlineStatus

To the end of that url. With this code, you can have an image of a green/gray dot to tell if you are online or not.

But wait, there is still more!  big_smile
Maybe you think the image you have is boring, and you want something different. Well, you are not alone.
All you have to do is add a

Code:

&type=

to the end of the url and your possibilies extend even further!
Here are your options:
A square button:

Code:

&type=square

Text:

Code:

&type=text

You can even do your own image! To do so, add:

Code:

&online=URLOFIMAGEFORONLINE&offline=URLOFIMAGEFOROFFLINE

You are probably thinking, "Wow. Thats so long I'll never understand it!". But I can help you with it!  big_smile
Lemme break it down to you:
First, we add the username:

Code:

user=USERNAME

Then we add the action:

Code:

&action=onlineStatus

Remember, we've done this before. So don't sweat it!  smile

Next we add the image to show when the user is online:

Code:

&online=URLOFIMAGEFORONLINE

Finally we add the image to show when the user is offline:

Code:

&offline=URLOFIMAGEFOROFFLINE

(remember to fill in the actual urls for this to work)

And you're done! Enjoy your offline/online detector!  big_smile

Offline

 

#538 2011-09-26 14:16:14

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

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

kayybee wrote:

Just wondering, is there a way to get the love its/views/other info for a specific project?

http://scratch.mit.edu/forums/viewtopic … 60#p838560

Offline

 

#539 2011-09-30 02:46:47

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

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

sparks wrote:

That's not been done because I can't think of a way to get a random project image to have a matching link! Can anyone think of a way? I'd prefer not to use MySQL...

LS97, so how would your "fake directory" suggestion display this?

http://www.blocks.scratchr.org/API.php?action=project&user=sparks&type=newest&return=image

?

I know how! Using cookies!
1. Image is displayed and cookie is set on user's computer
2. when it is clicked on, the cookie is used to send user to right url.


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#540 2011-09-30 03:12:30

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

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

Hmmm, I don't know if cookies can be sent over images, that sounds potentially dangerous to me but it is a very good idea! I shall look into it!


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

Offline

 

#541 2011-09-30 14:33:11

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

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

sparks wrote:

Hmmm, I don't know if cookies can be sent over images, that sounds potentially dangerous to me but it is a very good idea! I shall look into it!

They can... dangerous?


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#542 2011-09-30 14:37:18

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

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

comp500 wrote:

sparks wrote:

Hmmm, I don't know if cookies can be sent over images, that sounds potentially dangerous to me but it is a very good idea! I shall look into it!

They can... dangerous?

LOL XD THE ATTACK OF THE CHOCOLATE CHIP COOKIES! (wait this is a joke right?) If not, he means like the computer cookies.  tongue


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#543 2011-09-30 15:51:43

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

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

Pecola1 wrote:

comp500 wrote:

sparks wrote:

Hmmm, I don't know if cookies can be sent over images, that sounds potentially dangerous to me but it is a very good idea! I shall look into it!

They can... dangerous?

LOL XD THE ATTACK OF THE CHOCOLATE CHIP COOKIES! (wait this is a joke right?) If not, he means like the computer cookies.  tongue

nojoke  tongue


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#544 2011-10-02 12:25:59

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

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

bumppppppppppppppp


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#545 2011-10-02 12:37:54

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

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

Hey, comp, amazing cookie idea! I didn't actually realize its potential until you guys made that joke about it  tongue  I'm pretty sure that'll work.

Offline

 

#546 2011-10-02 14:27:04

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

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

LS97 wrote:

Hey, comp, amazing cookie idea! I didn't actually realize its potential until you guys made that joke about it  tongue  I'm pretty sure that'll work.

:3


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#547 2011-10-02 14:55:55

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

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

Not done much work with Cookies yet, I can't promise I'll look into it any time soon, my Uni course is very demanding atm...


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

Offline

 

#548 2011-10-02 22:21:38

Laternenpfahl
Scratcher
Registered: 2011-06-24
Posts: 1000+

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

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

Oh, and sparks, can I use the thing you have in your sig until then? Thanks!


http://i46.tinypic.com/6yd4c0.png

Offline

 

#549 2011-10-02 22:25:21

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

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

ProgrammingFreak wrote:

kayybee wrote:

Just wondering, is there a way to get the love its/views/other info for a specific project?

http://scratch.mit.edu/forums/viewtopic … 60#p838560

But that's not a specific project.

It'll change if the user uploads another project...


So, is there a way to find one's post count?

Last edited by kayybee (2011-10-02 22:49:39)

Offline

 

#550 2011-10-03 03:35:17

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

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

sparks wrote:

Not done much work with Cookies yet, I can't promise I'll look into it any time soon, my Uni course is very demanding atm...

ok, i can do it then give to chu...


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

Board footer