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


Go Back   Easy PHP Calendar > General Discussion > General Support

General Support Questions about using the Easy PHP Calendar. (Not installation or customizations)

Closed Thread
 
Thread Tools Search this Thread Display Modes

Don't Be Like Mike - and a Category question
Old 05-22-2006, 08:41 PM   #1
HoosierMike
Calendar User
 
HoosierMike is offline
Join Date: Mar 2006
Posts: 4
Default Don't Be Like Mike - and a Category question

First, a bit of advice from someone who learned the hard way:

1) update to the newest version(s) in order to keep an eye on file permissions (I failed to do so and suffered the consequences this weekend when an outsider got access to my calendar.php and config.inc.php files and changed them in an unflattering way)

2) backup your config.inc.php file (I forgot to do so and I lost all my settings when the hacker changed the file). As a result, I'm now in the process of recreating much of my customization.

I also have a question: in trying to recreate my category structure from within the Setup Manager, it seems to be assigning new category numbers. As a result, when I run the Event Manager and try to edit an existing event, it doesn't recognize the category selections that I made when I originally entered each event (I assume this is because the category numbers stored in the "Category" field in the mySQL database don't match the category numbers that Setup Manager is now using in my re-created version).

For what it's worth, my structure involved 3 possible choices in the main category (the main category is called "Category"), and had a second category with only one possible choice (the second category is called "Highlight").
Here's a copy of the $epcCategories string in the newly created config.inc.php file (reflecting the new, incorrect category numbers)

$epcCategories="0|Category[0|Federation[5|Local Synagogues & Orgs[6|Other[7|-||-1|Highlight?[4|Yes[9|-||-12|5";

I assume I could remedy this problem by changing the numbers in the $epcCategories string to reflect the old category numbering that is reflected in all my database event entries. I'm trying to reverse engineer the old category numbers by looking at the existing data in my database, but I can't quite figure out the formatting of the $epcCategories string.

Here's a chart that lists several sample category field entries from existing database events (reflecting the original correct category numbering), along with an indication of the selection it reflects within the "Category" main category and "Highlight?" secondary category :

Data in MySQL field "Category" "Highlight?"

0[11X Federation -
0[12X Local Synagogues... -
0[13X Other -
0[11X5[15X Federation Yes


Does anyone have any specific suggestions on how I should change the numbers in the above $epcCategories string so that they correspond to the "old" category numbers reflected in the above chart?

Thanks!
 

Old 05-23-2006, 09:14 AM   #2
Brian
EPC Developer
 
Brian's Avatar
 
Brian is offline
Join Date: Jun 2001
Location: Florida, USA
Posts: 10,907
Default

Try this (haven't had my coffee yet...):

$epcCategories="0|Category[0|Federation[11|Local Synagogues & Orgs[12|Other[13|-||-5|Highlight?[5|Yes[15|-||-20|6";
__________________
-- Brian

Questions?

Instructions | FAQs | Errors FAQ | Forums | Support
| Web Site Hosting
 

Old 05-23-2006, 09:42 AM   #3
HoosierMike
Calendar User
 
HoosierMike is offline
Join Date: Mar 2006
Posts: 4
Default

Thanks, Brian. It looks like your suggestion works. If you're this good before you have your coffee, I can only imagine what you accomplish the rest of the day!
 
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



All times are GMT -4. The time now is 04:43 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 |