syntax testing Options
daniel
Posted: Thursday, August 17, 2006 2:19:31 AM

Rank: Aficionado

Joined: 7/19/2006
Posts: 190
Location: Norway
url
http://www.google.com
check out google

email
no@spam.plz
plz don't spam my email

formatting
lets use red, bold, italic and underlined text



images inside links


code
Code:

<xml />


xml code
Code:

<html />
daniel
Posted: Thursday, August 17, 2006 2:30:37 AM

Rank: Aficionado

Joined: 7/19/2006
Posts: 190
Location: Norway
Code:


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:Stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>
<xsl:stylesheet
    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxml="urn:schemas-microsoft-com:xslt"
    xmlns:umbraco.library="urn:umbraco.library"
    exclude-result-prefixes="msxml umbraco.library">


<xsl:output method="xml" omit-xml-declaration="yes"/>

<xsl:param name="currentPage"/>
<xsl:variable name="numberOfItems" select="/macro/numberOfItems"/>

<xsl:template match="/">

<!-- The fun starts here -->
<xsl:for-each select="$currentPage/ancestor-or-self::node[@level=1]/descendant::node [@nodeTypeAlias = 'wwNews']/node">
<xsl:sort select="@createDate" order="descending"/>
<xsl:if test="position() &lt;= $numberOfItems">
<p class="newsDate"><xsl:value-of select="umbraco.library:LongDate(@createDate)"/>:</p>
        <h2><a title="Read news item: {@nodeName}" href="{umbraco.library:NiceUrl(@id)}"><xsl:value-of select="@nodeName"/></a></h2>
<p class="newsResume">
<xsl:value-of select="./data [@alias = 'teaser']" disable-output-escaping="yes"/>
</p>
</xsl:if>
</xsl:for-each>


</xsl:template>

</xsl:stylesheet>

daniel
Posted: Thursday, August 17, 2006 2:46:29 AM

Rank: Aficionado

Joined: 7/19/2006
Posts: 190
Location: Norway
How to use:

url
[ url]http://www.google.com[/url ]
[ url=http://www.google.com]check out google[/url ]

email
[ email]no@spam.plz[/email ]
[ email=no@spam.plz]plz don't spam my email[/email ]

formatting
lets use [ font=red]red[/font ], [ b]bold[/b ], [ i]italic[/i ] and [ u]underlined[/u ] text

[img ]/media/26045/umbracos1_thumb.jpg[/img ]

images inside links
[ url=/media/26045/umbracos1.jpg][ img]/media/26045/umbracos1_thumb.jpg[/img ][/url ]

code (by default, it assumes XML/HTML if nothing is spesified)
[ code]
<xml />
[/code ]

xml code (use css, c#, c-sharp, csharp, vb, vb.net, js, jscript, javascript, sql, xml, xhtml, xslt, html or xhtml)
[ code=xml]
<html />
[/code ]
daniel
Posted: Thursday, August 17, 2006 2:47:51 AM

Rank: Aficionado

Joined: 7/19/2006
Posts: 190
Location: Norway
css test

Code:


/* Rich text editor styling start */
#holderBody {
    background: #fff;
}

#holder {
    border: 1px solid #ccc;
    padding: 10px;
    margin: 5px;
    text-align: left;
}

/* Rich text editor styling end */

body,html {
    margin:0;
    padding:0;
    background-color: #EFEFF6;
    font-family: 'lucida grande', 'lucida sans', lucida, verdana;
    font-size:12px;
    text-align: center;
    color:#333366;
    }

/* HEADERS */
h2 {
    font-size:30px;
    margin: 5px 0;
    padding: 0;
    font-weight: bold;
    font-size: 140%;
    text-decoration: none;
}

daniel
Posted: Thursday, August 17, 2006 4:40:33 AM

Rank: Aficionado

Joined: 7/19/2006
Posts: 190
Location: Norway
testing html syntax

Code:


<div style="float: right">
  <a href="/post?post=<?UMBRACO_GETITEM field="pageID"/>">Create new post</a>
</div>

<h2><?UMBRACO_GETITEM field="pageName"/></h2>

<div id="latestPosts">
  <?UMBRACO_MACRO macroAlias="ListLatestPosts" numberOfItems="150" ></?UMBRACO_MACRO>
</div>

<div class="clear"></div>

daniel
Posted: Thursday, August 17, 2006 4:42:10 AM

Rank: Aficionado

Joined: 7/19/2006
Posts: 190
Location: Norway
testing SQL

Code:


create table #tempReturning (Header nvarchar(50), Value int)

insert into #tempReturning SELECT 'Published',
(
    SELECT         COUNT (nodeId)
    FROM         dbo.cmsDocument
    WHERE         published = 1
)

insert into #tempReturning SELECT 'Not Published',
(
    (
        SELECT         COUNT (DISTINCT nodeId)
        FROM         dbo.cmsDocument
    )
    -
    (
    SELECT         COUNT (nodeId)
    FROM         dbo.cmsDocument
    WHERE         published = 1
    )
)

SELECT * FROM #tempReturning
DROP TABLE #tempReturning

daniel
Posted: Thursday, August 17, 2006 7:05:24 AM

Rank: Aficionado

Joined: 7/19/2006
Posts: 190
Location: Norway
Niels Hartvig wrote:
OK - we needed a replacement for Yahoo Groups that just seems really unstable.


fubar

Quote:
weeeeeee... :)
daniel
Posted: Thursday, August 17, 2006 7:11:27 AM

Rank: Aficionado

Joined: 7/19/2006
Posts: 190
Location: Norway
Niels Hartvig wrote:

Code:

    // code and quote
    // OK - we needed a replacement for Yahoo Groups that just seems really unstable.



fubar
jesper
Posted: Thursday, August 17, 2006 8:36:25 AM

Rank: Administration

Joined: 7/25/2006
Posts: 415
Location: vipperoed, denmark
Neat work, Daniel! And very nice with the FAQ in the menu. I can see that u can do quoting but it isn't described in the faq?

Kindly

Jesper

webbureau jesper.com doing webdesign / development / umbraco implementations / 2007&2008 MVP
daniel
Posted: Friday, August 18, 2006 10:21:29 AM

Rank: Aficionado

Joined: 7/19/2006
Posts: 190
Location: Norway
The quote aint done yet.
jesper
Posted: Friday, August 18, 2006 10:31:07 AM

Rank: Administration

Joined: 7/25/2006
Posts: 415
Location: vipperoed, denmark
On the faq there's a small typing error .. the /code closing tag is typed as /email

Jesper



webbureau jesper.com doing webdesign / development / umbraco implementations / 2007&2008 MVP
daniel
Posted: Friday, August 18, 2006 10:32:45 AM

Rank: Aficionado

Joined: 7/19/2006
Posts: 190
Location: Norway
Jesper Ordrup wrote:
On the faq there's a small typing error .. the /code closing tag is typed as /email

Jesper


Thanks for pointing out Jesper.
daniel2
Posted: Sunday, August 20, 2006 9:40:53 PM
Rank: Newbie

Joined: 8/8/2006
Posts: 7
Daniel Bj&#248;rnbakk wrote:

testing SQL

Code:


create table #tempReturning (Header nvarchar(50), Value int)

insert into #tempReturning SELECT 'Published',
(
    SELECT         COUNT (nodeId)
    FROM         dbo.cmsDocument
    WHERE         published = 1
)

insert into #tempReturning SELECT 'Not Published',
(
    (
        SELECT         COUNT (DISTINCT nodeId)
        FROM         dbo.cmsDocument
    )
    -
    (
    SELECT         COUNT (nodeId)
    FROM         dbo.cmsDocument
    WHERE         published = 1
    )
)

SELECT * FROM #tempReturning
DROP TABLE #tempReturning




:):D:blush: :ermm::no::p:tease::thumbup::w00t:
daniel2
Posted: Sunday, August 20, 2006 9:42:42 PM
Rank: Newbie

Joined: 8/8/2006
Posts: 7
Daniel Bj&#248;rnbakk wrote:

testing SQL

Code:


create table #tempReturning (Header nvarchar(50), Value int)

insert into #tempReturning SELECT 'Published',
(
    SELECT         COUNT (nodeId)
    FROM         dbo.cmsDocument
    WHERE         published = 1
)

insert into #tempReturning SELECT 'Not Published',
(
    (
        SELECT         COUNT (DISTINCT nodeId)
        FROM         dbo.cmsDocument
    )
    -
    (
    SELECT         COUNT (nodeId)
    FROM         dbo.cmsDocument
    WHERE         published = 1
    )
)

SELECT * FROM #tempReturning
DROP TABLE #tempReturning




:):D:blush: :ermm::no::p:tease::thumbup::w00t:
daniel2
Posted: Sunday, August 20, 2006 9:46:36 PM
Rank: Newbie

Joined: 8/8/2006
Posts: 7
Daniel Bj&#248;rnbakk wrote:

testing SQL

Code:


create table #tempReturning (Header nvarchar(50), Value int)

insert into #tempReturning SELECT 'Published',
(
    SELECT         COUNT (nodeId)
    FROM         dbo.cmsDocument
    WHERE         published = 1
)

insert into #tempReturning SELECT 'Not Published',
(
    (
        SELECT         COUNT (DISTINCT nodeId)
        FROM         dbo.cmsDocument
    )
    -
    (
    SELECT         COUNT (nodeId)
    FROM         dbo.cmsDocument
    WHERE         published = 1
    )
)

SELECT * FROM #tempReturning
DROP TABLE #tempReturning




:):D:blush: :ermm::no::p:tease::thumbup::w00t:
daniel2
Posted: Sunday, August 20, 2006 9:48:07 PM
Rank: Newbie

Joined: 8/8/2006
Posts: 7
Daniel Bj&#248;rnbakk wrote:

testing SQL

Code:


create table #tempReturning (Header nvarchar(50), Value int)

insert into #tempReturning SELECT 'Published',
(
    SELECT         COUNT (nodeId)
    FROM         dbo.cmsDocument
    WHERE         published = 1
)

insert into #tempReturning SELECT 'Not Published',
(
    (
        SELECT         COUNT (DISTINCT nodeId)
        FROM         dbo.cmsDocument
    )
    -
    (
    SELECT         COUNT (nodeId)
    FROM         dbo.cmsDocument
    WHERE         published = 1
    )
)

SELECT * FROM #tempReturning
DROP TABLE #tempReturning




:):D:blush: :ermm::no::p:tease::thumbup::w00t:
daniel2
Posted: Sunday, August 20, 2006 9:51:06 PM
Rank: Newbie

Joined: 8/8/2006
Posts: 7
Daniel Bj&#248;rnbakk wrote:

testing SQL

Code:


create table #tempReturning (Header nvarchar(50), Value int)

insert into #tempReturning SELECT 'Published',
(
    SELECT         COUNT (nodeId)
    FROM         dbo.cmsDocument
    WHERE         published = 1
)

insert into #tempReturning SELECT 'Not Published',
(
    (
        SELECT         COUNT (DISTINCT nodeId)
        FROM         dbo.cmsDocument
    )
    -
    (
    SELECT         COUNT (nodeId)
    FROM         dbo.cmsDocument
    WHERE         published = 1
    )
)

SELECT * FROM #tempReturning
DROP TABLE #tempReturning




:):D:blush: :ermm::no::p:tease::thumbup::w00t:
daniel2
Posted: Sunday, August 20, 2006 10:13:56 PM
Rank: Newbie

Joined: 8/8/2006
Posts: 7
Daniel Bj&#248;rnbakk wrote:

testing SQL

Code:


create table #tempReturning (Header nvarchar(50), Value int)

insert into #tempReturning SELECT 'Published',
(
    SELECT         COUNT (nodeId)
    FROM         dbo.cmsDocument
    WHERE         published = 1
)

insert into #tempReturning SELECT 'Not Published',
(
    (
        SELECT         COUNT (DISTINCT nodeId)
        FROM         dbo.cmsDocument
    )
    -
    (
    SELECT         COUNT (nodeId)
    FROM         dbo.cmsDocument
    WHERE         published = 1
    )
)

SELECT * FROM #tempReturning
DROP TABLE #tempReturning




:):D:blush: :ermm::no::p:tease::thumbup::w00t:

hmm.. works now?
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.