%META:TOPICINFO{author="TWikiContributor" date="1156794737" format="1.1" version="1.1"}%
---+!! %TOPIC%
See also: %TWIKIWEB%.BlogPlugin, %TWIKIWEB%.BlogUp

---++ Create a new blog
<noautolink>
<form name="blogFactoryForm" action="%SCRIPTURLPATH{rest}%/BlogPlugin/createblog" method="post">
<input type="hidden" name="webname" value="%WEB%" />
<input type="hidden" name="topicname" value="%TOPIC%" />
<input type="hidden" name="baseweb" value="_BlogPlugin" />
<input type="hidden" name="webbgcolor" value="#D0D0D0" size="16" /> 
<input type="hidden" name="nosearchall" value="" />
<div class="twikiPageForm">
<table>
<tr>
  <td class="twikiFirstCol">Name:</td>
  <td><input name="newweb" type="text" size="40" value="" /></td>
</tr>
<tr>
  <td class="twikiFirstCol">Slogan:</td>
  <td><input type="text" name="tagline" size="40" value="" /></td>
</tr>
<tr>
  <td valign="top" class="twikiFirstCol">Options:</td>
  <td>%TWISTYBUTTON{id="advopts" showlink="Show" hidelink="Hide"}%</td>
</tr>
<tr>
  <td colspan="2" style="padding:0px;margin:0px;">
  %TWISTYTOGGLE{id="advopts" mode="div" remember="on"}%
  <table>
    <tr style="%CALC{"$IF($EXISTS(%TWIKIWEB%.NatSkin),,display:none)"}%">
      <td valign="top" class="twikiFirstCol">Style:</td>
      <td valign="top">
	<select name="style">
	%FORMATLIST{"%KNOWNSTYLES%" pattern="\s*(.*)\s*" format="<option $percntIFSKINSTATE{style=\"$1\" then=\" selected=\\"selected\\"\"}$percnt>$1</option>" join="\n" separator=" "}%
	</select>
	<select name="stylevariation">
	%FORMATLIST{"none, %KNOWNVARIATIONS%" pattern="\s*(.*)\s*" format="<option $percntIFSKINSTATE{variation=\"$1\" then=\" selected=\\"selected\\"\"}$percnt>$1</option>" join="\n" separator=" "}%
	</select>
    </tr>
    <tr>
      <td valign="top" class="twikiFirstCol"><a class="nop" target="_blank" href="http://last.fm">LastFM</a> Nick:</td>
      <td valign="top"><input name="lastfmnick" type="text" value="" size="40" /></td>
    </tr>
    <tr>
      <td valign="top" class="twikiFirstCol"><a class="nop" target="_blank" href="http://www.technorati.com">Technorati</a> Code:</td>
      <td valign="top"><input name="technoraticode" type="text" value="" size="40" /></td>
    </tr>
    <tr>
      <td valign="top" class="twikiFirstCol"><a class="nop" target="_blank" href="https://www.google.com/adsense">Google Adsense</a> Code:</td>
      <td valign="top"><input name="googleadsensecode" type="text" value="" size="40" /></td>
    </tr>
  </table>
  %ENDTWISTY%
  </td>
</tr>
<tr>
  <td class="twikiFirstCol">&nbsp;</td>
  <td>
    <input type="submit" class="twikiSubmit natOkButton" value="Submit" />
    <input type="reset" class="natCancelButton" value="Reset" />
  </td>
</tr>
</table>
</div>
</form>

%IFDEFINEDTHEN{"%URLPARAM{"blogfactorymsg"}%" glue="off"}%
<div class="twikiPageForm">
<center>
%URLPARAM{"blogfactorymsg"}%

<input type="button" value="OK" class="natOkButton" 
~~~ onclick="window.location.href='%SCRIPTURL{"view"}%/%URLPARAM{"newweb"}%/WebHome'"
~~~ />
</center>
</div>
%FIDEFINED%

---++ Known blogs on <nop>%WIKITOOLNAME%
<table class="twikiTable">
<tr>
  <th>Name</th>
  <th>Tagline</th>
  <th>Author(s)</th>
  <th>Latest Posting</th>
</tr>
%~~ SEARCH{"WEBDB = TWiki::Plugins::BlogPlugin::WebDB" 
~~~   nonoise="on" web="all" excludetopic="%TOPIC%"
~~~   format="<tr>
~~~     <td>[[$web.WebHome][$web]]</td>
~~~     <td>$percntVAR{\"SITEMAPWHAT\" web=\"$web\"}$percnt</td>
~~~     <td>$percntDBQUERY{\"TopicType=~'\bBlogAuthor\b'\" 
~~~           web=\"$web\"
~~~           format=\"[[$dollarweb.$dollartopic][$dollartopic]]\"
~~~         }$percnt
~~~     </td>
~~~     <td>$percntDBQUERY{\"TopicType=~'\bBlogEntry\b' AND State='enabled'\" web=\"$web\"
~~~           format=\"
~~~             <a href=\\"%SCRIPTURL{"view"}%/$dollarweb/$dollartopic\\"
~~~                title=\\"$expand(Headline)\\">
*~~               $dollarpercntTIMESINCE{\\"$expand(createdate)\\" format=\\"$dollartime ago\\"}$dollarpercnt
*~~             </a>\" 
~~~           limit=\"1\" sort=\"created\" reverse=\"on\"
~~~         }$percnt
~~~     </td>
~~~   </tr>"
~~~ }%
</table>
</noautolink>

