Difference between revisions of "Phing events"
From GLMWiki
(3 intermediate revisions by one other user not shown) | |||
Line 5: | Line 5: | ||
Is there a member db for site (Y,N) [Y]? | Is there a member db for site (Y,N) [Y]? | ||
+ | Configure section | ||
− | Template section | + | file in config/application.ini |
+ | <pre> | ||
+ | ; 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 | ||
+ | </pre> | ||
+ | |||
+ | Output page is static page | ||
+ | <pre> | ||
+ | <?php | ||
+ | $GLOBALS['styleSheets'][] = BASE_URL . 'Toolkit/Events/css/event.css'; | ||
+ | $events = new Toolkit_Events_Display(Toolkit_Database::getInstance()); | ||
+ | echo $events->toHTML($this->keywordReplacement); | ||
+ | </pre> | ||
+ | |||
+ | Template section Home Page Events | ||
<pre> | <pre> | ||
Line 15: | Line 34: | ||
</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> |
Latest revision as of 11:48, 6 November 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]?
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();