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

#576 2011-11-24 05:03:44

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

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

Yes, you said I should add project view info and I was showing that I already had  tongue

Unless you meant something else?

EDIT:

Oh. I thought I put views but I put loves... IDK even know whether I did views though I really thought I had... give me a sec...

EDIT2: Oh...  yikes  I didn't do views! How odd! Let me rectify that!

EDIT3: Oh I see. It's not part of the main site API so I must have missed it... that means picking apart the project page html...

EDIT4: Wow. Going over old code.... Even heavily commented like this takes time to remember what on earth I was doing. There also appears to be a part to the API that displays info for the project with the least of a chosen statistic that I never finished  tongue

Last edited by sparks (2011-11-24 05:31:58)


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

Offline

 

#577 2011-11-24 05:43:00

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

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

sparks wrote:

Yes, you said I should add project view info and I was showing that I already had  tongue

Unless you meant something else?

EDIT:

Oh. I thought I put views but I put loves... IDK even know whether I did views though I really thought I had... give me a sec...

EDIT2: Oh...  yikes  I didn't do views! How odd! Let me rectify that!

EDIT3: Oh I see. It's not part of the main site API so I must have missed it... that means picking apart the project page html...

EDIT4: Wow. Going over old code.... Even heavily commented like this takes time to remember what on earth I was doing. There also appears to be a part to the API that displays info for the project with the least of a chosen statistic that I never finished  tongue

I guess you could find div#pactivity h5, and get the innerHTML. Cut it down to everything until the first space. Done. XD

Last edited by scimonster (2011-11-24 05:43:25)

Offline

 

#578 2011-11-24 05:52:09

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

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

Yeah, I have that bit, but for some reason it's not displaying anything at all on the page, even if I just echo plain text for that return value...


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

Offline

 

#579 2011-11-24 06:06:05

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

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

I wonder why.
I don't know PHP yet, so I can't help you debug.
Or maybe the fact that I don't know would be could, 'cause I wouldn't jump to conclusions about something I thought I saw that I didn't. XD
Maybe there's a typo; common problem. Or I sometimes thing that a property/method exists when it doesn't. Like, when I thought that in JS, I could do document.getElementsByClassName().

Offline

 

#580 2011-11-24 06:18:43

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

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

I think it was just updating very slowly, it seems to be showing something now (number of downloads) so now I can just add the views code instead.


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

Offline

 

#581 2011-11-24 06:34:23

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

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

watch this space:

My newest project has http://blocks.scratchr.org/API.php?user=sparks&action=projects&type=newest&return=views&num=1 views...

WOO! It works!

I may have a go at that requested post counter while I revel in my success  big_smile

Last edited by sparks (2011-11-24 06:41:07)


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

Offline

 

#582 2011-11-24 08:37:51

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

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

Yay, thanks!  big_smile
I was going to say that you now had to update the documentation, but you're too quick. XD Well, you have had two hours already...  tongue

Offline

 

#583 2011-11-24 14:44:52

recycle49
Scratcher
Registered: 2009-12-21
Posts: 1000+

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

You my friend have javascript and PHP skills. Just came to check in on things and found this. Awesome job!


"Every challenge must be met, every battle must be won, and every story will end." -Me
Recycle49 December 09 - November 11 Goodbye

Offline

 

#584 2011-11-24 15:47:25

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

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

Thanks, recycle  smile


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

Offline

 

#585 2011-11-27 22:18:31

DarthPickley
Scratcher
Registered: 2008-06-13
Posts: 100+

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

views for my last 10 projects:
http://www.blocks.scratchr.org/API.php?action=projects&type=newest&return=views&user=darthpickley&num=1 http://www.blocks.scratchr.org/API.php?action=projects&type=newest&return=views&user=darthpickley&num=2 http://www.blocks.scratchr.org/API.php?action=projects&type=newest&return=views&user=darthpickley&num=3 http://www.blocks.scratchr.org/API.php?action=projects&type=newest&return=views&user=darthpickley&num=4 http://www.blocks.scratchr.org/API.php?action=projects&type=newest&return=views&user=darthpickley&num=5 http://www.blocks.scratchr.org/API.php?action=projects&type=newest&return=views&user=darthpickley&num=6 http://www.blocks.scratchr.org/API.php?action=projects&type=newest&return=views&user=darthpickley&num=7 http://www.blocks.scratchr.org/API.php?action=projects&type=newest&return=views&user=darthpickley&num=8 http://www.blocks.scratchr.org/API.php?action=projects&type=newest&return=views&user=darthpickley&num=9 http://www.blocks.scratchr.org/API.php?action=projects&type=newest&return=views&user=darthpickley&num=10

I wish that there was some way that I could easily figure out which, out of my projects, have the highest numbers of views, love-its, favorites, etc.

Offline

 

#586 2011-11-27 22:36:30

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

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

What happened to multiline?


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

Offline

 

#587 2011-11-28 16:41:41

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

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

The API can't handle multiline at present. It's completely open source though, you can see the code on post 2 of this thread and have a go at adding it if you like  smile

Darth, I did start work on a api addition that was supposed to return your lowest (choose)d project, there's a start in the code but I never finished because it involved a lot of parsing... maybe one day, eh?


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

Offline

 

#588 2012-01-11 11:54:12

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

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

i had my latest project thumnail with a matching link in my sig but somehow it has dissapeared...


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

 

#589 2012-01-11 12:07:07

rookwood101
Scratcher
Registered: 2011-07-29
Posts: 500+

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

Seems to be working now.


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

Offline

 

#590 2012-01-26 12:34:20

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

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

sparks wrote:

type value:

onlineStatus

other parameters:

user, [type, online, offline]

What? I don't.... What do you type?

Last edited by iampie (2012-01-26 12:37:45)


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

Offline

 

#591 2012-01-26 13:19:01

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

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

iampie wrote:

sparks wrote:

type value:

onlineStatus

other parameters:

user, [type, online, offline]

What? I don't.... What do you type?

If you tell me what you want to show I can give you the code  smile

Alternately why not try comp500's API generator!

Last edited by sparks (2012-01-26 13:21:03)


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

Offline

 

#592 2012-01-26 13:23:09

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

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

sparks wrote:

iampie wrote:

sparks wrote:

type value:

onlineStatus

other parameters:

What? I don't.... What do you type?

If you tell me what you want to show I can give you the code  smile

Alternately why not try comp500's API generator!

OFFtopic: sparks how's the block library doing?


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

Offline

 

#593 2012-01-26 13:30:40

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

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

Urg. There's something horribly wrong with my MySQL, I take it. Tell you what. I'll post the code I have onto the site development thread and people can have a go at me for doing it wrong, then I'll know what's wrong!  tongue


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

Offline

 

#595 2012-01-27 07:38:47

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

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

sparks wrote:

iampie wrote:

sparks wrote:

type value:

onlineStatus

other parameters:

What? I don't.... What do you type?

If you tell me what you want to show I can give you the code  smile

Alternately why not try comp500's API generator!

PLEASE GIVE ME THE CODE PLEASE...


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

Offline

 

#596 2012-01-27 07:47:25

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

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

iampie wrote:

sparks wrote:

iampie wrote:


What? I don't.... What do you type?

If you tell me what you want to show I can give you the code  smile

Alternately why not try comp500's API generator!

PLEASE GIVE ME THE CODE PLEASE...

View the page source.  wink

Offline

 

#597 2012-01-27 11:17:52

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 don't.... What do you type?

If you tell me what you want to show I can give you the code  smile

Alternately why not try comp500's API generator!

PLEASE GIVE ME THE CODE PLEASE...

Tell me what you want it to do, then I'll give you the code! The API can do many things with images, so take a look at the first post, there's a pretty concise list of things it can do.


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

Offline

 

#598 2012-01-28 14:02:47

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

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

sparks wrote:

iampie wrote:

sparks wrote:


If you tell me what you want to show I can give you the code  smile

Alternately why not try comp500's API generator!

PLEASE GIVE ME THE CODE PLEASE...

Tell me what you want it to do, then I'll give you the code! The API can do many things with images, so take a look at the first post, there's a pretty concise list of things it can do.

Nevermind...Igotithfieuf;hefieuf


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

Offline

 

#599 2012-01-28 17:10:55

Lucario621
Community Moderator
Registered: 2007-10-03
Posts: 1000+

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

I just decided to try out using this system for my signature. Not too bad.


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

Offline

 

#600 2012-01-28 17:50:57

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

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

Lucario621 wrote:

I just decided to try out using this system for my signature. Not too bad.

So confused for a sec then. I was like, I don't remember posting this!  tongue  You know you can use your own images  tongue


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

Offline

 

Board footer