JEvents 3.1 (Free Access)

JevDate::strftime

Forum for JEvents 3.1 for Joomla 3.x and 2.5.
Forum rules
When requesting support please follow these steps:

1. Update all JEvents add on's first, via the Joomla! Updater
2. Copy and Paste the JEvents Support Information from the JEvents Control Panel.
3. If you get a 500 error OR white page, enable Maximum Error Reporting in Joomla! Global Config and visit the page again, this should give you a more detailed error and help us provide a prompt response.

Postby rsie » Tue Apr 23, 2013 4:35 pm

Hi,

I added some code to controllers/icalrepeat.php that used the JevDate::strftime function. It worked great, but then I took that code and put it in a new class which is called from icalrepeat. Now I just get a blank page when that function is called and if I comment out that function in the new class it works fine, but if I don't I just get a blank page...Does anyone know what I have to do to make this work?

thanks,
Ron
rsie
 
Posts: 8
Joined: Thu Apr 18, 2013 12:50 am

Postby carcam » Tue Apr 23, 2013 5:01 pm

Hi Ron,
can you please show us the code?

In the meanwhile, it might be an issue related to not including JEvents classes in it.

Also you may check your error log to see the specific error or enable Maximum error reporting at Joomla! global configuration
¿Sabías que tenemos soporte en español para los miembros del Club de JEvents? ¡ÚNETE AHORA!
User avatar
carcam
Team Staff
 
Posts: 7061
Joined: Wed Aug 06, 2008 7:50 pm
Location: Almería

Postby rsie » Tue Apr 23, 2013 6:47 pm

<?php
/*
This class is a helper to get Jevents Event data to pass to the registerevent plugin for linking to chronoforms
*
*
*/

defined( '_JEXEC' ) or die( 'Restricted access' );
include_once(JEV_PATH."/libraries/jevdate.php");

class RegisterForEvent {
var $start_date = "";
var $end_date = "";
var $description = "";
var $title = "";
var $type = "";

function __construct()
{
}

function loadResults() {

$db =& JFactory::getDBO();

$query = "select dtstart, dtend, summary, description from #__jevents_vevdetail where evdet_id = '" . $evid . "'";
$db->setQuery($query);
$rows = $db->loadObjectList();
$row = null;
if($rows) {
$row = new jIcalEventRepeat($rows[0]);
}

$this->title = $row->title;
$this->description = $row->_content;
$this->type = "jevent";


$st = JevDate::strftime( '%B %e',@$row->dtstart() );
$et = JevDate::strftime( '%B %e',@$row->dtend() );
/*
if(strnatcmp($st,$et) == 0) {
$this->start_date = JevDate::strftime( '%A %B %e, %Y, %I:%M%P',@$row->dtstart()) . JevDate::strftime( ' - %I:%M%P',@$row->dtend());
}
else {
$this->start_date = JevDate::strftime( '%A %B %e, %Y - %I:%M%P',@$row->dtstart());
$this->end_date = JevDate::strftime( '%A %B %e, %Y - %I:%M%P',@$row->dtend());
}
*/
}
}


If I comment out the two JevDate lines then it runs fine...otherwise I get a blank page...thanks for listening.

Ron
rsie
 
Posts: 8
Joined: Thu Apr 18, 2013 12:50 am

Postby Tonyp » Tue Apr 23, 2013 8:31 pm

Hi Ron,

If you enable Joomla! Maximum Error Reporting, what happens on the blank page now? It should provide a detailed error of what is causing the issue.

Regards
Tony
---------------------------------------
Feel free to PM me if you would like Custom Installs or Joomla! related work for a competitive quote.

User avatar
Tonyp
Team Staff
 
Posts: 23633
Joined: Tue Oct 12, 2010 9:12 pm
Location: Isle of Man

Postby rsie » Wed Apr 24, 2013 1:50 pm

Thanks so much, that showed me that I failed to pass in a required var and so my sql fetch was failing making everything else dicey...

thanks for the very helpful response.
Ron
rsie
 
Posts: 8
Joined: Thu Apr 18, 2013 12:50 am

Postby Tonyp » Wed Apr 24, 2013 6:52 pm

Hello Ron,

Not a problem and we have all done it :).

Regards
Tony
---------------------------------------
Feel free to PM me if you would like Custom Installs or Joomla! related work for a competitive quote.

User avatar
Tonyp
Team Staff
 
Posts: 23633
Joined: Tue Oct 12, 2010 9:12 pm
Location: Isle of Man


Return to JEvents 3.1 (Free Access)

  • Who is online
  • View new posts
  • View unanswered posts
  • In total there are 0 users online :: 0 registered and 0 hidden (based on users active over the past 5 minutes)
  • Most users ever online was 94 on Tue Sep 01, 2009 12:33 am
  • Users browsing this forum: No registered users