Extract first image attached to post in Wordpress

Well, I found about two dozens of different plugins and other crap that promised to extract the first image of every post in Wordpress. This feature was crucial for my upcoming portfolio webpage, so I went on digging deeper. Thankfully I found the Blog Mum blog which gave me a profound yet creative solution. However, I had to have the height and width of my images(divs with background actually) embedded into the div’s style in order for my slider to work correctly. Thats when I made some adjustments to the code. This is my first time messing with wordpress script on this level so please excuse my PHP.

Functions.php hase this:

// Retrieve the src of first image in a post

function bm_extract_string($start, $end, $original) { $original = stristr($original, $start); $trimmed = stristr($original, $end); return substr($original, strlen($start), -strlen($trimmed)); } function getFirstImage() { $content = get_the_content(); $pic_string = bm_extract_string(’src=”‘,’” ‘,$content); $imagesize = getimagesize($pic_string); list($width, $height, $type, $attr) = getimagesize($pic_string); echo ‘< a href=”’.$link.’” style=”background:url(‘.$pic_string.’); display:block; width:’.$width.’px; height:’.$height.’px;”></a> ‘; }

and inside your index.php simply put this:

<?php getFirstImage(); ?>

Comments (View)

posted : Friday, August 7th, 2009

Reblog Notes Show

Tags : wordpress, php, embed image, first image, extract image, extract first image, get first image, getFirstImage, plugin, plug-in, more,

Bookmark and Share

Fluid Sculpture by Charlie Bucket. Visit his domain page at [← casualprofanity.com →] for many more samples of his liquid-tubing experiments.

When I saw this video for the first time I immediately though that this technique could be used to bend intravenous(I.V.) tubing into shape, for a more decadent effect. Something that Marilyn Manson might appreciate.

Comments (View)

posted : Saturday, May 30th, 2009

Reblog Notes Show

Tags : fluid sculpture, Charlie Bucket, casualprofanity, casual profanity, Marilyn Manson, more,

Bookmark and Share

posted : Saturday, May 30th, 2009

Reblog Notes Show

Tags : michel foucault, focault, free text, free, online, more,

Bookmark and Share

Generative Architecture and Scripting

I have been always a little bit envious of the SCI-ARCH teaching methodologies while studying architecture at the Carleton school of architecture. Their use of generative scripting technologies has been an avenue that I would have definitely loved to explore, and intent to do so in near future.

Below are a few videos that I managed to gather around YouTube that display some of the SCI-Arch student work. Unfortunately, most of the scripting in these videos is utilized towards the pragmatic purpose of physical form. I’d like to believe the calculative abilities of a computed should rarely be utilized for the generation of form, since it is an unnatural adaptation of the computer’s strengths.

It seems that while in my earlier years professors often avoided talking about ergonomics and use or statistical data with regards to architecture. They found those issues boring and unfruitful in the process of designing and preferred to leave those for the engineers and sociologists. I however always believed in a potential in marrying those sociological and calculative aspects with my architecture. This is really where I would like to see the architectural scripting to go.

Formally this work is exceptional:

Comments (View)

posted : Wednesday, March 4th, 2009

Reblog Notes Show

Tags : architecture, generative, more, sci-arch, script, scripting, txtvideo, architect, architectural, design, gener8,

Bookmark and Share

Andrew King Studio - Ottawa, ON, Canada

Artist: Andrew King

I’m usually very picky with my art taste. Nothing really suits my fancy. It is as if I am in my 100th time living as a human, and I have seen it all. However, this week I was very pleasantly surprised to find a very talented Ottawa artist Andrew King. The hints of humour or even sarcasm may seem shallow to some but I find those novel and nostalgic. I haven’t seen many works of art that can make one smile. [ ←Andrew King’s official homepage ]

Andrew King’s work is now exhibited at the Terence Robert Gallery(TRG Sussex Drive, Ottawa.) [ link ]

More more of his paintings:

Comments (View)

posted : Wednesday, March 4th, 2009

Reblog Notes Show

Tags : andrew king, art, king andrew, more, ottawa, studio, funny, sarcasm, sarcastic,

Bookmark and Share

Mac vs. PC: or Apple's deathmatch

I’m an avid user of the computer. I have used it for over 8 hours a day, every day, for the past 15 years. I have thoroughly used DOS 3 to 6.22; Windows 3.1, 3.11, 95, NT, 98, 98SE, 2000, Me, XP, Longhorn, and Vista; I used Mac OS 8 to 10.4.11; as well as Linux distros Ubuntu 6 to 8.10, Mandrake, and RedHat. When I say that I used the computer thoroughly I mean that I used: Word and text processors, games, video editing, sound editing, sound composing, image editing and composing, worked with a plethora of 3D modelers, played music, formatted, partitioned, installed, burned, anti-vired, dismantled the hardware, rewired, and upgraded hardware, watched films, chatted, blogged, surfed, programmed and coded numerous scripts, did web and graphic design, used torrents, p2p networks, hacked and customized every single bit of data in all of the above to the highest degree of my capability. Please correct me if I missed something here.

Having said the above I consider my opinion regarding the “PC vs. Mac” very competent. Therefore, I will try to review this issue from all the perspectives known to me. Feel free to argue with me, or correct me. If there are things i missed let me know. I’m open to criticism!

Typical Claims: Mac is better than PC:

Mac is Apple Macintosh, a registered trade mark of a proprietary computer hardware, software, and consumer electronics giant. P.C. stands for Personal Computer. This statement and suchlike are obviously made by an extremely incompetent person. Possible translations: 1. Current Mac OS is better than current installable PC OS; 2. Mac hardware is better then any available hardware used to construct PCs; 3. Windows and/or programs available for a Windows OS is less capable then that of a Mac OS. 4. Mac has the perfect balance between function and look. 5. Mac is Minimalist. 6. There are no viruses in Mac.

#1 Current Mac OS is better than current installable PC OS:

Currently, there are a hundred plus Linux distros available to be installed on any modern personal computer. There are Windows, Unix, FreeBSD, and many more others, including micro OSs used in handhelds, productions houses, design ateliers and etc. To claim that Mac OS is the absolute best then any other is to try ALL available ones. I believe there is only a hand full of people that attempted to try out at the most 50% of those. Most importantly, Mac OS is installed on a PC because Mac is a Personal Computer, by definition.

#2 Mac hardware is better then any available hardware used to construct PCs;

Once again Mac is a PC (personal computer), it is constructed out of available PC hardware. Today’s Macs run on Intel powered computers which means that all of the hardware available in a Mac is also available for a PC or an equivalent of such can be attained. In fact for the price of any current Mac a more powerful PC could be assembled. The only thing exclusive to a Mac is the box and a built in chip that acts like a key to allow Mac OS installation.

#3 Windows and/or programs available for a Windows OS are less capable then that of a Mac OS

One must be very bored to have tried all available software alternatives in both OSes. I assure you that windows by far has more software written for it than any other OS in existence. I love to hear what people come up with when they show off the capabilities of their Mac Books. Usually, these people just couldn’t or didn’t want to find that function on a Windows, or they don’t realize that Windows is evolving in parallel to Mac OS.

#4 Mac has the perfect balance between function and look(this one is the most popular amongst the hipsters)

While functions is comparable in both there are uncountable PC models and looks that one would discover if they made a thorough search. Moreover, you simply cannot beat the functionality offered by paying only one third of a price, which is what many clone PC vendors offer.

#5 Mac is Minimalist (i love this one)

Is minimalism a good thing or bad? I bet most people coming with this statement have no idea what minimalism constitutes. I’d say Mac’s design is usually economical, or even utilitarian, rather than than minimalist in comparison to many others. Most of the finer intricacies found in Windows and Linux systems are simply not offered in Mac OS, because those ‘confuse’ the casual user.

#6 There are no viruses in Mac.

Is this something you heard from a FutureShop electronics representative? So did I. I laughed really hard at their naivety. Viruses are an issue that come with a territory. Windows is more widespread and thus it is also more widespread amongst the community hacker and virus scripters. The more popular Mac would gets the more viruses there will be designed for it. in fact, Symantec is already manufacturing an anti-virus for Mac Os [Link]. Of course the Mac one costs more than the PC one, even though there are tens of years of experience of fighting with malware on a PC. Mac users are paying for quality? I don’t think so. More over, if Windows users payed for every bit of software on their computer and only used the Internet for professional needs the wouldn’t have encountered any viruses in the first place.

In conclusion, a person that prefers a Mac must admit that:

-either they are a mainstream consumer that judges the computer industry simply from what is readily available on a shelf in a computer store or from what is found in the first 4 items appearing on Google.com search.

-or They simply prefer the look of a Mac computer, or prefer the user interface of a Mac OS.

The problem, really, is that this choice is often made without making the slightest attempt to do any research! Many don’t know that there are lighter and slimmer laptops out there than even the Mac Air. That Mac OS can run on any PC, as well as Linux can run on any. They don’t know that Windows and Linux can be made to look identical to Mac Os in addition to an infinitely growing amount of looks and feels of UIs available; all that to no additional cost.

Comments (View)

posted : Tuesday, February 24th, 2009

Reblog Notes Show

Tags : Anti-virus, Dos, Mac, Mac OS, OS X, P.C., PC, Personal Computer, antivirus, apple, apple macintosh, design, hardware, mac, macintosh, minimal, minimalism, more, no viruses, price, review, symantec, viruses, vista, win xp, windows vista, windows xp, winxp, xp, distro,

Bookmark and Share

MP3's are evil !

A standard CD is recorded with an audio stream of 1411 kbits/sec, while most mp3’s found and purchased on the wed have the stream of 128-320 kbits/sec. It is regardless of what compression methods, optimization techniques, or filtering that were used to create the MP3, MP4, or WMA,  the result will always contain only a fraction of the original information. It then comes as not surprise that many claim that they cannot hear the difference between a 128 kbits/sec and 320 kbits/sec MP3. It is simply because we are progressively loosing our ability to hear such subtleties the more we listen to lossy content.

We are becoming a culture that in not only incapable to appreciate a good pair of headphones but one that looses it’s ability to process natural sounds, as the listenership rates rise.

In a brief essay Pantelis Vassilakis describes in simple terms the consequences of listening to lossy music(mp3) and makes suggestions to avoid the degeneration of hearing:

← Read the source article →

Comments (View)

posted : Friday, February 6th, 2009

Reblog Notes Show

Tags : mp3, listen, litenting, 320, 128, 192, 160, kbit/sec, kbits/s, mp3, mp4, wma, acc, lossy, music, degenerate, more,

Bookmark and Share

Visions of Luigi Colani

Form follows emotion, not function - Luigi Colani

http://lh5.ggpht.com/abramsv/SDppUiFUY6I/AAAAAAAAR18/sV-P-7TRYvI/s640/Colani-C112Back.jpg

Although, these concepts may look clumsy they are rather inventive, and could challenge some of today’s ideals. How can one ignore these tacky but ingenious Mercedes windshield wipers?

Luigi Colani’s Mercedes Trucks:

Motorbike:

Piano:

T.V.:

Source article:

no.1: ← Dark Roasted Blend:Extravagant Designs by Luigi Colani →

no.2: ← Dark Roasted Blend:Concept Trucks by Luigi Colani →

no.3: ← the new cafe racer > society →

no.4: ← haha.nu - Luigi Colani’s Designs →

no.5: ← Luigi Colani -Telegraph →

no.6: ← Form follows emotion, not funcion →

Comments (View)

posted : Tuesday, February 3rd, 2009

Reblog Notes Show

Tags : Form follows emotion, not function, Colani, Extravagant, Luigi Colani, concept train, concept truck, design, futurism, futurist, mercedes, trucks, visions, more,

Bookmark and Share

Source: ← The Blackheart Gang: The Tale of How 2006 →

Here’s some more great animation by the Blackheart Gang:

Sea Orchestra:

Ringo:

Here are some of their shor films and ads:

Comments (View)

posted : Sunday, February 1st, 2009

Reblog Notes Show

Tags : 3d, HP Unity Tree, Heart Foundation, Menoclove Forte, Pepsi - Escape, animated, animation, black heart, black heart gang, blackheart, blackheart gang, gang, ringo, sea orchestra, tale, the tale of how, more,

Bookmark and Share

Drumming on a roller-coaster - Tommy Lee - Drum Solo (Live 1987)

Comments (View)

posted : Sunday, February 1st, 2009

Reblog Notes Show

Tags : Mötley Crüe, band, drum, drums, metal, motley crew, rocker, roller-coaster, rollercoaster, solo, tommy lee, more,

Bookmark and Share

REVEL IN NEW YORK: Documentaries

REVEL IN NEW YORK is a series about the people of New York City. We take you into their worlds and reveal their personal tastes and subjective recommendations.” These are an extraordinary collection of documentaries that renders a whole new north American subcultural niche. These are no hipsters. They cannot be denied. Here are some noteworthy episodes:

Tod Sellie

Emily’s Feet

Pidgeon lady

← Official Webpage →

← Official video chanel on blip.tv →

Comments (View)

posted : Monday, January 26th, 2009

Reblog Notes Show

Tags : art, blip.tv, culture, documentary, emily's feet, film, more, new york, pidgeon lady, revel in new york, subculture, tod sellie, txtvideo,

Bookmark and Share

The holiest of cinema has finally turned mainstream with this panache. What do we got here: Quay Brothers, Alejandro Jodorowsky, the whole Blade Runner, Yan Svankmajer, etc.

this is Timbuktu - Välj Mej (video)

I guess I’m shooting myself in the foot. I am all about plagearism and collaboration. However, now I start tu question myself - maybe the fine tools are not for the kids…

Comments (View)

posted : Sunday, January 25th, 2009

Reblog Notes Show

Tags : Alejandro Jodorowsky, Blade Runner, Quay Brothers, Svankmajer, Yan Svankmajer, collaboration, more, music, plagearism, music video,

Bookmark and Share

Art Gallery of Ontario

Walker Court & Baroque Stair Photo: AGO Photographer Sean Weaver © 2008 Art Gallery of Ontario.Last week I was in Toronto to celebrate the New Year with the family and took the opportunity to visit the newly renovated Art Gallery of Ontario (AGO). As a student of architecture I was not particularly impressed with the Frank Gehry touch, despite all the positive review I’ve been hearing. The facade seamed detached and off scale while the exhibition spaces were crowded and non stimulating the viewing. Of note is the greenhouse-like indoor garden, which felt refreshing in the midst of downtown. Also, the spiraling bent wood interior stair case suspended above the main atrium, was a treat, creating a very challenging and surreal atmosphere. I felt that it was an adequate mood setter for the entering people.

Img: Walker Court & Baroque Stair
Photo: AGO Photographer Sean Weaver © 2008 Art Gallery of Ontario.

In terms of art I was very impressed with the large collection of great Canadian art, which I believe made the trip truelly worthwhile. Below are some of the more memorable of the art pieces to me:

Yves Tanguy - The satin pillow  ↓

Yves Tanguy. Satin Pillow. 1929. Oil on canvas. 131 x 97 cm. (Art Gallery of Ontario, Toronto, Ontario).

Henry Moore - Helmet Head No. 2  ↓

Helmet Head No.2 1950

Mary Frances Pratt - The Service Station  ↓

The Service Station

Faith Ringgold - The American People Series: Die  ↓

The American People Series #20: Die. 1967

Denyse Thomasos - Metropolis  ↓

Denyse Thomasos, “Metropolis” (2007). Acrylic on canvas. 7 x 11 ft.

Wangechi Mutu - This you call Civilization?  ↓

"This you call Civilization?", 2008, Mixed media, ink, collage, contact paper on Mylar, 98" x 52"

Comments (View)

posted : Friday, January 9th, 2009

Reblog Notes Show

Tags : Denyse Thomasos, Faith Ringgold, Henry Moore, Mary Pratt, Michael Snow, Wangechi Mutu, Yves Tanguy, ago, art, gallery, long, more, ontario, toronto, Frank Gehry, Architecture, review,

Bookmark and Share
[Flash 9 is required to listen to audio.]
playcount:15 | ←Source→

The song is”…By a band called «Chailift», a trio from Brooklyn, New York. They have been together for a couple of years, but the group has already put together a ridiculously infectious album called, «Does you, inspire you». You should definitely check out the whole CD because there are a lot of standout tracks but this is the one getting the most attention; it is called «Bruises»…” -MPR Music, Robin Hilton. The song is featured on the 2008 Apple iPod nano commercial. Regardless of my bios, if feel that these guys are really up to stuff with their commercial music selection.

Comments (View)

posted : Thursday, December 25th, 2008

Reblog Notes Show

Tags : Ipod, apple, band, bruises, chairlift, chairlift, commercial, mac, music, nano, robin hilton, more,

Bookmark and Share

This is the video I presented along with the «Intertext» painting.

← See details →

Comments (View)

posted : Thursday, December 25th, 2008

Reblog Notes Show

Tags : Tom Dubicanac, acrylic, architectural, architecture, colaborate, lady, more, nude, open source, opensource, paint, painting, surreal, surrealism, white house, white house redux, wiki, woman,

Bookmark and Share