Main menu

Forum


[SOLVED] Is this layout possible with a custom theme?

  • jonmar
  • Autore della discussione
  • Junior Member
  • Junior Member
Di più
8 Anni 1 Settimana fa - 8 Anni 1 Settimana fa #12492 da jonmar
Hey guys,

I need to create a calendar with this layout (see image) and was wondering if it's possible in iCagenda with a custom made theme?

Thanks guys,

Jon
Allegati:
Ultima Modifica 8 Anni 1 Settimana fa da jonmar.
Ringraziano per il messaggio: daikaadsteve

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • Lyr!C
  • Avatar di Lyr!C
  • Administrator
  • Administrator
  • Lead Developer
Di più
8 Anni 1 Settimana fa #12496 da Lyr!C
Hello,

Something like this could be possible, but with the need of special php functions and code, to be able to check the date, and then integrate a month line in-between.

But do you have the skill to create the php code for this ? (i can help a bit to give the logic to follow, but not an advanced help as i do in pro support...)

Best Regards,
Cyril

Latest version : iCagenda 3.9.3
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

File allegato:

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • jonmar
  • Autore della discussione
  • Junior Member
  • Junior Member
Di più
8 Anni 1 Settimana fa #12497 da jonmar
Risposta da jonmar al topic Is this layout possible with a custom theme?
Nah I don't really have a lot of skill in php. I can probably make do with the month name in the box with the date, but I'll have to check with the client. If they decide to purchase the pro version, will you be able to help get the month between the boxes?

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • jonmar
  • Autore della discussione
  • Junior Member
  • Junior Member
Di più
8 Anni 1 Settimana fa - 8 Anni 1 Settimana fa #12501 da jonmar
Risposta da jonmar al topic Is this layout possible with a custom theme?
BTW, where do I control how many events are listed per page on the event list page?

Edit: Never mind, found it in the menu options :p

I've managed to create my custom theme and it was pretty easy, however I haven't been able to get the month names configured to show up between the rows.
Ultima Modifica 8 Anni 1 Settimana fa da jonmar.
Ringraziano per il messaggio: Lyr!C

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • Lyr!C
  • Avatar di Lyr!C
  • Administrator
  • Administrator
  • Lead Developer
Di più
8 Anni 1 Settimana fa #12503 da Lyr!C

BTW, where do I control how many events are listed per page on the event list page?

Edit: Never mind, found it in the menu options :p

You found it before i answer ;-)

I've managed to create my custom theme and it was pretty easy, however I haven't been able to get the month names configured to show up between the rows.

So, the event layout for list is for each event.
What you can do is using the event date returned for each, to add a control. (this one is variable $evt)

So, then, the check could be done by year and month.
With a code like this at the top (in php part) :
$array_months = array();
$array_years = array();
$event_m = JHtml::date($evt, 'F', null);
$event_y = JHtml::date($evt, 'Y', null);

if ( ! in_array($event_m, $array_months)
	&& ! in_array($event_y, $array_years))
{
	$array_months[] = $event_m;
	$array_years[] = $event_y;
	echo '<div class="month-header">' . $event_m . '</div>';
}

Of course, you can add styling ;-)

Hope this helps ?

Best Regards,
Cyril

Latest version : iCagenda 3.9.3
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

File allegato:

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • jonmar
  • Autore della discussione
  • Junior Member
  • Junior Member
Di più
8 Anni 1 Settimana fa - 8 Anni 1 Settimana fa #12508 da jonmar
Risposta da jonmar al topic Is this layout possible with a custom theme?
Hi,

Thanks for the code! Which file does it go in? I tried it in finno_calendar.php where it says to add code at the top of the calendar, but nothing changed on the site.

Okay, I'm getting closer, but I'm still doing something wrong. I pasted the code into finno_events.php on line 24 just below the <!-- Event --> comment. Now the month name shows up, but it shows up above each event like so:

Allegati:
Ultima Modifica 8 Anni 1 Settimana fa da jonmar.

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • Lyr!C
  • Avatar di Lyr!C
  • Administrator
  • Administrator
  • Lead Developer
Di più
8 Anni 1 Settimana fa #12510 da Lyr!C
Well, i see my error : array are reset at each event...

Try this :
$array_months = isset($array_months) ? $array_months : array();
$array_years = isset($array_years) ? $array_years : array();
$event_m = JHtml::date($evt, 'F', null);
$event_y = JHtml::date($evt, 'Y', null);

if ( ! in_array($event_m, $array_months)
	&& ! in_array($event_y, $array_years))
{
	$array_months[] = $event_m;
	$array_years[] = $event_y;
	echo '<div class="month-header">' . $event_m . '</div>';
}

May work better... (not tested)

Regards,
Cyril

Latest version : iCagenda 3.9.3
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

File allegato:

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • jonmar
  • Autore della discussione
  • Junior Member
  • Junior Member
Di più
8 Anni 1 Settimana fa #12513 da jonmar
Risposta da jonmar al topic Is this layout possible with a custom theme?
Thanks! Really close now. The month appears above the event just once, but it won't show the next month. June shows up at the beginning correctly, but the last event is in July, and the month doesn't show.


Allegati:

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • Lyr!C
  • Avatar di Lyr!C
  • Administrator
  • Administrator
  • Lead Developer
Di più
8 Anni 1 Settimana fa #12519 da Lyr!C
Well, i think i should sleep more, and work less ;-)

The code provided could not work like this, as year is already set...
$array_monthyear = isset($array_monthyear) ? $array_monthyear : array();
$event_m = JHtml::date($evt, 'F', null);
$event_y = JHtml::date($evt, 'Y', null);

if ( ! in_array($event_m . $event_y, $array_monthyear))
{
	$array_monthyear[] = $event_m . $event_y;
	echo '<div class="month-header"><h4>' . $event_m . '</h4></div>';
}

Note: this time, i have tested it and works ;-)

Regards,
Cyril

Latest version : iCagenda 3.9.3
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

File allegato:

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • jonmar
  • Autore della discussione
  • Junior Member
  • Junior Member
Di più
8 Anni 1 Settimana fa - 8 Anni 1 Settimana fa #12522 da jonmar
Risposta da jonmar al topic Is this layout possible with a custom theme?
You are the man! It works perfectly now :) Really happy right now, and my client will be too. I will strongly recommend that they buy your Pro version, and I'll be buying the Unlimited version for my developer needs.

PS: I found a little bug. If I have set a character limit for event titles, the titles that are below the limit get the three dots "..." at the end of the event name if the event name has a space at the end of it. Once I deleted the spaces from the ends of the titles only the titles above the limit had the dots. (I didn't have a character limit set at the time so you won't see the bug in the image)

Allegati:
Ultima Modifica 8 Anni 1 Settimana fa da jonmar.

Si prega Accedi o Crea un account a partecipare alla conversazione.

Tempo creazione pagina: 0.219 secondi

Follow Us

Create your Joomla templates with Template Creator CK

acymailing logo new