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

#151 2011-10-22 16:11:19

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

Re: Make your Forum Posts/Topics Likeable! - fixed

I felt like I needed to bring this up again.

rookwood,
I am trying to host this on my own site because I am expanding on it and turning this into a bigger project (which includes end-user browser extensions and more). You've done such a good job on this that I didn't want to start from scratch, but rest assured that if this project succeeds credit will be given.

Your source works, I imagine, but what databases do I need to host and how do I implement it?

Besides, there's an 'include mysql.php' that I need, possibly?

Oh, and the background images.

Last edited by LS97 (2011-10-22 16:14:25)

Offline

 

#152 2011-10-28 10:39:44

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

Re: Make your Forum Posts/Topics Likeable! - fixed

LS97 wrote:

I felt like I needed to bring this up again.

rookwood,
I am trying to host this on my own site because I am expanding on it and turning this into a bigger project (which includes end-user browser extensions and more). You've done such a good job on this that I didn't want to start from scratch, but rest assured that if this project succeeds credit will be given.

Your source works, I imagine, but what databases do I need to host and how do I implement it?

Besides, there's an 'include mysql.php' that I need, possibly?

Oh, and the background images.

i could help.......


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

Offline

 

#153 2011-10-28 10:42:57

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

Re: Make your Forum Posts/Topics Likeable! - fixed

rookwood101 wrote:

ssss wrote:

So you now use your own pc.

no, I use a vps host that I rent with a few of my friends for £30 per month ish.

with http://www.thrustvps.com

not to spam but go everywhere use powrhost.com for free with almost no restrictions...


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

Offline

 

#154 2011-10-28 10:44:38

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

Re: Make your Forum Posts/Topics Likeable! - fixed

comp500 wrote:

LS97 wrote:

I felt like I needed to bring this up again.

rookwood,
I am trying to host this on my own site because I am expanding on it and turning this into a bigger project (which includes end-user browser extensions and more). You've done such a good job on this that I didn't want to start from scratch, but rest assured that if this project succeeds credit will be given.

Your source works, I imagine, but what databases do I need to host and how do I implement it?

Besides, there's an 'include mysql.php' that I need, possibly?

Oh, and the background images.

i could help.......

aaaaaaaand I could host it on github.....

and lol 60 sec rule  tongue


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

Offline

 

#155 2011-10-28 11:03:11

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

Re: Make your Forum Posts/Topics Likeable! - fixed

Guys I don't need it anymore. I made my own like buttons  tongue
http://modshare2.tk/likes/?id=975369&mode=img

Last edited by LS97 (2011-10-28 11:03:26)

Offline

 

#156 2011-10-29 12:46:33

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

Re: Make your Forum Posts/Topics Likeable! - fixed

Sorry, I was on holiday, you need 4 tables, for each forum, and for seperate posts and topics.
Although you've done yours already, I'll put it here just in case.
postrate
tbg_postrate
topicrate
tbg_topicrate

the mysql.php has

Code:

$mysql_host = "DBHost";
$mysql_database = "DatabaseName";
$mysql_user = "YourMySQLUsernameHere";
$mysql_password = "YourMySQLPasswordHere";
$bdrq = 'Bad request. The link you followed is***incorrect or outdated.';//Replace *** with a space otherwise it won't work.

Last edited by rookwood101 (2011-11-02 11:41:45)


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

Offline

 

#157 2011-11-02 05:28:15

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

Re: Make your Forum Posts/Topics Likeable! - fixed

Why don't styles work? D:

Offline

 

#158 2011-11-02 06:09:28

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

Re: Make your Forum Posts/Topics Likeable! - fixed

rookwood101 wrote:

Sorry, I was on holiday, you need 4 databases, for each forum, and for seperate posts and topics.
Although you've done yours already, I'll put it here just in case.
postrate
tbg_postrate
topicrate
tbg_topicrate

the mysql.php has

Code:

$mysql_host = "DBHost";
$mysql_database = "DatabaseName";
$mysql_user = "YourMySQLUsernameHere";
$mysql_password = "YourMySQLPasswordHere";
$bdrq = 'Bad request. The link you followed is***incorrect or outdated.';//Replace *** with a space otherwise it won't work.

Ah, I see!
The only problem is I don't have enough to make 4 databases, so I'll just stick with mine.
Thanks anyways!!!

Offline

 

#159 2011-11-02 11:41:15

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

Re: Make your Forum Posts/Topics Likeable! - fixed

LS97 wrote:

rookwood101 wrote:

Sorry, I was on holiday, you need 4 tables, for each forum, and for seperate posts and topics.
Although you've done yours already, I'll put it here just in case.
postrate
tbg_postrate
topicrate
tbg_topicrate

the mysql.php has

Code:

$mysql_host = "DBHost";
$mysql_database = "DatabaseName";
$mysql_user = "YourMySQLUsernameHere";
$mysql_password = "YourMySQLPasswordHere";
$bdrq = 'Bad request. The link you followed is***incorrect or outdated.';//Replace *** with a space otherwise it won't work.

Ah, I see!
The only problem is I don't have enough to make 4 databases, so I'll just stick with mine.
Thanks anyways!!!

nononon four tables sorry  hmm


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

Offline

 

#160 2011-11-02 14:32:58

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

Re: Make your Forum Posts/Topics Likeable! - fixed

rookwood101 wrote:

LS97 wrote:

rookwood101 wrote:

Sorry, I was on holiday, you need 4 tables, for each forum, and for seperate posts and topics.
Although you've done yours already, I'll put it here just in case.
postrate
tbg_postrate
topicrate
tbg_topicrate

the mysql.php has

Code:

$mysql_host = "DBHost";
$mysql_database = "DatabaseName";
$mysql_user = "YourMySQLUsernameHere";
$mysql_password = "YourMySQLPasswordHere";
$bdrq = 'Bad request. The link you followed is***incorrect or outdated.';//Replace *** with a space otherwise it won't work.

Ah, I see!
The only problem is I don't have enough to make 4 databases, so I'll just stick with mine.
Thanks anyways!!!

nononon four tables sorry  hmm

oooooooooooooooooooooh.
I'll still keep mine  tongue

Offline

 

#161 2012-02-20 17:19:07

elfin8er
Scratcher
Registered: 2012-01-15
Posts: 1000+

Re: Make your Forum Posts/Topics Likeable! - fixed

You guys gonna update this? I miss it.


http://i1340.photobucket.com/albums/o723/stevetheipad/goldlittlesig.png

Offline

 

#162 2012-02-20 17:58:34

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

Re: Make your Forum Posts/Topics Likeable! - fixed

elfin8er wrote:

You guys gonna update this? I miss it.

too much commitment having to host all the tables and stuff, although I agree it was nice  smile


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

Offline

 

#163 2012-02-20 18:46:43

elfin8er
Scratcher
Registered: 2012-01-15
Posts: 1000+

Re: Make your Forum Posts/Topics Likeable! - fixed

rookwood101 wrote:

elfin8er wrote:

You guys gonna update this? I miss it.

too much commitment having to host all the tables and stuff, although I agree it was nice  smile

Well that stinks. You're sure there's no way to work around it?


http://i1340.photobucket.com/albums/o723/stevetheipad/goldlittlesig.png

Offline

 

#164 2012-03-04 19:12:52

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

Re: Make your Forum Posts/Topics Likeable! - fixed

it dosent work.


http://scratch.mit.edu/forums/viewtopic.php?id=91538


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

Offline

 

#165 2012-03-04 19:19:08

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

Re: Make your Forum Posts/Topics Likeable! - fixed

Nope, it doesn't anymore.


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

Offline

 

#166 2012-03-05 20:03:45

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

Re: Make your Forum Posts/Topics Likeable! - fixed

What does the .tk extension stand for?


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

Offline

 

#167 2012-03-05 20:08:44

danwoodski
Scratcher
Registered: 2009-12-23
Posts: 100+

Re: Make your Forum Posts/Topics Likeable! - fixed

Squawkers13 wrote:

What does the .tk extension stand for?

http://dot.tk
^It's used for domain forwarding.


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://dl.dropbox.com/u/12506914/Pics/p2e-2.png&link2=http://dl.dropbox.com/u/12506914/Pics/ms.png&link3=http://dl.dropbox.com/u/12506914/Pics/block%20lib.png
Starting to move on to other languages, but I'll still be around from time to time  smile

Offline

 

#168 2012-03-06 07:37:31

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

Re: Make your Forum Posts/Topics Likeable! - fixed

Squawkers13 wrote:

What does the .tk extension stand for?

Tokelau.

Offline

 

#169 2012-03-14 09:58:57

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

Re: Make your Forum Posts/Topics Likeable! - fixed

Sidharth wrote:

Here is the bookmarklet that can generate code for you based on the forum page or post you are on:

Like this one: http://rookwood101.tk/topicrate.php?id= … ;type=post

TO USE:
    *Higlight code, press Ctrl and C simultaneously
    *Create new bookmark in your browser
    *Change its name to whatever and also the url to the code you copied

Code:

javascript: (function () {
    var teststring = document.location.href;
    if (teststring.substr(0, 47) == 'http://scratch.mit.edu/forums/viewtopic.php?id=' || teststring.substr(0, 42) == 'http://scratch.mit.edu/forums/edit.php?id=' || teststring.substr(0, 48) == 'http://scratch.mit.edu/forums/viewtopic.php?pid=' || teststring.substr(0, 55) == 'http://scratch.mit.edu/forums/post.php?action=post&tid=' || teststring.substr(0, 43) == 'http://scratch.mit.edu/forums/post.php?tid=') {
        var topicID = /(\d)+/gi.exec(teststring)[0];
        if (teststring.substr(0, 48) == 'http://scratch.mit.edu/forums/viewtopic.php?pid=' || teststring.substr(0, 42) == 'http://scratch.mit.edu/forums/edit.php?id=') {
            var BBCODE = '[url=http://rookwood101.tk/topicrate.php?id=' + topicID + '&ret=add&type=post][url]http://rookwood101.tk/topicrate.php?id=' + topicID + '&ret=image&type=post[/url][/url]';
        } else {
            var BBCODE = '[url=http://rookwood101.tk/topicrate.php?id=' + topicID + '&ret=add][url]http://rookwood101.tk/topicrate.php?id=' + topicID + '&ret=image[/url][/url]';
        }
        var NENENENE = prompt('BBCode: Press Ctrl(cmd on Mac)-c, then Ctrl(cmd on Mac)-v to paste it', BBCODE);
    } else {
        if (teststring.substr(0, 50) == 'http://scratch.mit.edu/tbgforums/viewtopic.php?id=' || teststring.substr(0, 42) == 'http://scratch.mit.edu/tbgforums/edit.php?id=' || teststring.substr(0, 51) == 'http://scratch.mit.edu/tbgforums/viewtopic.php?pid=' || teststring.substr(0, 58) == 'http://scratch.mit.edu/tbgforums/post.php?action=post&tid=' || teststring.substr(0, 46) == 'http://scratch.mit.edu/tbgforums/post.php?tid=') {
            var topicID = /(\d)+/gi.exec(teststring)[0];
            if (teststring.substr(0, 48) == 'http://scratch.mit.edu/tbgforums/viewtopic.php?pid=' || teststring.substr(0, 42) == 'http://scratch.mit.edu/tbgforums/edit.php?id=') {
                var BBCODE = '[url=http://rookwood101.tk/topicrate.php?id=' + topicID + '&ret=add&forum=tbg&type=post][url]http://rookwood101.tk/topicrate.php?id=' + topicID + '&ret=image&forum=tbg&type=post[/url][/url]';
            } else {
                var BBCODE = '[url=http://rookwood101.tk/topicrate.php?id=' + topicID + '&ret=add&forum=tbg][url]http://rookwood101.tk/topicrate.php?id=' + topicID + '&ret=image&forum=tbg[/url][/url]';
            }
            var NENENENE = prompt('BBCode: Press Ctrl(cmd on Mac)-c, then Ctrl(cmd on Mac)-v to paste it', BBCODE);
        } else {
            alert('BAD URL!');
        }
    }

})();

Now works in TBG forums and a lot more page types covered (now you can "like" posts, too!  If you want the button to be for the forum thread, then make sure you don't have a ?pid=xxxxxx at the end.  smile


Tell me if it doesn't work  smile

EDITed EDIT: Now you can like posts too!!.

EDIT: OOPS, the type=post thing was getting added to even non-post pages. Fixed.

EDIT: Does anyone want it to be able to set style? I'm not for that, I can do it manually, but does someone else want it?

IMPROVEMENTS:
    *You can generate code to like a post too, just click on the time stamp of the postand run the bookmarklet.
    *You can generate code while posting a reply
    *You can generate code while editing a post
    *Everything works on the text-based games forum (I hope! I'm way too lazy to test it)
    *7/31/2011 - Now uses an anonymous function.

EDIT: Now made a code generator for top liked list! HERE

DON'T BLOCK POPUPS!
Don't worry, it will redirect you back here when it's done.
Source:

Code:

(function () {
    var number = prompt('Rank 1 to what number?', 'Number here');
    var imglink = 'http://rookwood101.tk/topicrate.php?ret=top';
    var urllink = 'http://rookwood101.tk/topicrate.php?ret=toplink';
    if (number <= 1) {
        alert('BAD NUMBER!');
    } else {

        var intbg = prompt('Are you in the text-based games forum? (\'yes\'/\'no\')');

        var posts = prompt('Do you want posts? (\'yes\'/\'no\')');
        if (posts === 'yes') {
            imglink = imglink + '&type=post';
            urllink = urllink + '&type=post';
        }
        if (intbg === 'yes') {
            imglink = imglink + '&forum=tbg';
            urllink = urllink + '&forum=tbg';
        }
        var wind1 = window.open('', '', 'width=200,height=100');
        var count = 0;
        for (count = 1; count <= number; count++) {
            wind1.document.write('<a href=\'' + urllink + '&rank=' + count + '\'><img src=\'' + imglink + '&rank=' + count + '\' /></a> <br />');
        }
        for (count = 1; count <= number; count++) {
            wind1.document.write('[url= + urllink + '&rank=' + count + ][url]' + imglink + '&rank=' + count + '[/url][/url] <br />');
        }
    }
})();

EDIT: edited whole post to use rookwood101.tk  smile

help rookwood!
it makes no sense!
please help get gen code for:
scratch.mit.edu/forums/viewtopic.php?id=91769


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

Offline

 

#170 2012-03-14 11:48:47

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

Re: Make your Forum Posts/Topics Likeable! - fixed

Squawkers13 wrote:

Sidharth wrote:

Here is the bookmarklet that can generate code for you based on the forum page or post you are on:

Like this one: http://rookwood101.tk/topicrate.php?id= … ;type=post

TO USE:
    *Higlight code, press Ctrl and C simultaneously
    *Create new bookmark in your browser
    *Change its name to whatever and also the url to the code you copied

Code:

javascript: (function () {
    var teststring = document.location.href;
    if (teststring.substr(0, 47) == 'http://scratch.mit.edu/forums/viewtopic.php?id=' || teststring.substr(0, 42) == 'http://scratch.mit.edu/forums/edit.php?id=' || teststring.substr(0, 48) == 'http://scratch.mit.edu/forums/viewtopic.php?pid=' || teststring.substr(0, 55) == 'http://scratch.mit.edu/forums/post.php?action=post&tid=' || teststring.substr(0, 43) == 'http://scratch.mit.edu/forums/post.php?tid=') {
        var topicID = /(\d)+/gi.exec(teststring)[0];
        if (teststring.substr(0, 48) == 'http://scratch.mit.edu/forums/viewtopic.php?pid=' || teststring.substr(0, 42) == 'http://scratch.mit.edu/forums/edit.php?id=') {
            var BBCODE = '[url=http://rookwood101.tk/topicrate.php?id=' + topicID + '&ret=add&type=post][url]http://rookwood101.tk/topicrate.php?id=' + topicID + '&ret=image&type=post[/url][/url]';
        } else {
            var BBCODE = '[url=http://rookwood101.tk/topicrate.php?id=' + topicID + '&ret=add][url]http://rookwood101.tk/topicrate.php?id=' + topicID + '&ret=image[/url][/url]';
        }
        var NENENENE = prompt('BBCode: Press Ctrl(cmd on Mac)-c, then Ctrl(cmd on Mac)-v to paste it', BBCODE);
    } else {
        if (teststring.substr(0, 50) == 'http://scratch.mit.edu/tbgforums/viewtopic.php?id=' || teststring.substr(0, 42) == 'http://scratch.mit.edu/tbgforums/edit.php?id=' || teststring.substr(0, 51) == 'http://scratch.mit.edu/tbgforums/viewtopic.php?pid=' || teststring.substr(0, 58) == 'http://scratch.mit.edu/tbgforums/post.php?action=post&tid=' || teststring.substr(0, 46) == 'http://scratch.mit.edu/tbgforums/post.php?tid=') {
            var topicID = /(\d)+/gi.exec(teststring)[0];
            if (teststring.substr(0, 48) == 'http://scratch.mit.edu/tbgforums/viewtopic.php?pid=' || teststring.substr(0, 42) == 'http://scratch.mit.edu/tbgforums/edit.php?id=') {
                var BBCODE = '[url=http://rookwood101.tk/topicrate.php?id=' + topicID + '&ret=add&forum=tbg&type=post][url]http://rookwood101.tk/topicrate.php?id=' + topicID + '&ret=image&forum=tbg&type=post[/url][/url]';
            } else {
                var BBCODE = '[url=http://rookwood101.tk/topicrate.php?id=' + topicID + '&ret=add&forum=tbg][url]http://rookwood101.tk/topicrate.php?id=' + topicID + '&ret=image&forum=tbg[/url][/url]';
            }
            var NENENENE = prompt('BBCode: Press Ctrl(cmd on Mac)-c, then Ctrl(cmd on Mac)-v to paste it', BBCODE);
        } else {
            alert('BAD URL!');
        }
    }

})();

Now works in TBG forums and a lot more page types covered (now you can "like" posts, too!  If you want the button to be for the forum thread, then make sure you don't have a ?pid=xxxxxx at the end.  smile


Tell me if it doesn't work  smile

EDITed EDIT: Now you can like posts too!!.

EDIT: OOPS, the type=post thing was getting added to even non-post pages. Fixed.

EDIT: Does anyone want it to be able to set style? I'm not for that, I can do it manually, but does someone else want it?

IMPROVEMENTS:
    *You can generate code to like a post too, just click on the time stamp of the postand run the bookmarklet.
    *You can generate code while posting a reply
    *You can generate code while editing a post
    *Everything works on the text-based games forum (I hope! I'm way too lazy to test it)
    *7/31/2011 - Now uses an anonymous function.

EDIT: Now made a code generator for top liked list! HERE

DON'T BLOCK POPUPS!
Don't worry, it will redirect you back here when it's done.
Source:

Code:

(function () {
    var number = prompt('Rank 1 to what number?', 'Number here');
    var imglink = 'http://rookwood101.tk/topicrate.php?ret=top';
    var urllink = 'http://rookwood101.tk/topicrate.php?ret=toplink';
    if (number <= 1) {
        alert('BAD NUMBER!');
    } else {

        var intbg = prompt('Are you in the text-based games forum? (\'yes\'/\'no\')');

        var posts = prompt('Do you want posts? (\'yes\'/\'no\')');
        if (posts === 'yes') {
            imglink = imglink + '&type=post';
            urllink = urllink + '&type=post';
        }
        if (intbg === 'yes') {
            imglink = imglink + '&forum=tbg';
            urllink = urllink + '&forum=tbg';
        }
        var wind1 = window.open('', '', 'width=200,height=100');
        var count = 0;
        for (count = 1; count <= number; count++) {
            wind1.document.write('<a href=\'' + urllink + '&rank=' + count + '\'><img src=\'' + imglink + '&rank=' + count + '\' /></a> <br />');
        }
        for (count = 1; count <= number; count++) {
            wind1.document.write('[url= + urllink + '&rank=' + count + ][url]' + imglink + '&rank=' + count + '[/url][/url] <br />');
        }
    }
})();

EDIT: edited whole post to use rookwood101.tk  smile

help rookwood!
it makes no sense!
please help get gen code for:
scratch.mit.edu/forums/viewtopic.php?id=91769

This will not work anymore, sorry. I turned the service off.


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

Offline

 

#171 2012-03-14 19:33:23

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

Re: Make your Forum Posts/Topics Likeable! - fixed

Noooooooo!


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

Offline

 

#172 2012-03-16 22:51:27

stevetheipad
Scratcher
Registered: 2011-08-06
Posts: 1000+

Re: Make your Forum Posts/Topics Likeable! - fixed

Heh, this might actually be useful for my own forums. Thanks for explaining it!


http://i.imgur.com/0x8ia.jpg
gone

Offline

 

#173 2012-06-21 17:47:57

XenoK
Scratcher
Registered: 2011-09-08
Posts: 1000+

Re: Make your Forum Posts/Topics Likeable! - fixed

could you make a google +1 button for it?


Eternity Tasks has launched into Alpha One! http://tasks.eternityincurakai.com/EI%20projects.png

Offline

 

Board footer