Easy PHP Calendar - We really take care of your dates!


Go Back   Easy PHP Calendar > General Discussion > Customizations (Themes / Templates)

Customizations (Themes / Templates) Help with customizing the themes and templates. Post your own custom themes for others to enjoy.

Closed Thread
 
Thread Tools Search this Thread Display Modes

Legend Filter
Old 05-21-2011, 11:24 AM   #1
perkiekat
Calendar User
 
perkiekat is offline
Join Date: Jan 2011
Posts: 17
Default Legend Filter

Hello,
I want to know how I can split the legend filter into two columns instead of one to show all the categories in both. I do not mean two separate columns with same categories in each one, but two columns showing all of the categories...just split up.
The one column seems to take up too much space vertically leaving a lot of empty space. I am using my style sheet, but just don't know how to make legends show up in both columns without showing two of the same thing.

Thanks!
Pkat
 

Old 05-21-2011, 07:34 PM   #2
ve9gra
Support Team
 
ve9gra's Avatar
 
ve9gra is offline
Join Date: Jun 2003
Location: New Brunswick, Canada
Posts: 4,965
Default

The legend.php file is not encrypted, so if you know how to play with loops, you can modify the output to fit what you need.

One possible option is to replace the table code for DIV... and then make the divs flow so that they're automatically distributed inside of a "holder" div. Make the holder div twice as wide as the content divs, and you'll get two columns.
__________________
-- Gervais
EPC Tutorials... We're here to help!
Offering custom integration services. Contact me here.
* Not affiliated with EasyPHPCalendar or NashTech Inc.
 

Old 05-21-2011, 09:19 PM   #3
perkiekat
Calendar User
 
perkiekat is offline
Join Date: Jan 2011
Posts: 17
Default

Thank you for responding. I placed two div tags as you suggested and two show up, however, they both contain the same information. I would like to split the categories up in each div.

Here is the code I have embedded in the page. I am not doing something right:

<div style="float: right; width: 20%;">
<?php require("/home/khorton/public_html/nhba2/calendar/plugins/legend-filter.php"); ?>
</div>
<div style="float: right; width: 20%;">
<?php require("/home/khorton/public_html/nhba2/calendar/plugins/legend-filter.php"); ?>
</div>

I have attached an image to show you what it currently looks like. Just need to know how to make the categories to split up. Let's say I have 12 categories, so I would like 6 of those categories to show up in one column and the other 6 categories in the other column. Is this doable and if so, can you please let me know what I need to do. I would really appreciate it.
Thank you,
pkat


Last edited by perkiekat; 05-21-2011 at 09:25 PM.
 

Old 05-22-2011, 07:28 AM   #4
perkiekat
Calendar User
 
perkiekat is offline
Join Date: Jan 2011
Posts: 17
Default

I am not a php guru and had to look up on w3schools to find out what a loop is. Anyway, seems I need to use some sort of code similar to what I have below and I am not even sure this is correct or where to place it. Any help from anyone one on the forum with this would greatly be appreciated :

<?php
$x=array("one","two","three");
foreach ($x as $value)
{
echo $value . "<br />";
}
?>
 

Old 05-23-2011, 07:39 AM   #5
ve9gra
Support Team
 
ve9gra's Avatar
 
ve9gra is offline
Join Date: Jun 2003
Location: New Brunswick, Canada
Posts: 4,965
Default

That loop already exists in the legend.php file. Right now that loop is using <table> <tr> and <td> tags to create a vertical table. What I recommended was to modify that to replace it for <div>.
__________________
-- Gervais
EPC Tutorials... We're here to help!
Offering custom integration services. Contact me here.
* Not affiliated with EasyPHPCalendar or NashTech Inc.
 

Old 05-23-2011, 08:47 AM   #6
ve9gra
Support Team
 
ve9gra's Avatar
 
ve9gra is offline
Join Date: Jun 2003
Location: New Brunswick, Canada
Posts: 4,965
Default

Here's my rendition...

Adjust the width by changing the container size on line 62, and adjust each element size on lines 71 and 80.

Note that the container needs to be 6px larger (from my testing) than the multiple of elements you want.

In the way it's configured now, each element is 200px, and I wanted two columns, so the container is 406px wide. Say you'd want three columns, make the container 606px.

Simply upload the file to your /plugins folder, and adjust the filename in the require(). There's no need for any manually added div anywhere... just call the plugin.
Attached Files
File Type: php legend-flow.php (2.1 KB, 193 views)
__________________
-- Gervais
EPC Tutorials... We're here to help!
Offering custom integration services. Contact me here.
* Not affiliated with EasyPHPCalendar or NashTech Inc.
 

Old 05-23-2011, 11:11 AM   #7
perkiekat
Calendar User
 
perkiekat is offline
Join Date: Jan 2011
Posts: 17
Default

Thank you. I uploaded as you instructed and then changed the require name in the website page. It works!

How do I make the name of events clickable?
And the Show All categories is not in there now. What do I need to do?

I really appreciate your help with this. I could not of done this without your help. As stated before, when it comes to php code, I'm kinda lost!

Pkat
 

Old 05-23-2011, 04:12 PM   #8
ve9gra
Support Team
 
ve9gra's Avatar
 
ve9gra is offline
Join Date: Jun 2003
Location: New Brunswick, Canada
Posts: 4,965
Default

The legend is just that... a legend. It would have to be modified to include the filter functionality. You might want to simply add the filter as well.

As for the All Categories, you need to add a variable before calling it. See the Online Docs under the plugin section.
__________________
-- Gervais
EPC Tutorials... We're here to help!
Offering custom integration services. Contact me here.
* Not affiliated with EasyPHPCalendar or NashTech Inc.
 
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Filter & Legend Problem edkgb General Support 2 06-23-2010 06:43 AM
Private sub-category breaks filter jteal Customizations (Themes / Templates) 4 04-24-2009 02:20 PM
Adding filter and legend plugins to page in Joomla SFTN Media Mambo/Joomla Integration 9 11-30-2008 01:31 PM
Legend and filter filters. jwc Customizations (Themes / Templates) 2 09-25-2007 06:54 PM
filter and legend plugins Visiontm General Support 5 02-23-2006 02:37 PM



All times are GMT -4. The time now is 11:46 PM.


vBulletin skins developed by: eXtremepixels
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright 2009 NashTech, Inc.

| Home | Register | Today's Posts | Search | New Posts |