public mobSocialPlugin(MobSocialObjectContext context, mobSocialSettings mobSocialSettings, ISettingService settingService, IMessageTemplateService messageTemplateService, IScheduleTaskService scheduleTaskService, IMobSocialService mobSocialService, ILocalizationService localizationService, IStoreContext storeContext, IVideoBattleService videoBattleService) : base(storeContext, settingService) { _context = context; _mobSocialSettings = mobSocialSettings; _settingService = settingService; _messageTemplateService = messageTemplateService; _scheduleTaskService = scheduleTaskService; _mobSocialService = mobSocialService; _localizationService = localizationService; _videoBattleService = videoBattleService; _storeContext = storeContext; _config = new HttpRuntimeSection(); //TODO Move to dependency registrar and perform injection }
/// <summary> /// Install plugin /// </summary> public override void Install() { //locales //this.AddOrUpdatePluginLocaleResource("Plugins.ProductCarousel.Cache", "true"); //It's required to set initializer to null (for SQL Server Compact). //otherwise, you'll get something like "The model backing the 'your context name' context has changed since the database was created. Consider using Code First Migrations to update the database" //settings var mobSocialSettings = new mobSocialSettings() { Version = MobSocialConstant.ReleaseVersion, ProfilePictureSize = 100, WidgetZone = "after_header_links", PeopleSearchAutoCompleteEnabled = true, PeopleSearchAutoCompleteNumberOfResults = 10, EventPageSearchAutoCompleteNumberOfResults = 10, PeopleSearchTermMinimumLength = 3, EventPageSearchTermMinimumLength = 1, ShowProfileImagesInSearchAutoComplete = true, CustomerAlbumPictureThumbnailWidth = 290, MaximumMainAlbumPictures = 10, MaximumMainAlbumVideos = 10, EventPageAttendanceThumbnailSize = 25, UninvitedFriendsNumberOfResults = 20, CustomerProfileUpdateViewCountAfterNumberOfSeconds = 180, // 3 minutes, FacebookWebsiteAppId = "1234567890123456", BusinessPageSearchUrl = "BusinessSearch", ArtistPageMainImageSize = 300, ArtistPageThumbnailSize = 150, // Would you like to replace the api key with your own? // Find more info here by contacting us at [email protected] EchonestAPIKey = "DQFW7ZCMHBBLMLVFE", // Would you like to replace the partner id with your own? // Find more info here by contacting us at [email protected] SevenDigitalPartnerId = "9378", SongFileMaximumUploadSize = _config.MaxRequestLength, SongFileSampleMaximumUploadSize = _config.MaxRequestLength, PurchasedSongFeePercentage = 30, ShowVideoThumbnailsForBattles = true, DefaultVotingChargeForPaidVoting = 0.99m, EnableFacebookInvite = true, }; var mediaSettings = new MediaSettings() { AvatarPictureSize = 200 }; AddLocaleResourceStrings(); _settingService.SaveSetting(mediaSettings); _settingService.SaveSetting(mobSocialSettings); InsertMessageTemplates(); AddScheduledTasks(); _context.Install(); base.Install(); }