public Event(IProjectSettings prjSettings) { _prjSettings = prjSettings; _serverUrl = string.Format("{0}projects/{1}/{2}", _prjSettings.KeenUrl, _prjSettings.ProjectId, KeenConstants.EventsResource); }
public EventMock(IProjectSettings prjSettings, Func<IProjectSettings, JObject> GetSchemas = null, Func<JObject, IProjectSettings, IEnumerable<CachedEvent>> AddEvents = null) { _settings = prjSettings; _getSchemas = GetSchemas ?? new Func<IProjectSettings, JObject>((p) => { return new JObject(); }); _addEvents = AddEvents ?? new Func<JObject, IProjectSettings, IEnumerable<CachedEvent>>((p, e) => { return new List<CachedEvent>(); }); }
public EventMock(IProjectSettings prjSettings, Func<IProjectSettings, JArray> getSchemas = null, Func<JObject, IProjectSettings, IEnumerable<CachedEvent>> addEvents = null) { _settings = prjSettings; _getSchemas = getSchemas ?? ((p) => new JArray()); _addEvents = addEvents ?? ((p, e) => new List<CachedEvent>()); }
public EventCollectionMock(IProjectSettings prjSettings, Func<string, IProjectSettings, JObject> GetSchema = null, Action<string, IProjectSettings> DeleteCollection = null, Action<string, JObject, IProjectSettings> AddEvent = null) { _settings = prjSettings; _getSchema = GetSchema ?? new Func<string, IProjectSettings, JObject>((s, p) => { return new JObject(); }); _deleteCollection = DeleteCollection ?? new Action<string, IProjectSettings>((s, p) => { }); _addEvent = AddEvent ?? new Action<string, JObject, IProjectSettings>((s, p, e) => { }); }
public virtual void LoadDialogSettings(IProjectSettings settings) { Contract.Assert(settings != null); double dialogWidth; if (settings.TryGetDouble(SavedSettingsKeys.DbContextDialogWidthKey, out dialogWidth)) { DialogWidth = dialogWidth; } }
public EventCollectionMock(IProjectSettings prjSettings, Func<string, IProjectSettings, JObject> getSchema = null, Action<string, IProjectSettings> deleteCollection = null, Action<string, JObject, IProjectSettings> addEvent = null) { _settings = prjSettings; _getSchema = getSchema ?? ((s, p) => new JObject()); _deleteCollection = deleteCollection ?? ((s, p) => { }); _addEvent = addEvent ?? ((s, p, e) => { }); }
/// <summary> /// /// </summary> /// <param name="prjSettings">A ProjectSettings instance containing the ProjectId and API keys</param> public KeenClient(IProjectSettings prjSettings) { // Preconditions if (null == prjSettings) throw new KeenException("An IProjectSettings instance is required."); if (prjSettings.ProjectId.IsNullOrWhiteSpace()) throw new KeenException("A Project ID is required."); if ((prjSettings.MasterKey.IsNullOrWhiteSpace() && prjSettings.WriteKey.IsNullOrWhiteSpace())) throw new KeenException("A Master or Write API key is required."); if (prjSettings.KeenUrl.IsNullOrWhiteSpace()) throw new KeenException("A URL for the server address is required."); _prjSettings = prjSettings; // The EventCollection and Event interface normally should not need to // be set by callers, so the default implementation is set up here. Users // may override these by injecting an implementation via the property. EventCollection = new EventCollection(_prjSettings); Event = new Event(_prjSettings); }
public static void SetBool(this IProjectSettings settings, string key, bool value) { settings[key] = value.ToString(CultureInfo.InvariantCulture); }
public virtual void Setup() { if (UseMocks) SetupEnv(); settingsEnv = new ProjectSettingsProviderEnv(); }
public Task <string> ResolveBlogUrl(IProjectSettings blog) { throw new NotImplementedException(); }
/// <summary> /// /// </summary> /// <param name="prjSettings">A ProjectSettings instance containing the ProjectId and API keys</param> /// <param name="eventCache">An IEventCache instance providing a caching strategy</param> public KeenClient(IProjectSettings prjSettings, IEventCache eventCache) : this(prjSettings) { EventCache = eventCache; }
public async Task Update(IProjectSettings project) { await _projectCommands.Update(project.Id, project, CancellationToken.None).ConfigureAwait(false); }
public AccessKeysMock(IProjectSettings projSettings, Func <AccessKey, IProjectSettings, JObject> createAccessKey = null) { _settings = projSettings; _createAccessKey = createAccessKey ?? ((p, k) => new JObject()); }
public static string GetPriceFilter(IProjectSettings that) => that.Value <string>("priceFilter");
public virtual void SaveSettings(IProjectSettings settings) { settings.SetBool(SavedSettingsKeys.IsLayoutPageSelectedKey, IsLayoutPageSelected); settings.SetBool(SavedSettingsKeys.IsPartialViewSelectedKey, IsPartialViewSelected); settings.SetBool(SavedSettingsKeys.IsReferencingScriptLibrariesSelectedKey, IsReferenceScriptLibrariesSelected); if (IsLayoutPageSelected) { settings[SavedSettingsKeys.LayoutPageFileKey] = LayoutPageFile; } else { settings[SavedSettingsKeys.LayoutPageFileKey] = null; } if (IsModelClassSupported && DataContextType != null) { settings[SavedSettingsKeys.DbContextTypeFullNameKey] = DataContextType.TypeName; } }
public virtual void LoadSettings(IProjectSettings settings) { Contract.Assert(settings != null); bool boolValue; if (settings.TryGetBool(SavedSettingsKeys.IsLayoutPageSelectedKey, out boolValue)) { IsLayoutPageSelected = boolValue; } if (settings.TryGetBool(SavedSettingsKeys.IsPartialViewSelectedKey, out boolValue)) { IsPartialViewSelected = boolValue; } if (settings.TryGetBool(SavedSettingsKeys.IsReferencingScriptLibrariesSelectedKey, out boolValue)) { IsReferenceScriptLibrariesSelected = boolValue; } string stringValue; if (settings.TryGetString(SavedSettingsKeys.LayoutPageFileKey, out stringValue)) { LayoutPageFile = stringValue; } if (IsModelClassSupported && settings.TryGetString(SavedSettingsKeys.DbContextTypeFullNameKey, out stringValue)) { DataContextType = DataContextTypes.Where(t => String.Equals(t.TypeName, stringValue, StringComparison.Ordinal)).FirstOrDefault(); } }
public async Task <PageEditContext> Handle(PageEditContextRequest request, CancellationToken cancellationToken = default(CancellationToken)) { IPage page = null; ContentHistory history = null; var canEdit = false; var didReplaceDraft = false; var didRestoreDeleted = false; var rootPageCount = -1; IProjectSettings project = await _projectService.GetCurrentProjectSettings(); if (project != null) { canEdit = await request.User.CanEditPages(project.Id, _authorizationService); var slug = request.Slug; if (slug == "none") { slug = string.Empty; } if (!string.IsNullOrEmpty(slug)) { page = await _pageService.GetPageBySlug(slug, cancellationToken); } else if (!string.IsNullOrWhiteSpace(request.PageId)) { page = await _pageService.GetPage(request.PageId, cancellationToken); } if (request.HistoryId.HasValue) { history = await _historyQueries.Fetch(project.Id, request.HistoryId.Value).ConfigureAwait(false); if (history != null) { //if (!string.IsNullOrWhiteSpace(history.TemplateKey)) //{ // return RedirectToRoute(PageRoutes.PageEditWithTemplateRouteName, routeVals); //} if (page == null) // page was deleted, restore it from history { page = new Page(); history.CopyTo(page); if (history.IsDraftHx) { page.PromoteDraftTemporarilyForRender(); } didRestoreDeleted = true; } else { didReplaceDraft = page.HasDraftVersion(); var pageCopy = new Page(); page.CopyTo(pageCopy); if (history.IsDraftHx) { pageCopy.DraftAuthor = history.DraftAuthor; pageCopy.DraftContent = history.DraftContent; pageCopy.DraftSerializedModel = history.DraftSerializedModel; } else { pageCopy.DraftAuthor = history.Author; pageCopy.DraftContent = history.Content; pageCopy.DraftSerializedModel = history.SerializedModel; } page = pageCopy; } //model.HistoryArchiveDate = history.ArchivedUtc; //model.HistoryId = history.Id; //model.DidReplaceDraft = didReplaceDraft; //model.DidRestoreDeleted = didRestoreDeleted; } } if (page == null) { var rootList = await _pageService.GetRootPages(cancellationToken).ConfigureAwait(false); rootPageCount = rootList.Count; } } return(new PageEditContext( project, page, history, canEdit, didReplaceDraft, didRestoreDeleted, rootPageCount )); }
public async Task SendCommentNotificationEmailAsync( IProjectSettings project, IPost post, IComment comment, string postUrl, string approveUrl, string deleteUrl ) { var sender = await _emailSenderResolver.GetEmailSender(project.Id); if (sender == null) { var logMessage = $"failed to send account confirmation email because email settings are not populated for site {project.Title}"; _log.LogError(logMessage); return; } if (string.IsNullOrWhiteSpace(project.CommentNotificationEmail)) { var logMessage = $"failed to send comment notification email because CommentNotificationEmail is not populated for project {project.Id}"; _log.LogError(logMessage); return; } var site = await _siteResolver.GetById(new Guid(project.Id)); var model = new CoreCommentNotificationModel(site, project, post, comment, postUrl); var subject = "Blog comment: " + post.Title; string plainTextMessage = null; string htmlMessage = null; try { try { htmlMessage = await _viewRenderer.RenderViewAsString <CoreCommentNotificationModel>("CommentNotificationEmail", model); } catch (Exception ex) { _log.LogError("error generating html email from razor template", ex); return; } await sender.SendEmailAsync( project.CommentNotificationEmail, //to site.DefaultEmailFromAddress, //from subject, plainTextMessage, htmlMessage, comment.Email, //replyto configLookupKey : project.Id ).ConfigureAwait(false); } catch (Exception ex) { _log.LogError($"error sending comment notification email {ex.Message} : {ex.StackTrace}"); } }
public DBAccess(IProjectSettings settings) { this.settings = settings; dbInstance = Connect(); }
private ContentFilterResult FilterHtmlForList(IPost post, IProjectSettings settings, bool useTeaser) { var result = new ContentFilterResult(); if (useTeaser) { TeaserResult teaserResult = null; string teaser = null; if (!string.IsNullOrWhiteSpace(post.TeaserOverride)) { if (post.ContentType == "markdown") { teaser = MapImageUrlsToCdn( ConvertMarkdownToHtml(post.TeaserOverride), settings.CdnUrl, settings.LocalMediaVirtualPath); } else { teaser = MapImageUrlsToCdn( post.TeaserOverride, settings.CdnUrl, settings.LocalMediaVirtualPath); } result.FilteredContent = teaser; result.IsFullContent = false; } else { // need to generate teaser if (post.ContentType == "markdown") { var html = MapImageUrlsToCdn( ConvertMarkdownToHtml(post.Content), settings.CdnUrl, settings.LocalMediaVirtualPath); teaserResult = _teaserService.GenerateTeaser( settings.TeaserTruncationMode, settings.TeaserTruncationLength, html, post.Id, post.Slug, settings.LanguageCode ); } else { var html = MapImageUrlsToCdn( post.Content, settings.CdnUrl, settings.LocalMediaVirtualPath); teaserResult = _teaserService.GenerateTeaser( settings.TeaserTruncationMode, settings.TeaserTruncationLength, html, post.Id, post.Slug, settings.LanguageCode ); } result.FilteredContent = teaserResult.Content; result.IsFullContent = !teaserResult.DidTruncate; } } else { // using full content if (post.ContentType == "markdown") { result.FilteredContent = MapImageUrlsToCdn( ConvertMarkdownToHtml(post.Content), settings.CdnUrl, settings.LocalMediaVirtualPath); } else { result.FilteredContent = MapImageUrlsToCdn( post.Content, settings.CdnUrl, settings.LocalMediaVirtualPath); } result.IsFullContent = true; } return(result); }
public static string GetFacingHouse(IProjectSettings that) => that.Value <string>("facingHouse");
public async Task SendCommentNotificationEmailAsync( IProjectSettings project, IPost post, IComment comment, string postUrl, string approveUrl, string deleteUrl ) { var smtpOptions = GetSmptOptions(project); if (smtpOptions == null) { var logMessage = $"failed to send comment notification email because smtp settings are not populated for project {project.Id}"; log.LogError(logMessage); return; } if (string.IsNullOrWhiteSpace(project.CommentNotificationEmail)) { var logMessage = $"failed to send comment notification email because CommentNotificationEmail is not populated for project {project.Id}"; log.LogError(logMessage); return; } if (string.IsNullOrWhiteSpace(project.EmailFromAddress)) { var logMessage = $"failed to send comment notification email because EmailFromAddress is not populated for project {project.Id}"; log.LogError(logMessage); return; } var model = new CommentNotificationModel(project, post, comment, postUrl); var subject = "Blog comment: " + post.Title; string plainTextMessage = null; string htmlMessage = null; var sender = new EmailSender(); try { try { htmlMessage = await viewRenderer.RenderViewAsString <CommentNotificationModel>("CommentEmail", model); } catch (Exception ex) { log.LogError("error generating html email from razor template", ex); return; } await sender.SendEmailAsync( smtpOptions, project.CommentNotificationEmail, //to project.EmailFromAddress, //from subject, plainTextMessage, htmlMessage, comment.Email //replyto ).ConfigureAwait(false); } catch (Exception ex) { log.LogError("error sending comment notification email", ex); } }
public SetBalanceOnTestedObject(ILogger logger, IStockQuoteRepository stockQuoteRepository, IProjectSettings projectSettings) : base(logger, stockQuoteRepository, projectSettings) { }
public virtual void SaveDialogSettings(IProjectSettings settings) { settings[SavedSettingsKeys.DbContextDialogWidthKey] = DialogWidth.ToString(); }
public static void CopyTo(this IProjectSettings input, IProjectSettings target) { target.AddBlogToPagesTree = input.AddBlogToPagesTree; target.BlogMenuLinksToNewestPost = input.BlogMenuLinksToNewestPost; target.BlogPageNavComponentVisibility = input.BlogPageNavComponentVisibility; target.BlogPagePosition = input.BlogPagePosition; target.BlogPageText = input.BlogPageText; target.CdnUrl = input.CdnUrl; target.ChannelCategoriesCsv = input.ChannelCategoriesCsv; target.ChannelRating = input.ChannelRating; target.ChannelTimeToLive = input.ChannelTimeToLive; target.CommentNotificationEmail = input.CommentNotificationEmail; target.CopyrightNotice = input.CopyrightNotice; target.DaysToComment = input.DaysToComment; target.DefaultPageSlug = input.DefaultPageSlug; target.DefaultContentType = input.DefaultContentType; target.Description = input.Description; //target.EmailFromAddress = input.EmailFromAddress; target.FacebookAppId = input.FacebookAppId; target.Id = input.Id; target.Image = input.Image; target.IncludePubDateInPostUrls = input.IncludePubDateInPostUrls; target.LanguageCode = input.LanguageCode; target.LocalMediaVirtualPath = input.LocalMediaVirtualPath; target.ManagingEditorEmail = input.ManagingEditorEmail; target.ModerateComments = input.ModerateComments; target.PostsPerPage = input.PostsPerPage; target.PubDateFormat = input.PubDateFormat; target.RecaptchaPrivateKey = input.RecaptchaPrivateKey; target.RecaptchaPublicKey = input.RecaptchaPublicKey; target.RemoteFeedProcessorUseAgentFragment = input.RemoteFeedProcessorUseAgentFragment; target.RemoteFeedUrl = input.RemoteFeedUrl; target.ShowTitle = input.ShowTitle; target.SiteName = input.SiteName; //target.SmtpPassword = input.SmtpPassword; //target.SmtpPort = input.SmtpPort; //target.SmtpPreferredEncoding = input.SmtpPreferredEncoding; //target.SmtpRequiresAuth = input.SmtpRequiresAuth; //target.SmtpServer = input.SmtpServer; //target.SmtpUser = input.SmtpUser; //target.SmtpUseSsl = input.SmtpUseSsl; target.TimeZoneId = input.TimeZoneId; target.Title = input.Title; target.TwitterCreator = input.TwitterCreator; target.TwitterPublisher = input.TwitterPublisher; target.UseDefaultPageAsRootNode = input.UseDefaultPageAsRootNode; //target.UseMetaDescriptionInFeed = input.UseMetaDescriptionInFeed; target.WebmasterEmail = input.WebmasterEmail; target.Publisher = input.Publisher; target.PublisherLogoUrl = input.PublisherLogoUrl; target.PublisherLogoWidth = input.PublisherLogoWidth; target.PublisherLogoHeight = input.PublisherLogoHeight; target.PublisherEntityType = input.PublisherEntityType; target.DisqusShortName = input.DisqusShortName; target.ShowRecentPostsOnDefaultPage = input.ShowRecentPostsOnDefaultPage; target.ShowFeaturedPostsOnDefaultPage = input.ShowFeaturedPostsOnDefaultPage; target.TeaserMode = input.TeaserMode; target.TeaserTruncationMode = input.TeaserTruncationMode; target.TeaserTruncationLength = input.TeaserTruncationLength; target.DefaultFeedItems = input.DefaultFeedItems; target.MaxFeedItems = input.MaxFeedItems; }
private static async Task RunNonInteractive(string runArguments, ILogger logger, IProjectSettings projectSettings, IStocksDataApi api) { try { var splitted = runArguments.Split(' '); await api.Execute(splitted); } catch (Exception e) { logger.LogError(e); } }
public async Task <PageViewContext> Handle(PageViewContextRequest request, CancellationToken cancellationToken = default(CancellationToken)) { IPage page = null; ContentHistory history = null; var canEdit = false; var hasDraft = false; var hasPublishedVersion = false; var didReplaceDraft = false; var didRestoreDeleted = false; var showingDraft = false; var rootPageCount = -1; IProjectSettings project = await _projectService.GetCurrentProjectSettings(); if (project != null) { canEdit = await request.User.CanEditPages(project.Id, _authorizationService); var slug = request.Slug; if (string.IsNullOrEmpty(slug) || slug == "none") { slug = project.DefaultPageSlug; } page = await _pageService.GetPageBySlug(slug, cancellationToken); if (page != null) { hasDraft = page.HasDraftVersion(); hasPublishedVersion = page.HasPublishedVersion(); } if (canEdit && request.HistoryId.HasValue) { history = await _historyQueries.Fetch(project.Id, request.HistoryId.Value); if (history != null) { if (page == null) //page must have been deleted, restore from hx { page = new Page(); history.CopyTo(page); if (history.IsDraftHx) { page.PromoteDraftTemporarilyForRender(); } didRestoreDeleted = true; } else { var pageCopy = new Page(); page.CopyTo(pageCopy); if (history.IsDraftHx) { pageCopy.Content = history.DraftContent; pageCopy.Author = history.DraftAuthor; } else { pageCopy.Content = history.Content; pageCopy.Author = history.Author; } page = pageCopy; didReplaceDraft = hasDraft; } } } else if (canEdit && page != null && ((request.ShowDraft && page.HasDraftVersion()) || !page.HasPublishedVersion())) { var pageCopy = new Page(); page.CopyTo(pageCopy); pageCopy.PromoteDraftTemporarilyForRender(); page = pageCopy; showingDraft = true; } if (page == null) { var rootList = await _pageService.GetRootPages(cancellationToken).ConfigureAwait(false); rootPageCount = rootList.Count; } } return(new PageViewContext( project, page, history, canEdit, hasDraft, hasPublishedVersion, didReplaceDraft, didRestoreDeleted, showingDraft, rootPageCount )); }
public Top10TradingSimulator(ILogger logger, IStockQuoteRepository stockQuoteRepository, IProjectSettings projectSettings) : base(logger, stockQuoteRepository, projectSettings) { }
public KeenClient(IProjectSettings prjSettings, IKeenHttpClientProvider keenHttpClientProvider) : this(prjSettings, null, keenHttpClientProvider) { }
public async Task Unzip(IProjectSettings project) { await ReadFromZip(project); }
public MockPocoContext(IProjectSettings projectSettings) : base(projectSettings.GetDbContextOptions) { }
public StockTestContext(IProjectSettings projectSettings) : base(projectSettings.GetDbContextOptions) { }
public static bool TryGetString(this IProjectSettings settings, string key, out string value) { value = settings[key]; return(value != null); }
public ContentFilterResult FilterHtmlForList(IPost post, IProjectSettings settings) { bool useTeaser = (settings.TeaserMode == TeaserMode.ListsAndFeed || settings.TeaserMode == TeaserMode.ListOnly) && !post.SuppressTeaser; return(FilterHtmlForList(post, settings, useTeaser)); }
/// <summary> /// /// </summary> /// <param name="prjSettings">A ProjectSettings instance containing the ProjectId and API keys</param> /// <param name="eventCache">An IEventCache instance providing a caching strategy</param> public KeenClient(IProjectSettings prjSettings, IEventCache eventCache) : this(prjSettings, eventCache, null) { }
public static string GetAcreageFilter(IProjectSettings that) => that.Value <string>("acreageFilter");
public virtual void SaveDialogSettings(IProjectSettings settings) { settings["WebStackScaffolding_DependencyDialogWidth"] = base.DialogWidth.ToString(); }
public static string GetNumberOfBedrooms(IProjectSettings that) => that.Value <string>("numberOfBedrooms");
public virtual void SaveDialogSettings(IProjectSettings settings) { settings[SavedSettingsKeys.ConfigDialogWidthKey] = DialogWidth.ToString(); }
/// <summary> /// /// </summary> /// <param name="prjSettings">A ProjectSettings instance containing the ProjectId and API keys</param> public KeenClient(IProjectSettings prjSettings) : this(prjSettings, null, null) { }
public static ProjectSettings FromIProjectSettings(IProjectSettings project) { var p = new ProjectSettings(); p.AddBlogToPagesTree = project.AddBlogToPagesTree; p.BlogMenuLinksToNewestPost = project.BlogMenuLinksToNewestPost; p.BlogPageNavComponentVisibility = project.BlogPageNavComponentVisibility; p.BlogPagePosition = project.BlogPagePosition; p.BlogPageText = project.BlogPageText; p.CdnUrl = project.CdnUrl; p.ChannelCategoriesCsv = project.ChannelCategoriesCsv; p.ChannelRating = project.ChannelRating; p.ChannelTimeToLive = project.ChannelTimeToLive; p.CommentNotificationEmail = project.CommentNotificationEmail; p.CopyrightNotice = project.CopyrightNotice; p.DaysToComment = project.DaysToComment; p.DefaultPageSlug = project.DefaultPageSlug; p.Description = project.Description; p.EmailFromAddress = project.EmailFromAddress; p.FacebookAppId = project.FacebookAppId; p.Id = project.Id; p.Image = project.Image; p.IncludePubDateInPostUrls = project.IncludePubDateInPostUrls; p.LanguageCode = project.LanguageCode; p.LocalMediaVirtualPath = project.LocalMediaVirtualPath; p.ManagingEditorEmail = project.ManagingEditorEmail; p.ModerateComments = project.ModerateComments; p.PostsPerPage = project.PostsPerPage; p.PubDateFormat = project.PubDateFormat; p.RecaptchaPrivateKey = project.RecaptchaPrivateKey; p.RecaptchaPublicKey = project.RecaptchaPublicKey; p.RemoteFeedProcessorUseAgentFragment = project.RemoteFeedProcessorUseAgentFragment; p.RemoteFeedUrl = project.RemoteFeedUrl; p.ShowTitle = project.ShowTitle; p.SiteName = project.SiteName; p.SmtpPassword = project.SmtpPassword; p.SmtpPort = project.SmtpPort; p.SmtpPreferredEncoding = project.SmtpPreferredEncoding; p.SmtpRequiresAuth = project.SmtpRequiresAuth; p.SmtpServer = project.SmtpServer; p.SmtpUser = project.SmtpUser; p.SmtpUseSsl = project.SmtpUseSsl; p.TimeZoneId = project.TimeZoneId; p.Title = project.Title; p.TwitterCreator = project.TwitterCreator; p.TwitterPublisher = project.TwitterPublisher; p.UseDefaultPageAsRootNode = project.UseDefaultPageAsRootNode; p.UseMetaDescriptionInFeed = project.UseMetaDescriptionInFeed; p.WebmasterEmail = project.WebmasterEmail; p.Publisher = project.Publisher; p.PublisherLogoUrl = project.PublisherLogoUrl; p.PublisherLogoWidth = project.PublisherLogoWidth; p.PublisherLogoHeight = project.PublisherLogoHeight; p.PublisherEntityType = project.PublisherEntityType; p.DisqusShortName = project.DisqusShortName; p.ShowRecentPostsOnDefaultPage = project.ShowRecentPostsOnDefaultPage; p.ShowFeaturedPostsOnDefaultPage = project.ShowFeaturedPostsOnDefaultPage; return(p); }