Difference between revisions of "Phing events"

From GLMWiki
Jump to: navigation, search
Line 15: Line 15:
 
   </a><!-- /.cEventItem -->
 
   </a><!-- /.cEventItem -->
 
</section><!-- /#cEvents -->
 
</section><!-- /#cEvents -->
 +
</pre>
 +
 +
Add your event form
 +
create as pageId in the static directory example of event add form on page 12
 +
static/12.phtml (file)
 +
<pre>
 +
<script type="text/javascript">
 +
$(document).ready(function(){
 +
  $("textarea[name='descr']").textlimit('span.counter',1000);
 +
});
 +
</script>
 +
<?php
 +
$form = new Toolkit_Events_AddEventForm(
 +
Toolkit_Database::getInstance(),
 +
    'new_event'
 +
);
 +
$form->useCaptcha(true);
 +
$form->setAutoValidateDateElements(false);
 +
$form->configureForm();
 +
echo $form->toHtml();
 
</pre>
 
</pre>

Revision as of 11:43, 2 July 2012

What site is this app for [demo.gaslightmedia.com] ?
What is the database name for site [demo]?
Is there a member db for site (Y,N) [Y]?


Template section

<section flexy:if="hasEvents" id="cEvents">
  <a flexy:foreach="events,v" href="{v[href]:h}" class="cEventItem">
    <span class="cEventTitle">{v[header]:h}</span>
    <span class="cEventDate">{v[bdate]:h}</span>
  </a><!-- /.cEventItem -->
</section><!-- /#cEvents -->

Add your event form create as pageId in the static directory example of event add form on page 12 static/12.phtml (file)

<script type="text/javascript">
$(document).ready(function(){
  $("textarea[name='descr']").textlimit('span.counter',1000);
});
</script>
<?php
$form = new Toolkit_Events_AddEventForm(
	Toolkit_Database::getInstance(),
    'new_event'
);
$form->useCaptcha(true);
$form->setAutoValidateDateElements(false);
$form->configureForm();
echo $form->toHtml();