Yazım önerileri
- Web sayfası ve e-posta adresleri otomatik olarak bağlantıya çevrilir.
Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
Bu site HTML içeriğe izin verir. Tüm HTML'yi öğrenmek korkutucu olurken, en temel HTML "etiketlerini" kullanmayı öğrenmek çok kolaydır. Bu tablo bu sitede izin verilmiş etiketler için örnekler sunar.
Daha fazla bilgi için W3C'nin HTML tanımlamalarına bakın veya HTML anlatan başka siteler bulmak için kendi gözde arama motorunuzu kullanın.
Etiket açıklaması Yazdığınız Gördüğünüz Çapalar diğer sayfalara bağlantı yapmak için kullanılırlar. <a href="http://www.snoopyvet.com">SnoopY Veteriner Polikliniği PetShop</a>SnoopY Veteriner Polikliniği PetShop Eğik <em>Eğik</em>Eğik Güçlü <strong>Güçlü</strong>Güçlü Alıntı <cite>Alıntı</cite>Alıntı Programlama kaynak kodunu göstermek için kullanılan kodlanmış metin <code>Kodlanmış</code>KodlanmışSırasız liste - her liste maddesine başlarken <li> kullanın <ul> <li>İlk madde</li> <li>İkinci madde</li> </ul>- İlk madde
- İkinci madde
Sıralı liste - her liste maddesine başlarken <li> kullanın <ol> <li>İlk madde</li> <li>İkinci madde</li> </ol>- İlk madde
- İkinci madde
Tanım listeleri diğer HTML listeleri gibidir. &dl;dl> tanım listesini başlatır, <dt> tanım terimini başlatır ve <dd> tanım açıklamasını başlatır. <dl> <dt>İlk terim</dt> <dd>İlk tanım</dd> <dt>İkinci terim</dt> <dd>İkinci tanım</dd> </dl>- İlk terim
- İlk tanım
- İkinci terim
- İkinci tanım
Çoğu sıradışı simge sorun çıkmadan doğrudan girilebilir.
Eğer sorunla karşılaşırsanız, HTML simge karşılığını kullanmayı deneyin. Genel bir örnek şuna benzer & simgesi için &. Karşılıkların tam listesi için HTML karşılıkları sayfasına bakın. Mevcut simgelerden bazıları şunları içermektedir:
Karakter Açıklaması Yazdığınız Gördüğünüz Ve işareti (&) && Büyüktür >> Küçüktür << Tırnak işareti "" - Satır ve paragraflar otomatik olarak tanınırlar. <br /> satır sonu, <p> paragraf ve </p> paragraf kapanışetiketleri otomatik olarak eklenirler. Eğer paragraflar otomatik olarak tanınmazsa basitçe bir çift satır sonu ekleyin.
-
Özel PHP kodu kullanımı
Eğer PHP'de betik yazmayı biliyorsanız, Drupal size istediğiniz herhangi bir betiği ekleme gücünü vermektedir. Sayfa görüntülendiği zaman çalıştırılacak ve anında sayfanın içine gömülecektir. Bu size şaşırtıcı bir esneklik ve güç vermektedir, fakat tabii bununla birlikte iyi kod yazmazsanız tehlike ve güvenlik eksiği gelmektedir. Eğer PHP, SQL veya site motoruna aşina değilseniz, PHP kullanmaktan kaçının, çünkü veritabanınızı bozabilir veya sitenizi güvenliksiz ve hatta kullanılamaz hale getirebilirsiniz. Eğer içeriğinizle süslü şeyler yapmayı planlamıyorsanız, düz HTML ile başlamanız belki de daha iyidir.
Bilin ki her PHP öğesi , ifadeleri noktalı virgülle bitirmek dahil, geçerli PHP kodu olmalıdır. Önerilen şudur ki, kodunuzu sitenize eklemeden önce ayrı olarak geliştirmeniz, bir deneme veritabanında çalışan basit bir sınama betiği ile denemenizdir.
Notlar:
- Global değişkenleri PHP kodunuzun sınırları içinde kullanabilirsiniz, yapılandırma parametreleri gibi, fakat sizin kodunuzda değer verilen global değişkenler, aynı değerleri ileride de koruyacağını unutmayın.
- Şimdi register_globals değeri öntanımlı olarak off-kapalı gelmektedir. Eğer form bilgisine ihtiyacınız varsa onu $_POST, $_GET gibi "superglobals" değişkenlerden almalısınız.
- Öğenizin asıl içeriğini bastırmak için
printya dareturnifadelerini kullanabilirsiniz.
Temel bir örnek:
Ziyaretçilerinizi karşılamak için "Hoşgeldiniz" başlıklı bir kutunuz olsun istiyorsunuz. Bu kutunun içeriği şunu yaparak yaratılabilir:
print t("Hoşgeldin ziyaretçi, ... karşılama iletisi buraya yazılır ...");Eğer biz kayıtlı bir kullanıcıyla uğraşıyorsak, o zaman iletiyi şu şekilde kişiselleştirebiliriz::
global $user; if ($user->uid) { print t("Hoşgeldin $user->name, ... karşılama iletisi buraya yazılır ..."); } else { print t("Hoşgeldin ziyaretçi, ... karşılama iletisi buraya yazılır ..."); }Daha başka örnekler için, var olan Drupal kodunu incelemenizi ve onu bir başlangıç noktası olarak kullanmanızı öneriyoruz, özellikle kenarlık kutuları için.
-
Gallery2 Filter:
You can link to items in your embedded Gallery2 using a special code. This code will be replaced by a thumbnail image that is linked to the actual item in your Gallery.
Syntax:
[G2:item_id n=number type=type size=number class=name frame=name album_frame=name item_frame=name]- item_id (required): This is the item ID from Gallery2. If you look at the URL of the item, this is the last number. Note that if the item_id is a single photo, n must be 1.
- n (suggested): This is the number of photos you want the block to show. It will override whatever is set in the defaults (initially 1). Note: this will change past instances where you did not set n -- the reason for its suggested use.
- type: The default type of gallery block. Any of the following may be used: randomImage, recentImage, viewedImage, randomAlbum, recentAlbum, viewedAlbum, dailyImage, weeklyImage, monthlyImage, dailyAlbum, weeklyAlbum, monthlyAlbum, specificItem. Note that for n=1, selectedItem is automatically chosen regardless of this parameter.
- class: The block that Gallery2 returns is wrapped in a DIV so additional styling can be done. The classes for this DIV are located in g2_filter.css. Included with the module are "left", "right", and "nowrap". These position the image block to the left or right or on a line all its own with the text not wrapping. You can also add your own class(es) to the CSS file and they will automatically be available.
- size: The length of the longest side for the thumbnail. The other side is determined automatically to keep the same aspect ratio. This option (for Gallery2.2 and above) will use the gallery image that is closest in size, and so may end up using a smaller image and expanding it (lower quality). If so, use "exactsize". For Gallery2.1, if you want your size to be bigger than the thumbnail size for that image as defined in your Gallery2, you must select "Full Size" in the gallery settings page (but note that the full image will be returned and then resized by the browser, so it may take a while to download).
- exactsize: The length of the longest side for the thumbnail. The other side is determined automatically to keep the same aspect ratio. This option always ensures that the image is scaled from a larger image and so image quality is maintained. This only works for Gallery2.2 and above.
- frame/album_frame/item_frame: You can use just "frame" to assign a frame to the thumbnail regardless of whether it's for an album or a single item. Using aframe will only affect albums and iframe will only affect single items. Frames included with the default Gallery 2 install are: bamboo, book, brand , dots, flicking, gold, gold2, polaroid, polaroids, shadow, shells, slide, solid, notebook, wood.
BBCode Guide
BBCode allows you to specify formatting rules for your text, even if you are not allowed to use HTML in your posts. BBCode originated from the forum software named PHPBB, and this site has a special implementation of it.
In BBCode terms, you use "tags" to add formatting to your text. Every tag is enclosed in [ and ] brackets. If you want to mark some region in your text, you need to use an opening tag and a closing tag. Closing tags start with [/, as you will see in the examples below. If you mistype a tag or forget to close it, you will not get the desired formatting.
Simple text formatting
BBCode allows you to make some parts of your texts stand out from the context by adding [b]old, [i]talic, [u]nderlined and [s]trikeout formatting to them. The [color], [size] and [font] tags allow you to change the color, size and font of portions of the text you enclose with these tags. Both require a parameter (which colour, how big, what font) that is suffixed to the name of the tag by an equals sign (example below). You should not repeat the parameter in the closing tag!
You can specify any recognized color name (red, blue, green, white, etc.) or a hexadecimal color value (#CDCDCD, #FFFFFF, etc.) as the parameter of a [color] tag. The [size] tag allows you to set the font size between 6 and 48, 6 being the smallest size. Note that using very large text is considered by many to be annoying, and it is seldom a good idea to try to attract more attention to your post in this way. The [font] tag can be set to any valid font face, such as Arial, Arial Black, Courier, Courier New, Helvetica, Impact, Times New Roman, Verdana, etc.
usage display I [b]need to do[/b] this by the weekend I need to do this by the weekend John said that [i]we should[/i] ask her John said that we should ask her I [u]would not like to[/u] offend you I would not like to offend you Let's correct this [s]mispelled[/s] misspelled word Let's correct this mispelledmisspelled wordJane was at [color=blue]the coast[/color] Jane was at the coast Joe was in [color=#FF0000]the forest[/color] Joe was in the forest You said: [size=30]HEY![/size] You said: HEY! She said: [font=Courier]What?[/font] She said: What? Creating links
You have multiple options to specify links to other destinations in your posts.
URLs (Uniform Resource Locators) starting with "www" or "ftp" (eg. www.example.com) are automatically recognized and replaced with links. You can also use the [url] tag with a parameter to specify a link with meaningful text to click on. If you use the url tag without the parameter, the enclosed text is assumed to be a URL, and a link is created to that destination.
Email addresses in posts are also automatically converted to email links. For compatibility with common BBCode implementations, an [email] tag is provided.
usage display For more examples, visit www.example.com For more examples, visit www.example.com For more examples, visit http://example.com For more examples, visit http://example.com If you have questions ask me at joe@example.com If you have questions ask me at joe@example.com If you have questions ask me at [email]joe@example.com[/email] If you have questions ask me at joe@example.com We use [url=http://example.com/]the example site[/url] in these examples We use the example site in these examples We use [url]http://example.com/[/url] in these examples We use http://example.com/ in these examples Displaying images
The [img] tag allows you to display an image in your post. You need to specify a URL to the image, so it needs to be accessible somewhere on the internet. Beware of adding very large images to your text, or the page will load very slowly!
If you enclose a URL in an [img] tag, then it will be replaced with code to display the image. For example
A good screenshot: [img]http://example.com/screenshot.png[/img]will show you the screenshot (if it exists).You can also specify the desired display dimensions of the image by adding a dimension parameter to the [img] tag.
A good screenshot: [img=640x480]http://example.com/screenshot.png[/img]will display the image in 640x480 (though the full image will be downloaded). Do not use this to show a thumbnail of an image!You are free to link an image to an external destination by enclosing the [img] tag with a [url] tag:
See [url=http://example.com][img]http://example.com/screenshot.png[/img][/url].Ordered and unordered lists
The simplest list type is the unordered list, which means that there is no numbering applied to the elements. You can make such a list by enclosing the list elements in [list] opening and closing tags. Specify the start of one element with the [*] list element marker, which has no closing tag pair.
To create an ordered list, you should add a parameter to the [list] list tag specifying what type of ordered list you would like to see. The possible parameters are "i", "I", "1", "a", "A", "c", "d" and "s" which all correspond to the display of the first list element.
usage display I love [list] [*]Oranges [*]Apples [*]Bananas [/list]
I love - Oranges
- Apples
- Bananas
I love [list=I] [*]Oranges [*]Apples [*]Bananas [/list]
I love - Oranges
- Apples
- Bananas
I love [list=1] [*]Oranges [*]Apples [*]Bananas [/list]
I love - Oranges
- Apples
- Bananas
Fixed-width text and block formatting
You can use the [code] tag to add an inline fixed-width formatted part or to add a block of (usually program) code. If there is any newline present between the opening and closing tags, then a block will be displayed.
Similarly, the [php] tag can be used to post PHP code. PHP code will automatically be syntax highlighted for easier readability.
usage display Edit your [code]robots.txt[/code] file Edit your robots.txtfileAn HTML title example:
[code]
<head>
<title>Page Title</title>
</head>
[/code]An HTML title example:
<head>
<title>Page Title</title>
</head>
Some PHP code:
[php]
<?php
function hello()
{
echo "Hello World!";
}
?>
[/php]Some PHP code:
<?php
function hello()
{
echo "Hello World!";
}
?>Text and block alignment
You can also set the alignment of the text by using [left], [right] and [center] tags. The [float] tag can be used to place floating boxes in the text (especially handy for images). You can specify the direction of the floating with [float=left] and [float=right]. The [justify] tag can be used justify text on both sides of the page.
Other supported tags
It is possible to quote something that has already been posted, by just putting [quote][/quote] tags around it. To quote a specific person, use something like [quote=John]. Quote tags can be nested.
The [sub] and [sup] tags can be used to add subscript and superscript text. For example, H[sub]2[/sub]O gives H2O, while X[sup]3[/sup] gives X3.
The [acronym] tag allow you to identify text as an acronym and provide a description when users move their mouse over the tag. For example, [acronym=Structured Query Language]SQL[/acronym] produces SQL.
The [abbr] tag allow you to identify text as an abbreviation and provide a description when users move their mouse over the tag. For example, [abbr=World Wide Web]WWW[/abbr] produces WWW.
The [notag] tags prevent text inside the tags from being parsed. This allows you to give examples of BBcode and not have it converted to HTML. For example: [notag]These [b]tags[/b] are not rendered[/notag] will produce "These [b]tags[/b] are not rendered".
The [hr] tag draws a horizontal line across the page. Handy for separating chunks of text.
Using multiple formatting tags
You can apply more than one formatting specification to a portion of some text.
I was at [b][i]the coast[/i][/b]will be rendered asI was at the coast.Make sure that you take care of the proper order of the opening and closing tags. You should close the tags in the opposite order in which you opened them. Otherwise you might get very strange rendering results. Also check your post with the preview function before submitting it, in case there are formatting errors due to improper BBCode usage.