vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   HOW TO: Copy, rather than Move Calendar events? (https://vborg.vbsupport.ru/showthread.php?t=73690)

ataraxia 01-03-2005 11:58 AM

HOW TO: Copy, rather than Move Calendar events?
 
How could I hack vb3.0.4 code to make it possible to Copy, rather than Move, events from one calendar to another?

Or, if you want to get really elegant, offer both Copy and Move options?

Is there any way to do this without a hack?

Thanks

ataraxia 01-08-2005 07:27 PM

Quote:

Originally Posted by ataraxia
How could I hack vb3.0.4 code to make it possible to Copy, rather than Move, events from one calendar to another?

In the case 'domove': section of calendar.php (ver 3.0.5) this bit of code is what "moves" a calendar:

PHP Code:

                $DB_site->query("
                    UPDATE " 
TABLE_PREFIX "event
                    SET calendarid = 
$newcalendarid
                    WHERE eventid = 
$eventinfo[eventid] 

Could this be modified to Copy, rather than move by SELECT all of the source event record fields and then INSERT them into a new record with the target calendar ID? I.e. "clone" the old record but change the ID# so that it will ALSO be displayed in a different calendar as a completely separate record.

I'm new to MySQL and don't quite know how to do that (and take a chance of really messing up my message base.) Can someone help. please.

I would think that there would be lots of people who would like to be able to "clone" events from one calendar to another.

.


All times are GMT. The time now is 01:13 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00889 seconds
  • Memory Usage 1,717KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete