Help:Editing
From SQLServerPedia
|
See Also: How_To_Help
About Article ContentFor tips on article content, check out these links:
How to Format Wiki ArticlesSome articles were exported from Quest's KnowledgeXpert product and the text isn't easy to read or edit. If one of your articles has all of the content jammed into a single line with no line breaks, and you want to do edits on it, you can email Brent Ozar with the URL and he'll help clean it up for you. For the rest of the articles, use standard Wiki syntax as follows. Formatting T-SQL CodeTo put code into your wiki article, frame it with "<pre>" tags like this (you'll need to add a class telling the highlighter which language you are using): <pre class="brush:tsql"> SELECT r.cpu_time-t.cpu_time AS CPUDiff , r.logical_reads-t.logical_reads AS ReadDiff , r.wait_type , r.writes, r.row_count, s.[HOST_NAME] FROM sys.dm_exec_sessions AS s INNER join sys.dm_exec_requests AS r ON s.session_id =r.session_id and s.last_request_start_time=r.start_time LEFT join #temp AS t ON t.session_id=s.session_id CROSS APPLY sys.dm_exec_sql_text(r.sql_handle) h WHERE is_user_process = 1 ORDER BY 3 DESC </pre> It will show up on the page like this: SELECT r.cpu_time-t.cpu_time AS CPUDiff , r.logical_reads-t.logical_reads AS ReadDiff , r.wait_type , r.writes, r.row_count, s.[HOST_NAME] FROM sys.dm_exec_sessions AS s INNER join sys.dm_exec_requests AS r ON s.session_id =r.session_id and s.last_request_start_time=r.start_time LEFT join #temp AS t ON t.session_id=s.session_id CROSS APPLY sys.dm_exec_sql_text(r.sql_handle) h WHERE is_user_process = 1 ORDER BY 3 DESC The color-coding and fonts are done automatically - all you have to do is copy/paste in the T-SQL. You can also use more than just T-SQL as the source language - here is the list of supported languages for syntax highlighting. Things That Work Anywhere
Things That Only Work at the Beginning of a Line
More Formatting ExamplesFor more detailed format tricks, check out these links. Not all of the MediaWiki commands will work at SQLServerPedia since we don't have customized templates set up, though.
Adding Images and Screen ShotsTo add an image to a page, type this into the editor: [[Image:MyImageName.jpg|My Helpful Image Description]] You can use any file name you want for the image - the file will be uploaded in the next step, and the file name doesn't have to exactly match the file name on your hard drive. The extension does have to match, though. Every image should include a description so that those with screen readers can hear it. Click the Show Preview button at the bottom of the page. The preview of the page will have a red link for your image. Right-click on that link, and click Open in New Window. From there, you can upload the image. After uploading the image, come back to your Wiki article and click Show Preview again. The page will be refreshed with your new image. For picture formatting commands, see this Wikipedia article: Adding VideosTo display videos inline in the article like you see below, they need to be converted into Apple Quicktime format (MP4) with the streaming hints enabled. For help with setting that up, email us at ask@sqlserverpedia.com. Then, when that's done and the videos are hosted somewhere (we can host 'em for you too) you can show videos using the following syntax: http://tutorials.sqlserverpedia.com/SQLServerPedia-20090129-Baselining.flv That's right - just literally type in the location of the video. When the page is viewed, the video will show in a player like this: http://tutorials.sqlserverpedia.com/SQLServerPedia-20090129-Baselining.flv Getting Your Page Noticed in Search EnginesTo get your articles the best possible placement in search engines, thereby helping more DBAs to find your tips, you can populate the meta keywords and descriptions for your page by inserting the below code into your page. This is only for advanced users. If meta tags don't mean anything to you, don't worry about it - skip this. <meta name="keywords" content="your keywords go here, separated by commas"> <meta name="description" content="A plain, easy-to-read one-line description of your article."> |