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

#101 2012-01-01 12:27:54

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

Re: Adding the images back in to your scratch forum experience

rookwood101 wrote:

fungirl123 wrote:

ZeroLuck wrote:


Lol, that was me  big_smile
You should disable it because everyone can get your account when you have this
not disabled!

I did  yikes
Are people going to get into my account now??!?!
I'm so noobish lol

no don't worry, zeroluck hasn't actually done anything with the cookie, just displayed it.

Still, might want to fix?

Offline

 

#102 2012-01-01 14:40:28

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

Re: Adding the images back in to your scratch forum experience

fixed! (only images at the moment though - you'll have to wait for me to fix the security holes in the youtube and scratch projects)

Only problem is, it won't work if the images have capital letters in their filename.
Download using the original link.


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

Offline

 

#103 2012-01-01 15:01:09

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

Re: Adding the images back in to your scratch forum experience

rookwood101 wrote:

fixed! (only images at the moment though - you'll have to wait for me to fix the security holes in the youtube and scratch projects)

Only problem is, it won't work if the images have capital letters in their filename.
Download using the original link.

read this it tells you how to update.


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

Offline

 

#104 2012-01-01 15:49:24

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

Re: Adding the images back in to your scratch forum experience

this post had some test stuff in.

Last edited by rookwood101 (2012-01-02 05:40:36)


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

Offline

 

#105 2012-01-01 16:27:21

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: Adding the images back in to your scratch forum experience

@rookwood101, you have a second monitor the exact same size as me. 0.o


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#106 2012-01-01 16:31:21

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

Re: Adding the images back in to your scratch forum experience

MathWizz wrote:

@rookwood101, you have a second monitor the exact same size as me. 0.o

Wait what lol  tongue

Edit: not very anonymous 'anonymous usage statistics'?

Last edited by rookwood101 (2012-01-01 16:32:25)


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

Offline

 

#107 2012-01-02 04:20:57

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

Re: Adding the images back in to your scratch forum experience

you forgot my name  sad
tongue

Offline

 

#108 2012-01-02 04:55:49

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

Re: Adding the images back in to your scratch forum experience

roijac wrote:

you forgot my name  sad
tongue

Lol sorry


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

Offline

 

#109 2012-01-02 05:40:48

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

Re: Adding the images back in to your scratch forum experience

Massive script update!

This post will hopefully explain to you what has changed, and also how to update your copy of the script to the latest version.

Me and LS97 put a lot of work into making this script safe and secure, removing all the security holes, and making sure everything works perfectly.

Changes:
Stopped people from being able to inject malicious JavaScript code that could potentially log in to your scratch account!

Features:
• Make all the image tags work again
- disagree with the scratch team's decision to disable all images in posts? You'll be able to
   view them all now!

   Uses the standard [ img ] and [ /img ] tags.

• Embed YouTube videos directly on the forums without linking through to any sites!
- show your friends that video you've been working on quickly and easily!

   Uses a new tag formatted like so: [ youtube ]<video id>[ /youtube ]
   Eg. [ youtube ]aZDG15hb[ /youtube ]

• Post scratch projects on the forums
- let the community know of your latest creation without even leaving the comfort of the
   forums!

   Uses another new tag formatted like this: [ scratch=flash ]<user>/<project id>[ /scratch ]
   eg. [ scratch=flash ]rookwood101/123456[ /scratch ]

Remember not to have any spaces in the tags when you are actually using them as otherwise they will not work!


To update the script:

on firefox you can go into tools>greasemonkey>manage user scripts>then click remove on the one labeled 'enable images on scratch forums'.

In chrome go to the spanner icon, then click options, go to extensions and uninstall 'enable images on scratch forums'

You'll have to work out yourself how to do it in other browsers.

Finally just click the link in the first post to redownload the script!


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

Offline

 

#110 2012-01-02 06:05:40

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Adding the images back in to your scratch forum experience

rookwood101 wrote:

[...]
Remember not to have any spaces in the tags when you are actually using them as otherwise they will not work!

If you don't want to confuse Scratchers with the spaces in the [ img ] tags, you can type [[b][/b]img], which makes [img].  wink


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#111 2012-01-02 06:38:50

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Adding the images back in to your scratch forum experience

I added a notice on top which tells you whether the script was successful or not, and gives a bug report link if there is an error. (The header is also edited slightly)

Code:

// ==UserScript==
// @name          Image Enabler
// @namespace      rookwood101,Cocolover,LS97,flashgocrazy
// @description    Enable images, and allow Scratch projects and YouTube videos on forums with BBCode
// @include        http://scratch.mit.edu/forums/viewtopic.php*
// ==/UserScript==

//Set title to fail
document.getElementById("brdtitle").innerHTML=document.getElementById("brdtitle").innerHTML+"<span id='imgtagenablerstatus'>Greasemonkey image tag enabler is goofing up. <small style='color:#777777'>[<a href='http://scratch.mit.edu/forums/viewtopic.php?id=85177' style='color:#777777'>Report this bug!</a>]</small></span>";

if (document.URL.indexOf('http://scratch.mit.edu/forums/viewtopic.php') != -1) {

//replace img tags
 var bodyElement = document.getElementsByTagName("body")[0];
 var bodyInner = bodyElement.innerHTML;
 var imageurls = new Array();
 for (i=0;i<bodyInner.split(/\[img\]/i).length-1;i++) {
  imageurls[i] = bodyInner.split(/\[img\]/i)[i+1].split(/\[\/img\]/i)[0];
  if (imageurls[i].replace(/(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])?/i, "") != "") {
   imageurls[i] = 'http://img94.imageshack.us/img94/6045/invalidimage.png';
  }
 }
 var addImages = bodyInner;
 for (i=0;i<imageurls.length;i++) {
  addImages = addImages.replace(/\[img\](http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])?\[\/img\]/i, '<img style="max-width: 510px;" src="' + imageurls[i] + '" />');
 }
 
 //replace youtube tags
 var youtubeids = new Array();
 for (i=0;i<addImages.split(/\[youtube\]/i).length-1;i++) {
  youtubeids[i] = addImages.split(/\[youtube\]/i)[i+1].split(/\[\/youtube\]/i)[0];
  if (youtubeids[i].replace(/[a-zA-Z0-9\-_]+/, "") != "") {
   youtubeids[i] = 'dQw4w9WgXcQ';
  }
 }
 var addYoutube = addImages;
 for (i=0;i<youtubeids.length;i++) {
  addYoutube = addYoutube.replace(/\[youtube\]([a-zA-Z0-9\-_]+)\[\/youtube\]/i, '<iframe width="510" height="315" src="http://www.youtube.com/embed/' + youtubeids[i] + '"frameborder="0" allowfullscreen></iframe>');
 }
 
//replace project tags
  var projectpath = new Array();
 for (i=0;i<addYoutube.split(/\[scratch=flash\]/i).length-1;i++) {
  projectpath[i] = addYoutube.split(/\[scratch=flash\]/i)[i+1].split(/\[\/scratch\]/i)[0];
  if (projectpath[i].replace(/[a-zA-Z0-9]+\/[0-9]+/i, "") != "") {
   projectpath[i] = 'Mike16112/675815';
  }
 }
 var addProjects = addYoutube;
 for (i=0;i<projectpath.length;i++) {
  addProjects = addProjects.replace(/\[scratch=flash\]([a-zA-Z0-9]+\/[0-9]+)\[\/scratch\]/i, '<object width="483" height="387" type="application/x-shockwave-flash" data="http://scratch.mit.edu/static/misc/PlayerOnly.swf"><param name="allowScriptAccess" value="always"><param name="allowFullScreen" value="true"><param name="flashvars" value="project=http://scratch.mit.edu/static/projects/' + projectpath[i] + '.sb?version=1"></object>');
 }
 document.getElementsByTagName("body")[0].innerHTML = addProjects;
}

//Set title to success
document.getElementById("imgtagenablerstatus").innerHTML="Greasemonkey image tag enabler has completed running. <small style='color:#777777'>[<a href='http://scratch.mit.edu/forums/viewtopic.php?id=85177' style='color:#777777'>Having problems?</a>]</small>";

Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#112 2012-01-02 06:45:16

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

Re: Adding the images back in to your scratch forum experience

need help debugging

Code:

// ==UserScript==
// @name           enable images on scratch forum and more!
// @namespace      rookwood101,Cocolover,LS97,flashgocrazy,roijac
// @description    enable images on scratch forum, added youtube and projects
// @include        http://scratch.mit.edu/forums/viewtopic.php*
// ==/UserScript==
if (document.URL.indexOf('http://scratch.mit.edu/forums/viewtopic.php') != -1) {

    //replace img tags
    var bodyElement = document.getElementsByTagName("body")[0];
    var bodyInner = bodyElement.innerHTML;
    var imageurls = new Array();
    for (i=0;i<bodyInner.split(/\[img\]/i).length-1;i++) {
        imageurls[i] = bodyInner.split(/\[img\]/i)[i+1].split(/\[\/img\]/i)[0];
        if (imageurls[i].replace(/(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])?/i, "") != "") {
        imageurls[i] = 'http://img94.imageshack.us/img94/6045/invalidimage.png';
        }
    }
    var addImages = bodyInner;
    for (i=0;i<imageurls.length;i++) {
        addImages = addImages.replace(/\[img\](http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])?\[\/img\]/i, '<img style="max-width: 510px;" src="' + imageurls[i] + '" />');
    }

    //replace youtube tags
    var youtubeids = new Array();
    for (i=0;i<addImages.split(/\[youtube\]/i).length-1;i++) {
        youtubeids[i] = addImages.split(/\[youtube\]/i)[i+1].split(/\[\/youtube\]/i)[0];
        if (youtubeids[i].replace(/[a-zA-Z0-9\-_]+/, "") != "") {
            youtubeids[i] = 'dQw4w9WgXcQ';
        }
    }
    var addYoutube = addImages;
    for (i=0;i<youtubeids.length;i++) {
        addYoutube = addYoutube.replace(/\[youtube\]([a-zA-Z0-9\-_]+)\[\/youtube\]/i, '<iframe width="510" height="315" src="http://www.youtube.com/embed/' + youtubeids[i] + '"frameborder="0" allowfullscreen></iframe>');
    }
 
    //replace project tags
    var projectpath = new Array();
    for (i=0;i<addYoutube.split(/\[scratch=flash\]/i).length-1;i++) {
        projectpath[i] = addYoutube.split(/\[scratch=flash\]/i)[i+1].split(/\[\/scratch\]/i)[0];
        if (projectpath[i].replace(/[a-zA-Z0-9]+\/[0-9]+/i, "") != "") {
            projectpath[i] = 'Mike16112/675815';
        }
    }
    
    function showProject(i) {
        projectDiv = document.getElementById(i);
            if(projectDiv.style.display == "block") {
                    projectDiv.style.display = "none";
              }
            else {
                projectDiv.style.display = "block";
            }
        
    }

    var addProjects = addYoutube;
    for (i=0;i<projectpath.length;i++) {
        addProjects = addProjects.replace(/\[scratch=flash\]([a-zA-Z0-9]+\/[0-9]+)\[\/scratch\]/i, '<input type="button" value="Show/Hide Project" onclick="showProject(' + i + ');"/> <div id="' + i + '" style="display: none;"> <object width="483" height="387" type="application/x-shockwave-flash" data="http://scratch.mit.edu/static/misc/PlayerOnly.swf"><param name="allowScriptAccess" value="always"> <param name="allowFullScreen" value="true"> <param name="flashvars" value="project=http://scratch.mit.edu/static/projects/' + projectpath[i] + '.sb?version=1"> </object> </div>');
    }
    document.getElementsByTagName("body")[0].innerHTML = addProjects;

}

tried preventing auto-playing, but doesn't work  sad

Last edited by roijac (2012-01-02 13:33:10)

Offline

 

#113 2012-01-02 08:25:53

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

Re: Adding the images back in to your scratch forum experience

Hardmath123 wrote:

I added a notice on top which tells you whether the script was successful or not, and gives a bug report link if there is an error. (The header is also edited slightly)

Code:

// ==UserScript==
// @name          Image Enabler
// @namespace      rookwood101,Cocolover,LS97,flashgocrazy
// @description    Enable images, and allow Scratch projects and YouTube videos on forums with BBCode
// @include        http://scratch.mit.edu/forums/viewtopic.php*
// ==/UserScript==

//Set title to fail
document.getElementById("brdtitle").innerHTML=document.getElementById("brdtitle").innerHTML+"<span id='imgtagenablerstatus'>Greasemonkey image tag enabler is goofing up. <small style='color:#777777'>[<a href='http://scratch.mit.edu/forums/viewtopic.php?id=85177' style='color:#777777'>Report this bug!</a>]</small></span>";

if (document.URL.indexOf('http://scratch.mit.edu/forums/viewtopic.php') != -1) {

//replace img tags
 var bodyElement = document.getElementsByTagName("body")[0];
 var bodyInner = bodyElement.innerHTML;
 var imageurls = new Array();
 for (i=0;i<bodyInner.split(/\[img\]/i).length-1;i++) {
  imageurls[i] = bodyInner.split(/\[img\]/i)[i+1].split(/\[\/img\]/i)[0];
  if (imageurls[i].replace(/(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])?/i, "") != "") {
   imageurls[i] = 'http://img94.imageshack.us/img94/6045/invalidimage.png';
  }
 }
 var addImages = bodyInner;
 for (i=0;i<imageurls.length;i++) {
  addImages = addImages.replace(/\[img\](http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])?\[\/img\]/i, '<img style="max-width: 510px;" src="' + imageurls[i] + '" />');
 }
 
 //replace youtube tags
 var youtubeids = new Array();
 for (i=0;i<addImages.split(/\[youtube\]/i).length-1;i++) {
  youtubeids[i] = addImages.split(/\[youtube\]/i)[i+1].split(/\[\/youtube\]/i)[0];
  if (youtubeids[i].replace(/[a-zA-Z0-9\-_]+/, "") != "") {
   youtubeids[i] = 'dQw4w9WgXcQ';
  }
 }
 var addYoutube = addImages;
 for (i=0;i<youtubeids.length;i++) {
  addYoutube = addYoutube.replace(/\[youtube\]([a-zA-Z0-9\-_]+)\[\/youtube\]/i, '<iframe width="510" height="315" src="http://www.youtube.com/embed/' + youtubeids[i] + '"frameborder="0" allowfullscreen></iframe>');
 }
 
//replace project tags
  var projectpath = new Array();
 for (i=0;i<addYoutube.split(/\[scratch=flash\]/i).length-1;i++) {
  projectpath[i] = addYoutube.split(/\[scratch=flash\]/i)[i+1].split(/\[\/scratch\]/i)[0];
  if (projectpath[i].replace(/[a-zA-Z0-9]+\/[0-9]+/i, "") != "") {
   projectpath[i] = 'Mike16112/675815';
  }
 }
 var addProjects = addYoutube;
 for (i=0;i<projectpath.length;i++) {
  addProjects = addProjects.replace(/\[scratch=flash\]([a-zA-Z0-9]+\/[0-9]+)\[\/scratch\]/i, '<object width="483" height="387" type="application/x-shockwave-flash" data="http://scratch.mit.edu/static/misc/PlayerOnly.swf"><param name="allowScriptAccess" value="always"><param name="allowFullScreen" value="true"><param name="flashvars" value="project=http://scratch.mit.edu/static/projects/' + projectpath[i] + '.sb?version=1"></object>');
 }
 document.getElementsByTagName("body")[0].innerHTML = addProjects;
}

//Set title to success
document.getElementById("imgtagenablerstatus").innerHTML="Greasemonkey image tag enabler has completed running. <small style='color:#777777'>[<a href='http://scratch.mit.edu/forums/viewtopic.php?id=85177' style='color:#777777'>Having problems?</a>]</small>";

You should probably put the extra code you added in the if statement, otherwise it will run on any page (in chome, not firefox).

But other than that, great! I tested it and it works perfectly!

I'll debug yours in a sec roijac (lunch)

Last edited by rookwood101 (2012-01-02 08:28:33)


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

Offline

 

#114 2012-01-02 08:35:15

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Adding the images back in to your scratch forum experience

rookwood101 wrote:

Hardmath123 wrote:

I added a notice on top which tells you whether the script was successful or not, and gives a bug report link if there is an error. (The header is also edited slightly)

Code:

// ==UserScript==
// @name          Image Enabler
// @namespace      rookwood101,Cocolover,LS97,flashgocrazy
// @description    Enable images, and allow Scratch projects and YouTube videos on forums with BBCode
// @include        http://scratch.mit.edu/forums/viewtopic.php*
// ==/UserScript==

//Set title to fail
document.getElementById("brdtitle").innerHTML=document.getElementById("brdtitle").innerHTML+"<span id='imgtagenablerstatus'>Greasemonkey image tag enabler is goofing up. <small style='color:#777777'>[<a href='http://scratch.mit.edu/forums/viewtopic.php?id=85177' style='color:#777777'>Report this bug!</a>]</small></span>";

if (document.URL.indexOf('http://scratch.mit.edu/forums/viewtopic.php') != -1) {

//replace img tags
 var bodyElement = document.getElementsByTagName("body")[0];
 var bodyInner = bodyElement.innerHTML;
 var imageurls = new Array();
 for (i=0;i<bodyInner.split(/\[img\]/i).length-1;i++) {
  imageurls[i] = bodyInner.split(/\[img\]/i)[i+1].split(/\[\/img\]/i)[0];
  if (imageurls[i].replace(/(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])?/i, "") != "") {
   imageurls[i] = 'http://img94.imageshack.us/img94/6045/invalidimage.png';
  }
 }
 var addImages = bodyInner;
 for (i=0;i<imageurls.length;i++) {
  addImages = addImages.replace(/\[img\](http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])?\[\/img\]/i, '<img style="max-width: 510px;" src="' + imageurls[i] + '" />');
 }
 
 //replace youtube tags
 var youtubeids = new Array();
 for (i=0;i<addImages.split(/\[youtube\]/i).length-1;i++) {
  youtubeids[i] = addImages.split(/\[youtube\]/i)[i+1].split(/\[\/youtube\]/i)[0];
  if (youtubeids[i].replace(/[a-zA-Z0-9\-_]+/, "") != "") {
   youtubeids[i] = 'dQw4w9WgXcQ';
  }
 }
 var addYoutube = addImages;
 for (i=0;i<youtubeids.length;i++) {
  addYoutube = addYoutube.replace(/\[youtube\]([a-zA-Z0-9\-_]+)\[\/youtube\]/i, '<iframe width="510" height="315" src="http://www.youtube.com/embed/' + youtubeids[i] + '"frameborder="0" allowfullscreen></iframe>');
 }
 
//replace project tags
  var projectpath = new Array();
 for (i=0;i<addYoutube.split(/\[scratch=flash\]/i).length-1;i++) {
  projectpath[i] = addYoutube.split(/\[scratch=flash\]/i)[i+1].split(/\[\/scratch\]/i)[0];
  if (projectpath[i].replace(/[a-zA-Z0-9]+\/[0-9]+/i, "") != "") {
   projectpath[i] = 'Mike16112/675815';
  }
 }
 var addProjects = addYoutube;
 for (i=0;i<projectpath.length;i++) {
  addProjects = addProjects.replace(/\[scratch=flash\]([a-zA-Z0-9]+\/[0-9]+)\[\/scratch\]/i, '<object width="483" height="387" type="application/x-shockwave-flash" data="http://scratch.mit.edu/static/misc/PlayerOnly.swf"><param name="allowScriptAccess" value="always"><param name="allowFullScreen" value="true"><param name="flashvars" value="project=http://scratch.mit.edu/static/projects/' + projectpath[i] + '.sb?version=1"></object>');
 }
 document.getElementsByTagName("body")[0].innerHTML = addProjects;
}

//Set title to success
document.getElementById("imgtagenablerstatus").innerHTML="Greasemonkey image tag enabler has completed running. <small style='color:#777777'>[<a href='http://scratch.mit.edu/forums/viewtopic.php?id=85177' style='color:#777777'>Having problems?</a>]</small>";

You should probably put the extra code you added in the if statement, otherwise it will run on any page (in chome, not firefox).

But other than that, great! I tested it and it works perfectly!

I'll debug yours in a sec roijac (lunch)

Code:

// ==UserScript==
// @name          Image Enabler
// @namespace      rookwood101,Cocolover,LS97,flashgocrazy
// @description    Enable images, and allow Scratch projects and YouTube videos on forums with BBCode
// @include        http://scratch.mit.edu/forums/viewtopic.php*
// ==/UserScript==

if (document.URL.indexOf('http://scratch.mit.edu/forums/viewtopic.php') != -1) {
//Set title to fail
document.getElementById("brdtitle").innerHTML=document.getElementById("brdtitle").innerHTML+"<span id='imgtagenablerstatus'>Greasemonkey image tag enabler is goofing up. There may be an open tag or invalid image. <small style='color:#777777'>[<a href='http://scratch.mit.edu/forums/viewtopic.php?id=85177' style='color:#777777'>Report this bug!</a>]</small></span>";

//replace img tags
 var bodyElement = document.getElementsByTagName("body")[0];
 var bodyInner = bodyElement.innerHTML;
  
 if (occurrences(bodyInner, "[img]")<=30) {
  var imageurls = new Array();
  for (i=0;i<bodyInner.split(/\[img\]/i).length-1;i++) {
   imageurls[i] = bodyInner.split(/\[img\]/i)[i+1].split(/\[\/img\]/i)[0];
   if (imageurls[i].replace(/(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])?/i, "") != "") {
    imageurls[i] = 'http://img94.imageshack.us/img94/6045/invalidimage.png';
   }
  }
  var addImages = bodyInner;
  for (i=0;i<imageurls.length;i++) {
   addImages = addImages.replace(/\[img\](http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])?\[\/img\]/i, '<img style="max-width: 510px;" src="' + imageurls[i] + '" />');
  }
 }
 else
 {
    alert("There were too many images to display, so they have been omitted.");
 }
 
 //replace youtube tags
 var youtubeids = new Array();
 for (i=0;i<addImages.split(/\[youtube\]/i).length-1;i++) {
  youtubeids[i] = addImages.split(/\[youtube\]/i)[i+1].split(/\[\/youtube\]/i)[0];
  if (youtubeids[i].replace(/[a-zA-Z0-9\-_]+/, "") != "") {
   youtubeids[i] = 'dQw4w9WgXcQ';
  }
 }
 var addYoutube = addImages;
 for (i=0;i<youtubeids.length;i++) {
  addYoutube = addYoutube.replace(/\[youtube\]([a-zA-Z0-9\-_]+)\[\/youtube\]/i, '<iframe width="510" height="315" src="http://www.youtube.com/embed/' + youtubeids[i] + '"frameborder="0" allowfullscreen></iframe>');
 }
 
//replace project tags
  var projectpath = new Array();
 for (i=0;i<addYoutube.split(/\[scratch=flash\]/i).length-1;i++) {
  projectpath[i] = addYoutube.split(/\[scratch=flash\]/i)[i+1].split(/\[\/scratch\]/i)[0];
  if (projectpath[i].replace(/[a-zA-Z0-9]+\/[0-9]+/i, "") != "") {
   projectpath[i] = 'Mike16112/675815';
  }
 }
 var addProjects = addYoutube;
 for (i=0;i<projectpath.length;i++) {
  addProjects = addProjects.replace(/\[scratch=flash\]([a-zA-Z0-9]+\/[0-9]+)\[\/scratch\]/i, '<object width="483" height="387" type="application/x-shockwave-flash" data="http://scratch.mit.edu/static/misc/PlayerOnly.swf"><param name="allowScriptAccess" value="always"><param name="allowFullScreen" value="true"><param name="flashvars" value="project=http://scratch.mit.edu/static/projects/' + projectpath[i] + '.sb?version=1"></object>');
 }
 document.getElementsByTagName("body")[0].innerHTML = addProjects;
}

//Set title to success
document.getElementById("imgtagenablerstatus").innerHTML="Greasemonkey image tag enabler has completed running. <small style='color:#777777'>[<a href='http://scratch.mit.edu/forums/viewtopic.php?id=85177' style='color:#777777'>Having problems?</a>]</small>";

function occurrences(string, substring){
 var n=0;
 var pos=0;

 while(true){
  pos=string.indexOf(substring,pos);
  if(pos!=-1){ n++; pos+=substring.length;}
  else{break;}
 }
 return(n);
}

Now it gives a "too many image tags" warning if there are 30+ images, and it bails out of the image processing bit. If you want, you can put a confirm() bypass, but I find this way cleaner.

Last edited by Hardmath123 (2012-01-02 08:39:48)


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#115 2012-01-02 09:25:38

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

Re: Adding the images back in to your scratch forum experience

Hardmath123 wrote:

rookwood101 wrote:

Hardmath123 wrote:

I added a notice on top which tells you whether the script was successful or not, and gives a bug report link if there is an error. (The header is also edited slightly)

Code:

// ==UserScript==
// @name          Image Enabler
// @namespace      rookwood101,Cocolover,LS97,flashgocrazy
// @description    Enable images, and allow Scratch projects and YouTube videos on forums with BBCode
// @include        http://scratch.mit.edu/forums/viewtopic.php*
// ==/UserScript==

//Set title to fail
document.getElementById("brdtitle").innerHTML=document.getElementById("brdtitle").innerHTML+"<span id='imgtagenablerstatus'>Greasemonkey image tag enabler is goofing up. <small style='color:#777777'>[<a href='http://scratch.mit.edu/forums/viewtopic.php?id=85177' style='color:#777777'>Report this bug!</a>]</small></span>";

if (document.URL.indexOf('http://scratch.mit.edu/forums/viewtopic.php') != -1) {

//replace img tags
 var bodyElement = document.getElementsByTagName("body")[0];
 var bodyInner = bodyElement.innerHTML;
 var imageurls = new Array();
 for (i=0;i<bodyInner.split(/\[img\]/i).length-1;i++) {
  imageurls[i] = bodyInner.split(/\[img\]/i)[i+1].split(/\[\/img\]/i)[0];
  if (imageurls[i].replace(/(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])?/i, "") != "") {
   imageurls[i] = 'http://img94.imageshack.us/img94/6045/invalidimage.png';
  }
 }
 var addImages = bodyInner;
 for (i=0;i<imageurls.length;i++) {
  addImages = addImages.replace(/\[img\](http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])?\[\/img\]/i, '<img style="max-width: 510px;" src="' + imageurls[i] + '" />');
 }
 
 //replace youtube tags
 var youtubeids = new Array();
 for (i=0;i<addImages.split(/\[youtube\]/i).length-1;i++) {
  youtubeids[i] = addImages.split(/\[youtube\]/i)[i+1].split(/\[\/youtube\]/i)[0];
  if (youtubeids[i].replace(/[a-zA-Z0-9\-_]+/, "") != "") {
   youtubeids[i] = 'dQw4w9WgXcQ';
  }
 }
 var addYoutube = addImages;
 for (i=0;i<youtubeids.length;i++) {
  addYoutube = addYoutube.replace(/\[youtube\]([a-zA-Z0-9\-_]+)\[\/youtube\]/i, '<iframe width="510" height="315" src="http://www.youtube.com/embed/' + youtubeids[i] + '"frameborder="0" allowfullscreen></iframe>');
 }
 
//replace project tags
  var projectpath = new Array();
 for (i=0;i<addYoutube.split(/\[scratch=flash\]/i).length-1;i++) {
  projectpath[i] = addYoutube.split(/\[scratch=flash\]/i)[i+1].split(/\[\/scratch\]/i)[0];
  if (projectpath[i].replace(/[a-zA-Z0-9]+\/[0-9]+/i, "") != "") {
   projectpath[i] = 'Mike16112/675815';
  }
 }
 var addProjects = addYoutube;
 for (i=0;i<projectpath.length;i++) {
  addProjects = addProjects.replace(/\[scratch=flash\]([a-zA-Z0-9]+\/[0-9]+)\[\/scratch\]/i, '<object width="483" height="387" type="application/x-shockwave-flash" data="http://scratch.mit.edu/static/misc/PlayerOnly.swf"><param name="allowScriptAccess" value="always"><param name="allowFullScreen" value="true"><param name="flashvars" value="project=http://scratch.mit.edu/static/projects/' + projectpath[i] + '.sb?version=1"></object>');
 }
 document.getElementsByTagName("body")[0].innerHTML = addProjects;
}

//Set title to success
document.getElementById("imgtagenablerstatus").innerHTML="Greasemonkey image tag enabler has completed running. <small style='color:#777777'>[<a href='http://scratch.mit.edu/forums/viewtopic.php?id=85177' style='color:#777777'>Having problems?</a>]</small>";

You should probably put the extra code you added in the if statement, otherwise it will run on any page (in chome, not firefox).

But other than that, great! I tested it and it works perfectly!

I'll debug yours in a sec roijac (lunch)

Code:

// ==UserScript==
// @name          Image Enabler
// @namespace      rookwood101,Cocolover,LS97,flashgocrazy
// @description    Enable images, and allow Scratch projects and YouTube videos on forums with BBCode
// @include        http://scratch.mit.edu/forums/viewtopic.php*
// ==/UserScript==

if (document.URL.indexOf('http://scratch.mit.edu/forums/viewtopic.php') != -1) {
//Set title to fail
document.getElementById("brdtitle").innerHTML=document.getElementById("brdtitle").innerHTML+"<span id='imgtagenablerstatus'>Greasemonkey image tag enabler is goofing up. There may be an open tag or invalid image. <small style='color:#777777'>[<a href='http://scratch.mit.edu/forums/viewtopic.php?id=85177' style='color:#777777'>Report this bug!</a>]</small></span>";

//replace img tags
 var bodyElement = document.getElementsByTagName("body")[0];
 var bodyInner = bodyElement.innerHTML;
  
 if (occurrences(bodyInner, "[url]")<=30) {
  var imageurls = new Array();
  for (i=0;i<bodyInner.split(/\[img\]/i).length-1;i++) {
   imageurls[i] = bodyInner.split(/\[img\]/i)[i+1].split(/\[\/img\]/i)[0];
   if (imageurls[i].replace(/(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])?/i, "") != "") {
    imageurls[i] = 'http://img94.imageshack.us/img94/6045/invalidimage.png';
   }
  }
  var addImages = bodyInner;
  for (i=0;i<imageurls.length;i++) {
   addImages = addImages.replace(/\[img\](http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])?\[\/img\]/i, '<img style="max-width: 510px;" src="' + imageurls[i] + '" />');
  }
 }
 else
 {
    alert("There were too many images to display, so they have been omitted.");
 }
 
 //replace youtube tags
 var youtubeids = new Array();
 for (i=0;i<addImages.split(/\[youtube\]/i).length-1;i++) {
  youtubeids[i] = addImages.split(/\[youtube\]/i)[i+1].split(/\[\/youtube\]/i)[0];
  if (youtubeids[i].replace(/[a-zA-Z0-9\-_]+/, "") != "") {
   youtubeids[i] = 'dQw4w9WgXcQ';
  }
 }
 var addYoutube = addImages;
 for (i=0;i<youtubeids.length;i++) {
  addYoutube = addYoutube.replace(/\[youtube\]([a-zA-Z0-9\-_]+)\[\/youtube\]/i, '<iframe width="510" height="315" src="http://www.youtube.com/embed/' + youtubeids[i] + '"frameborder="0" allowfullscreen></iframe>');
 }
 
//replace project tags
  var projectpath = new Array();
 for (i=0;i<addYoutube.split(/\[scratch=flash\]/i).length-1;i++) {
  projectpath[i] = addYoutube.split(/\[scratch=flash\]/i)[i+1].split(/\[\/scratch\]/i)[0];
  if (projectpath[i].replace(/[a-zA-Z0-9]+\/[0-9]+/i, "") != "") {
   projectpath[i] = 'Mike16112/675815';
  }
 }
 var addProjects = addYoutube;
 for (i=0;i<projectpath.length;i++) {
  addProjects = addProjects.replace(/\[scratch=flash\]([a-zA-Z0-9]+\/[0-9]+)\[\/scratch\]/i, '<object width="483" height="387" type="application/x-shockwave-flash" data="http://scratch.mit.edu/static/misc/PlayerOnly.swf"><param name="allowScriptAccess" value="always"><param name="allowFullScreen" value="true"><param name="flashvars" value="project=http://scratch.mit.edu/static/projects/' + projectpath[i] + '.sb?version=1"></object>');
 }
 document.getElementsByTagName("body")[0].innerHTML = addProjects;
}

//Set title to success
document.getElementById("imgtagenablerstatus").innerHTML="Greasemonkey image tag enabler has completed running. <small style='color:#777777'>[<a href='http://scratch.mit.edu/forums/viewtopic.php?id=85177' style='color:#777777'>Having problems?</a>]</small>";

function occurrences(string, substring){
 var n=0;
 var pos=0;

 while(true){
  pos=string.indexOf(substring,pos);
  if(pos!=-1){ n++; pos+=substring.length;}
  else{break;}
 }
 return(n);
}

Now it gives a "too many image tags" warning if there are 30+ images, and it bails out of the image processing bit. If you want, you can put a confirm() bypass, but I find this way cleaner.

I don't really see much point in doing this, as any page with more than 30 images still works fine for me. But I don't know, what is it like for others?


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

Offline

 

#116 2012-01-02 09:30:00

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Adding the images back in to your scratch forum experience

rookwood101 wrote:

Hardmath123 wrote:

rookwood101 wrote:


You should probably put the extra code you added in the if statement, otherwise it will run on any page (in chome, not firefox).

But other than that, great! I tested it and it works perfectly!

I'll debug yours in a sec roijac (lunch)

Code:

// ==UserScript==
// @name          Image Enabler
// @namespace      rookwood101,Cocolover,LS97,flashgocrazy
// @description    Enable images, and allow Scratch projects and YouTube videos on forums with BBCode
// @include        http://scratch.mit.edu/forums/viewtopic.php*
// ==/UserScript==

if (document.URL.indexOf('http://scratch.mit.edu/forums/viewtopic.php') != -1) {
//Set title to fail
document.getElementById("brdtitle").innerHTML=document.getElementById("brdtitle").innerHTML+"<span id='imgtagenablerstatus'>Greasemonkey image tag enabler is goofing up. There may be an open tag or invalid image. <small style='color:#777777'>[<a href='http://scratch.mit.edu/forums/viewtopic.php?id=85177' style='color:#777777'>Report this bug!</a>]</small></span>";

//replace img tags
 var bodyElement = document.getElementsByTagName("body")[0];
 var bodyInner = bodyElement.innerHTML;
  
 if (occurrences(bodyInner, "[url]")<=30) {
  var imageurls = new Array();
  for (i=0;i<bodyInner.split(/\[img\]/i).length-1;i++) {
   imageurls[i] = bodyInner.split(/\[img\]/i)[i+1].split(/\[\/img\]/i)[0];
   if (imageurls[i].replace(/(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])?/i, "") != "") {
    imageurls[i] = 'http://img94.imageshack.us/img94/6045/invalidimage.png';
   }
  }
  var addImages = bodyInner;
  for (i=0;i<imageurls.length;i++) {
   addImages = addImages.replace(/\[img\](http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])?\[\/img\]/i, '<img style="max-width: 510px;" src="' + imageurls[i] + '" />');
  }
 }
 else
 {
    alert("There were too many images to display, so they have been omitted.");
 }
 
 //replace youtube tags
 var youtubeids = new Array();
 for (i=0;i<addImages.split(/\[youtube\]/i).length-1;i++) {
  youtubeids[i] = addImages.split(/\[youtube\]/i)[i+1].split(/\[\/youtube\]/i)[0];
  if (youtubeids[i].replace(/[a-zA-Z0-9\-_]+/, "") != "") {
   youtubeids[i] = 'dQw4w9WgXcQ';
  }
 }
 var addYoutube = addImages;
 for (i=0;i<youtubeids.length;i++) {
  addYoutube = addYoutube.replace(/\[youtube\]([a-zA-Z0-9\-_]+)\[\/youtube\]/i, '<iframe width="510" height="315" src="http://www.youtube.com/embed/' + youtubeids[i] + '"frameborder="0" allowfullscreen></iframe>');
 }
 
//replace project tags
  var projectpath = new Array();
 for (i=0;i<addYoutube.split(/\[scratch=flash\]/i).length-1;i++) {
  projectpath[i] = addYoutube.split(/\[scratch=flash\]/i)[i+1].split(/\[\/scratch\]/i)[0];
  if (projectpath[i].replace(/[a-zA-Z0-9]+\/[0-9]+/i, "") != "") {
   projectpath[i] = 'Mike16112/675815';
  }
 }
 var addProjects = addYoutube;
 for (i=0;i<projectpath.length;i++) {
  addProjects = addProjects.replace(/\[scratch=flash\]([a-zA-Z0-9]+\/[0-9]+)\[\/scratch\]/i, '<object width="483" height="387" type="application/x-shockwave-flash" data="http://scratch.mit.edu/static/misc/PlayerOnly.swf"><param name="allowScriptAccess" value="always"><param name="allowFullScreen" value="true"><param name="flashvars" value="project=http://scratch.mit.edu/static/projects/' + projectpath[i] + '.sb?version=1"></object>');
 }
 document.getElementsByTagName("body")[0].innerHTML = addProjects;
}

//Set title to success
document.getElementById("imgtagenablerstatus").innerHTML="Greasemonkey image tag enabler has completed running. <small style='color:#777777'>[<a href='http://scratch.mit.edu/forums/viewtopic.php?id=85177' style='color:#777777'>Having problems?</a>]</small>";

function occurrences(string, substring){
 var n=0;
 var pos=0;

 while(true){
  pos=string.indexOf(substring,pos);
  if(pos!=-1){ n++; pos+=substring.length;}
  else{break;}
 }
 return(n);
}

Now it gives a "too many image tags" warning if there are 30+ images, and it bails out of the image processing bit. If you want, you can put a confirm() bypass, but I find this way cleaner.

I don't really see much point in doing this, as any page with more than 30 images still works fine for me. But I don't know, what is it like for others?

Well, the block library freezes up pretty bad on FireFox 3.1 Mac, I haven't bothered to get GreaseMonkey working of Safari, which I have recorded to be over 15 times faster at string processing.


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#117 2012-01-02 10:15:53

muppetds
Scratcher
Registered: 2011-02-11
Posts: 1000+

Re: Adding the images back in to your scratch forum experience

for some reason it takes me to the code not the download file

safari browser


SCRATCH'S PARTLY INSANE RESIDENT 
http://internetometer.com/imagesmall/31691.pnghttp://bluetetrarpg.x10.mx/usercard/?name=muppetds

Offline

 

#118 2012-01-02 10:17:06

gbear605
Scratcher
Registered: 2008-03-06
Posts: 1000+

Re: Adding the images back in to your scratch forum experience

muppetds wrote:

for some reason it takes me to the code not the download file

safari browser

doesn't work for safari unless you install stuff.  see the op.


Yeah, I'm mostly inactive.  I check in once in a while though.  If you want to contact me, I have a contact form at my website, http://escratch.org

Offline

 

#119 2012-01-03 06:10:41

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

Re: Adding the images back in to your scratch forum experience

Hardmath123 wrote:

rookwood101 wrote:

Hardmath123 wrote:


Code:

// ==UserScript==
// @name          Image Enabler
// @namespace      rookwood101,Cocolover,LS97,flashgocrazy
// @description    Enable images, and allow Scratch projects and YouTube videos on forums with BBCode
// @include        http://scratch.mit.edu/forums/viewtopic.php*
// ==/UserScript==

if (document.URL.indexOf('http://scratch.mit.edu/forums/viewtopic.php') != -1) {
//Set title to fail
document.getElementById("brdtitle").innerHTML=document.getElementById("brdtitle").innerHTML+"<span id='imgtagenablerstatus'>Greasemonkey image tag enabler is goofing up. There may be an open tag or invalid image. <small style='color:#777777'>[<a href='http://scratch.mit.edu/forums/viewtopic.php?id=85177' style='color:#777777'>Report this bug!</a>]</small></span>";

//replace img tags
 var bodyElement = document.getElementsByTagName("body")[0];
 var bodyInner = bodyElement.innerHTML;
  
 if (occurrences(bodyInner, "[url]")<=30) {
  var imageurls = new Array();
  for (i=0;i<bodyInner.split(/\[img\]/i).length-1;i++) {
   imageurls[i] = bodyInner.split(/\[img\]/i)[i+1].split(/\[\/img\]/i)[0];
   if (imageurls[i].replace(/(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])?/i, "") != "") {
    imageurls[i] = 'http://img94.imageshack.us/img94/6045/invalidimage.png';
   }
  }
  var addImages = bodyInner;
  for (i=0;i<imageurls.length;i++) {
   addImages = addImages.replace(/\[img\](http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])?\[\/img\]/i, '<img style="max-width: 510px;" src="' + imageurls[i] + '" />');
  }
 }
 else
 {
    alert("There were too many images to display, so they have been omitted.");
 }
 
 //replace youtube tags
 var youtubeids = new Array();
 for (i=0;i<addImages.split(/\[youtube\]/i).length-1;i++) {
  youtubeids[i] = addImages.split(/\[youtube\]/i)[i+1].split(/\[\/youtube\]/i)[0];
  if (youtubeids[i].replace(/[a-zA-Z0-9\-_]+/, "") != "") {
   youtubeids[i] = 'dQw4w9WgXcQ';
  }
 }
 var addYoutube = addImages;
 for (i=0;i<youtubeids.length;i++) {
  addYoutube = addYoutube.replace(/\[youtube\]([a-zA-Z0-9\-_]+)\[\/youtube\]/i, '<iframe width="510" height="315" src="http://www.youtube.com/embed/' + youtubeids[i] + '"frameborder="0" allowfullscreen></iframe>');
 }
 
//replace project tags
  var projectpath = new Array();
 for (i=0;i<addYoutube.split(/\[scratch=flash\]/i).length-1;i++) {
  projectpath[i] = addYoutube.split(/\[scratch=flash\]/i)[i+1].split(/\[\/scratch\]/i)[0];
  if (projectpath[i].replace(/[a-zA-Z0-9]+\/[0-9]+/i, "") != "") {
   projectpath[i] = 'Mike16112/675815';
  }
 }
 var addProjects = addYoutube;
 for (i=0;i<projectpath.length;i++) {
  addProjects = addProjects.replace(/\[scratch=flash\]([a-zA-Z0-9]+\/[0-9]+)\[\/scratch\]/i, '<object width="483" height="387" type="application/x-shockwave-flash" data="http://scratch.mit.edu/static/misc/PlayerOnly.swf"><param name="allowScriptAccess" value="always"><param name="allowFullScreen" value="true"><param name="flashvars" value="project=http://scratch.mit.edu/static/projects/' + projectpath[i] + '.sb?version=1"></object>');
 }
 document.getElementsByTagName("body")[0].innerHTML = addProjects;
}

//Set title to success
document.getElementById("imgtagenablerstatus").innerHTML="Greasemonkey image tag enabler has completed running. <small style='color:#777777'>[<a href='http://scratch.mit.edu/forums/viewtopic.php?id=85177' style='color:#777777'>Having problems?</a>]</small>";

function occurrences(string, substring){
 var n=0;
 var pos=0;

 while(true){
  pos=string.indexOf(substring,pos);
  if(pos!=-1){ n++; pos+=substring.length;}
  else{break;}
 }
 return(n);
}

Now it gives a "too many image tags" warning if there are 30+ images, and it bails out of the image processing bit. If you want, you can put a confirm() bypass, but I find this way cleaner.

I don't really see much point in doing this, as any page with more than 30 images still works fine for me. But I don't know, what is it like for others?

Well, the block library freezes up pretty bad on FireFox 3.1 Mac, I haven't bothered to get GreaseMonkey working of Safari, which I have recorded to be over 15 times faster at string processing.

Yeh, when I test it on my mac (mac mini) it freezes up, obviously my pc with an intel i7 2600k is faster  big_smile

@Roijac - I tried what you were trying to do a slightly different way and still couldn't get it to work. I think this will be quite hard to do, but I'm sure we'll get there eventually.

@everyone can someone try and work on a fix for nXIII's forum blocks?


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

Offline

 

#120 2012-01-03 06:14:35

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Adding the images back in to your scratch forum experience

rookwood101 wrote:

Hardmath123 wrote:

rookwood101 wrote:


I don't really see much point in doing this, as any page with more than 30 images still works fine for me. But I don't know, what is it like for others?

Well, the block library freezes up pretty bad on FireFox 3.1 Mac, I haven't bothered to get GreaseMonkey working of Safari, which I have recorded to be over 15 times faster at string processing.

Yeh, when I test it on my mac (mac mini) it freezes up, obviously my pc with an intel i7 2600k is faster  big_smile

@Roijac - I tried what you were trying to do a slightly different way and still couldn't get it to work. I think this will be quite hard to do, but I'm sure we'll get there eventually.

@everyone can someone try and work on a fix for nXIII's forum blocks?

I think that would be easy. Just create a tag called [forumblocks] that operates just like the [img] tag, but instead of adding just image HTML, it adds the image HTML+the forum blocks http prefix.


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#121 2012-01-03 06:17:16

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

Re: Adding the images back in to your scratch forum experience

Hardmath123 wrote:

rookwood101 wrote:

Hardmath123 wrote:

Well, the block library freezes up pretty bad on FireFox 3.1 Mac, I haven't bothered to get GreaseMonkey working of Safari, which I have recorded to be over 15 times faster at string processing.

Yeh, when I test it on my mac (mac mini) it freezes up, obviously my pc with an intel i7 2600k is faster  big_smile

@Roijac - I tried what you were trying to do a slightly different way and still couldn't get it to work. I think this will be quite hard to do, but I'm sure we'll get there eventually.

@everyone can someone try and work on a fix for nXIII's forum blocks?

I think that would be easy. Just create a tag called [forumblocks] that operates just like the [img] tag, but instead of adding just image HTML, it adds the image HTML+the forum blocks http prefix.

I'm not quite sure what you mean by that.

Edit: oh I see, you mean someone would put [forumblocks][commmandblock(hole)][/forumblocks] like that?

Edit: Yeh that sounds pretty doable!

Last edited by rookwood101 (2012-01-03 06:18:49)


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

Offline

 

#122 2012-01-03 16:11:11

nickbrickmaster
Scratcher
Registered: 2010-02-02
Posts: 500+

Re: Adding the images back in to your scratch forum experience

Nexstudent wrote:

It doesn't work. When I click the download link, all it does is bring me to the script  hmm

Try then right-clicking and selecting "Save page as..."


Ask me what I'm doing, wait an hour than roll a die, if it's 4-6, I'm playing Skyrim, if it's 1, I'm eating, if it's 2-3 I'm programming.
Steam: nickbrickmaster | RotMG: PwnThemAll | Minecraft: nickbrickmaster | League Of Legends: BaneOfTitans

Offline

 

#123 2012-01-03 16:33:43

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

Re: Adding the images back in to your scratch forum experience

i have a suggestion:
[likebutton](id of a forum topic)[/likebutton]

should make one of rookwood's like buttons!


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

 

#124 2012-01-03 17:06:55

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

Re: Adding the images back in to your scratch forum experience

joefarebrother wrote:

i have a suggestion:
[likebutton](id of a forum topic)[/likebutton]

should make one of rookwood's like buttons!

Unfortunately, I don't have the time nor the resources to continue developing/hosting the like button system, so linking to it doesn't work, and won't for the foreseeable future.


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

Offline

 

#125 2012-01-04 13:39:04

muppetds
Scratcher
Registered: 2011-02-11
Posts: 1000+

Re: Adding the images back in to your scratch forum experience

gbear605 wrote:

muppetds wrote:

for some reason it takes me to the code not the download file

safari browser

doesn't work for safari unless you install stuff.  see the op.

I've installed the stuff


SCRATCH'S PARTLY INSANE RESIDENT 
http://internetometer.com/imagesmall/31691.pnghttp://bluetetrarpg.x10.mx/usercard/?name=muppetds

Offline

 

Board footer