We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexDiscussionExhibition › my blog
Pages: 1 2 
my blog (Read 4578 times)
my blog
Jun 17th, 2008, 9:27pm
 
http://r6753.blogspot.com/

I hacked together a blog on Google's blogger.com for a Processing gallery. I chose blogger because they let you do a lot of stuff like iframes and javascript and it seems to be working okay so far. Here's the code I use for the sidebar dealie that displays the sketches:

Code:

<div style="overflow:hidden; position:relative; bottom:0px; width:460px; height:500px; margin-left:-50px;">
<iframe id="appBox" scrolling="no" frameborder="0" width="520" style="overflow:visible; position:relative; top:-55px; width:500px;" src="" height="600">
java applet iframe
</iframe>
</div>

Then I use javascript links to set the src attribute of the iframe. Thought you guys might be interested.
Re: my blog
Reply #1 - Jun 22nd, 2008, 9:02pm
 
Rick,

I really like your blog! Using the sidebar for the applets was a good idea. I'm not sure if it's just me, but when I click to see the code for the applet, the first character of each line is cut off. I'm using Firefox 3.0.

Matthew
Re: my blog
Reply #2 - Jun 23rd, 2008, 12:17pm
 
Looks interesting. I have subscribed to the RSS feed. Smiley
Re: my blog
Reply #3 - Jun 23rd, 2008, 5:11pm
 
Quote:
the first character of each line is cut off


That is one of the problems with displaying the applets in that iframe. The area is not wide enough to display all the text. I wish I could find a way to fix that without editing all the auto-generated applets.

In Firefox you can right click on the text and go to "this frame > open frame in new tab (or window)." I don't know about other browsers. Any suggestions anyone?

Anyway, thanks for looking guys.
Re: my blog
Reply #4 - Jun 25th, 2008, 7:04am
 
I am often reluctant about the use of iframes, but here it is smart and well done. But indeed, despite my disliking of target attributes on links, here you might put a target="_blank" on the link to the source, to avoid the cut off effect.
Re: my blog
Reply #5 - Jun 25th, 2008, 4:17pm
 
I was kind of hoping to find an alternative to an iframe when I was making it. I think you can do the same basic thing with object tags and set the content to text/html. I thought I saw that somewhere but I haven't been able to find it again.

Changing the links to open in a new window would be okay, but then I would have to change each of the generated HTML files before uploading. I guess I shouldn't be so lazy but I was hoping to avoid that. You can always right click the source link and choose open in new window / tab.
Re: my blog
Reply #6 - Jul 25th, 2008, 5:26pm
 
Whoa great blog!  I'm a bit slow w/ respect to javascript and such.  All i want to do is post a processing sketch in my blog and I can't seem to work it out from the code you posted.  Can you give any further advice???
Re: my blog
Reply #7 - Jul 28th, 2008, 4:58pm
 
Can we have a link to your blog? Your options depend on what service you are blogging through.
Re: my blog
Reply #8 - Aug 5th, 2008, 7:18pm
 
Mmm, nice design! I may have to steal the replacing-iframe UI idea for my own Processing blog, which I never finished mainly because I just couldn't figure out how best to incorporate the applets themselves...
Re: my blog
Reply #9 - Aug 5th, 2008, 9:54pm
 
Thank you. Please do use it and finish your blog. Post it up here when you do. Web design can be frustrating but I would like to see it.
Re: my blog
Reply #10 - Aug 6th, 2008, 11:53am
 
Rick wrote on Jul 28th, 2008, 4:58pm:
Can we have a link to your blog Your options depend on what service you are blogging through.


it's a blogger blog like yours...

http://kurtisrandom.blogspot.com/

cheers
Re: my blog
Reply #11 - Aug 6th, 2008, 12:54pm
 
looks good!

Dunno if anyone is interested, but I'm doing kind of something similar using the jquery / thickbox modules (using drupal - probably modules for blogger/wordpress exist as well). I just upload the html generated from the PDE as is, then tell thickbox to launch that in its modal window with blacked background etc. If you don't have JavaScript it degrades gracefully to just launching the page.

code is pretty straightforward, you just give the link a class of "thickbox" and the module javascript takes care of the rest...

Code:

<a href="/files/memotv/fluid1/index.html?placeValuesBeforeTB_=savedValues&TB_iframe=true&width=1000&height=650&modal=true" class="thickbox">here</a>


It's not everyones cup of tea, but could be useful for some...

you can see it in in action at http://www.memo.tv/tags/processing_org (only the May 27, Nov 11 & Nov 10 posts have it) - click the red <here> to see it.
Re: my blog
Reply #12 - Aug 6th, 2008, 9:08pm
 
That works pretty well Memo! I may have a look at integrating something like that into my site (I'm currently creating a theme from scratch cos the current one looks terrible Smiley)

EDIT: should probably have clarified that I was talking about my own site looking terrible :p
Re: my blog
Reply #13 - Aug 20th, 2008, 9:02pm
 
Sorry, I somehow missed these latest posts.

I have modified the Blogger template so there is room on the left, the "sidbar", to fit my 400px sketches. The code I posted goes in a "gaget." On the layout page click "add gaget and choose the javascript/html one."

Then a link to put something in the box looks like this:
Code:

<a href="#7290801" onClick="document.getElementById('appBox').src = 'http://studentpages.scad.edu/~rbraue20/circleFrame/'">view this sketch</a>

Put the link to your sketch directory, or whatever you want to appear in the iframe, between the single quotes. The href= part is what it links to; here its an anchor link which can be created like this:
Code:

<a name="7290801"></a>

The page then scrolls to wherever the anchor link is when the above link is clicked. I really only put the anchor links in to make it show the standard hand cursor when you use the "view sketch" links and there is probably a better way to do that part.

I also tried ThickBox a while back before I started using this and had some trouble with it working on my local computer so I didn't use it. It might work better with the stuff actually online but I think I had to change the generated HTML to get it to work in IE6. Also it crashed browsers when I clicked the sketch to focus it and then hit ESC to close the box. I believe that was the scenario.

Anyway I hope that was helpful.

Edit: I can post my template if anyone wants it.
Re: my blog
Reply #14 - Sep 8th, 2008, 5:32pm
 
Right, I've made a blog at last, based on your general ideas! Thanks for that.

I've changed the detail of it quite a bit - I'm not sure why you didn't simply use links like <a href="http://oolong.co.uk/sc" target="appBox"> rather than resorting to JavaScript It seems much easier, but maybe I'm missing something!

I've also allowed scrollbars, because it annoys me when you can't access everything in a frame, and sometimes I like to include controls and things underneath an applet.

One other significant change is that I've added some JavaScript to resize the frame to fit the amount of available space, since there's no guarantee otherwise that the whole thing will fit onto any given screen - a danger of using fixed positioning.
Pages: 1 2