Main menu

Forum


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

  • jonmar
  • Topic Author
  • Junior Member
  • Junior Member
More
8 years 1 month ago - 8 years 1 month ago #12492 by 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
Attachments:
Last edit: 8 years 1 month ago by jonmar.
The following user(s) said Thank You: daikaadsteve

Please Log in or Create an account to join the conversation.

  • Lyr!C
  • Lyr!C's Avatar
  • Administrator
  • Administrator
  • Lead Developer
More
8 years 1 month ago #12496 by 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.5
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 Attachment:

Please Log in or Create an account to join the conversation.

  • jonmar
  • Topic Author
  • Junior Member
  • Junior Member
More
8 years 1 month ago #12497 by jonmar
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?

Please Log in or Create an account to join the conversation.

  • jonmar
  • Topic Author
  • Junior Member
  • Junior Member
More
8 years 1 month ago - 8 years 1 month ago #12501 by jonmar
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.
Last edit: 8 years 1 month ago by jonmar.
The following user(s) said Thank You: Lyr!C

Please Log in or Create an account to join the conversation.

  • Lyr!C
  • Lyr!C's Avatar
  • Administrator
  • Administrator
  • Lead Developer
More
8 years 1 month ago #12503 by 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.5
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 Attachment:

Please Log in or Create an account to join the conversation.

  • jonmar
  • Topic Author
  • Junior Member
  • Junior Member
More
8 years 1 month ago - 8 years 1 month ago #12508 by jonmar
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:

Attachments:
Last edit: 8 years 1 month ago by jonmar.

Please Log in or Create an account to join the conversation.

  • Lyr!C
  • Lyr!C's Avatar
  • Administrator
  • Administrator
  • Lead Developer
More
8 years 1 month ago #12510 by 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.5
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 Attachment:

Please Log in or Create an account to join the conversation.

  • jonmar
  • Topic Author
  • Junior Member
  • Junior Member
More
8 years 1 month ago #12513 by jonmar
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.


Attachments:

Please Log in or Create an account to join the conversation.

  • Lyr!C
  • Lyr!C's Avatar
  • Administrator
  • Administrator
  • Lead Developer
More
8 years 1 month ago #12519 by 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.5
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 Attachment:

Please Log in or Create an account to join the conversation.

  • jonmar
  • Topic Author
  • Junior Member
  • Junior Member
More
8 years 1 month ago - 8 years 1 month ago #12522 by jonmar
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)

Attachments:
Last edit: 8 years 1 month ago by jonmar.

Please Log in or Create an account to join the conversation.

Time to create page: 0.323 seconds

Follow Us

Create your Joomla templates with Template Creator CK

acymailing logo new