Tibor SzászInteraction matters

  • Home
  • About me
  • Projects
  • Reqest price offer
  • Contact me
  • RSS

2009 1112

nl2br() and the 'pre' element

If you ever struggled with converting new lines to "br" tags and keep the new lines inside the "pre" tags, then you will value this:

Although CodeIgniter has a nl2br_except_pre() function, it ignores the "pre" tags with attributes.

I've quickly looked through the official documentation of the nl2br() function just to save some time, and found a solution at the bottom of the page by Greywyvern. Unfortunetly it was too complex, so I modified it to my needs.

Press 'read more' to download the code.


Category: Programming - Tags: nl2br Read more

2008 0908

Dead simple MooTools slideshow

Szükségem volt egy kis slideshowra egy projecthez és ez lett a vége:
(1.2-es verzióhoz készült)

function slideShow( Obj ){
	// Version 0.2; Created by Kow, 2008; http://skyweb.hu/kow
	var pass = this;
	// initializing
	this.curImg = 0;
	this.slides = Obj;
	this.slides.each( function( img, index ){ 
		if( index > 0 ) img.fade(); 
		img.set('morph', { duration: 'long' });
	}, this);
	this.next = function(){
		pass.curImg++;
		this.slides.each( function( img, index ){ 
			img.morph({ opacity: 0 });
		}, this);
		if( pass.curImg == this.slides.length ) pass.curImg = 0;
		this.slides[ pass.curImg ].morph({ opacity: 1 });
	}
	this.prev = function(){
		pass.curImg--;
		this.slides.each( function( img, index ){ 
			img.morph({ opacity: 0 });
		}, this);
		if( pass.curImg < 0 ) pass.curImg = this.slides.length - 1;
		this.slides[ pass.curImg ].morph({ opacity: 1 });
	}
}

// Így kell bekapcsolni:
sshow = new slideShow( $$('div#gallery_image img') );

// 3 másodpercenként fog így képet váltani
sshow.next.periodical( 3000, sshow );
Ez a kis CSS még kell hozzá:
#gallery_image img{
	position: absolute;
	left: 0px;
	top: 0px;
}


Category: Programming - Tags: mootools javascript slideshow Read more

2008 0713

UTF-8 okosság

Nem csak az árvíztűrőtükörfúrógép létezik az UTF-8 karakterkészletben, hanem "ezzel a vicces eszközzel":http://www.revfad.com/flip.html felfedhető a karakternek a tökörképe is :) Viccesek voltak a fejlesztők, 2 ^31^ karakterben elég sokminden elférhet, végülis miért pont ezek maradnának ki :)

Érdemes elbogarászni a nagy hosszű legördülő menüben, mert olyan karatkereket találtam, amikről eddig gőzöm nem volt :)
A teljes készlet: http://www.utf8-chartable.de/

░░▓░░░▓░▓░░▓▓░▓▓▓▓░░
░░▓▓░░▓░▓░▓░░░▓░░░░░
░░▓░▓░▓░▓░▓░░░▓▓░░░░
░░▓░░▓▓░▓░▓░░░▓░░░░░
░░▓░░░▓░▓░░▓▓░▓▓▓▓░░


Category: Programming - Tags: utf8 Read more

‹ First  < 3 4 5 6 7 8 9 10 > 

Briefing

Me myself and I
I love coding, especially for the web. I'm in the online industry for 6 years. My favourite toys are:
JavaScript, PHP, XHTML, MySQL, Canvas, Flash
Váltás magyar nyelvre

Topics

  • Coffee break
  • Design & stuff
  • Generative arts
  • Programming
  • User experience

Friends

  • Kárpáti Róbert
  • Royaljerry
  • Bagi Zoltán
  • Pegazoo
  • Charles Alexander Deli
  • Bence Bangócs
  • Lunakid
  • Rapp design

Feeling so social

  • Facebook
  • IWIW
  • TurulMeme

Tags

javascript (14) php (6) mootools (5) iscaffold (4) codeigniter (4) tutorial (3) crud (3) structure-synth (2) renders (2) template (2) css (2) free (2) google (2) drupal (1) data-visualisation (1) resizing (1) canvas (1) soundcloud (1) wordpress (1) joomla (1) google-buzz (1) hack (1) script (1) rss (1) bermuda-triangle (1) interface (1) design, (1) transitions (1) easing (1) microsoft (1) windows8 (1) magyar (1) bugs (1) ie8 (1) experience (1) user (1) twitter (1) facebook (1) email (1) table (1) rc1 (1) nl2br (1) drag-and-drop (1) slideshow (1) wikipedia (1) dns (1) svg (1) experiment (1) firefox-extension (1) tagging (1) slimbox (1) bugfix (1) cfdg (1) lists (1) inspiration (1) data-uri (1) trick (1) forge (1) infovis (1) blackout (1) tabs (1) library (1) sitebuild (1) utf8 (1) class (1) ajax (1) konami-codes (1) open-source (1)




All rights reserved, ©2008-2012 - Built on CodeIgniter framework - Konami codes - Mostly Valid XHTML 1.1 - Valid CSS 2.1