CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • civiEvent
Pages: [1]

Author Topic: civiEvent  (Read 1621 times)

Julian

  • Guest
civiEvent
August 19, 2009, 12:00:51 pm
I got civiCRM to work with Drupal 6 and it is great, but there is one thing I have to change. As usual. Is there any way to make the events not to expire or make them valid for a period of time like a month. I tried to set the expiration time to a later date but the events still expire before the actual date.  I am using the Event block created by CiviCRM.
Any ideas?
Thanks
Julian

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: civiEvent
August 19, 2009, 12:41:09 pm
Julian :

By default, we show all the events in the event block that have start date >= current date
You might want to set the date from which onwards you wish to display the events here :
Code: [Select]
Index: CRM/Core/Block.php
===================================================================
--- CRM/Core/Block.php (revision 23349)
+++ CRM/Core/Block.php (working copy)
@@ -515,7 +515,8 @@
         $config =& CRM_Core_Config::singleton( );
         
         require_once 'CRM/Event/BAO/Event.php';
-        $info = CRM_Event_BAO_Event::getCompleteInfo( );
+        $info = CRM_Event_BAO_Event::getCompleteInfo( "20020101" );

where 2002-01-01 onwards you want to display events in event block

Hope that helps!
-Yashodha
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

Julian

  • Guest
Re: civiEvent
August 19, 2009, 09:27:13 pm
Hi
Yashodha,

Thanks that did solve my problem.
Julian

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: civiEvent
August 27, 2009, 01:51:12 am
Julian :
Quote
Do you know if there is a way not to display the date in the block or to make it not mandatory when the event is created.

I would suggest just hiding the date in the block rather than making it non mandatory during event creation.
The following patch would do the trick :

Code: [Select]
Index: templates/CRM/Block/Event.tpl
===================================================================
--- templates/CRM/Block/Event.tpl (revision 23456)
+++ templates/CRM/Block/Event.tpl (working copy)
@@ -5,7 +5,6 @@
 {foreach from=$event item=ev}
     <p>
     <a href="{$ev.url}">{$ev.title}</a><br />
-    {$ev.start_date|truncate:10:""|crmDate}<br />
     {assign var=evSummary value=$ev.summary|truncate:80:""}
     <em>{$evSummary}{if $ev.summary|count_characters:true GT 80}  (<a href="{$ev.url}">{ts}more{/ts}...</a>){/if}</em>
I strongly recommend you use custom template to achieve this.
For more details, refer : http://wiki.civicrm.org/confluence/display/CRMDOC/Customize+Built-in,+Profile,+Contribution+and+Event+Registration+Screens

HTH
-Yashodha
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

bonhommie

  • I’m new here
  • *
  • Posts: 18
  • Karma: 0
Re: civiEvent
September 07, 2009, 10:04:33 am
Is it possible to make events show up for the entire time they are active?

i have some events spanning 2 weeks, but they disappear from the events block on day 1.
so instead of start date >= today, how do i work "end date" into it so I see multi-day events in the block until they are over?

thanks

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: civiEvent
September 07, 2009, 10:07:57 am

you will need to change the code / query in

CRM/Core/Block.php, function setTemplateEventValues

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Mrkrabs

  • Guest
Re: civiEvent
September 25, 2009, 01:05:07 pm
Quote from: Donald Lobo on September 07, 2009, 10:07:57 am

you will need to change the code / query in

CRM/Core/Block.php, function setTemplateEventValues

lobo


I have the same problem, could you elaborate on how to achieve this in the code? It doesn't make sense that active and unexpired event disappears from the list. The delisting should be based on end date (if end date is set), or stay listed forever if there is no end date.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • civiEvent

This forum was archived on 2017-11-26.