<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jayj.dk &#187; Tips &amp; Tricks</title>
	<atom:link href="http://jayj.dk/category/tips-tricks/feed/" rel="self" type="application/rss+xml" />
	<link>http://jayj.dk</link>
	<description>Blog, portfolio, templates</description>
	<lastBuildDate>Mon, 06 Sep 2010 15:51:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>5 WordPress tricks</title>
		<link>http://jayj.dk/5-wordpress-tricks/</link>
		<comments>http://jayj.dk/5-wordpress-tricks/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 13:43:11 +0000</pubDate>
		<dc:creator>Jesper</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://jayj.dk/?p=641</guid>
		<description><![CDATA[I denne uge har jeg gravet 5 WordPress tricks frem, som jeg vil dele med jer. Der er alt lige fra &#8220;shortcodes&#8221; til hvordan man gør sit tema oversættelse klar. Mastering WordPress Shortcodes WordPress Configuration Tricks Brug custom taxonomies til at lave en filmdatabase Fjern en kategori fra dit RSS Feed Gør dit tema oversættelse [...]]]></description>
			<content:encoded><![CDATA[<p>I denne uge har jeg gravet 5 WordPress tricks frem, som jeg vil dele med jer. Der er alt lige fra &#8220;shortcodes&#8221; til hvordan man gør sit tema oversættelse klar.</p>
<h3>Mastering WordPress Shortcodes</h3>
<p><a href="http://www.smashingmagazine.com/2009/02/02/mastering-wordpress-shortcodes"><img src="http://jayj.dk/wp-content/uploads/wordpress_shortcodes_3.jpg" alt="Wordpress Shortcodes" title="Wordpress Shortcodes" width="599" height="150" class="size-full wp-image-599" /></a></p>
<p><span id="more-641"></span></p>
<h3>WordPress Configuration Tricks</h3>
<p><a href="http://diggingintowordpress.com/2009/06/wordpress-configuration-tricks"><img src="http://jayj.dk/wp-content/uploads/wp_config.jpg" alt="WP-Config" title="WP-Config" width="599" height="150" class="size-full wp-image-613" /></a></p>
<h3>Brug custom taxonomies til at lave en filmdatabase</h3>
<p><a href="http://justintadlock.com/archives/2009/06/04/using-custom-taxonomies-to-create-a-movie-database"><img src="http://jayj.dk/wp-content/uploads/movie_database.jpg" alt="Lav en filmdatabase" title="Lav en filmdatabase" width="599" height="150" class="size-full wp-image-615" /></a></p>
<h3>Fjern en kategori fra dit RSS Feed</h3>
<p><a href="http://yoast.com/exclude-category-feed/"><img src="http://jayj.dk/wp-content/uploads/remove_cat.jpg" alt="Fjern kategori fra RSS Feed" title="Fjern kategori fra RSS Feed" width="599" height="150" class="size-full wp-image-616" /></a></p>
<h3>Gør dit tema oversættelse klar</h3>
<p><a href="http://www.wprecipes.com/make-your-wordpress-theme-translatable"><img src="http://jayj.dk/wp-content/uploads/flags.jpg" alt="Gør dit tema oversættelse klar" title="Gør dit tema oversættelse klar" width="599" height="150" class="size-full wp-image-619" /></a></p>
<p>Kender du andre gode WordPress tutorials du vil dele med os andre? Så skriv en kommentar med linket til den <img src='http://jayj.dk/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://jayj.dk/5-wordpress-tricks/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Kategori tag cloud</title>
		<link>http://jayj.dk/kategori-tag-cloud/</link>
		<comments>http://jayj.dk/kategori-tag-cloud/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 14:03:58 +0000</pubDate>
		<dc:creator>Jesper</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[kategori]]></category>
		<category><![CDATA[tag]]></category>

		<guid isPermaLink="false">http://jayj.dk/?p=650</guid>
		<description><![CDATA[Hvis du bruger WordPress kender du garanteret til &#8220;Tag cloud&#8221;, som er de mest bruge tags i sky-format. Afhængigt af hvordan din WordPress blog er oprettet, kan du have interesse i at vise dine WordPress-tags til dine læsere. Er du bare helt lost og aner ikke hvad jeg snakker om? Ta&#8217; et kig på dette [...]]]></description>
			<content:encoded><![CDATA[<p>Hvis du bruger WordPress kender du garanteret til &#8220;Tag cloud&#8221;, som er de mest bruge tags i sky-format. Afhængigt af hvordan din WordPress blog er oprettet, kan du have interesse i at vise dine WordPress-tags til dine læsere. Er du bare helt lost og aner ikke hvad jeg snakker om? Ta&#8217; et kig på dette billede, så får du måske en idé om det! <img src='http://jayj.dk/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><img src="http://jayj.dk/wp-content/uploads/tagcloud.png" alt="Wordpress tag cloud" title="Wordpress tag cloud" width="294" height="348" class="size-full wp-image-570" /></p>
<p>Fra og med WordPress 2.8 som udkom for nogle dage siden er det nu ikke kun muligt at vise tags, det er også muligt at vise kategorier og link kategorier.</p>
<p>Dette er koden til den normale tag sky:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_tag_cloud<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p><a href="http://codex.wordpress.org/Template_Tags/wp_tag_cloud">Du kan læse i codexet om wp_tag_cloud</a></p>
<p>Hvis du går ned til taxonomy, kan du se at <code>category</code> er det der laver Kategori skyen</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_tag_cloud<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'taxonomy=category'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p><img src="http://jayj.dk/wp-content/uploads/kategoricloud.png" alt="Wordpress kategori cloud" title="Wordpress kategori cloud" width="291" height="237" class="size-full wp-image-577" /></p>
]]></content:encoded>
			<wfw:commentRss>http://jayj.dk/kategori-tag-cloud/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lav en simpel hjemmeside på få minutter</title>
		<link>http://jayj.dk/lav-en-simpel-hjemmeside-pa-fa-minutter/</link>
		<comments>http://jayj.dk/lav-en-simpel-hjemmeside-pa-fa-minutter/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 13:32:33 +0000</pubDate>
		<dc:creator>Jesper</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[hjemmeside]]></category>

		<guid isPermaLink="false">http://jayj.dk/?p=629</guid>
		<description><![CDATA[Sad forleden og kiggede på nogle tutorials på Net.tutsplus.com og CSS-tricks.com om hvordan de lavede “screencasts”… Fik selv lyst til at lave en simpel, super nedern en &#8211; Så det har jeg gjort Det er nok en udmærket video for nye, da den hjemmeside er meget simpel. Selve videoen er på 8 minutter, og uden [...]]]></description>
			<content:encoded><![CDATA[<p>Sad forleden og kiggede på nogle tutorials på Net.tutsplus.com og CSS-tricks.com om hvordan de lavede “screencasts”… Fik selv lyst til at lave en simpel, super nedern en &#8211; Så det har jeg gjort <img src='http://jayj.dk/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Det er nok en udmærket video for nye, da den hjemmeside er meget simpel. Selve videoen er på 8 minutter, og uden lyd &#8211; Så forbred dig på 8 kedelige minutter xD</p>
<p><a href="http://s88.photobucket.com/albums/k189/JayJay_999/video/?action=view&#038;current=Createasimplewebsite.flv">Se i fuld størrelse</a></p>
<p><object type="application/x-shockwave-flash" width="448" height="361" data="http://s88.photobucket.com/flash/player.swf?file=http://vid88.photobucket.com/albums/k189/JayJay_999/video/Createasimplewebsite.flv"><param name="movie" value="http://s88.photobucket.com/flash/player.swf?file=http://vid88.photobucket.com/albums/k189/JayJay_999/video/Createasimplewebsite.flv"></param><param name="wmode" value="transparent"></param>
</object></p>
<p>Opdatering 01/11:</p>
<p>Du kan nu downloade en opdateret version her</p>
<div class="download"><a href="http://jayj.dk/download/7" title="Download Simpel Hjemmeside">Download Simpel Hjemmeside</a><br /><small>91 downloads</small></div>
]]></content:encoded>
			<wfw:commentRss>http://jayj.dk/lav-en-simpel-hjemmeside-pa-fa-minutter/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>BBKode</title>
		<link>http://jayj.dk/bbkode/</link>
		<comments>http://jayj.dk/bbkode/#comments</comments>
		<pubDate>Mon, 11 May 2009 13:48:49 +0000</pubDate>
		<dc:creator>Jesper</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[bbkode]]></category>
		<category><![CDATA[gæstebog]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://jayj.dk/?p=647</guid>
		<description><![CDATA[Som jeg lovede i mandags, vil jeg i dag skrive hvordan man tilføjer BBkode til gæstebogen (Det kan også bruges til andre ting). Du kender garanteret bbkode fra forums og lignende. Når du for eksempel vil skrive med fed tekst, skriver du [b]din tekst[/b] og det giver så resultatet &#8220;din tekst&#8221; Niels Gamborg&#8217;s gæstebog Se [...]]]></description>
			<content:encoded><![CDATA[<p>Som jeg lovede i mandags, vil jeg i dag skrive hvordan man tilføjer BBkode til gæstebogen (Det kan også bruges til andre ting). Du kender garanteret bbkode fra forums og lignende. Når du for eksempel vil skrive med fed tekst, skriver du [b]din tekst[/b] og det giver så resultatet <strong>&#8220;din tekst&#8221;</strong></p>
<div class="download">
<a href="http://www.nielsgamborg.dk/?p=php&#038;u=gaestebog_script">Niels Gamborg&#8217;s gæstebog</a><br />
<a href="http://jayj.dk/gastebog">Se demo</a>
</div>
<p>I denne tutorial vil jeg gå ind over hvordan du får URL, fed, kursiv, understreget , gennemstreget, overstreget, farvet tekst, og smileys til at virke.<br />
Lav en ny php fil, og kald den bbkode.php (lig den i samme mappe som din gæstebog fil)</p>
<p>Til at tjekke om brugeren har skrevet nogle bbkoder vil vi bruge &#8220;preg_replace&#8221;. Jeg er ikke ekspert til at forklare, så hvis du vil vide mere om det, kan jeg anbefale videoerne <a href="http://blog.themeforest.net/screencasts/a-crash-course-in-regular-expressions">A Crash-Course in Regular Expressions</a> og <a href="http://blog.themeforest.net/screencasts/diving-into-php-day-7">Diving into php day 7</a> &#8211; Begge af Jeffrey Way. Du kan prøve at google det for at få mere at vide. </p>
<p>Først skal vi lave en funktion.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">function</span> bbkode<span style="color: #009900;">&#40;</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
&nbsp;
<span style="color: #009900;">&#125;</span> 
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p><span id="more-647"></span></p>
<p>Først tjekker vi efter fed tekst. Hvis brugeren har skrevet [b]noget tekst og [/b], laver den dem om til html tagget strong, som giver fed tekst.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">function</span> bbkode<span style="color: #009900;">&#40;</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
      <span style="color: #666666; font-style: italic;">// Tjekker efter fed tekst</span>
      <span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;(\[b\](.+?)\[\/b])is&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'&lt;strong&gt;$1&lt;/strong&gt;'</span><span style="color: #339933;">,</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> 
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Det samme skal vi sådan set bare gøre for resten af vores bbkoder.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">function</span> bbkode<span style="color: #009900;">&#40;</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
         <span style="color: #666666; font-style: italic;">// Tjekker efter fed tekst</span>
        <span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;(\[b\](.+?)\[\/b])is&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'&lt;strong&gt;$1&lt;/strong&gt;'</span><span style="color: #339933;">,</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
         <span style="color: #666666; font-style: italic;">// Tjekker efter [i] og [/i] Kursiv</span>
        <span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;(\[i\](.+?)\[\/i\])is&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'&lt;i&gt;$1&lt;/i&gt;'</span><span style="color: #339933;">,</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">// Tjekker efter [u] og [/u] Understreget</span>
        <span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;(\[u\](.+?)\[\/u\])is&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'&lt;span style=&quot;text-decoration: underline;&quot;&gt;$1&lt;/span&gt;'</span><span style="color: #339933;">,</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">// Tjekker efter [s] og [/s] Gennemstreget</span>
        <span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;(\[s\](.+?)\[\/s\])is&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'&lt;span style=&quot;text-decoration: line-through;&quot;&gt;$1&lt;/span&gt;'</span><span style="color: #339933;">,</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">// Tjekker efter [o] og [/o] Overstreget</span>
        <span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;(\[o\](.+?)\[\/o\])is&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'&lt;span style=&quot;text-decoration: overline;&quot;&gt;$1&lt;/span&gt;'</span><span style="color: #339933;">,</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">// Tjekker efter [color] og [/color] Farver teksten alt efter hvilken farve brugeren har indtastet</span>
        <span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;(\[color=(.+?)\](.+?)\[\/color\])is&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&lt;span style=<span style="color: #000099; font-weight: bold;">\&quot;</span>color: <span style="color: #006699; font-weight: bold;">$1</span><span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;<span style="color: #006699; font-weight: bold;">$2</span>&lt;/span&gt;&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">// Tjekker efter [size] og [/size] Gør teksten større er mindre </span>
        <span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;(\[size=(.+?)\](.+?)\[\/size\])is&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&lt;span style=<span style="color: #000099; font-weight: bold;">\&quot;</span>font-size: <span style="color: #006699; font-weight: bold;">$1px</span><span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;<span style="color: #006699; font-weight: bold;">$2</span>&lt;/span&gt;&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
       <span style="color: #666666; font-style: italic;">// Linjeskift med [br]</span>
       <span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;(\[br])is&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&lt;br /&gt;&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> 
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Når vi kommer til links bliver det hele lidt mere kompliceret. Først skal vi tjekke om det rent faktisk er en url. Det er nok ikke den bedste måde at gøre det på, men det virker. Hvis du kender til en bedre metode, så skriv gerne en kommentar!</p>
<p><i>Bemærk: Du skal stadig skrive denne kode mellem { } (jeg har tilføjet det over den fede tekst)</i></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Er det en URL?</span>
<span style="color: #000088;">$URLSearchString</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;a-zA-Z0-9\:\/\-\?\&amp;\.\=\_\~\#\'&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/\[url\]([<span style="color: #006699; font-weight: bold;">$URLSearchString</span>]*)\[\/url\]/&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'&lt;a href=&quot;$1&quot; target=&quot;_blank&quot;&gt;$1&lt;/a&gt;'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;(\[url\=([<span style="color: #006699; font-weight: bold;">$URLSearchString</span>]*)\](.+?)\[/url\])&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'&lt;a href=&quot;$1&quot; target=&quot;_blank&quot;&gt;$2&lt;/a&gt;'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Nu kan brugeren både skrive [url="http://jayj.dk]Tekst[/url] og [url]http://jayj.dk[/url]. Forskellen er at i den første kan man selv bestemme hvilken tekst linket skal have. Som du nok har set er der tilføjet target=&#8221;_blank&#8221; i linket. Det gør bare at linket åbner i et nyt vindue, bare fjern det hvis du ikke vil have det.</p>
<p>Du kan også tilføje smileys, men til det kan vi ikke bruge preg_replace. Vi skal bruge str_replace, fordi vi ikke bruger regular expressions. Læs mere om <a href="http://dk2.php.net/str_replace">str_replace i PHP Manualen</a>.<br />
Du kan selvfølgelig tilføje mange flere smileys end det her.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">// Tjekker efter smileys</span>
<span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;:)&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&lt;img src=<span style="color: #000099; font-weight: bold;">\&quot;</span>LINK TIL SMILEY<span style="color: #000099; font-weight: bold;">\&quot;</span> /&gt;&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;:D&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&lt;img src=<span style="color: #000099; font-weight: bold;">\&quot;</span>LINK TIL SMILEY<span style="color: #000099; font-weight: bold;">\&quot;</span> /&gt;&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Tilføj så</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">return</span> <span style="color: #000088;">$text</span><span style="color: #339933;">;</span></pre></div></div>

<p>lige før }</p>
<p>Sådan her ser det færdig script ud:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
<span style="color: #666666; font-style: italic;">// BBkode af Jayj.dk</span>
<span style="color: #000000; font-weight: bold;">function</span> bbkode<span style="color: #009900;">&#40;</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span>
       <span style="color: #009900;">&#123;</span>
	<span style="color: #666666; font-style: italic;">// Er det en URL?</span>
            <span style="color: #000088;">$URLSearchString</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;a-zA-Z0-9\:\/\-\?\&amp;\.\=\_\~\#\'&quot;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// Udfører URL søgning </span>
            <span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/\[url\]([<span style="color: #006699; font-weight: bold;">$URLSearchString</span>]*)\[\/url\]/&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'&lt;a href=&quot;$1&quot; target=&quot;_blank&quot;&gt;$1&lt;/a&gt;'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;(\[url\=([<span style="color: #006699; font-weight: bold;">$URLSearchString</span>]*)\](.+?)\[/url\])&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'&lt;a href=&quot;$1&quot; target=&quot;_blank&quot;&gt;$2&lt;/a&gt;'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #666666; font-style: italic;">// Tjekker efter [b] og [/b] Fed</span>
            <span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;(\[b\](.+?)\[\/b])is&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'&lt;strong&gt;$1&lt;/strong&gt;'</span><span style="color: #339933;">,</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #666666; font-style: italic;">// Tjekker efter [i] og [/i] Kursiv</span>
            <span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;(\[i\](.+?)\[\/i\])is&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'&lt;i&gt;$1&lt;/i&gt;'</span><span style="color: #339933;">,</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #666666; font-style: italic;">// Tjekker efter [u] og [/u] Understreget</span>
            <span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;(\[u\](.+?)\[\/u\])is&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'&lt;span style=&quot;text-decoration: underline;&quot;&gt;$1&lt;/span&gt;'</span><span style="color: #339933;">,</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #666666; font-style: italic;">// Tjekker efter [s] og [/s] Gennemstreget</span>
            <span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;(\[s\](.+?)\[\/s\])is&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'&lt;span style=&quot;text-decoration: line-through;&quot;&gt;$1&lt;/span&gt;'</span><span style="color: #339933;">,</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #666666; font-style: italic;">// Tjekker efter [o] og [/o] Overstreget</span>
            <span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;(\[o\](.+?)\[\/o\])is&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'&lt;span style=&quot;text-decoration: overline;&quot;&gt;$1&lt;/span&gt;'</span><span style="color: #339933;">,</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #666666; font-style: italic;">// Tjekker efter [color] og [/color] Farver teksten alt efter hvilken farve brugeren har indtastet</span>
            <span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;(\[color=(.+?)\](.+?)\[\/color\])is&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&lt;span style=<span style="color: #000099; font-weight: bold;">\&quot;</span>color: <span style="color: #006699; font-weight: bold;">$1</span><span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;<span style="color: #006699; font-weight: bold;">$2</span>&lt;/span&gt;&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #666666; font-style: italic;">// Tjekker efter [size] og [/size] Gør teksten større er mindre </span>
            <span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;(\[size=(.+?)\](.+?)\[\/size\])is&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&lt;span style=<span style="color: #000099; font-weight: bold;">\&quot;</span>font-size: <span style="color: #006699; font-weight: bold;">$1px</span><span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;<span style="color: #006699; font-weight: bold;">$2</span>&lt;/span&gt;&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// Linjeskift med [br]</span>
	<span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;(\[br])is&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&lt;br /&gt;&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// Tjekker efter smileys</span>
	<span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;:)&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&lt;img src=<span style="color: #000099; font-weight: bold;">\&quot;</span>LINK TIL SMILEY<span style="color: #000099; font-weight: bold;">\&quot;</span> /&gt;&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;:-)&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&lt;img src=<span style="color: #000099; font-weight: bold;">\&quot;</span>LINK TIL SMILEY<span style="color: #000099; font-weight: bold;">\&quot;</span> /&gt;&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;:D&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&lt;img src=<span style="color: #000099; font-weight: bold;">\&quot;</span>LINK TIL SMILEY<span style="color: #000099; font-weight: bold;">\&quot;</span> /&gt;&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;:hihi:&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&lt;img src=<span style="color: #000099; font-weight: bold;">\&quot;</span>LINK TIL SMILEY<span style="color: #000099; font-weight: bold;">\&quot;</span> /&gt;&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;;)&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&lt;img src=<span style="color: #000099; font-weight: bold;">\&quot;</span>LINK TIL SMILEY<span style="color: #000099; font-weight: bold;">\&quot;</span> /&gt;&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;:roll:&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&lt;img src=<span style="color: #000099; font-weight: bold;">\&quot;</span>LINK TIL SMILEY<span style="color: #000099; font-weight: bold;">\&quot;</span> /&gt;&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;:P&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&lt;img src=<span style="color: #000099; font-weight: bold;">\&quot;</span>LINK TIL SMILEY<span style="color: #000099; font-weight: bold;">\&quot;</span> /&gt;&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;:ked:&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&lt;img src=<span style="color: #000099; font-weight: bold;">\&quot;</span>LINK TIL SMILEY<span style="color: #000099; font-weight: bold;">\&quot;</span> /&gt;&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;:O&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&lt;img src=<span style="color: #000099; font-weight: bold;">\&quot;</span>LINK TIL SMILEY<span style="color: #000099; font-weight: bold;">\&quot;</span> /&gt;&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;:o&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&lt;img src=<span style="color: #000099; font-weight: bold;">\&quot;</span>LINK TIL SMILEY<span style="color: #000099; font-weight: bold;">\&quot;</span> /&gt;&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;:chok:&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&lt;img src=<span style="color: #000099; font-weight: bold;">\&quot;</span>LINK TIL SMILEY<span style="color: #000099; font-weight: bold;">\&quot;</span> /&gt;&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
             <span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;:evil:&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&lt;img src=<span style="color: #000099; font-weight: bold;">\&quot;</span>LINK TIL SMILEY<span style="color: #000099; font-weight: bold;">\&quot;</span> /&gt;&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
         <span style="color: #b1b100;">return</span> <span style="color: #000088;">$text</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Nu har vi så lavet bbkode funktionen, men vi mangler at tilføje den til gæstebogen. Åben din gæstebog fil.</p>
<p>Find linjen</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$foresp</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT navn, dato, besked FROM bog ORDER BY nr DESC&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//Data hentes i tabellen bog</span></pre></div></div>

<p>Tilføj så denne lille kode ovenover. bbkode.php er filnavnet på bbkode filen, bare ændr den til det din bbkode fil hedder.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">require</span> <span style="color: #0000ff;">'bbkode.php'</span><span style="color: #339933;">;</span></pre></div></div>

<p>Nu find linjen</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">echo</span> <span style="color: #990000;">nl2br</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;besked&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>     <span style="color: #666666; font-style: italic;">//nl2br = newline oversættes til html breaktag.</span></pre></div></div>

<p>Skift den ud med</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">echo</span> <span style="color: #990000;">nl2br</span><span style="color: #009900;">&#40;</span>bbkode<span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;besked&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>bbkode er navnet på vores funktion.</p>
<div class="download"><a href="http://jayj.dk/download/6" title="Download BBkode">Download BBkode</a><br /><small>142 downloads</small></div>
<p>Det var så dagens mandags tip om hvordan du tilføjer bbkoder til Niels Gamborg&#8217;s gæstebog. Hvis du har spørgsmål eller kommentarer, er du mere end velkommen til at skrive en kommentar. Du er mere end velkommen til at skrive idéer til andre tips!</p>
<p>Hvis du kunne lide tippet, og vil have flere så husk at <a href="http://feeds2.feedburner.com/jayjdk">Abonner på mit RSS Feed, hvor du også har mulighed for at få tippet leveret via mail.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jayj.dk/bbkode/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PHP gæstebog</title>
		<link>http://jayj.dk/php-g%c3%a6stebog/</link>
		<comments>http://jayj.dk/php-g%c3%a6stebog/#comments</comments>
		<pubDate>Mon, 04 May 2009 13:38:24 +0000</pubDate>
		<dc:creator>Jesper</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[gæstebog]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://jayj.dk/?p=635</guid>
		<description><![CDATA[Dagens mandags tip er hvordan man kan lave en PHP gæstebog. Jeg vil ikke skrive et tutorial til hvordan man gør, men derimod anbefale Niels Gamborg&#8217;s tutorial. Scriptet er det samme som jeg bruger i min gæstebog, jeg har dog ændret lidt i den. Har blandt andet tilføjet muligheden for at bruge bbkode, og det [...]]]></description>
			<content:encoded><![CDATA[<p>Dagens mandags tip er hvordan man kan lave en PHP gæstebog. Jeg vil ikke skrive et tutorial til hvordan man gør, men derimod anbefale  Niels Gamborg&#8217;s tutorial. </p>
<p>Scriptet er det samme som jeg bruger i min gæstebog, jeg har dog ændret lidt i den. Har blandt andet tilføjet muligheden for at bruge bbkode, og det er så det næste uges mandags tip handler om. Så glæd dig til i næste uge <img src='http://jayj.dk/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Gæstebog scriptet består af 4 dele.</p>
<ul>
<li>HTML-formular, hvor brugeren indtaster navn og gæsebogsindlæg</li>
<li>PHP script, der gemmer indholdet fra formularen i en database</li>
<li>PHP script, der der viser de tidligere indlæg på siden</li>
<li>MySQL script, der opretter den nødvendige tabel i din database</li>
</ul>
<p><a href="http://www.nielsgamborg.dk/?p=php&amp;u=gaestebog_script">Linket til Niels Gamborg&#8217;s gæstebog script findes her</a></p>
<p>Så var så dagens ret korte mandags tip, men husk at følg med i næste uge, hvor jeg fortæller hvordan du tilføjer bbkode til den (måske også hvordan man <em>næsten</em> spamsikrer den)</p>
]]></content:encoded>
			<wfw:commentRss>http://jayj.dk/php-g%c3%a6stebog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;This video is not available in your country&#8221;</title>
		<link>http://jayj.dk/this-video-is-not-available-in-your-country/</link>
		<comments>http://jayj.dk/this-video-is-not-available-in-your-country/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 15:46:09 +0000</pubDate>
		<dc:creator>Jesper</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[mandag]]></category>
		<category><![CDATA[spærring]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[trick]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://jayj.dk/?p=421</guid>
		<description><![CDATA[Kender du det når du skal til at se en video på Youtube, og får beskeden: This video is not available in your country Der findes flere forskellige måder at omgå spærringen , og i dagens mandags tip vil jeg skrive om en af dem. Denne metode er faktisk utrolig simpel, det er bare at [...]]]></description>
			<content:encoded><![CDATA[<p>Kender du det når du skal til at se en video på <a href="http://youtube.com">Youtube</a>, og får beskeden:</p>
<p><span class="error"><strong>This video is not available in your country</strong></span></p>
<p>Der findes flere forskellige måder at omgå spærringen , og i dagens mandags tip vil jeg skrive om en af dem. Denne metode er faktisk utrolig simpel, det er bare at gå ind på hjemmesiden <a href="http://www.hidemyass.com/">Hide My Ass!</a>, tro det eller ej men Youtube.com står allerede skrevet i søgefelter <img src='http://jayj.dk/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Tryk på knappen &#8220;Hide My Ass&#8221;, og så er der fuld drøn på videoerne <img src='http://jayj.dk/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Du kan også finde andre metoder ved hjælp af en <a href="http://www.google.dk/search?sourceid=navclient&#038;aq=0&#038;oq=this+vid&#038;hl=da&#038;ie=UTF-8&#038;rlz=1T4GGLL_daDK311DK311&#038;q=this+video+is+not+available+in+your+country.">hurtig Google søgning</a>.</p>
<p>Det var så dagens mandags tip. Hvis du har spørgsmål eller kommentarer, er du mere end velkommen til at skrive en kommentar. Du er mere end velkommen til at skrive idéer til andre tips!</p>
<p>Hvis du kunne lide tippet, og vil have flere så husk at <a href="http://feeds2.feedburner.com/jayjdk">Abonner på mit RSS Feed, hvor du også har mulighed for at få tippet leveret via mail.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jayj.dk/this-video-is-not-available-in-your-country/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Sæt lys på Facebook</title>
		<link>http://jayj.dk/lys-pa-facebook/</link>
		<comments>http://jayj.dk/lys-pa-facebook/#comments</comments>
		<pubDate>Sat, 18 Apr 2009 14:09:05 +0000</pubDate>
		<dc:creator>Jesper</dc:creator>
				<category><![CDATA[Sjov]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[lys]]></category>

		<guid isPermaLink="false">http://jayj.dk/?p=652</guid>
		<description><![CDATA[p>Mandags tippet i dag er måske ikke så brugbart, men sjovt er det nu Faldte over en artikel på Noupe.com for nogle dage siden, hvor de fortalte om et fuldstændig ubrugeligt sjovt lille Facebook trick, der gør at når man klikker kommer der Lens Flare (lysglimt) I får lige et billede af det &#8211; et [...]]]></description>
			<content:encoded><![CDATA[<p>p>Mandags tippet i dag er måske ikke så brugbart, men sjovt er det nu <img src='http://jayj.dk/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
Faldte over en artikel på Noupe.com for nogle dage siden, hvor de fortalte om et fuldstændig ubrugeligt sjovt lille Facebook trick, der gør at når man klikker kommer der Lens Flare (lysglimt)</p>
<p>I får lige et billede af det &#8211; et billede forklarer jo mere end 1000 ord<br />
<img src="http://jayj.dk/wp-content/uploads/facebook-lens-flare.png" alt="Facebook Lens Flare" title="Facebook Lens Flare" width="574" height="307" class="size-full wp-image-530" /></p>
<p>For at få det til at virke skal du trykke:<br />
<strong>Op, Op, Ned, Ned, Venstre, Højre, Venste, Højre, b, a, enter og klik </strong></p>
<p>Ubrugeligt? Sjovt? Helt sikkert!</p>
]]></content:encoded>
			<wfw:commentRss>http://jayj.dk/lys-pa-facebook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mandags tippet: Send en stor fil super nemt</title>
		<link>http://jayj.dk/mandags-tippet-stor-fil-nemt/</link>
		<comments>http://jayj.dk/mandags-tippet-stor-fil-nemt/#comments</comments>
		<pubDate>Mon, 13 Apr 2009 18:07:18 +0000</pubDate>
		<dc:creator>Jesper</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[drop]]></category>
		<category><![CDATA[drop.io]]></category>
		<category><![CDATA[filer]]></category>
		<category><![CDATA[mandag]]></category>
		<category><![CDATA[online]]></category>
		<category><![CDATA[tippet]]></category>
		<category><![CDATA[trick]]></category>

		<guid isPermaLink="false">http://jayj.dk/?p=418</guid>
		<description><![CDATA[Denne uges Mandags tip handler om, hvordan man kan sende en stor fil over nettet utroligt nemt. Hjemmesiden Drop.io giver dig mulighed for at gemme store filer online i et år. Den er fulstændig gratis, og man behøver ikke engang at oprette en bruger Når man kommer ind på siden, er der en boks hvor [...]]]></description>
			<content:encoded><![CDATA[<p>Denne uges Mandags tip handler om, hvordan man kan sende en stor fil over nettet utroligt nemt.<br />
Hjemmesiden <a href="http://drop.io">Drop.io</a> giver dig mulighed for at gemme store filer online i et år. Den er fulstændig gratis, og man behøver ikke engang at oprette en bruger <img src='http://jayj.dk/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Når man kommer ind på siden, er der en boks hvor man kan vælge &#8220;Drop name&#8221;, som er adressen hvor alle ens uploadet filer er. Man har også mulighed for at uploade en fil med det samme, som kan fylde helt op til <strong>100 mb</strong>! Man har også mulighed for at vælge kodeord, og hvornår filen skal slettes igen. </p>
<p>Det var så dagens mandags tip. Hvis du har spørgsmål eller kommentarer, er du mere end velkommen til at skrive en kommentar. Du er mere end velkommen til at skrive idéer til andre tips!</p>
<p>Hvis du kunne lide tippet, og vil have flere så husk at <a href="http://feeds2.feedburner.com/jayjdk">Abonner på mit RSS Feed, hvor du også har mulighed for at få tippet leveret via mail.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jayj.dk/mandags-tippet-stor-fil-nemt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mandags tippet: Flyt javascript ned til footeren</title>
		<link>http://jayj.dk/javascript-ned-til-footer/</link>
		<comments>http://jayj.dk/javascript-ned-til-footer/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 13:28:17 +0000</pubDate>
		<dc:creator>Jesper</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[mandag]]></category>
		<category><![CDATA[mandags]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[tippet]]></category>
		<category><![CDATA[trick]]></category>

		<guid isPermaLink="false">http://jayj.dk/?p=406</guid>
		<description><![CDATA[Så er mandags tippet tilbage, godt nok lidt forsinket. Tippet i dag, er igen et tip man kan bruge, hvis man har en hjemmeside. Det handler om at man kan mindske loadtiderne på sine sider, ved at flytte sit javascript ned til footeren, istedet for i toppen. Du kan læse mere om det på Yahoo&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Så er mandags tippet tilbage, godt nok lidt forsinket. Tippet i dag, er igen et tip man kan bruge, hvis man har en hjemmeside. Det handler om at man kan mindske loadtiderne på sine sider, ved at flytte sit javascript ned til footeren, istedet for i toppen. Du kan læse mere om det på <a href="http://developer.yahoo.com/performance/rules.html#js_bottom">Yahoo&#8217;s &#8220;Best Practices for Speeding Up Your Web Site&#8221;</a></p>
<p>Her er et eksempel på en side med javascriptet i toppen</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span> xmlns<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.w3.org/1999/xhtml&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;</span>Titel<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;js/javascript.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>Lorem Ipsum<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></div></div>

<p>Så flytter vi ganske simpelt javascriptet ned til bunden. Det vil ikke gøre alverdens lige i dette eksempel, men hvis du bruger meget javascript, kan det gøre en forskel.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span> xmlns<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.w3.org/1999/xhtml&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;</span>Titel<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>Lorem Ipsum<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;js/javascript.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></div></div>

<p>Hvis du bruger WordPress, kan du også sænke loadtiderne ved at lade vær med at loade et bestemt javascript, på sider der ikke behøver det. Det gør du med <a href="http://codex.wordpress.org/Conditional_Tags">Conditional Tags</a></p>
<p>Hvis du kun vil loade et javascript på forsiden kan du bruge is_home()</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>is_home<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;script type=&quot;text/javascript&quot; src=&quot;/js/forsidejavascript.js&quot;&gt;&lt;/script&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Du kan se flere Conditional Tags på <a href="http://codex.wordpress.org/Conditional_Tags" title="Conditional Tags">WordPress Codex siden, der handler om det.</a></p>
<p>Det var så dagens mandags tip, godt nok lidt forsinket. Hvis du har spørgsmål eller kommentarer, er du mere end velkommen til at skrive en kommentar. Du er mere end velkommen til at skrive idéer til andre tips!</p>
<p>Det var altså mandags tippet for denne gang. Hvis du kunne lide tippet, og vil have flere så husk at <a href="http://feeds2.feedburner.com/jayjdk">Abonner på mit RSS Feed, hvor du også har mulighed for at få tippet leveret via mail.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jayj.dk/javascript-ned-til-footer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mandags tippet: Centrer din hjemmeside</title>
		<link>http://jayj.dk/centrer-din-hjemmeside/</link>
		<comments>http://jayj.dk/centrer-din-hjemmeside/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 13:26:47 +0000</pubDate>
		<dc:creator>Jesper</dc:creator>
				<category><![CDATA[Nyheder]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[mandag]]></category>
		<category><![CDATA[mandags]]></category>
		<category><![CDATA[tippet]]></category>
		<category><![CDATA[trick]]></category>

		<guid isPermaLink="false">http://jayj.dk/?p=363</guid>
		<description><![CDATA[I dag starter en ny &#8220;serie&#8221; her på Jayj.dk. Nemlig Mandags tippet. Hver mandag vil der komme et tip af mulige slags. Dagens tip er til hvordan man får centreret sin hjemmeside. Det er en ganske simpel metode der bruges. Lad os starte med en simpel side &#60;!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.0 Transitional//EN&#34; &#34;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#34;&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>I dag starter en ny &#8220;serie&#8221; her på Jayj.dk. Nemlig Mandags tippet. Hver mandag vil der komme et tip af mulige slags.</p>
<p>Dagens tip er til hvordan man får centreret sin hjemmeside. Det er en ganske simpel metode der bruges.</p>
<p>Lad os starte med en simpel side</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span> xmlns<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.w3.org/1999/xhtml&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;</span>Min hjemmeside<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>Min overskrift<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></div></div>

<p>Hvor vi så har dette i vores css:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">body <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#ccc</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>For at kunne få hjemmesiden centreret, skal vi have &#8220;rammet den ind&#8221;, som gøres ved at vi opretter en div rundt om indholdet.</p>
<p>Nu ser vores HTML sådan her ud:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;ramme&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>Min overskrift<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>

<p>Det vi har gjort, er at vi har lavet en div, hvor side indholdet er. Den behøver selvfølgelig ikke at hedde ramme, men hvis du skifter ID navnet, skal du også huske at rette navnet i css&#8217;en.</p>
<p>Men siden er ikke centreret endnu. Det gør vi ved at tilføje følgende til vores css style</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#ramme</span> <span style="color: #00AA00;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">800px</span><span style="color: #00AA00;">;</span>
        <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Den første linje er det vi har kaldt vores ramme div. Width er bredden på siden, det skal du selvfølgelig rette til efter hvor bred din side skal være.<br />
Margin: 0 auto; betyder at den er 0 px fra toppen og bunden og auto px fra venstre og højre.</p>
<p>I stedet kunne vi også bruge denne kode, men den første er mere simpel</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#ramme</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">800px</span><span style="color: #00AA00;">;</span>
        <span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Så skulle din side gerne være centreret. Hvis du har spørgsmål eller kommentarer, er du mere end velkommen til at skrive en kommentar. Du er også velkommen til at skrive idéer til andre tips!</p>
<p>Det var altså mandags tippet for denne gang. Hvis du kunne lide tippet, og vil have flere så husk at <a href="http://feeds2.feedburner.com/jayjdk">Abonner på mit RSS Feed, hvor du også har mulighed for at få tippet leveret via mail</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jayj.dk/centrer-din-hjemmeside/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk (enhanced)

Served from: jayj.dk @ 2010-09-09 21:14:59 -->