Phing events

From GLMWiki
Jump to: navigation, search
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]?

Configure section

file in config/application.ini

; Turn the event application On or Off
eventdb.application = On
; The page id in the toolbox that holds the event calendar
eventdb.event_page  = 12
; Turn the home page events module On or Off for the event application
eventdb.home_events = On

Output page is static page

<?php
$GLOBALS['styleSheets'][] = BASE_URL . 'Toolkit/Events/css/event.css';
$events = new Toolkit_Events_Display(Toolkit_Database::getInstance());
echo $events->toHTML($this->keywordReplacement);

Template section Home Page Events

<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();