CMS moduulit

eero
Site Admin
Viestit: 329
Liittynyt: 07 Marras 2007 20:17

CMS moduulit

Viesti Kirjoittaja eero »

captcha

Hae http://dev.cmsmadesimple.org/project/list?letter=C

Käytä hn_captcha

Hyvät asetukset:
  • chars: 5
    minsize: 10
    maxsize: 15
    maxrotation: 25
    noise: Päällä
    websafecolors: ei
    secretstring: Älä muuta
    secretposition: 15
    collect_garbage_after: 10
    maxlifetime: 30
eero
Site Admin
Viestit: 329
Liittynyt: 07 Marras 2007 20:17

Palautelomake

Viesti Kirjoittaja eero »

Lomakkeenrakentaja eli Form Builder

Hae http://dev.cmsmadesimple.org/project/li ... r=F&page=2

Aika hieno valmis XML-lomake:
otayhteytta.xml.txt
Ota-yhteytta
(14.37 KiB) Tiedosto ladattu 966 kertaa
Lisätään lomake Lisää uusi lomake

Annetaan Pääsivulta lomakkeelle nimi ja alias

Luodaan muutama tekstikenttä:
  • Nimi Tekstikenttä pituus: 80, Pakollinen
    Vastaanottaja * Lähetä vastaukset asetettuihin sähköpostiosoitteisiin Vastaanottaja: eero.lehtinen@poytya.fi
    Osoite Tekstikenttä pituus: 80, Ei tarkistusta
    Puhelinnumero Tekstikenttä pituus: 80, Ei tarkistusta
    Sähköpostiosoite Tekstikenttä pituus: 80, Sähköpostiosoite
    Aihe Tekstikenttä pituus: 80, Ei tarkistusta
    Palaute Tekstialue Pakollinen non-wysiwyg, 10 riviä, 50 saraketta
Siirryttään Captcha-asetukset-välilehdelle ja laitetaan tarkastus päälle

Muokkaa myös virheilmoitus ja teksti haluamaksesi

Valitaan lomakkeen malli:
- Kannattaa laittaa taulukkopohja jossa otsikko joko vasemmalla tai yläpuolella

Jos käytät yläpuolella niin seuraava on hyvä:

Koodi: Valitse kaikki

{* TABLE FORM LAYOUT / Field titles on Top *}
{* next line sets number of columns for things like checkbox groups *}
{assign var="cols" value="3"}
{literal}
<script type="text/javascript">
function fbht(htid)
	{
		var fbhtc=document.getElementById(htid);
		if (fbhtc)
			{
			if (fbhtc.style.display == 'none')
				{
				fbhtc.style.display = 'inline';
				}
			else
				{
				fbhtc.style.display = 'none';
				}
			}
}
</script>
{/literal}
{$fb_form_header}
{if $fb_form_done == 1}
	{* This first section is for displaying submission errors *}
	{if $fb_submission_error}
		<div class="viestivirhe">{$fb_submission_error}</div>
		{if $fb_show_submission_errors}
			<table class="virhe">
			{foreach from=$fb_submission_error_list item=thisErr}
				<tr><td>{$thisErr}</td></tr>
			{/foreach}
			</table>
		{/if}
	{/if}
{else}
	{* this section is for displaying the form *}
	{* we start with validation errors *}
	{if $fb_form_has_validation_errors}
		<div class="viestivirhe">
		
		{foreach from=$fb_form_validation_errors item=thisErr}
			{$thisErr}<br><br>
		{/foreach}
		
		</div>
	{/if}
	{if $captcha_error}
		<div class="viestivirhe">{$captcha_error}<br><br></div>
	{/if}

	{* and now the form itself *}
	{$fb_form_start}
	<div>{$fb_hidden}</div>

	<table{if $css_class != ''} class="{$css_class}"{/if}>
	{if $total_pages gt 1}<tr><td colspan="2">{$title_page_x_of_y}</td></tr>{/if}
	{foreach from=$fields item=entry}
		{if $entry->display == 1 &&
			$entry->type != '-Fieldset Start' &&
			$entry->type != '-Fieldset End' }
		<tr>
			{strip}
			<td valign="top"
			{if $entry->required == 1 || $entry->css_class != ''} class=" 
				{if $entry->required == 1}
					required
				{/if}
				{if $entry->required == 1 && $entry->css_class != ''} {/if}
				{if $entry->css_class != ''}
					{$entry->css_class}
				{/if}
				"
			{/if}
			>
			{if $entry->hide_name == 0}
				{if $entry->required_symbol != ''}
					{$entry->required_symbol} 
				{/if}
				{$entry->name}
			{/if}
			</td></tr><tr><td align="left" valign="top"{if $entry->css_class != ''} class="{$entry->css_class}"{/if}>
			{if $entry->multiple_parts == 1}
			<table>
				<tr>
				{section name=numloop loop=$entry->input}
					<td>{$entry->input[numloop]->input} {$entry->input[numloop]->name}{if $entry->input[numloop]->op} {$entry->input[numloop]->op}{/if}</td>
					{if not ($smarty.section.numloop.rownum mod $cols)}
						{if not $smarty.section.numloop.last}
				</tr><tr>
						{/if}
					{/if}
					{if $smarty.section.numloop.last}
						{math equation = "n - a % n" n=$cols a=$entry->input|@count assign="cells"}
						{if $cells ne $cols}
							{section name=pad loop=$cells}
								<td> </td>
							{/section}
						{/if}
				</tr>
					{/if}
				{/section}
			</table>
			{else}
				{if $entry->smarty_eval == '1'}{eval var=$entry->input}{else}{$entry->input}{/if}
			{/if}
			
			{if $entry->helptext != ''} <a href="javascript:fbht('{$entry->field_helptext_id}')"><img src="modules/FormBuilder/images/info-small.gif" alt="Help" /></a>
					<span id="{$entry->field_helptext_id}" style="display:none" class="fbr_helptext">{$entry->helptext}</span>{/if}
			
			</td></tr>
			{/strip}
		{/if}
	{/foreach}
	{if $has_captcha == 1}
	<tr><td>{$title_captcha}<br /><br />{$input_captcha}<br /><br /></td></tr><tr><td>{$graphic_captcha}<br /><br /></td></tr>
	{/if}
	<tr><td>{$prev}</td></tr><tr><td>{$submit}</td></tr>
</table>
{$fb_form_end}
{/if}
{$fb_form_footer}
Jos taas sivulla niin seuraava on hyvä:

Koodi: Valitse kaikki

{* TABLE FORM LAYOUT / Field titles on Left *}
{* next line sets number of columns for things like checkbox groups *}
{assign var="cols" value="3"}
{literal}
<script type="text/javascript">
function fbht(htid)
	{
		var fbhtc=document.getElementById(htid);
		if (fbhtc)
			{
			if (fbhtc.style.display == 'none')
				{
				fbhtc.style.display = 'inline';
				}
			else
				{
				fbhtc.style.display = 'none';
				}
			}
}
</script>
{/literal}
{$fb_form_header}
{if $fb_form_done == 1}
	{* This first section is for displaying submission errors *}
	{if $fb_submission_error}
		<div class="viestivirhe">{$fb_submission_error}</div>
		{if $fb_show_submission_errors}
			<table class="virhe">
			{foreach from=$fb_submission_error_list item=thisErr}
				<tr><td>{$thisErr}</td></tr>
			{/foreach}
			</table>
		{/if}
	{/if}
{else}
	{* this section is for displaying the form *}
	{* we start with validation errors *}
	{if $fb_form_has_validation_errors}
		<div class="viestivirhe">
		{foreach from=$fb_form_validation_errors item=thisErr}
			{$thisErr}<br /><br />
		{/foreach}
		</div>
	{/if}
	{if $captcha_error}
		<div class="viestivirhe">{$captcha_error}<br /><br /></div>
	{/if}

	{* and now the form itself *}
	{$fb_form_start}
	<div>{$fb_hidden}</div>

	<table {if $css_class != ''} class="{$css_class}"{/if}>
	{if $total_pages gt 1}<tr><td colspan="2">{$title_page_x_of_y}</td></tr>{/if}
	{foreach from=$fields item=entry}
		{if $entry->display == 1 &&
			$entry->type != '-Fieldset Start' &&
			$entry->type != '-Fieldset End' }
		<tr>
			{strip}
			<td align="right" valign="top"
			{if $entry->required == 1 || $entry->css_class != ''} class=" 
				{if $entry->required == 1}
					required
				{/if}
				{if $entry->required == 1 && $entry->css_class != ''} {/if}
				{if $entry->css_class != ''}
					{$entry->css_class}
				{/if}
				"
			{/if}
			>
			{if $entry->hide_name == 0}

				{if $entry->required_symbol != ''}
					{$entry->required_symbol} 
				{/if}


				{$entry->name}: 
			{/if}
			</td><td align="left" valign="top"{if $entry->css_class != ''} class="{$entry->css_class}"{/if}>
			{if $entry->multiple_parts == 1}
			<table>
				<tr>
				{section name=numloop loop=$entry->input}
					<td>{$entry->input[numloop]->input} {$entry->input[numloop]->name}{if $entry->input[numloop]->op} {$entry->input[numloop]->op}{/if}</td>
					{if not ($smarty.section.numloop.rownum mod $cols)}
						{if not $smarty.section.numloop.last}
				</tr><tr>
						{/if}
					{/if}
					{if $smarty.section.numloop.last}
						{math equation = "n - a % n" n=$cols a=$entry->input|@count assign="cells"}
						{if $cells ne $cols}
							{section name=pad loop=$cells}
					<td> </td>
							{/section}
						{/if}
				</tr>
					{/if}
				{/section}
				</table>
			{else}
				{if $entry->smarty_eval == '1'}{eval var=$entry->input}{else}{$entry->input}{/if}
			{/if}
			
			{if $entry->helptext != ''} <a href="javascript:fbht('{$entry->field_helptext_id}')"><img src="modules/FormBuilder/images/info-small.gif" alt="Help" /></a>
					<span id="{$entry->field_helptext_id}" style="display:none" class="fbr_helptext">{$entry->helptext}</span>{/if}
			
			
			</td></tr>
			{/strip}
		{/if}
	{/foreach}
	{if $has_captcha == 1}
		<tr><td></td></td><td>{$title_captcha}</td></tr>
<tr><td></td></td><td><br />{$input_captcha}<br /></td></tr>
<tr><td></td></td><td><br />{$graphic_captcha}<br /><br /></td></tr>
	{/if}
		<tr><td>{$prev}</td><td>{$submit}</td></tr>
	</table>
	{$fb_form_end}
{/if}
{$fb_form_footer}




FormBuilder Default Style
eero
Site Admin
Viestit: 329
Liittynyt: 07 Marras 2007 20:17

Palautelomake jatkuu... (v***tun muokkain)

Viesti Kirjoittaja eero »

Oothan tässä vaiheessa jo liittänyt palautelomakkeen tyylin sivupohjaan?

Avaa tyylitiedosto ja liitä siihen seuraava:

Koodi: Valitse kaikki

.virhe {
color: #ff0000;
font-weight: bold;
}

.viestivirhe {
color: #ff0000;
font-weight: bold;
}
Näin saat hienon punaisen värin virheille :-)

Lähetysmallisivulta voit määrittää millaisen palautteen lähettäjälle näytetään lähetyksen jälkeen.
Seuraava on ihan kohtuullinen:

Koodi: Valitse kaikki

<h3>Kiitos viestistä {$nimi}. Viestisi on lähetetty</h3>

Lähettetty viesti:<br /><br />

{if $fld_29 != "" && $fld_29 != "[ei annettu]" }<strong>Nimi</strong>: {$fld_29}<br /><br />{/if}
{if $fld_31 != "" && $fld_31 != "[ei annettu]" }<strong>Osoite</strong>: {$fld_31}<br /><br />{/if}
{if $fld_32 != "" && $fld_32 != "[ei annettu]" }<strong>Puhelinnumero</strong>: {$fld_32}<br /><br />{/if}
{if $fld_33 != "" && $fld_33 != "[ei annettu]" }<strong>Sähköpostiosoite</strong>: {$fld_33}<br /><br />{/if}
{if $fld_35 != "" && $fld_35 != "[ei annettu]" }<strong>Aihe</strong>: {$fld_35}<br /><br />{/if}
{if $fld_36 != "" && $fld_36 != "[ei annettu]" }<strong>Palaute</strong>: {$fld_36}<br />{/if}
Määritellään vielä millaisen vastauksen vastaanottaja saa:

Valitse kenttä * Lähetä vastaukset asetettuihin email osoitteisiin ja sieltä Lisäasetukset-välilehti
Tässä määritellään vastaanottajan postiin tulevan viestin muoto ja kentät.

Hyvä pohja:

Koodi: Valitse kaikki

<table border="0" style="margin-left: 30; margin-top: 30">
<tr>
<td colspan="2"><h2><font face="Verdana" color="#FF0000">Viesti palautelomakkeelta</font></h2><br>
<tr>
<td width="203"><font face="Verdana"><strong>Nimi</strong>: </font> </td>
<td width="309"><font face="Verdana">{$nimi}</font></td>
</tr>
<tr>
<td width="203"><font face="Verdana"><strong>Osoite</strong>:  </font>  </td>
<td width="309"><font face="Verdana">{$osoite}</font></td>
</tr>
<tr>
<td width="203"><font face="Verdana"><strong>Puhelinnumero</strong>: </font> </td>
<td width="309"><font face="Verdana">{$puhelinnumero}</font></td>
</tr>
<tr>
<td width="203"><font face="Verdana"><strong>Sähköpostiosoite</strong>:  </font>  </td>
<td width="309"><font face="Verdana">{$fld_33}</font></td>
</tr>
<tr>
<td width="203"><font face="Verdana"><strong>Aihe</strong>: </font> </td>
<td width="309"><font face="Verdana">{$aihe}</font></td>
</tr>
<tr>
<td  colspan="2"><font face="Verdana"><strong>Viesti</strong>:</font></td>
</tr>
<tr>
<td  colspan="2"><font face="Verdana">{$palaute}</font></td>
</tr>
<tr>
<td width="203"><font face="Verdana"><strong>Lähetyspäivä</strong>: </font> </td>
<td width="309"><font face="Verdana">{$sub_date}</font></td>
</tr>

<tr>
<td  colspan="2"><font face="Verdana"><br><br><strong>Lähettäjän IP-osoite</strong>: {$sub_source_ip}<br />
</font></td>
</tr>
</table>
Lopuksi liitetään sivuun johon palautelomake halutaan koodi:

{FormBuilder form='palautelomake'}
eero
Site Admin
Viestit: 329
Liittynyt: 07 Marras 2007 20:17

Tekstin koon muuttaminen

Viesti Kirjoittaja eero »

Voit muuttaa tekstin kokoa näppärästi pikku javascriptillä.

Teksti muutetaan main-tyylin sisällä. Ei koko sivustolla.

Laita sivupohjan head-tagin sisään seuraava koodi:

Koodi: Valitse kaikki

{literal}
<script src="uploads/sivupohja/koko.js" type="text/javascript"></script>
</script>
{/literal}
Laita sivupohjaan haluamaasi paikkaan seuraava koodi:

Koodi: Valitse kaikki

<a href="javascript:pienenna();"><img border="0" src="/uploads/sivupohja/valinnat/pienenna.gif" title="Pienennä tekstikokoa" alt="Pienennä tekstikokoa"></a>
<a href="javascript:suurenna();"><img border="0" src="/uploads/sivupohja/valinnat/suurenna.gif" title="Suurenna tekstikokoa" alt="Suurenna tekstikokoa">
Muokkaa polut oikeiksi ja lataa scripti ja kuvat sinne.

koko.js

Koodi: Valitse kaikki

var minTxtSize = 8;
var maxTxtSize = 25;
var i=11;
function suurenna(){
var num = i++;
var div = document.getElementById("main");
if(maxTxtSize != i){
div.style.fontSize = num + "px";
}else{
document.getElementById("size_1").disabled= true;
document.getElementById("size_2").disabled= false;
return;
} 
}
function pienenna(){
var num = i--;
var div = document.getElementById("main");
if(minTxtSize != i){
div.style.fontSize = num + "px";
}else{
document.getElementById("size_1").disabled= false;
document.getElementById("size_2").disabled= true;
return;
} 
}
kuvat.zip
Kuvat
(833 Tavua) Tiedosto ladattu 1014 kertaa
eero
Site Admin
Viestit: 329
Liittynyt: 07 Marras 2007 20:17

Toisen kentän lisääminen jossa eri sisältöä joka sivulla

Viesti Kirjoittaja eero »

Tämä on näppärä jos halutaan lisätä sisältöä tai sivupalkkiin ja sisältö on joka sivulla erilaista.

Lisää haluamaasi kohtaan sivustolle seuraava koodi:

Koodi: Valitse kaikki

{content block="Vastuuhenkilön yhteystiedot" online="true"}
Tällöin muokattaessa sisältöä tulee uusi kenttä jonka nimi on "Vastuuhenkilön yhteystiedot"
eero
Site Admin
Viestit: 329
Liittynyt: 07 Marras 2007 20:17

Uutismoduuli

Viesti Kirjoittaja eero »

Vhän tönkkö oletusasetuksilla.

Huomaa että tyylin nimiä on muutettu.

Laitetaan sivuun jossa uutiset halutaan näyttää koodi:

Koodi: Valitse kaikki

{news category="etusivu" summarytemplate="Etusivu koostepohja" detailtemplate="Etusivu yksityiskohtainen"}
Tyylitietosto:

Koodi: Valitse kaikki

div#news {
/* margin for the entire div surrounding the news items */
	margin: 2em 0 1em 0em;
/* border set here */
	border: 1px solid #909799;
/* sets it off from surroundings */
	background: #fefefe;

}
div#news h2 {
	line-height: 2em;
/* you can set your own image here */
/*	background: url([[root_url]]/uploads/ngrey/darknav.png) repeat-x left center; */
	color: #073D1C;
	border: none
}
.NewsSummary {
/* padding for the news article summary */
	padding: 0.5em 0.5em 1em;
/* margin to the bottom of the news article summary */
	margin: 0 0.5em 1em 0.5em;
	border-bottom: 1px solid #ccc;
/* Tekstin väri */
color: #000000;

}

/* Lähetyspäivä */
.NewsSummaryPostdate {
/* smaller than default text size */
/*	font-size: 11px; */
/* bold to set it off from text */
	font-weight: bold;
             float:right;
             margin: -25px 0 0 0;
             color: #073D1C;
}

/* Määritellään otsikon teksti h3:ksi */

div#newsotsikko h3 {
	font-weight: bold;
/* Yläpuolen määritys */
	padding-top: 0.5em;
            text-decoration:none;
            font-size:16px;
}
div#newsotsikko h3 a:link{
/* Otsikon väri */
             color: #073D1C;
	font-weight: bold;
            text-decoration:none;
            font-size:16px;
}
div#newsotsikko h3 a:hover{
	font-weight: bold;
            font-size: 16px;	
            color: #073D1C;
            text-decoration:none;
}
div#newsotsikko h3 a:visited{
             color: #073D1C;
	font-weight: bold;
             text-decoration:none;
             font-size:16px;
}



.NewsSummaryCategory {
/* italic to set it off from text */
	font-style: italic;
	margin: 5px 0;
}
.NewsSummaryAuthor {
/* italic to set it off from text */
	font-style: italic;
	padding-bottom: 0.5em;
}
.NewsSummarySummary {
/* larger than default text */
	line-height: 140%;
}
.NewsSummaryContent {
/* larger than default text */
	line-height: 140%;
}

/* Lue lisää */
div#naytalisaa h3 {
	padding-top: 0.5em;
             color: #073D1C;
             font-weight: bold;
             font-size: 11px;
             font-weight:normal;
}
div#naytalisaa h3 a:link {
             color: #073D1C;
             font-weight: bold;
             font-size: 11px;
             font-weight:normal;
}
div#naytalisaa h3 a:hover {
             color: #073D1C;
             font-weight: bold;
             font-size: 11px;
             font-weight:normal;
	text-decoration: none;
/*	background-color: #fefefe;*/
}
div#naytalisaa h3 a:visited {
             color: #073D1C;
             font-weight: bold;
             font-size: 11px;
             font-weight:normal;
}




#NewsPostDetailDate {
/* smaller text */
/*	font-size: 11px; */
	margin-bottom: 5px;
/* bold to set it off from text */
	font-weight: bold;
}

#NewsPostDetailTitle {
/* Otsikon väri */
	color: #073D1C;
}

#NewsPostDetailSummary {
/* larger than default text */
	line-height: 150%;
}
#NewsPostDetailCategory {
/* italic to set it off from text */
	font-style: italic;
	border-top: 1px solid #ccc;
	margin-top: 0.5em;
	padding: 0.2em 0;
}
#NewsPostDetailContent {
	margin-bottom: 15px;
/* larger than default text */
	line-height: 150%;
}
#NewsPostDetailAuthor {
	padding-bottom: 1.5em;
/* italic to set it off from text */
	font-style: italic;
}
/* more divs, left unstyled, just so you know the IDs of them */ 
#NewsPostDetailTitle {
}
#NewsPostDetailHorizRule {
}
#NewsPostDetailPrintLink {
}
#NewsPalaaTakaisin h3 a:hover {}
div#NewsPalaaTakaisin h3 {
	padding-top: 0.5em;
             color: #073D1C;
             font-weight: bold;
             font-size: 11px;
             font-weight:normal;
}
div#NewsPalaaTakaisin h3 a:link {
             color: #073D1C;
             font-weight: bold;
             font-size: 11px;
             font-weight:normal;
}
div#NewsPalaaTakaisin h3 a:hover {
             color: #073D1C;
             font-weight: bold;
             font-size: 11px;
             font-weight:normal;
	text-decoration: none;
/*	background-color: #fefefe;*/
}
div#NewsPalaaTakaisin h3 a:visited {
             color: #073D1C;
             font-weight: bold;
             font-size: 11px;
             font-weight:normal;
}

div#news ul li {
	padding: 2px 2px 2px 5px;
	margin-left: 20px;
}
Näppärä koostepohja:

Koodi: Valitse kaikki

{if $pagecount > 1}
  <p>
{if $pagenumber > 1}
{$firstpage} {$prevpage} 
{/if}
{$pagetext} {$pagenumber} {$oftext} {$pagecount}
{if $pagenumber < $pagecount}
 {$nextpage} {$lastpage}
{/if}

{/if}
{foreach from=$items item=entry}
<div class="NewsSummary">

<div id="newsotsikko">
<h3><a href="{$entry->moreurl}" title="{$entry->title|cms_escape:htmlall}">{$entry->title|cms_escape}</a></h3>
{if $entry->postdate}
	<div class="NewsSummaryPostdate">
		{$entry->postdate|cms_date_format}
	</div>
{/if}
</div>
<p>
{if $entry->summary}
	<div class="NewsSummarySummary">
		{eval var=$entry->summary}
	</div>
	<div id="naytalisaa">
		<h3>[ {$entry->morelink >>>} ]</h3>
	</div>

{else if $entry->content}

	<div class="NewsSummaryContent">
		{eval var=$entry->content}
	</div>
{/if}

{if isset($entry->extra)}
    <div class="NewsSummaryExtra">
        {eval var=$entry->extra}
	{* {cms_module module='Uploads' mode='simpleurl' upload_id=$entry->extravalue} *}
    </div>
{/if}
{if isset($entry->fields)}
  {foreach from=$entry->fields item='field'}
     <div class="NewsSummaryField">
        {if $field->type == 'file'}
          <img src="{$entry->file_location}/{$field->value}"/>
        {else}
          {$field->name}: {eval var=$field->value}
        {/if}
     </div>
  {/foreach}
{/if}

</div>
{/foreach}
<!-- End News Display Template -->
Ja näppärä sisältöpohja:

Koodi: Valitse kaikki

{* set a canonical variable that can be used in the head section if process_whole_template is false in the config.php *}
{if isset($entry->canonical)}
  {assign var='canonical' value=$entry->canonical}
{/if}

<h3 id="NewsPostDetailTitle">{$entry->title|cms_escape:htmlall}</h3>    
{if $entry->postdate}
	<div id="NewsPostDetailDate">
Lähetetty: {$entry->postdate|cms_date_format}
			</div>
{/if}

<hr id="NewsPostDetailHorizRule" />

{if $entry->summary}
	<div id="NewsPostDetailSummary">
		<strong>
			{eval var=$entry->summary}
		</strong>
	</div>
{/if}
<hr id="NewsPostDetailHorizRule" />

<p>
<div id="NewsPostDetailContent">
	{eval var=$entry->content}
</div>

{if $entry->extra}
	<div id="NewsPostDetailExtra">
		{$extra_label} {$entry->extra}
	</div>
{/if}
</p>
{if $return_url != ""}
<div id="NewsPalaaTakaisin"><h3>[ {$return_url} ]{if $category_name != ''} - {$category_link} ]{/if}</h3></div>
{/if}

{if isset($entry->fields)}
  {foreach from=$entry->fields item='field'}
     <div class="NewsDetailField">
        {if $field->type == 'file'}
	  {* this template assumes that every file uploaded is an image of some sort, because News doesn't distinguish *}
          <img src="{$entry->file_location}/{$field->value}"/>
        {else}
          {$field->name}: {eval var=$field->value}
        {/if}
     </div>
  {/foreach}
{/if}
<br>
eero
Site Admin
Viestit: 329
Liittynyt: 07 Marras 2007 20:17

Sivupalkkien sisältöä news-moduulista

Viesti Kirjoittaja eero »

Joskus kannattaa laittaa sivupalkkien sisältöä uutisten sisään. Tällöin ei tarvi koskea enää lopulliseen sivupohjaan vaan voi hallita tietoja uutisten kautta. Näppärä jos ei halua antaa muiden koskea sivupohjaan.

Laitetaan sivupohjaan kohtaan jossa muokattava kenttä halutaan näyttää koodi:

Koodi: Valitse kaikki

{news category="Yhteystiedot" summarytemplate="Yhteystiedot" detailtemplate="Yhteystiedot"}
Koostepohja:

Koodi: Valitse kaikki

{foreach from=$items item=entry}
{if $entry->summary}
  {eval var=$entry->summary}
{else if $entry->content}
  {eval var=$entry->content}
{/if}
{/foreach}
Muuhun ei tarvi koskea. Sitten vain laittamaan sisältöä koosteeseen ja yksityiskotaiseen kirjoita jotain. Yksityiskohtainen ei tule koskaan näkyviin.
eero
Site Admin
Viestit: 329
Liittynyt: 07 Marras 2007 20:17

Tulostus

Viesti Kirjoittaja eero »

Tulostus:
{print showbutton=true script=true popup="true" src_img="/uploads/sivupohja/valinnat/tulostus.png"}
PDF:
{print showbutton=true script=true pdf="true" src_img="/uploads/sivupohja/valinnat/pdf.png"}

Huomaa että noissa on omat kuvat. Poistaa kuvan niin tulee normaali kuva.

Linkkimalli:

Koodi: Valitse kaikki

{if isset($imgsrc)}
{capture assign='image'}
  <img src="{$imgsrc}" title="{$linktext}" alt="{$linktext}" {if isset($imgclass) && $imgclass!=''}class="{$imgclass}"{/if} />
{/capture}
<a href="{$href}" class="{$class}" {$target} {if isset($more)}{$more}{/if} rel="nofollow">{$image}</a>
{else}
<a href="{$href}" class="{$class}" {$target} {if isset($more)}{$more}{/if} rel="nofollow">{$image}{$linktext}</a>
{/if}

Normaali tulostus

Pohja:

Koodi: Valitse kaikki

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <title>Tulostetaan {title}</title>
    <meta name="robots" content="noindex"></meta>
    <base href="{$rooturl}" />
    <meta http-equiv="Content-Type" content="text/html; charset={$encoding}" />

    {cms_stylesheet media='print' templateid=$templateid}

    {if $overridestylesheet!=''}
    <style type="text/css">
    {$overridestylesheet}
    </style>
    {/if}
    
  </head>
  <body	style="background-color: white; color: black; background-image: none; text-align: left;">

<h2>{title}</h2>	
    {$content}
        
    {$printscript}
  </body>
</html>
PDF-tulostus

Pohja:

Koodi: Valitse kaikki

<h2>{$title}</h2>
{$content}<h2>{$title}</h2>
{$content}
eero
Site Admin
Viestit: 329
Liittynyt: 07 Marras 2007 20:17

Vaihtuva banneri

Viesti Kirjoittaja eero »

Banners Module

http://dev.cmsmadesimple.org/project/list?letter=B

Vaihtaa banneria päivitettäessä sivua tai siirryttäessä uudelle sivulle.

Luodaan uusi kategoria
Ladataan kuvat sopivaan paikkaan
Määritellään Bannerilistan sivupohjasta oikea kuvan koko

Muokataan kategoriasta sivupohjaa:

Koodi: Valitse kaikki

{strip}
  uploads/{$banner.image}
{/strip}
Laitetaan esim. otsikkobanneriksi seuraavasti:

Koodi: Valitse kaikki

<div id="header" style="background-image: url({cms_module module='Banners' category='otsikko'}); no-repeat; left; top;"> 
eero
Site Admin
Viestit: 329
Liittynyt: 07 Marras 2007 20:17

Tekstit kuviksi

Viesti Kirjoittaja eero »

truetypetext

http://dev.cmsmadesimple.org/project/li ... r=T&page=2

Näppärä jos käytetään fonttia jota ei normaalisti ole. Muuttaa tekstin kuviksi ja pystyy luomaan hienoja tehosteita.

Ladataan fontti välilehdeltä Font files
Luodaan uusi tyyli

Automatic replacement kannattaa pitää ContentPostRender-asetuksessa

Jos käytät läpinäkyvää taustaa niin kannattaa silti valita taustaväri joka on mahdollisimman paljon samanlainen kuin tausta.
Käytä AINA png-kuvia.

Voidaan käyttää myös valikoissa tyyliin:

Koodi: Valitse kaikki

{* CSS classes used in this template:
.activeparent - The top level parent when a child is the active/current page
li.active0n h3 - n is the depth/level of the node. To style the active page for each level separately. The active page is not clickable.
.clearfix - Used for the unclickable h3 to use the entire width of the li, just like the anchors. See the Tools stylesheet in the default CMSMS installation.
li.sectionheader h3 - To style section header
li.separator - To style the ruler for the separator *} 
{if $count > 0}
<ul>
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="<ul>" times=$node->depth-$node->prevdepth}
{elseif $node->depth < $node->prevdepth}
{repeat string="</li></ul>" times=$node->prevdepth-$node->depth}
</li>
{elseif $node->index > 0}</li>
{/if}
{* kun linkillä on alasivuja ja sivu on valittu *}
{if $node->parent == true or ($node->current == true and $node->haschildren == true)}
<li id="i{$node->id}" class="menuactive menuparent"><class="menuactive menuparent" href="{$node->url}"><span>{cms_module module="TruetypeText" style="aktiivinen" text=$node->menutext}</span>



{* kun linkillä on alasivuja*}
{elseif $node->haschildren == true and $node->type != 'sectionheader' and $node->type != 'separator'}

<li id="i{$node->id}" class="parent"><a class="parent" href="{$node->url}"><span>{cms_module module="TruetypeText" style="passiivinen" text=$node->menutext}</span></a>


{*Kun linkki on valittu *}
{elseif $node->current == true}

<li id="i{$node->id}" class="currentpage"><h3><span>{cms_module module="TruetypeText" style="aktiivinen" text=$node->menutext}</span></h3>


{*ei tee mitään *}
{elseif $node->type == 'sectionheader'}

<li id="i{$node->id}" class="sectionheader"><span>{cms_module module="TruetypeText" style="passiivinen" text=$node->menutext}</span>



{elseif $node->type == 'separator'}
<li id="i{$node->id}" class="separator" style="list-style-type: none;"> <hr />

{else}
{*Lisää id-numeron jos ei ole alasivuja*}
<li id="i{$node->id}">

<a href="{$node->url}"><span>{cms_module module="TruetypeText" style="passiivinen" text=$node->menutext}</span></a>


{/if}
{/foreach}
{repeat string="</li></ul>" times=$node->depth-1}</li>
</ul>
{/if}
eero
Site Admin
Viestit: 329
Liittynyt: 07 Marras 2007 20:17

Frontend User Management

Viesti Kirjoittaja eero »

Tarvitaan:
  • CustomContent
    Frontend Users
    CGExtensions

http://dev.cmsmadesimple.org/project/li ... r=C&page=3
http://dev.cmsmadesimple.org/project/li ... r=F&page=2
http://dev.cmsmadesimple.org/project/list?letter=C

Siirrytään Käyttäjän ominaisuudet-välilehdelle
Valitaan Lisää ominaisuus
  • Annetaan kaksi kenttää:
    • Annetaan sopiva nimi Esim. Nimi
      Kehoite on tieto jolla kenttä näkyy. Esim. Koko nimi
      Tyyppi on Teksti
      Pituus 30
      maksimipituus 255
      unique: kyllä
    Ja toinen
    • Annetaan nimeksi email
      Kehoite on tieto jolla kenttä näkyy. Esim. Sähköpostiosoite
      Tyyppi on Email-osoite
      Pituus 30
      maksimipituus 255
      unique: ei
Luodaan uusi ryhmä
  • Anna sopiva nimi
    Annetaan kuvaava nimi
    Valitaan Vaadittu kenttä molempiin
    Valitaan Ask in Lost Username nimelle mutta ei sähköpostille
Siirrytään Käyttäjät-välilehdelle
Valitaan Lisää käyttäjä
Annetaan tiedot ja liitetään luotuun ryhmään

Siirrytään Asetukset-välilehdelle
  • Automatically Create Unknown Users: Kyllä
    Vaadi vähintään yksi ryhmä per käyttäjä: Täppi
    Default user expiry period: 272
    Muut valinnat on poissa tai oletuksina
Siirrytään Builtin Authentication-välilehdelle
  • Allow users to request their username: Kyllä
    Allow users to request a password change: Kyllä
    Kenttien pituudet: 30
    Salli tupla-emailit: Kyllä
    Sähköpostiosoite on käyttäjänimi: Ei
    Kirjaudu sisään -napin otsikko: Kirjaudu
    PageID/Alias joka näytetään ulos kirjautumisen jälkeen: Mikä haluut (etusivu)
    Muut oletuksina
Jos unohtunut käyttäjätunnustietoja ei tule niin tarkasta asetukset...

Nyt on asetukset kunnossa
eero
Site Admin
Viestit: 329
Liittynyt: 07 Marras 2007 20:17

Frontend User Management sivupohjat

Viesti Kirjoittaja eero »

Kirjautumis pohja:

Koodi: Valitse kaikki

{* login form template *}
{* this is a sample template, feel free to customize it *}
{$startform}
{if $error}
  {$error}<br>
{/if}
<p>
<table border="0">
<tr><td> {$prompt_username}: </td><td>{$input_username}</td></tr>
<tr><td> {$prompt_password}: </td><td>{$input_password}</td></tr>
 {if isset($captcha)}
   
<tr><td>   {$captcha_title}: </td><td>{$input_captcha}</td></tr>
<tr><td> </td><td><br>   {$captcha}<br></td></tr>
 {/if}
 {if isset($input_rememberme)}
<tr><td colspan="2">{$input_rememberme} {$prompt_rememberme}</td></tr>
 {/if}
 <br/>
<tr><td> </td><td><br> <input type="submit" name="{$feuactionid}submit" value="{$mod->Lang('login')}"/></td></tr>
<tr><td colspan="2"><br>  <a href="{$url_forgot}" title="{$mod->Lang('info_forgotpw')}">{$mod->Lang('forgotpw')}</a></td></tr>
<tr><td colspan="2"><br>  <a href="{$url_lostun}" title="{$mod->Lang('info_lostun')}">{$mod->Lang('lostusername')}</a></td></tr>
</table>

</p>
{$endform}
Kirjaudu ulos pohja:

Koodi: Valitse kaikki

<!-- Logout form template -->
  <p>{$prompt_loggedin} {$username}</p> 
  <p><a href="{$url_logout}" title="{$mod->Lang('info_logout')}">{$mod->Lang('logout')}</a></p>
<!-- Logout form template -->
Vaihda asetuksia -pohja:

Koodi: Valitse kaikki

<!-- change settings template -->
{$title}
{if $message != ''}
  {if $error != ''}
    <p><font color="red">{$message}</font></p>
  {else}
    <p>{$message}</p>
  {/if}
{/if}
{$startform}
 {if $controlcount > 0}
  <center>
  <table width="75%">
     {foreach from=$controls item=control}
  <tr>
     <td>{$control->hidden}<font color="{$control->color}">{$control->prompt}{$control->marker}</font></td>
     <td>
       {if isset($control->image)}{$control->image}<br/>{/if}
       {$control->control}{$control->addtext}
       {if isset($control->control2)}{$control->prompt2} {$control->control2}<br/>{/if}
     </td>
  </tr>
 {/foreach}
  </table>
  </center>
 {/if}
 {$hidden}{$hidden2}{$submit}{$cancel}
{$endform}
<!-- change settings template -->
"Unohtunut salasana" -pohja:

Koodi: Valitse kaikki

<!-- forgot password template -->
{$startform}
{$title}
{if !empty($message) }
  {if !empty($error) }
    <p><font color="red">{$message}</font></p>
  {else}
    <p>{$message}</p>
  {/if}
{/if}
<p>{$lostpw_message}</p>
<p>{$prompt_username} {$input_username}</p>
<p>{$hidden}{$submit}&nbsp{$cancel}</p>
{$endform}
<!-- forgot password template --> 
Unohtunut salasana (Pohja vahvistuslomakkeelle)

Koodi: Valitse kaikki

<!-- forgot password verification template -->
{$startform}
{$title}
{if !empty($message)}
  {if !empty($error) }
    <p><font color="red">{$message}</font></p>
  {else}
    <p>{$message}</p>
  {/if}
{/if}
<br /><br /><br />
<table>
<tr><td>{$prompt_username}: </td><td>{$input_username}</td></tr>
<tr><td>{$prompt_code}: </td><td>{$input_code}</td></tr>
<tr><td>{$prompt_password}: </td><td>{$input_password}</td></tr>
<tr><td>{$prompt_repeatpassword}: </td><td>{$input_repeatpassword}</td></tr>
<tr><td> </td><td>{$hidden}{$submit}</td></tr>
</table>
{$endform}
<!-- forgot password verification template -->
"Unohtunut käyttäjätunnus" -pohja:

Koodi: Valitse kaikki

{* lost username confirm template form *}
<h4>{$title}</h4>
<br>
Kirjoita salasanasi jolla kirjaudut intranet:iin ja nimesi ja lopuksi anna varmistuskoodi. Lähetyksen jälkeen saat kirjautumistunnuksesi näkyviin.
<br><br>
{if isset($message)}<h5 class="error">{$message}</h5>{/if}
{if $controlcount > 0}
  {$startform}{$hidden}
<p>
    <div class="pagerow">
<table border="0">
<tr><td>      <div class="page_prompt">{$prompt_password}</div></td></tr>
<tr><td>      <div class="page_input">{$input_password}</div></td></tr>
    </div>
<tr><td><br>    {foreach from=$controls item='entry'}</td></tr>
       <div class="pagerow">
<tr><td>          <div class="page_prompt">{$entry->hidden}{$entry->prompt}</div></td></tr>
<tr><td>         <div class="page_input">{$entry->control}{$entry->addtext}</div></td></tr>
       </div>
    {/foreach}
    <div class="pagerow">
<tr><td><br>       {$captcha_title}</td></tr>
<tr><td>{$input_captcha}</td></tr>
<tr><td>{$captcha}</td></tr>
    </div>

<tr><td><br>    <div class="pagerow">{$submit}{$cancel}</div></td></tr>
</table>
</p>
  {$endform}
{/if}
Muut on oletuksilla
eero
Site Admin
Viestit: 329
Liittynyt: 07 Marras 2007 20:17

Frontend User Management sivustoon

Viesti Kirjoittaja eero »

Lopuksi laitetaan vielä suojattu sivu toimimaan. Kyseessä on intranet-sivusto jota ei haluta näyttää kaikille käyttäjille.
Tarkoitus on luoda ensimmäiselle tasolle kaksi sivua. Kirjautumissivu ja intranetin etusivu. Muut intranet-sivut tulevat intranetin etusivun alle.

Luodaan kirjautumissivu joka ei näy valikossa.
Laitetaan sivuun koodi

Koodi: Valitse kaikki

{cms_module module='FrontEndUsers' form='login' returnto='intranetetusivu'}
(ohjaa automaattisesti onnistuneen kirjautumisen jälkeen intranetin etusivulle)

Luodaan tai kopioidaan uusi sivupohja
Luodaan uusi sivu joka ei näy valikossa ja käytetään äsken luotua sivupohjaa
Lisätään sivupohjaan koodi:

Koodi: Valitse kaikki

{if $customcontent_loggedin}


[i]Sisältöä[/i]


{else}
<p><center><b><font size="3px" color="#ff0000">Pääsy estetty</font></b><br><br><a href="index.php?page=intranetkirjautuminen">Kirjaudu sisään</a></p></p><br><br>
{cms_module module=FrontEndUsers }</center>
{/if}
Ensimmäinen kannattaa laittaa sivuvalikoiden yläpuolella. Näin käyttäjät eivät näe valikoita ennen kuin ovat kirjautuneet.

Hyvä säätö suojaukseen:

Jos halutaan ettei suojatut sivut näy hakutuloksessa laita sivupohjan HEAD-tagin sisään seuraava:

Koodi: Valitse kaikki

{if $page_alias|lower|substr:0:7 != "suojattu_"}
<meta name="robots" content="index,follow" />
{else}
<meta name="robots" content="noindex,nofollow" />
{/if}

Tällöin täytyy suojatun sivun aliasnimen alkaa etuliitteellä suojattu_


Jos taas halutaan ettei suojatun sivun valikkoa näy ennen kuin käyttäjä on kirjautunut, niin laita sivupohjan valikkoon seuraava:

Koodi: Valitse kaikki

{if $ccuser->loggedin() && $ccuser->memberof('Registered Users')}
        {menu template='accessible_simple_navigation.tpl'}
{else}
        {menu template='accessible_simple_navigation.tpl' excludeprefix="suojattu_"}
{/if}

Tällöin täytyy suojatun sivun aliasnimen alkaa etuliitteellä suojattu_

Ja lopuksi sisältöön

Koodi: Valitse kaikki

{content assign=contentdump} {* assign content to var, to prefend double content tag *}

{if $page_alias|lower|substr:0:7 != "suojattu_"}
         <p>Public content</p>
         {$contentdump}
{else}
         {if $ccuser->loggedin() && $ccuser->memberof('Registered Users')}
                 <p>Secure content</p>
                 {$contentdump}
         {else}
                 <p>Sivu on sallittu vain kirjautuneille käyttäjille. Kirjaudu ensin!</p>
                 {cms_module module="Frontendusers"}
         {/if}
{/if}
eero
Site Admin
Viestit: 329
Liittynyt: 07 Marras 2007 20:17

Self Registration

Viesti Kirjoittaja eero »

Self Registration

http://dev.cmsmadesimple.org/project/files/15

Pohjat ovat aika onnettomia oletuksena. Alla on muokattuja.

Rekisteröintipohja 1 (tulee kun pyydetään kirjautumistietoja)

Koodi: Valitse kaikki

<!-- Registration 1 template -->
<br /><br />
{if isset($message) && $message != ''}
  {if isset($error) && $error != ''}
    <p><font color="red"><b>{$message}</b></font></p>
  {else}
    <p>{$message}</p>
  {/if}
{/if}
{$startform}
{if $controlcount > 0}
  <table width="75%">
{foreach from=$controls item=control}
  <tr>
    <td>{$control->hidden}
      {$control->prompt}{$control->marker}
     </td>
    <td>{$control->control}</td>
  </tr>
{/foreach}
  </table>
 <br/>
{/if}
{if isset($captcha)}
<table><tr><td>
{$captcha_title}: </td><td>{$input_captcha}<br /></td></tr>
<tr><td></td><td>{$captcha}<br /></td></tr></table>
{/if}
 {$hidden}{if isset($hidden2)}{$hidden2}{/if}{$submit}<br/><br/>
{$msg_sendanotheremail} {$link_sendanotheremail}
{$endform}
<!-- Registration 1 template -->
Onnistuneen rekisteröinnin jälkeen lähetettävä viesti. (samalla sivulla kuin rekisteröintipohja 1)

Koodi: Valitse kaikki

<!-- Post Registration 1 template -->
{$title}
{if isset($messasge) && $message != ''}
  {if isset($error) && $error != ''}
    <p><font color="red">{$message}</font></p>
  {else}
    <p>{$message}</p>
  {/if}
{/if}
<p>Kiitos rekisteröinnistä {$username} sivustolle {$sitename}. Sinulle on lähetetty sähköposti osoitteeseen {$email}, jossa kerrotaan, miten aktivoit tunnuksesi.</p>
<!-- Post Registration 1 template -->
Rekisteröintipohja 2-välilehti (sivu joka aukeaa sähköpostilinkistä)

Koodi: Valitse kaikki

<!-- Registration 1 template -->
<br /><br />{$title}<br /><br />
{if isset($messsage) && $message != ''}
  {if isset($error) && $error != ''}
    <p><font color="red">{$message}</font></p>
  {else}
    <p>{$message}</p>
  {/if}
{/if}
{$startform}
  <center>
  <table width="75%">
<tr><td>{$prompt_username}</font></td><td>{$input_username}</td></tr>
<tr><td>{$prompt_password}</font></td><td>{$input_password}</td></tr>
<tr><td>{$prompt_code}</font></td><td>{$input_code}</td></tr>
<tr><td></td><td><br/>{$hidden}{$hidden2}{$submit}</td></tr>
</table></center>
{$endform}
<!-- Registration 2 template -->
Vahvistus-emailin pohja

Teksti-muotoinen

Koodi: Valitse kaikki

Tervetuloa {$name}. Olet saanut tämän viesti koska sähköpostiosoitteellasi on pyydetty tunnuksia sivustolle {$sitename}. Jos olet pyytänyt tunnuksia, niin valitse alla oleva linkki ja anna avautuvaan lomakkeeseen käyttäjänimesi, salasanasi ja varmistuskoodi.

Linkki: {$url}
Tai: {$smallurl}</p>
Koodi on: {$code}

Jos et ole suorittanut rekisteröintiä, niin lähetä palautelomakkeelta ilmoitus ylläpidolle, sillä silloin saattaa olla kyseessä luvaton käyttö.
HTML-muotoinen (käytetään yleensä)

Koodi: Valitse kaikki

<!-- EmailConfirm template -->
<html>
<body>
<p>Tervetuloa {$name}. Olet saanut tämän viesti koska sähköpostiosoitteellasi on pyydetty tunnuksia sivustolle {$sitename}. Jos olet pyytänyt tunnuksia, niin valitse alla oleva linkki ja anna avautuvaan lomakkeeseen käyttäjänimesi, salasanasi ja varmistuskoodi.</p>
   <p>Linkki on: {$link}</p>
   <p>Tai: {$smalllink}</p>
   <p>Koodi: {$code}</p>
<p>Jos et ole suorittanut rekisteröintiä, niin lähetä palautelomakkeelta ilmoitus ylläpidolle, sillä silloin saattaa olla kyseessä luvaton käyttö.</p>
</body>
</html>
<!-- EmailConfirm template -->
Käyttäjän tietoja vaihdettu -pohja

Teksti-muotoinen

Koodi: Valitse kaikki

Tervetuloa {$ name} sivustolle. Tämä viesti on lähetetty, sillä vaikka olet jo rekisteröitynyt {$sitename}:lle, tiedoissasi oli virhe. Tiedot on nyt muutettu tai korjattu. Klikkaa alla olevaa linkkiä ja anna käyttäjätunnus, salasana ja yksilöllinen koodi avautuvaan sivustoon
   Linkki: {$url}
     tai: {$smallurl}</p>
   Salasana: {$password}
   Koodi: {$code}
HTML-muotoinen

Koodi: Valitse kaikki

<!-- EmailUserEdited template -->
<html>
<body>
<p>Tervetuloa {$name} sivustolle. Tämä viesti on lähetetty, sillä vaikka olet jo rekisteröitynyt {$sitename}:lle, tiedoissasi oli virhe. Tiedot on nyt muutettu tai korjattu. Klikkaa alla olevaa linkkiä ja anna käyttäjätunnus, salasana ja yksilöllinen koodi avautuvaan sivustoon.</p>
   <p>Linkki: {$link}</p>
   <p>Tai: {$smalllink}</p>
   <p>Salasana: {$password}</p>
   <p>Koodi: {$code}</p>
</body>
</html>
<!-- EmailUserEdited template -->
Kiitos -viestipohja (huomaa linkki ja muuta haluamaksesi)

Koodi: Valitse kaikki

<p>Tervetuloa {$username} sivustolle {$sitename}. Rekisteröitymisesi on suoritettu ja voit kirjautua käyttäjänimelläsi ja salasanallasi. Muista antaa myös varmistuskoodi.</p>
<p><a href="index.php?page=intranetkirjautuminen">Kirjaudu sisään</a></p>
<!-- FinalMessage Template -->
Unohditko salasanasi -emailin pohja

Koodi: Valitse kaikki

<!-- SendAnotherEmail Template -->
{$title}
{if isset($message) && $message != ''}
  {if isset($message) && $error != ''}
    <p><font color="red"><b>{$message}</b></font></p>
  {else}
    <p>{$message}</p>
  {/if}
{/if}
<p>En ole saanut vahvistusta sähköpostitse, lähetä uusi vahvistus.</p>
<p>Käyttäjänimeni on: {$startform}{$input_username} {$submit}{$endform}</p>
<!-- SendAnotherEmail Template -->
eero
Site Admin
Viestit: 329
Liittynyt: 07 Marras 2007 20:17

Self Registration muutos koodiin ja kielitiedosto

Viesti Kirjoittaja eero »

Sallittujen lista tarkastaa käyttäjänimen. Ei sähköpostiosoitetta. Ei fiksua.

Saat sen muuttamalla koodia action.reguser.php

Tässä toimiva koodi:
action.reguser.php.txt
action.reguser.php
(18.85 KiB) Tiedosto ladattu 1255 kertaa

Koodi: Valitse kaikki

<?php
#BEGIN_LICENSE
#-------------------------------------------------------------------------
# Module: SelfRegistration (c) 2008 by Robert Campbell 
#         (calguy1000@cmsmadesimple.org)
#  An addon module for CMS Made Simple to allow users to register themselves
#  with a website.
# 
# Version: 1.1.5
#
#-------------------------------------------------------------------------
# CMS - CMS Made Simple is (c) 2005 by Ted Kulp (wishy@cmsmadesimple.org)
# This project's homepage is: http://www.cmsmadesimple.org
#
#-------------------------------------------------------------------------
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# However, as a special exception to the GPL, this software is distributed
# as an addon module to CMS Made Simple.  You may not use this software
# in any Non GPL version of CMS Made simple, or in any version of CMS
# Made simple that does not indicate clearly and obviously in its admin 
# section that the site was built with CMS Made simple.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# Or read it online: http://www.gnu.org/licenses/licenses.html#GPL
#
#-------------------------------------------------------------------------
#END_LICENSE
if( !isset($gCms) ) exit;

$feusers =& $this->GetModuleInstance('FrontEndUsers');
if( !$feusers )
  {
    // this is ugly for the user to see
    // but at least the admin will be able to figure it out
    // this shouldn't happen once the user has seen the form.
    $this->_DisplayErrorPage( $id, $params, $returnid,
			      $this->Lang('error_nofeusersmodule'));
    return;
  }

$cmsmailer =& $this->GetModuleInstance('CMSMailer');
if( !$cmsmailer )
  {
    // this is ugly for the user to see
    // but at least the admin will be able to figure it out
    $this->_DisplayErrorPage( $id, $params, $returnid,
			      $this->Lang('error_nofeusersmodule'));
    return;
  }


// check for required parameters
if( !isset( $params['group_id'] ) )
  {
    $this->_DisplayErrorPage( $id, $params, $returnid,
			      $this->Lang('error_insufficientparams'));
    return;
  }

// attempt to register to an absolutely verboten group.
$tmp = $this->GetPreference('noregister_groups');
if( !empty($tmp) )
  {
    $tmp = explode(',',$tmp);
    if( in_array($params['group_id'],$tmp) )
      {
	$this->_DisplayErrorPage( $id, $params, $returnid,
				  $this->Lang('error_noregister'));
	return;
      }
  }

// Get property definitions
$propdefnsbyname = $feusers->GetPropertyDefns();

// Get group property relations
$properties = array();
{
  $tmp = $feusers->GetGroupPropertyRelations( $params['group_id'] );
  for( $i = 0; $i < count($tmp); $i++ )
    {
      $properties[$tmp[$i]['name']] = $tmp[$i];
    }
}

//
// Check to ensure all required fields have some content
// and validate email fields
//
$reg_additionalgroups = $this->GetPreference('reg_additionalgroups',0);
$allow_overwrite = (isset($params['allowoverwrite']))?$params['allowoverwrite']:0;
$matchfields_str = $this->GetPreference('additionalgroups_matchfields','');
$matchfields = explode('::',$matchfields_str);
foreach( $properties as $propname => $prop )
{
  $defn = $propdefnsbyname[$propname];
  $proptype = $defn['type'];
  $required = ($properties[$propname]['required'] == 2);
  $force_unique = $defn['force_unique'];

  switch( $proptype )
    {
    case 2: /* email */
      if( $required )
	{
	  if( !isset($params['input_'.$propname]) || $params['input_'.$propname] == ''  )
	    {
	      $params['error'] = 1;
	      $params['message'] = $this->Lang('error_requiredfield',$defn['prompt']);
	      return $this->myRedirect( $id, 'default', $returnid, $params );
	    }
	  
	  $result = $feusers->IsValidEmailAddress( $params['input_'.$propname]);
	  if( $result[0] == false )
	    {
	      $params['error'] = 1;
	      $params['message'] = $result[1];
	      return $this->myRedirect( $id, 'default', $returnid, $params );
	    }
	}
      break;
      
    case 5: /* multiselect */
      if( $required )
	{
	  if( !isset($params['input_'.$propname]) || $params['input_'.$propname] == ''  )
	    {
	      $params['error'] = 1;
	      $params['message'] = $this->Lang('error_requiredfield',$defn['prompt']);
	      return $this->myRedirect( $id, 'default', $returnid, $params );
	    }
	}
      if( isset($params['input_'.$propname]) )
	{
	  $params['input_'.$propname] = implode(',',$params['input_'.$propname]);
	}
      break;
      
    case 8: /* date */
      if( $required )
	{
	  if( !isset($params['input_'.$propname.'Month']) )
	    {
	      $params['error'] = 1;
	      $params['message'] = $this->Lang('error_requiredfield',$defn['prompt']);
	      return $this->myRedirect( $id, 'default', $returnid, $params );
	    }
	}
      if( isset($params['input_'.$propname.'Month']) )
	{
	  $params['input_'.$propname] =
	    mktime(0,0,0,
		   $params['input_'.$propname.'Month'],
		   $params['input_'.$propname.'Day'],
		   $params['input_'.$propname.'Year']);
	  unset($params['input_'.$propname.'Month']);
	  unset($params['input_'.$propname.'Day']);
	  unset($params['input_'.$propname.'Year']);
	}
      break;
      
    default:
      if( $required )
        {
          if( !isset($params['input_'.$propname]) || $params['input_'.$propname] == ''  )
            {
              $params['error'] = 1;
              $params['message'] = $this->Lang('error_requiredfield',$defn['prompt']);
              return $this->myRedirect( $id, 'default', $returnid, $params );
            }
        }
      break;
    }

  if( $force_unique && (!$allow_overwrite || !in_array($propname,$matchfields)) )
    {
      $value = $params['input_'.$propname];
      if( $value != '' && !$feusers->IsUserPropertyValueUnique( -1, $propname, $value ) )
	{
	  $params['error'] = 1;
	  $params['message'] = $this->Lang('error_uniquefield',$defn['prompt']);
	  return $this->myRedirect( $id, 'default', $returnid, $params );
	}
    }
}

// get the username and password
$username = '';
if( isset( $params['input_username'] ) )
  {
    $username = trim($params['input_username']);
  }
$password = '';
if( isset( $params['input_password'] ) )
  {
    $password = trim($params['input_password']);
  }
$repeatpassword = '';
if( isset( $params['input_repeatpassword'] ) )
  {
    $repeatpassword = trim($params['input_repeatpassword']);
  }

// check if the username is valid
if( $username == '' )
  {
    $params['error'] = 1;
    if ($feusers->GetPreference('username_is_email'))
      {
	$params['message'] = $this->Lang('error_emptyemail');
      }
    else
      {
	$params['message'] = $this->Lang('error_emptyusername');
      }
    
    return $this->myRedirect( $id, 'default', $returnid, $params );
  }

// ********* MOVED - SIIRRETTY IN FINNISH ************

// get an email field
// so that we can do some emailing.
$email_field = '';
if ($feusers->GetPreference('username_is_email'))
  {
    // email field is easy!
    $email_field = 'input_username';
  }
else
  {
   // find an email field... something that's name has email in it
   // or is of type 2
   foreach( $params as $key => $val )
     {
       if( preg_match( '/^input_/', $key ) )
	 {
	   $proptype = '';
	   $propname = substr($key,strlen('input_'));
	   if( isset($propdefnsbyname[$propname]) && $propdefnsbyname[$propname]['type'] == 2 )
	     {
	       $email_field = 'input_'.$propname;
	     }
	 }
     }
   }
if( $email_field == '' )
  {
    $params['error'] = 1;
    $params['message'] = $this->Lang('error_noemailaddress');
    return $this->myRedirect( $id, 'default', $returnid, $params );
  }
$email = $params[$email_field];

// check the repeated email field.
if( $this->GetPreference('selfreg_force_email_twice') )
  {
    if( !isset($params[$email_field.'_again'] ) )
      {
	$params['error'] = 1;
	$params['message'] = $this->Lang('error_nosecondemailaddress');
	return $this->myRedirect( $id, 'default', $returnid, $params );
      }

    if( $params[$email_field] != $params[$email_field.'_again'] )
      {
	$params['error'] = 1;
	$params['message'] = $this->Lang('error_emaildoesnotmatch');
	return $this->myRedirect( $id, 'default', $returnid, $params );
      }
  }

// ******** MOVED END - SIIRRETTY LOPPUU **********


//Ok, we have a valid $email, now we check to see
//if we're checking the whitelist (or blacklist) and
//and then if it matches...

if ($this->GetPreference('enable_whitelist', '') != '')
{
  $matched = false;
  $list = preg_split("/((\r(?!\n))|((?<!\r)\n)|(\r\n))/", $this->GetPreference('whitelist', ''));
  if (count($list))
    {
      foreach ($list as $one_line)
	{
	  $regex = '/^' . str_replace("@", "\@", str_replace("\*", ".*", preg_quote($one_line))) . '$/';

// ****** changed - muutettu *******

	  //if (preg_match($regex, $username) > 0)

	  if (preg_match($regex, $email) > 0)

// ****** changed end - muutos loppuu *******

	    {
	      $matched = true;
	      break;
	    }
	}
    }
	
  if (

      ($this->GetPreference('enable_whitelist', '') == 'exclude' && $matched) ||
      ($this->GetPreference('enable_whitelist', '') == 'include' && !$matched)

      )
    {
      $params['error'] = 1;
      $params['message'] = $this->GetPreference('whitelist_trigger_message', 'Whitelist Matched');
      return $this->myRedirect($id, 'default', $returnid, $params);
    }
}

// check if the passwords match or if they're valid
if( $password != $repeatpassword )
  {
    $params['error'] = 1;
    $params['message'] = $this->Lang('error_passwordsdontmatch');
    return $this->myRedirect( $id, 'default', $returnid, $params );
  }
$minpwlen = $feusers->GetPreference('min_passwordlength');
$maxpwlen = $feusers->GetPreference('max_passwordlength');
if( strlen($password) < $minpwlen || strlen($password) > $maxpwlen )
  {
    $params['error'] = 1;
    $params['message'] = $this->Lang('error_invalidpassword',
				     array($minpwlen,$maxpwlen));
    return $this->myRedirect( $id, 'default', $returnid, $params );
  }
   
// check captcha.
$captcha =& $this->GetModuleInstance('Captcha');
if( is_object($captcha) && !isset($params['nocaptcha']) )
  {
    if (! $captcha->CheckCaptcha($params['input_captcha']))
      {
	$params['error'] = 1;
	$params['message'] = $this->Lang('error_captchamismatch');
	return $this->myRedirect( $id, 'default', $returnid, $params );
      }
  }


// check if the username is taken.
$overwrite_uid = null;
if( $reg_additionalgroups && $allow_overwrite )
  {
    // we're allowing registration to additional groups.
    // meaning we need to find the existing user info

    $query = new feu_user_query(1);
    foreach( $matchfields as $field )
      {
	switch($field)
	  {
	  case '*username-password*':
	    $query->add_and_opt(feu_user_query_opt::MATCH_USERNAME,$username);
	    $query->add_and_opt(feu_user_query_opt::MATCH_PASSWORD,$password);
	    break;
	    
	  default:
	    $query->add_and_opt_obj(new feu_user_query_opt(feu_user_query_opt::MATCH_PROPERTY,$field,$params['input_'.$field]));
	    break;
	  }
      }

    $query->prepare();
    $cnt = $query->get_match_count();

    if( $cnt == 1 )
      {
	// only one match found.
	$data = $query->get_data(1);
	$overwrite_uid = $data[0]['id'];
      }
  }

// we just have to make sure the username isn't taken.
if( empty($overwrite_uid) && $feusers->GetUserID($username) )
  {
    $params['error'] = 1;
    $params['message'] = $this->Lang('error_usernametaken');
    return $this->myRedirect( $id, 'default', $returnid, $params );
  }

if( !$feusers->IsValidUsername( $username, ($overwrite_uid < 1) ? true : false ) )
  {
    $params['error'] = 1;
    if ($feusers->GetPreference('username_is_email'))
      {
	$params['message'] = $this->Lang('error_invalidemail');
      }
    else
      {
         $params['message'] = $this->Lang('error_invalidusername');
      }
    return $this->myRedirect( $id, 'default', $returnid, $params );
  }

$uid = $this->GetTempUserID($username);
if( $uid != false )
  {
    $params['error'] = 1;
    $params['message'] = $this->Lang('error_usernametaken');
    return $this->myRedirect( $id, 'default', $returnid, $params );
  }


// generate a unique code that the user can enter to double confirm
// his login.
$code = $feusers->GenerateRandomPrintableString();

// have to add the record to the database so that we know who this guy is
// when he comes back
$return = $this->CreateTempUser( $params['group_id'], $username, $password, $code, $overwrite_uid );
if( $return[0] == false )
  {
    $params['error'] = 1;
    $params['message'] = $return[1];
    return $this->myRedirect( $id, 'default', $returnid, $params );
  }

// and add his properties too
$tmpuid = $return[1];
foreach( $properties as $propname => $prop )
{
  $proptype = $propdefnsbyname[$propname]['type'];
  $required = ($properties[$propname]['required'] == 2);
  
  // check if the value exists (it may be an optional field)
  if( !isset($params['input_'.$propname]) ) continue;
  
  $value = $params['input_'.$propname];
  if( is_array($value) )
    {
    }
  $return = $this->AddTempUserProperty( $tmpuid, $propname, 
					$params['input_'.$propname] );
  
  if( $return[0] == false )
    {
      // now we have an issue to figure out
      $this->DeleteTempUser( $tmpuid );
      $params['error'] = 1;
      $params['message'] = $return[1];
      return $this->myRedirect( $id, 'default', $returnid, $params );
    }
}


//
// okay we're done creating temporary users
//
$redirect_pref = 'redirect_afterregister';
$action = 'post_registeruser';
$parms = array();
$parms['username'] = $username;
$parms['email'] = $email;
$expires = '';
$docreatefeu = 1;

if( $this->GetPreference('allowpaidregistration') )
  {
    // we're doing paid registration.
    
    // first, get the package info.
    $query = 'SELECT * FROM '.cms_db_prefix().'module_selfreg_paidpkgs WHERE gid = ?';
    $pkg = $db->GetRow($query,array($params['group_id']));
    $expires = selfreg_utils::pkg_subscr_to_expirydate($pkg);
    if( $pkg && $pkg['cost'] > 0 )
      {
	// this package costs money.
	$cart = cg_ecomm::get_cart_module();
	if( $cart )
	  {
	    
	    $redirect_pref = 'redirect_paidpkg';

	    // now we gotta add an item to the cart.
	    $item = new cg_ecomm_cartitem('',$tmpuid,1,$this->GetName());
	    $item->set_type(cg_ecomm_cartitem::TYPE_SERVICE);
	    $item->set_base_price($pkg['cost']);
	    $smarty->assign('tmpuid',$tmpuid);
	    $smarty->assign('username',$username);
	    $smarty->assign('pkg',$pkg);
	    $sku = 'sr-'.sprintf('%03d-%05d',$pkg['id'],$tmpuid);
	    $smarty->assign('sku',$sku);
	    $tmp = '{sitename} membership {$tmpuid}';
	    $tpl = $this->GetPreference('cartitem_summary_tpl');
	    if( !$tpl ) $tpl = $tmp;

	    $item->set_sku($sku);
	    $item->set_summary($this->ProcessTemplateFromData($tpl));
	    $item->set_item_total($pkg['cost']);
	    $subscription = new cg_ecomm_productinfo_subscription();
	    $subscription->set_payperiod(cg_ecomm_productinfo_subscription::SUBSCR_PERIOD_YEARLY);
	    $subscription->set_deliveryperiod(cg_ecomm_productinfo_subscription::SUBSCR_PERIOD_YEARLY);
	    $subscription->set_expiry(-1);
	    $item->set_subscription($subscription);
	    $res = $cart->AddCartItem($item);

	    $docreatefeu = 0;

	    if( !$res )
	      {
		// couldn't add this item to the cart (maybe the policy got in the way)
		// so redirect back to the start.
		// and display a message?
		$this->DeleteTempUser( $tmpuid );
		$this->DeleteTempUserProperties( $tmpuid );

		$params['error'] = 1;
		$params['message'] = $this->Lang('error_policycantadd');
		return $this->myRedirect( $id, 'default', $returnid, $params );
	      }
	  }
      }

    // if we get here either the cost is 0 or there is some problem with the cart
    // so we just proceed like normal.
  }


if( $this->GetPreference('require_email_confirmation',1) )
  {
    // okay, we're now ready to send the email, yahoo, yahoo, yahoo
    // now we have to decide what goes in it.
    $this->_SendUserConfirmationEmail($id,$returnid,$email,
				      $username, $params['group_id'], $code );
	
    // send an event
    $this->SendEvent('onNewUser',
		     array('username'=>$username,
			   'email'=>$email));

    // we're not redirecting anywhere we need to display some nice message
    // about we just spammed your inbox, etc, etc.
  }
else if ($docreatefeu)
  {
    $action = 'post_createuser';
    
    // it appears we're allowing instant registration
    $result = $this->_CreateFrontendUser( $tmpuid, $params['group_id'],
					  $username, $password, $expires );
    
    if( $result[0] == FALSE )
      {
	$params['error'] = 1;
	$params['message'] = $result[1];
	return $this->myRedirect( $id, 'default', $returnid, $params );
      }
    
    // woohooo, the user be created (hopefully).
    // delete the records from the SelfReg tables
    $this->DeleteTempUserProperties( $tmpuid );
    $this->DeleteTempUser( $tmpuid );
    
    // do we automatically log this user in?
    if( $this->GetPreference('login_afterverify') )
      {
	$feu =& $this->GetModuleInstance('FrontEndUsers');
	$res = $feu->Login( $username, $password );
	if( is_array($res) && $res[0] == FALSE )
	  {
	    die('auto login error = {$res[1]}');
	  }
      }

    // send an event
    $this->SendEvent('onNewUser',
		     array('username'=>$username,
			   'email'=>$email));
  }

// Check if we have to redirect to a page or not

$destpagestr = $this->ProcessTemplateFromData($this->GetPreference($redirect_pref));
if( !empty($destpagestr) )
  {
    $contentops =& $gCms->GetContentOperations();
    $destpageid = $contentops->GetPageIDFromAlias($destpagestr);
    if( $destpageid == FALSE )
      {
	$tmpalias = $contentops->GetPageAliasFromID($destpagestr);
	if( $tmpalias )
	  {
	    $destpageid = $tmpalias;
	  }
      }
    $returnid = $destpageid;
  }

if( $this->GetPreference('selfreg_skip_final_msg') ||
    $this->GetPreference('allowpaidregistration') )
  {
    if( isset($params['orig_url']) && empty($destpagestr) )
      {
	redirect($params['orig_url']);
	return;
      }
    $this->RedirectContent($returnid);
  }

$this->Redirect($id,$action,$returnid,$parms);

?>

Kielitiedosto ei ole valmis mutta toimiva
Käännä loppuun jos haluut ja liitä tänne
fi_FI.php.txt
Kielitiedosto
(22.96 KiB) Tiedosto ladattu 1059 kertaa

Koodi: Valitse kaikki

<?php
$lang['prompt_redirect_paidpkg'] = 'Page ID/Alias to redirect to for paid packages';
$lang['info_redirect_paidpkg'] ='A smarty template that determines the pageid or alias of a page to redirect to for paid packages. Typically a user that is registering for your site may want to go directly to your checkout page, or to the view cart page.';
$lang['info_additionalgroups_matchfields'] = 'When allowing existing users to register to an additional group, you can specify which FEU properties of the existing user must match when the user registers again.  This information will be used to uniquely identify the FEU user account';
$lang['info_cartitem_summary_tpl'] = 'A smarty template that determines the value of the summary that appears with this line item in the cart, and during the checkout process.  If no value is specified a default is used.  Valid smarty variables are {$pkg} <em>(array)</em>.  {$sku}, {$username}, {$tmpuid} <em>(the users temporary user id)</em>. <strong>Note:</strong> some payment gateways may only support a fixed number of characters for the summary.';
$lang['prompt_cartitem_summary_tpl'] = 'Cart Item Summary Template';
$lang['paid_registration'] = 'Paid Registration';
$lang['info_skip_final_msg'] = 'This option determins wether the registration complete message should be displayed to the user after registration.';
$lang['notifications'] = 'Ilmoitukset';
$lang['info_login_afterverify'] = 'This option will automatically log the visitor into the site after the user has been pushed to the Frontend Users module.  This option has no effect if allowing paid registration';
$lang['info_email_confirmation'] = 'This option sends an email to the registerd user account with a link that allows verifying that the account information entered is valid.<br/><strong>Note:</strong> This option should not be used when allowing paid registrations';
$lang['prompt_registration_settings'] = 'Rekisteröintiasetukset';
$lang['none'] = 'Ei';
$lang['month'] = 'Kuukausi';
$lang['year'] = 'Vuosi';
$lang['subscription_expires'] = 'Rekisteröinti uusitaan joka';
$lang['error_policycantadd'] = 'The policy of this website does not allow adding this item to your cart.  Please contact the site administrator';
$lang['prompt_allow_select_pkg'] = 'Allow users to select a package (group) to register to';
$lang['info_allowselectpkg'] = 'You may wish to allow your users to select an FEU group to register to.  These groups are tied to packages (for ecommerce purposes).  However if not using the E-commerce functionality, the price data can be ignored';
$lang['error_nopkgs'] = 'No packages have been defined to allow the customer to register to';
$lang['selpkg_template'] = 'Select Package Template';
$lang['title_selpkg_template'] = 'Select Subscription Package Template';
$lang['info_selpkg_template'] = 'This template is used when paid subscriptions are enabled to allow the user to select a paid subscription package';
$lang['error_pkgcost'] = 'Package Cost is Invalid';
$lang['error_pkgexists'] = 'A package with a %s of %s already exists';
$lang['description'] = 'Description';
$lang['edit_paidpkg'] = 'Edit Paid Package "%s"';
$lang['add_paidpkg'] = 'Add Paid Package';
$lang['name'] = 'Nimi';
$lang['prompt'] = 'Prompt';
$lang['group'] = 'Ryhmä';
$lang['cost'] = 'Cost';
$lang['regpkgs_tab'] = 'Registration Packages';
$lang['prompt_allow_paid_registration'] = 'Require members to pay for registration to your site';
$lang['info_allow_paid_registration'] = 'Please also select Selfregistration as a source module from CGEcommerceBase, and configure the "Paid Registration" Tab.  Additionally, you must enable package selection above.';
$lang['email-password'] = 'Sähköpostiosoite ja salasana';
$lang['username-password'] = 'Käyttäjänimi ja salasana';
$lang['help_param_allowoverwrite'] = <<<EOT
This parameter allows overwriting existing FEU users. In conjunction with the preferences in the SelfRegistration admin panel you can specify what data will be used to uniquely identify a user account';
EOT;
$lang['into_additionalgroups_matchfields'] = 'Specify which fields should be used to uniquely identify a user.  This can be used to allow the user to register when an account already exists for that user with a different username.';
$lang['prompt_additionalgroups_matchfields'] = 'When overwriting an existing account the following fields must match';
$lang['prompt_reg_additionalgroups'] = 'Sallitko rekisteröityjen käyttäjien rekisteröityä muihin ryhmiin?';
$lang['prompt_additionalgroups_settings'] = 'Muut ryhmän asetukset';
$lang['prompt_general_settings'] = 'Yleiset asetukset';
$lang['prompt_security_settings'] = 'Turvallisuusasetukset';
$lang['error_uniquefield'] = 'Määritelty arvo "%s" on jo käytössä toisella rekisteröidyllä käyttäjällä';
$lang['help_param_action'] = <<<EOT
Tämä parametri määrää modulin käyttäytymisen.
<ul>
  <li><strong>oletus</strong>
   <p>Tämä on oletustoiminta.  Perustuu <em>(deprecated></em> tila parametriin <em>(katso alta)</em> se voi näyttää joko rekisteröintilomakkeen, varmistuslomakkeen tai jonkun muun lomakkeen.</li>
  </li>
  <li>reguser_link
   <p>Näyttää linkin rekisteröintilomakkeelle.</p>
  </li>
</ul>
EOT;
$lang['help_param_destpage'] = 'Applicable only to the action=reguser_link.. this parameter allows specifying (by alias or page id) a destination page for the link.';
$lang['help_param_group'] = 'Applicable to the action=reguser_link or action=register, this parameter allows specifying a group in which the user will be regisered';
$lang['help_param_onlyhref'] = 'Used only in the action=reguser_link, setting this parameter indicates that the output should only contain the url portion of the link';
$lang['help_param_linktext'] = 'Used only in the action_reguser_link it allows specifying the text for the generated link.  This parameter is ignored if the onlyhref parameter is specified.';
$lang['help_param_noinline'] = 'Applicable to many actions, this parameter overrides the preference in the admin panel to indicate that the output from the generated link or form should not be displayed inline.  i.e: noinline=1 on the default action will indicate that the output text will replace the {content} tag.';
$lang['error_noregister'] = 'You cannot register to become a member of this user group';
$lang['prompt_noregister'] = 'Estä käyttäjää kirjautumasta valittuun/valittuihin ryhmiin';


$lang['error_nosecondemailaddress'] = 'Sähköpostiosoite pitää antaa kahteen kertaan';
$lang['push_live'] = 'Lisää käyttäjä';
$lang['areyousure_pushuser'] = 'Haluatko varmasti lisätä käyttäjän ilman varmistusprosessia?';
$lang['delete'] = 'Poista';
$lang['login_afterverify'] = 'Kirjaa uusi käyttäjä automaattisesti sisään kun varmistus on suoritettu';
$lang['skip_final_msg'] = 'Älä näytä kiitos-viestiä rekisteröinnin jälkeen';
$lang['redirect_afterregister'] = 'Sivun ID/alias, joka näytetään rekisteröinnin jälkeen';
$lang['redirect_afterverify'] = 'Sivun ID/alias, joka näytetään rekisteröinnin vahvistamisen jälkeen';


$lang['use_inline_forms'] = 'Use Inline Forms <em>(form output replaces the module tag, not all of content)</em>';

$lang['error_codesdontmatch'] = 'Valtuutusavain on väärä';
$lang['event_description_onNewUser'] = 'Toiminto joka suoritetaan kun uusi käyttäjä on rekisteröitynyt';
$lang['event_description_onUserRegistered'] = 'Toiminto joka suoritetaan kun uusi käyttäjä on varmentanut tunnuksensa ja rekisteröinti on valmis';
$lang['event_help_onNewUser'] = '<p>Toiminto joka suoritetaan kun uusi käyttäjä on rekisteröitynyt</p>
<h4>Tiedot</h4>
<ul>
<li><em>username</em> - Uuden käyttäjän valitsema käyttäjänimi</li>
<li><em>email</em> - Uuden käyttäjän sähköpostiosoite</li>
</ul>
';
$lang['event_help_onUserRegistered'] = '<p>Uusi käyttäjä on rekisteröity ja todennettu</p>
<h4>Tiedot</h4>
<ul>
<li><em>username</em> - Rekisteröity käyttäjänimi</li>
<li><em>id</em> - Uuden käyttäjän uid</li>
</ul>
';
$lang['confirm_submitprefs'] = 'Vaihda hallinnan asetuksia?';
$lang['info_admin_password'] = 'Jätä tämä kenttä tyhjäksi säilyttääksesi käyttäjän salasanan';
$lang['info_admin_repeatpassword'] = 'Jätä tämä kenttä tyhjäksi säilyttääksesi käyttäjän salasanan';
$lang['error_emaildoesnotmatch'] = 'Email-osoitteet eivät ole samat';
$lang['force_email_twice'] = 'Vaadi käyttäjiltä email-osoite kahteen kertaan';
$lang['again'] = 'uudestaan';
$lang['deleteselusers'] = 'Poista valitut käyttäjät';
$lang['error_nopropdefns'] = 'Ei ominaisuuksia tai ongelma tietokannassa';
$lang['error_nogroups'] = 'Ei ryhmiä tai ongelma tietokannassa';
$lang['error_dberror'] = 'Tietokantavirhe';
$lang['title_post_sendanotheremail_template'] = 'Lähetä unohditko salasanasi -emailin pohja';
$lang['title_sendanotheremail_template'] = 'Unohditko salasansi -emailin pohja';
$lang['clickhere'] = 'Paina tästä';
$lang['msg_sendanotheremail'] = 'Olen jo suorittanut rekisteröinnin, mutta en saanut sähköpostia.';
$lang['sendanotheremail_template'] = 'Unohditko salasansi -emailin pohja';
$lang['info_userverified'] = 'Uusi käyttäjä lisätty FrontEndUsersiin';
$lang['edit'] = 'Muokkaa';
$lang['unknown'] = 'Tuntematon';
$lang['select'] = 'Valitse';
$lang['check_all'] = 'Valitse kaikki';
$lang['uncheck_all'] = 'Poista valinnat';
$lang['send_adjustmentemail'] = 'Lähetä email käyttäjälle';
$lang['txt_adjustmentemail'] = '(kertoo käyttäjälle tilin muokkauksesta)';
$lang['txt_changepassword'] = 'Täytä nämä kentät vaihtaaksesi käyttäjän salasanan';
$lang['edituser'] = 'Muokkaa käyttäjää';
$lang['areyousure_deleteuser'] = 'Oletko varma että haluat poistaa tämän puolittain rekisteröidyn käyttäjän';
$lang['hdr_userid'] = 'Käyttäjä ID';
$lang['hdr_username'] = 'Käyttäjätunnus';
$lang['hdr_grpname'] = 'Ryhmä';
$lang['hdr_created'] = 'Luotu';
$lang['hdr_email'] = 'Email';
$lang['usersfound'] = 'Käyttäjiä löydetty (näytetään maksimissaan 250)';
$lang['users'] = 'Käyttäjät';
$lang['list1day'] = 'Listaa yli päivän vanhat';
$lang['subject'] = 'Aihe lähteville emaileille';
$lang['htmlbody'] = 'HTML-emailin sisältö';
$lang['textbody'] = 'Teksti-emailin sisältö';
$lang['prompt_numresetrecord'] = 'Käyttäjiä tällä hetkellä rekisteröitymässä: ';
$lang['remove1week'] = 'Poista kaikki yli viikon vanhat';
$lang['remove1month'] = 'Poista kaikki yli kuukauden vanhat';
$lang['remove1day'] = 'Poista kaikki yli päivän vanhat';
$lang['removeall'] = 'Poista kaikki';
$lang['areyousure'] = 'Oletko varma?';
$lang['registration_info_edited'] = 'Rekisteröinti tietoja muutettu';
$lang['registration_confirmation'] = 'Rekisteröinnin vahvistus';
$lang['user_registration'] = 'Rekisteröidy';
$lang['finalmessage_template'] = 'Kiitos -viestipohja';
$lang['title_verifyregistration'] = 'Varmista rekisteröinti';
$lang['code'] = 'Vahvistusavain';
$lang['default'] = 'Palauta oletukset';
$lang['error_noproperties'] = 'Käyttäjältä ei löydy ominaisuuksia';
$lang['error_noproprelations'] = 'Ei ominaisuussuhteita';
$lang['error_emailinvalid'] = 'Virheellinen email osoite';
$lang['error_noemailaddress'] = 'Ei käypää email-osoitekenttää';
$lang['error_requiredfield'] = 'Kenttä %s täytyy täyttää';
$lang['registration1_template'] = 'Rekisteröintipohja 1';
$lang['registration2_template'] = 'Rekisteröintipohja 2';
$lang['emailconfirm_template'] = 'Vahvistus-emailin pohja';
$lang['emailuseredited_template'] = 'Käyttäjän tietoja vaihdettu -pohja';
$lang['preferences'] = 'Asetukset';
$lang['error_usernotfound'] = 'Käyttäjää ei löytynyt';
$lang['error_invalidusername'] = 'Käyttäjätunnus on virheellinen (liian lyhyt, liian pitkä tai sisältää virheellisiä merkkejä). Käyttäjätunnus ei saa sisältää vain kirjaimia ja numeroita (ei välilyöntiä)';
$lang['error_invalidemail'] = 'Sähköposti on virheellinen.';
$lang['error_usernametaken'] = 'Käyttäjätunnus on jo käytössä';
$lang['error_passwordsdontmatch'] = 'Virhe: salasanat eivät ole yhtenevät';
$lang['error_invalidpassword'] = 'Salasana on virheellinen. Salasanan tulee olla vähintään %s ja enintään %s merkkiä pitkä';
$lang['error_emptyusername'] = 'Käyttäjätunnus ei voi olla tyhjä';
$lang['error_emptyemail'] = 'Sähköposti ei voi olla tyhjä';
$lang['repeatpassword'] = 'Salasana (uudestaan)';
$lang['password'] = 'Salasana';
$lang['username'] = 'Käyttäjätunnus';
$lang['email'] = 'Sähköposti';
$lang['captcha_title'] = 'Syötä kuvassa oleva teksti';
$lang['error_insufficientparams'] = 'Vääriä (tai puuttuvia) parametreja moduulikutsussa';
$lang['error_nofeusersmodule'] = 'Ei voitu alustaa FrontEndUsers-moduulia';
$lang['error_nosuchgroup'] = 'Valittua ryhmää ei ole';
$lang['error_captchamismatch'] = 'Kuvassa oleva ja syötetty teksti eivät ole yhtenevät';
$lang['send_emails_to'] = 'Rekisteröinti-emailit lähetetään osoitteeseen';
$lang['require_email_confirmation'] = 'Vaadi käyttäjää vahvistamaan rekisteröinti sähköpostilla';
$lang['notify_on_registration'] = 'Lähetä email-ilmoitus uudesta rekisteröinnistä';
$lang['cancel'] = 'Peruuta';
$lang['submit'] = 'Lähetä';

$lang['enable_whitelist'] = 'Salli hyväksyä tai rajoittaa-lista';
$lang['whitelist'] = 'Listaa jokainen osoite jonka haluan rajoittaa tai sallia. yksi per rivi. (käytä * villikorttia esim. *@joku.fi)';
$lang['whitelist_trigger_message'] = 'Viesti joka näytetään jos ehto ei täyty';
$lang['dont_use'] = 'Ei rajoitusta';
$lang['no_matches'] = 'älä salli osoitteen joka on listalla rekisteröityä';
$lang['only_matches'] = 'Salli vain osoitteet jotka ovat listalla rekisteröityä';

$lang['friendlyname'] = 'Self Registration Module';
$lang['postinstall'] = 'Installation successfull, please remember to set the "Modify SelfRegistration Settings" permission.  If the Captcha module is installed, then captcha functionality is enabled by default.  We strongly reccommend that you install this module.  If the Captcha module is installed, and you want to disable it, use the nocaptcha param in your selfregistration tag.';
$lang['postuninstall'] = 'Self Registration -moduuli on poistettu järjestelmästä. Nähellään!';
$lang['uninstalled'] = 'Moduulin asennus poistettu';
$lang['installed'] = 'Moduulin versio %s asennettu.';
$lang['prefsupdated'] = 'Modulin asetukset päivitetty.';
$lang['accessdenied'] = 'Käyttöoikeusvirhe! Tarkista oikeutesi.';
$lang['error'] = 'Virhe!';
$lang['upgraded'] = 'Moduuli päivitetty versioon %s.';
$lang['title_mod_prefs'] = 'Modulin asetukset';
$lang['title_mod_admin'] = 'Modulin hallintapaneeli';
$lang['title_admin_panel'] = 'Self Registration -moduuli';
$lang['moddescription'] = 'Moduuli, joka sallii sivuston käyttäjien (FEU) rekisteröidä itse itsensä.';
$lang['welcome_text'] = '<p>Tervetuloa käyttämään Self registration -moduulia.</p>';
$lang['changelog'] = '<ul>
<li>Version 0.0.1. Oct 2005. Initial NRPT (Not Ready for Prime Time) release.</li>
<li>Version 0.1.0. Oct 2005. Initial release.</li>
<li>Version 0.1.1. Oct 2005. Set the HTML mail flag.</li>
<li>Version 0.1.2. Oct 2005. Moved Random stuff into feusers, and added the ability to delete old entries from the registration temporary tables</li>
<li><p>Version 0.1.3. - Dec 2005</p>
<p>Fixed the toggles in the admin preferences.  Also, changed the permissions model to not require the unique permission added previously for the selfreg module.</p>
<p>This release was removed due to possible errors</p>
</li>
<li><p>Version 0.1.4. - Jan 2006</p>
<p>Fixed minor errors with CheckPermission, replaced all assign_by_refs's with assigns for hopeful php5 compatibility.</p>
<li><p>Version 0.1.5. - Jan 2006</p>
<p>Added the ability to set the subject of the confirmation email, and added the ability to specify a text body.  Subject, and text body are required.</p>
</li>
<li><p>Version 1.0.0. - Feb 2006</p>
<p>Fixed a problem with the verify mode.</p>
<p>Added the ability to edit and delete users. with selection on the checkboxes, and "checkall"</p>
<p>Now require FEUsers 0.1.8 and CMSMailer 1.73.9</p>
<p>Added another tab for the "your settings have been adjusted" email templates</p>
<p>Added CSV Exporting</p>
<p>Added a "Delete all users older than a day" button</p>
<p>Now works with the maximum length field of FEUsers</p>
<p>Added support for dropdowns and text areas</p>
<p>Disallow punctuation characters in username</p>
</li>
<li><p>Version 1.0.1. - Feb 2006</p>
<p>Added the ability for users to request another registration email (uses the same code), incase they lost their first one.</p>
</li>
<li><p>Version 1.0.2. - Feb 2006</p>
<p>The "Require email confirmation" checkbox now works.  Users are added straight to the frontend users database</p>
<p>Fixed a bug with the confirmation emails having links to the admin section (new bug only).</p>
</li>
<li><p>Version 1.0.3. - Feb 2006</p>
<p>Added the (optional) ability to require the user enter the email address twice</p>
<p>Fixed a bug with the useredited message not being thrown through smarty</p>
<p>Fixed the default registration template a bit to aide in validation for non required fields (fixed a warning)</p>
<p>Fix problems with inline and non-inline forms and links</p>
<p>Handle another case where the admin may not have created the proper type of email property</p>
<p>Changed to require CMS 0.12-beta2 at a minimum (for safety purposes)</p>
</li>
<li><p>Version 1.0.4. - Mar 2006</p>
<p>More control over username and password field sizes (controlled by feusers)</p>
<p>Confirmation on editing preferences</p>
<p>Require 0.12 proper of cms as a minimum</p>
</li>
<li><p>Version 1.1.0. - Dec 2006</p>
    <p>Added events and 1.0 compatibility</p>
    <p>Captcha support (thanks Dittman)</p>
</li>
<li><p>Version 1.1.1. - Apr 2007</p>
    <p>Now require FEUsers 1.2.0 (minimum)</p>
    <p>Support for multiselect lists in feusers</p>
    <p>Output some more fields to smarty to allow for increased accessibility</p>
    <p>Split code out into multiple files to reduce overall memory footprint</p>
    <p>Ignore all image fields</p>
    <p>Change Captcha support to be on by default if the Captcha module is found</p>
</li>
<li><p>Version 1.1.2. - Nov 2007</p>
    <p>Fix the problem with the UserDisplayLostRegEmailForm thing</p>
    <p>Adds the id to the onUserRegistered Event</p>
    <p>Fixes the problem with checkbox properties not working</p>
    <p>Now Requires CMS 1.2 minimum</p>
    <p>You can now use {SelfRegistration group='blah'}</p>
    <p>Now Requires CMS 1.3 minimum.</p>
</li>
<li><p>Version 1.1.3. - Nov 2007</p>
    <p>Fixes issue with SMTP Email address validation</p>
    <p>Now Require FEU 1.3.1</p>
</li>
</ul>';
$lang['help'] = '<h3>What Does This Do?</h3>
<p>This module is designed to allow front end users to register themselves and fill in the required information.  It then sends a confirmation email, with a link to a second page that must be completed before the registration is complete.  Once registration is complete, a user account is created in the front end users module.</p>
<p>In order to use this module, you must create a property of type "Email Address" in the FrontendUsers module, and associate that property with the group to be used for self registration.</p>
<h3>How Do I Use It</h3>
<p>You place the followng tag into your page {cms_module module=SelfRegistration group=usergroup}</p>
<p>You must have previously created properties and user groups in the FrontEndUsers module in order for this to work properly.</p>
<h3>Parameters</h3>
<p><strong>mode</strong> <em>optional</em> - possible values are "signup" and "verify".  If this parameter is not specified, "signup" is assumbed.</p>
<p><strong>group</strong> <em>optional</em> - This parameter is required if mode is "signup", or if mode is left empty.</p>
<p><strong>nocaptcha</strong> <em>optional</em> - This will disable captcha on the signup form. By default, if the Captcha module is installed, captcha support is provided.  This parameter disables it.</p>
<h3>Support</h3>
<p>This module does not include commercial support. However, there are a number of resources available to help you with it:</p>
<ul>
<li>For the latest version of this module, FAQs, or to file a Bug Report or buy commercial support, please visit calguy's
module homepage at <a href="http://techcom.dyndns.org">techcom.dyndns.org</a>.</li>
<li>Additional discussion of this module may also be found in the <a href="http://forum.cmsmadesimple.org">CMS Made Simple Forums</a>.</li>
<li>The author, calguy1000, can often be found in the <a href="irc://irc.freenode.net/#cms">CMS IRC Channel</a>.</li>
<li>Lastly, you may have some success emailing the author directly.</li>  
</ul>
<p>As per the GPL, this software is provided as-is. Please read the text
of the license for the full disclaimer.</p>

<h3>Copyright and License</h3>
<p>Copyright © 2005, Robert Campbel <a href="mailto:calguy1000@hotmail.com"><calguy1000@hotmail.com></a>. All Rights Are Reserved.</p>
<p>This module has been released under the <a href="http://www.gnu.org/licenses/licenses.html#GPL">GNU Public License</a>. You must agree to this license before using the module.</p>
';
$lang['utma'] = '156861353.1959547193.1213865783.1214078572.1214083722.12';
$lang['utmz'] = '156861353.1214056345.10.4.utmccn=(referral)|utmcsr=dev.cmsmadesimple.org|utmcct=/forum/forum.php|utmcmd=referral';
$lang['utmc'] = '156861353';
$lang['utmb'] = '156861353';
?>
Vastaa Viestiin