| View previous topic :: View next topic |
| Author |
Message |
DonH
Joined: 04 Nov 2008 Posts: 8
|
Posted: Mon Dec 08, 2008 2:03 pm Post subject: How to copy calendars or categories |
|
|
Can I copy a calendar after setting up categories so I don't have to recreate everything every time? How about just copying a set of categories that can be used for future calendars? Must I make all these changes to the default calendar in order to get this kind of functionality?
Thanks,
Don |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5275
|
|
| Back to top |
|
 |
Cave_Dweller
Joined: 27 Oct 2008 Posts: 40
|
Posted: Tue Dec 16, 2008 6:45 pm Post subject: |
|
|
Are all of the settings (except categories) for a calendar in the thyme_Calendars table of MySQL or are there some settings hidden elsewhere?
Looks like it would be faster to duplicate a line and change ID and name using phpMyAdmin than going through the dialog boxes. (I have at least 50 to create)
Might not be too hard to make a copycat type file to do this same thing, with a space for to change the new calendar name. I'll do that when I get the time.
UPDATE: Yes, using phpMyAdmin, you can click on the pencil to edit your last row (calendar) in the table. In the ensuing page, add one to the ID and change the name under both name (and description, if needed).
Then under the popup box at the bottom of the page, select save as new row and click go. There you have it, instant new calendar, with all the settings done.
Now run copycat.php to add the categories.
Perfect! |
|
| Back to top |
|
 |
DonH
Joined: 04 Nov 2008 Posts: 8
|
Posted: Fri Dec 19, 2008 1:38 pm Post subject: |
|
|
I put copycat.php in the same directory as login.php. Is that correct?
When I put in the URL to copycat.php it flashes briefly but then I go back to login.
Don |
|
| Back to top |
|
 |
Cave_Dweller
Joined: 27 Oct 2008 Posts: 40
|
Posted: Fri Dec 19, 2008 2:43 pm Post subject: |
|
|
| Yes, therefore it should be in same directory as index.php. Do you have a calendar set up with with categories installed to copy from? |
|
| Back to top |
|
 |
DonH
Joined: 04 Nov 2008 Posts: 8
|
Posted: Fri Dec 19, 2008 3:16 pm Post subject: |
|
|
Yes, it's in the same directory as index.php, login.php, phpinfo.php, etc.
I do have some calendars with categories that I could use to test it at least.
Don |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5275
|
Posted: Fri Dec 19, 2008 5:20 pm Post subject: |
|
|
Hi,
You have to be logged in as admin to be able to copy categories. Navigate to the copycat script as you did before. At the login screen, login. It should then redirect you back to the copycat script.
Let me know if you have any questions / trouble. |
|
| Back to top |
|
 |
DonH
Joined: 04 Nov 2008 Posts: 8
|
Posted: Fri Dec 19, 2008 6:37 pm Post subject: |
|
|
Ah, now I see. Thanks for the info Ian. And thanks for the table copy info Cave Dweller. Now I need to get phpMyAdmin installed.
Don |
|
| Back to top |
|
 |
Cave_Dweller
Joined: 27 Oct 2008 Posts: 40
|
Posted: Sun Dec 21, 2008 12:00 am Post subject: |
|
|
When using phpmyadmin to create a bunch of new calendars, they only show up for admin when admin is logged in. The don't show for the public nor do they show for normal registered users who are logged in.
So copying the calendars is only part of it. Next is to add the users. This can be done through the Thyme admin screen, Calendars.
- OR -
If you have a lot of them, a faster way is by using phpMyAdmin.
In phpMyAdmin, view the Calendars table. Make note of the calendar numbers. The ones that you added using the previous post will need users assigned.
Now in phpMyAdmin, select the CalendarMembers table. If you have two users in your calendars, a registered user and public user for each calendar, you will see in the CalendarMembers table that there are two cid (Calendar ID) lines for each calendar, one for each user level.
Depending on how many new calendars you have added, click the box at the front of each line to select a existing calendar members. Multiple selections are fine, but be sure to select them in pairs,using the cid as reference. Note the cid number of the last ones on the list.
Click the pencil at the bottom to edit all. Then starting from the top, change the cid field (only) on each pair to correspond to the new calendar id of the calendars you created using the copy method described earlier in this thread.
Select add as a new row from the drop down menu and click go at the very bottom of the edit screen in phpMyAdmin. You will have added users to your new calendars. Verify that they match those set up in the Thyme Admin screen. |
|
| Back to top |
|
 |
|