1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. To combat forum spam, we are temporarily disabling the ability to create new accounts for the forums. Please feel free to open a support ticket through out client area with any support issues. You can also search the forums for answers to many questions.

Don't Be Like Mike - and a Category question

Discussion in 'General Support' started by HoosierMike, May 22, 2006.

Thread Status:
Not open for further replies.
  1. HoosierMike

    HoosierMike New Member

    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?

  2. Brian

    Brian EPC Developer Staff Member

    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";
  3. HoosierMike

    HoosierMike New Member

    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!
Thread Status:
Not open for further replies.

Share This Page