Main menu

Forum


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

  • jonmar
  • Auteur du sujet
  • Membre junior
  • Membre junior
Plus d'informations
il y a 7 ans 9 mois - il y a 7 ans 9 mois #12492 par 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
Pièces jointes :
Dernière édition: il y a 7 ans 9 mois par jonmar.
Les utilisateur(s) suivant ont remercié: daikaadsteve

Connexion ou Créer un compte pour participer à la conversation.

 

  • Lyr!C
  • Portrait de Lyr!C
  • Administrateur
  • Administrateur
  • Lead Developer
Plus d'informations
il y a 7 ans 9 mois #12496 par Lyr!C
Réponse de Lyr!C sur le sujet Is this layout possible with a custom theme?
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.2
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) .

Fichier attaché :

Connexion ou Créer un compte pour participer à la conversation.

  • jonmar
  • Auteur du sujet
  • Membre junior
  • Membre junior
Plus d'informations
il y a 7 ans 9 mois #12497 par jonmar
Réponse de jonmar sur le sujet 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?

Connexion ou Créer un compte pour participer à la conversation.

  • jonmar
  • Auteur du sujet
  • Membre junior
  • Membre junior
Plus d'informations
il y a 7 ans 9 mois - il y a 7 ans 9 mois #12501 par jonmar
Réponse de jonmar sur le sujet 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.
Dernière édition: il y a 7 ans 9 mois par jonmar.
Les utilisateur(s) suivant ont remercié: Lyr!C

Connexion ou Créer un compte pour participer à la conversation.

  • Lyr!C
  • Portrait de Lyr!C
  • Administrateur
  • Administrateur
  • Lead Developer
Plus d'informations
il y a 7 ans 9 mois #12503 par Lyr!C
Réponse de Lyr!C sur le sujet 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

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.2
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) .

Fichier attaché :

Connexion ou Créer un compte pour participer à la conversation.

  • jonmar
  • Auteur du sujet
  • Membre junior
  • Membre junior
Plus d'informations
il y a 7 ans 9 mois - il y a 7 ans 9 mois #12508 par jonmar
Réponse de jonmar sur le sujet 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:

Pièces jointes :
Dernière édition: il y a 7 ans 9 mois par jonmar.

Connexion ou Créer un compte pour participer à la conversation.

  • Lyr!C
  • Portrait de Lyr!C
  • Administrateur
  • Administrateur
  • Lead Developer
Plus d'informations
il y a 7 ans 9 mois #12510 par Lyr!C
Réponse de Lyr!C sur le sujet Is this layout possible with a custom theme?
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.2
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) .

Fichier attaché :

Connexion ou Créer un compte pour participer à la conversation.

  • jonmar
  • Auteur du sujet
  • Membre junior
  • Membre junior
Plus d'informations
il y a 7 ans 9 mois #12513 par jonmar
Réponse de jonmar sur le sujet 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.


Pièces jointes :

Connexion ou Créer un compte pour participer à la conversation.

  • Lyr!C
  • Portrait de Lyr!C
  • Administrateur
  • Administrateur
  • Lead Developer
Plus d'informations
il y a 7 ans 9 mois #12519 par Lyr!C
Réponse de Lyr!C sur le sujet Is this layout possible with a custom theme?
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.2
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) .

Fichier attaché :

Connexion ou Créer un compte pour participer à la conversation.

  • jonmar
  • Auteur du sujet
  • Membre junior
  • Membre junior
Plus d'informations
il y a 7 ans 9 mois - il y a 7 ans 9 mois #12522 par jonmar
Réponse de jonmar sur le sujet 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)

Pièces jointes :
Dernière édition: il y a 7 ans 9 mois par jonmar.

Connexion ou Créer un compte pour participer à la conversation.

Temps de génération de la page : 0.269 secondes

 

Follow Us

acymailing logo new

Créez vos templates Joomla avec Template Creator CK