Battler45 / SierraMigrationToGitHub

Migration from unfuddle to GitHub
0 stars 0 forks source link

Create Blog Post Add / Edit Form #204

Closed Battler45 closed 4 years ago

Battler45 commented 4 years ago

Vihang,

I've prepared a mockup of the form that you can use to implement the Add / Edit Blog Post functionality on the site:

http://client.sierrainteractivedev.com/blog-post-form.htm

Some of the features of this form will be straightforward, but there are a number of details that will need to be taken into account. In implementing this functionality, you may want to review the functionality of the blog post editor on the current admin site. Go to:

http://client.sierrainteractive.com

And login using:

Sitename: joehaydenrealtor.com Username: joe Password: g0ldr3c0rd

Please bear in mind that this grants access to a live site, and so please refrain from making any changes to content (or, at least, undo them once they are done). To get to the Blog manager, click the Manage Blog link. If you need to add a new post to review the functionality, that is fine, as long as you remove it within 5-10 minutes after creating it. There are some differences between the functionality of the old system and what you will be implementing, but there are also quite a few similarities.

1 -- The Post Title field corresponds to the PostTitle field of the SICM_BlogPosts table

2 -- The Post Filename field corresponds to the PostFilename field of the SICM_BlogPosts table

3 -- The Category drop-down pulls from the SICM_BlogCategories link. When you click this drop-down, you'll notice a "New Category..." option. When selected, this should pop-up an overlay window (as on the current site) which prompts the user for the name of the new category and also for the filename.

On tab, the programming should automatically convert the users category name into a filename by stripping out all spaces and special characters, transforming all characters to lowercase, and replacing spaces with hyphens. The user will still have the ability to edit the filename, but when focus is removed from the field, the programming should automatically validate the user's input to the above standard.

The filename is used as part of the URL on the front-end blog when viewing posts from that particular category, so the filename should also be validated against other filenames from that blog to ensure that there are no exact duplicates (on submit). On successful submission of the New Category form, the new category name should dynamically be added to the Category drop-down and selected.

4 -- The Tags drop-down pulls from the SICM_BlogTags table. When the user selects the "New Tag..." option, an overlay should appear with the title "New Tag" requesting the name of the new tag (as on the current site). On submit, the user's input should be validated to make sure it is not a duplicate. On success, the modal dialog should close, and the tag should be linked to the post and displayed as in the example in the mockup. This functionality resembles the "Label" functionality in GMail, where you can assign multiple labels to a single email message.

When the user clicks an X next to any assigned tag, the tag disappears and the database relationship between the tag and blog post are removed.

It's important to note that when the user initially arrives at this page to add a new blog post, the Tags drop-down should be disabled. This is because the new post will not yet have a database ID, and so it would not yet be possible to associate tags with the post.

It is only after the user enters a post title and filename, and selects a category, and (optionally) enters meta-tags for the post, that the Tags drop-down should become enabled. (And, of course, it is always enabled in cases where the user is editing an existing post.)

5 -- The Meta-Tags textareas pull from the SICM_BlogMetaTags table.

6 -- You'll notice that in the right column there are two separate gray boxes with the title "Post Overview." The top box is an example of what the user should see when editing a post; the bottom box is an example of what the user should see when adding a new post (on initial page load). So, of course, there would only be one of these boxes visible in the finished page.

I would like the gray box to follow the user down the page as he scrolls down, so that it always remains visible and well-positioned for the user throughout the editing process. This means that the Save and Cancel buttons will be available at any time. I know there are some jQuery plugins / scripts which create an animated effect for accomplishing this, and if you can find one that is easy to implement, that's great. Otherwise, using CSS and fixed-positioning would also be fine if that will work.

For new posts, please default the Status to On-Hold, and the date and time to the current date and time. Clicking the date or the arrow next to it should bring up the same date / time picker that Vihar has already implemented on the task functionality on the Lead Detail page.

7 -- For new posts, when the user completes Title, Filename, and Category and clicks the Save button, a "slide down" message should appear from the top of the screen indicating that the post has been created successfully (blue text on white background as Vihar has implemented on other pages on the site), and the user should be scrolled down to the bottom of the form, where a text-editor window should dynamically be made to appear.

To get a sense of how this should work, please do go ahead and try adding a new post on the above website.

On the current admin area, I have been using the open source FCK editor to provide the editor functionality, and I think we should stick with that. They have a new version (the CK Editor) but in testing, I have not been happy with the way it automatically rewrited HTML entered into the editor window, and so I would prefer to stick with version 2.6.4 as on the current site (or a newer one in that line, if available).

If you view source on the Edit Blog Post page on the current admin area, you'll see quite a bit of javascript included in-line with the page. It is not pretty and not well-documented, but it should give you a basic idea of how to go about implementing this functionality. The FCK editor does include methods for dynamically creating and inserting editor windows on the fly. I've zipped up and attached the fckeditor files from the current site for you to use on the new site if you want to do that, but feel free to adapt or change as necessary.

You will definitely need to make some modifications to the Image Browser functionality, as it is currently configured to use the Classic ASP uploader plugin, and you will want to change this to the .NET uploader plugin (see http://ckeditor.com/download -- it looks like for FCK editor 2.6.4 there is an ASP.Net control which should simplify the implementation for you.)

8 -- In the right-column Post Overview box for editing (the top one) you'll also notice that there is an "Auto-Saved..." message. If you can figure out how to implement this type of functionality without too much trouble, please do so, but please don't take too much time for that if it proves to be very difficult. At this point it is more important to me to keep moving forward as quickly as we can than to get snagged on something like that if it ends up taking quite a bit of time.

I think that's it for now -- I'm sure you'll have questions. Please let me know if you do.

Thanks.

Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

Vihang,

One more note -- when adding a post, when the user clicks the Save button, the Post Status should automatically change from On Hold to Active. Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

Vihang,

1 -- Thanks -- that's a good point about the "Created" date. Yes, please do add a column for that. My original intention was to use the DatePosted field for that purpose, but I realize now that, being an editable field, we do need an additional field which will hold strictly the datetime at which a post was added to the database.

2 -- Yes, good point. Please remove the "required" asterisk from MetaTitle

3 -- Any user having permissions to manage the blog can edit any blog post.

4 -- Very good points / questions about auto-save. Thinking it through more fully, let's not implement auto-save at this time. We may revisit this decision later and decide to add it, but for now, please do not implement this feature.

Thanks. Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

Vihang,

Regarding the time control, there is already one implemented on the lead-detail.aspx page that allows for specification of both date and time -- it is related to the "Tasks" which can be assigned to Users. I'm sure Vihar will be able to point you to the necessary code.

Regarding FCKEditor, I know it can be complicated, so if you have any questions, please let me know.

One important point which I neglected to mention earlier: on the current production server, each site has a unique set of files which apply to the FCK Editor CSS capability -- meaning that, for each site, when FCK Editor loads, it pulls a set of CSS styles that are specified as related to the given site.

On the production server, the path to this file is always defined as:

/res/includes/siteconfig/site[SITE ID].xml /res/includes/siteconfig/site[SITE ID].css /res/includes/siteconfig/site[SITE ID].js

When configuring the FCK Editor in the page, it is possible to set a "Custom Configurations Path" like this:

oEditor.Config["CustomConfigurationsPath"] = "/res/includes/siteconfig/site[SITE ID].js" ;

The javascript file then contains references to both the XML and CSS files. The purpose of this is to allow text rendered in the Editor window to match as closely as possible to what will be rendered on the actual site.

If you think it's wise, I can copy all of these configuration files down into any directory you specify on the local site (or another location on the development server). Just let me know. (I set these three files up on the production server each time a new site is added.) Or, if you have a suggestion for an alternate approach, please let me know. This same set of files would also be used in the Content Manager page editor. Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

Ben,

I've few queries/points to confirm:

1-- The SICM_BlogPost table doesn't have corresponding column to display "Created" in Post Overview. Please let me know if I should add a new column for the same, as we did for SICM_Pages table.

2-- Having gone through the requirements and looking at SICM_BlogPostMetaTags table I deduce that "Meta Title" is not a required field. Please confirm this.

3-- Can any user having permissions to manage blog, edit the blog post. Or only the creator of the blog post is allowed to edit?

4-- My understanding regarding auto-save feature is that it would be to ensure that user's edits are not lost due to some unknown error. I think it would be a bit complex to enable auto-save feature on all fields. So my suggestion is to keep this to actual contents only. The main reason to not enable this on all fields is that it would require a complex workflow that will involve initially storing data in temporary storage (new table/file), providing user an option to load temporary data in case of any failure and so on...

After user has created a new blog post by entering and saving data in required fields, record would be created in the database. User can then work on adding actual blog contents. This is the stage where we can enable auto-saving of actual contents. Once user starts adding/editing contents, the javascript in the background would periodically auto-save content changes.

Pls note that once the changes are auto-saved, they won't be rolled-back if user "cancels" the changes, closes his browser, loses connection due to any unknown reason.

Please let me know your thoughts on this.

Thanks Posted by Shah Vihang(unfuddle username: vihang)

Battler45 commented 4 years ago

Ben,

I have implemented blog-post-form page and uploaded the latest changes on development server. You can access the page via "Manage Blog Posts" page. Please note that there is some issue on server while adding new blog post. I am looking into it and will update you on the same.

Please run the attached script to add new column "DateCreated" in SICM_BlogPosts table on Production DB. The Development DB is updated for the same.

Regarding FCKEditor:

1-- Please note that I have set "CustomConfigurationsPath" config parameter of FCKeditor as you had described. When you get time please upload the "Site Config" files for couple of sites on development server for testing.

2-- In fckconfig.js there are several values for "ToolbarSets". Please let me know if this config parameter needs to be set based on Site-ID. For now I've configured FCKeditor to use "MyToolbar".

3-- In current implementation the Image/File upload functionality is disabled as the instructions on config page suggested to perform some sort of validation. I'll work on this tomorrow and upload the changes. Also, there is a config parameter to set User file path. I believe this needs to be configured based on Site-ID as well. Please confirm this.

Regarding Postdate display. The plugin requires to have input controls. So, I'll need to spend some time to implement it as per the requirments.

Please review the page and let me know your feedback.

Thanks Posted by Shah Vihang(unfuddle username: vihang)

Battler45 commented 4 years ago

Vihang,

One clarification -- in the current implementation, there is an underscore between "site" and "[SITE ID]" -- for some reason, Unfuddle stripped this out when the comment was posted. Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

Ben,

Regarding #9, Yes, It would be better to load FCKEditor via Ajax. I'll update the code for the same. Please note that this will require a few changes in the current implementation. I'll also incorporate changes for #8, and provide you updated functionality by this weekend.

Thanks Posted by Shah Vihang(unfuddle username: vihang)

Battler45 commented 4 years ago

Vihang,

Sorry -- I somehow missed your reply yet again! (In Gmail, unfuddle notifications are often grouped together into the same conversation, and so if more than one notification comes in overnight, I don't seem to always notice all of them...)

As for your question -- deleted comments should remain invisible once deleted - meaning, they should not be visible on the front-end website (obviously) and they should not be visible in the administration area as well -- i.e., there does not need to be an un-delete.

Thanks. Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

Ben,

This is to update you on current work progress. I have implemented most of the requirements. I am working on integrating FCKEditor in blog post page.

There is one query regarding "Post Date" control. My understanding is to implement control similar to control on site-analytics page. Please note that that control only supports date selection. If time part is also to be captured than I will need to modify that control. Please let me know your thoughts on this.

Thanks Posted by Shah Vihang(unfuddle username: vihang)

Battler45 commented 4 years ago

Ben,

I have incorporated changes for comment #17:

1-- Please note that I could not center align buttons (in an overlay) using css. I tried to programmatically center these buttons, but the rendering was not consistent across browsers, especially in IE. It would be great if you could help me out on this.

2-- Please update the links in email with following querystring parameters:

An example,

http://client.sierrainteractivedev.com/id=101&sid=234&commid=24&action=approve

Please test this and let me know your feedback.

Thanks Posted by Shah Vihang(unfuddle username: vihang)

Battler45 commented 4 years ago

Vihang,

Thanks -- it's looking great.

1 -- I've downloaded the configuration files to /res/fckeditor/site_config/ -- this is a slightly different path than on the original site (because we are not using an "includes" folder on this new site) but hopefully it should be simple for you to adjust the path. Otherwise, the structure is the same, and I have downloaded all site_config files for all active sites to the development server.

2 -- Yes, correct, thank you -- MyToolbar is the correct set to display.

3 -- On the development web site, I've downloaded a directory called "UserFiles" -- this contains a number of additional directories such as "10", "11", "12" etc. Each of these directories corresponds to the ID of a particular site in the sites table. Please use this UserFiles folder as the User file path.

4 -- It looks to me like you have already implemented PostDate display controls and that they are already working properly.

5 -- Can you implement a confirmation overlay on the Cancel button, so that when the Cancel button is clicked, the user must confirm this action before they are returned to the blog-posts.aspx page?

6 -- It looks to me like if I do a sort of any type on the blog-posts.aspx page (such as on # of Comments) and then click any post to Edit, when I then Save or Cancel the post, I'm returned to the blog-posts.aspx page, but none of my sort preferences are preserved. Similarly, if I filter by Category and then edit a post, when I am returned to the blog-posts.aspx page, my Category filter is not preserved. The same is true for a search by keyword, and I'm assuming that the same is true for Authors as well. In all cases, can you make sure that, when the user is returned to the blog-posts.aspx page, they are returned to the same state as before they clicked through to the blog-post-form.aspx page?

7 -- If I edit the Post Filename field directly and then tab out of the field (so that it loses focus), that field needs to validate the user input and update it to the proper format if necessary. This involves forcing all letters to lower-case, stripping out any characters that are not letters or numbers (including apostrophes, etc.), replacing all spaces with hyphens, and then placing a trailing "/" at the end of the filename.

8 -- In creating the Post Filename from an initial Post Title, can you adjust the function so that multiple spaces are rendered as a single hyphen rather than as multiple hyphens. So, for example, this Post Title:

This is a test post tile 3434 ' sdlf 3433lj@@#@#

Would render as this Post Filename:

this-is-a-test-post-tile-3434-sdlf-3433lj/

Rather than this Post Filename:

this-is-a-test-post-tile-3434--sdlf----3433lj/

9 -- Just now in testing, I'm not sure what happened, but when I clicked the Cancel button, I get a "The resource cannot be found error message." You may be in the process of uploading items to the site, or it may be that my session timed out and there was an error in validating it against my session in the database.

10 -- In creating a new post, when the user enters a post title and filename and selects a category and then clicks the Save button, does the application reload the page to include the editor window, or is the editor window included dynamically via Ajax? If the former, that's fine, but either way, once the editor window is added, can you scroll the page down so that the editor window is visible in the user's screen? If you check out the current implementation, you will see an example of how I do this on the current site. As for an example of how to scroll the window to an appropriate location, Vihar has done this in several other places in the application and should be able to provide you with the necessary example code.

Thanks - I know I have provided a number of items here, but they are all small points, and you have done an excellent job so far. Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

Ben,

I have updated "Blog Management" page implementation as per the client-side javascript framework. I have also implemented "Categories Tab".

Please test this and let me know your feedback.

Thanks Posted by Shah Vihang(unfuddle username: vihang)

Battler45 commented 4 years ago

Vihang,

I've encountered one more small bug with the new categories functionality. In the database, I created a new blog for Site ID 293, KietHomes.com. I then logged in to the admin area with the intention of creating categories for the blog. However, when I went to the blog section, selected KietHomes.com, and then clicked over to the Categories tab, I get an "Unexpected error" message sliding down from the top.

When I then went into the database and added a new category manually and reloaded the Categories tab in the admin area, it worked fine. So it appears to be related to attempting to load the Categories tab for a blog for which no categories have yet been created.

Thanks.

Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

Ben,

I have changed "# Pages" to "# Posts". Sorry for the oversight.

Thanks Posted by Shah Vihang(unfuddle username: vihang)

Battler45 commented 4 years ago

Vihang,

Excellent -- I've tested the Categories feature in the Blog and it looks good. One small change request -- can you change "# Pages" to "# Posts"?

Thanks. Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

Vihang,

One more thought regarding item #10 in my last comment: it will actually be best to insert the new FCK Editor Textarea dynamically via Ajax without reloading the page if you can.

The reason is that in the Content Management section (and also in this Blog Post form, eventually) the user is going to have the ability to insert multiple content areas along with other widgets dynamically into a single page (this functionality already exists in the Content Management form on the current admin site).

So, working out this functionality now, at this point, will allow you to re-use this same code in a couple of future tickets. I believe this will require two steps:

1 -- Submitting the initial form via Ajax to a hidden page which will receive the data, submit it to the database, and then return the ID of the newly created page back to the form page via javascript / AJAX

2 -- Once the new page has been added to the database, insert the FCK Editor dynamically into the page (using javascript) and then add a Component ID for the text editor to the database using Ajax.

If you look at the Content Manager editor form in place on the current site and view source, you'll be able to see a lot of (ugly, uncommented) javascript code which performs this functionality. I am sure you won't want to re-use much of this code, but you should be able to locate and copy out the code which allows you to dynamically add FCK Editor windows into the page using a javascript function.

Thanks. Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

Vihang,

There appears to be a strange bug with the Categories feature on the blog-posts.aspx page.

If you login as the admin user, go to the Blog page, select HometoIndy.com as your site, and then go to the Categories page, you'll see I've entered a category called "Test Category." I did this through the database and (as you can see) I've entered an incorrect category filename.

The reason I did this is that I must have done the same thing earlier for this site, because I found two categories that were the same way. The problem came when I went to edit the category filenames for those categories. In the edit window for the category, I erased the current filename (in this case "Test Category"), put my cursor in the Category Name field, and then tabbed. The program created the new, correct filename as expected: test-category/. When I clicked OK, the change was reflected on the main Categories tab.

The problem is that if you hit refresh, the old category filename will re-appear (Test Category) with the spaces and the old formatting. The old filename must be caching somehow in the page, because in the case of the original two problem categories, I went into the database and made the change to the filename, but when I refreshed this Categories tab on the site, it still reverted the filenames in the database to the old, incorrect values (even though I had not edited the categories through the application, only through the database).

Can you look into this when you have a chance?

Thanks. Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

Ben,

I've fixed the category tab issue and updated the live site for the same. Please note that these changes are not published on development site for now. I'll update the development site along with other changes.

Thanks Posted by Shah Vihang(unfuddle username: vihang)

Battler45 commented 4 years ago

Ben,

There is a bug in the code that saves the category-name as the file-name. If it isn't urgent I'll publish this fix along with the other changes.

Thanks.

Posted by Shah Vihang(unfuddle username: vihang)

Battler45 commented 4 years ago

Vihang,

In the Blog section, could you implement functionality for the Blog Categories that is very similar to the Sections functionality you just implemented for the Content Section?

The Categories functionality would be almost exactly the same, except that (of course) the new tab would be called "Categories" instead of "Sections" and that, when deleting a category, the user would be offered a selection of the other existing categories rather than the other existing sections.

As with the Sections functionality I think that, for now at least, this functionality should be available only to Admins and Super Managers. At some point we may implement a 301 redirect tool which would automatically implement a 301 redirect for Google in the event that an existing pages filename or category is changed, and I think we need to do that before allowing users to delete categories or edit category filenames.

Please let me know if you have any questions. Thanks.

Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

Ben,

I've started working on adding "Categories" tab on the "Blog Management" page. I've already implemented stored procedures and data access methods for the same. I am currently working on implementing UI part of it. However I'll need your inputs before proceeding on the same.

When the "Blog Management" page was implemented, we didn't have the existing client-side framework so all processing of this page is currently handled on server-side. This will make it a bit complex to add a new "Categories" tab in the sense that synchronization between two tabs will have to be managed on the server-side. Since this tab is only going to be used by the "admin" users for now, we can go ahead and implement it.

The other alternatives are:

1 -- to change the "Blog Management" page implementation such that all processing is handled by the client-side javascript framework. This will make it very similar to the "Content Management" page implementation and we can add as many features that require client-side processing. We should do this if this page is going to be having a few more such features in the future.

2 -- to implement a new page for "Category Management". This will make it a bit odd as you (administrator) will have to navigate between two pages but this will make it easier to synchronize changes when a new category is added/existing category is removed.

Please let me know your thoughts on this.

I've a query in workflow - when a category is deleted, do we need to validate if blog posts in other sites are referencing the category and send an email to admin? I guess it is not required in this case but just wanted to confirm.

Thanks Posted by Shah Vihang(unfuddle username: vihang)

Battler45 commented 4 years ago

Vihang,

Best of luck on your exam. Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

Vihang,

Everything is working very well, thank you. One small point (and this is different than my original request) -- can you default the Post Status to Active rather than On Hold?

Also, regarding your question about point 2 in comment 9 -- you are correct. I was confusing this with the Content Manager functionality, which will be slightly different due to the user's ability to add multiple text areas and other types of components into those pages.

In the case of the Content Manager, when a text area is added to the page, in the current site I am at the same time adding a row to the SICM_PagesContent table and a row to the SICM_PagesComponentsLink table. But we can discuss that further in the Content Manager ticket.

Eventually we are going to port similar functionality over to this Blog Manager section, but not until we have first completed it for the Content Manager.

Thanks again -- great job. Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

Vihang,

Excellent work -- thank you!

Everything is working great so far -- assessing it again, can we make a few additional changes:

1 - Now that the comment edit form is displayed in an overlay, we have a little bit more room. I've created some new styles in the stylesheet for new buttons in the same style as the Submit button but using different colors. So:

a - In the Edit form overlay, can you change the CSS of the buttons to use these new styles? (So the Delete button will use the new button_red style, etc. -- Sorry, I should have thought of this before you spent time creating the other styles!)

b - Can you place the same distance between the buttons on the top row (Delete, Approve, On Hold) as there currently is between Submit and Cancel?

c - In places where the comment being edited is already On Hold, can you change the "Submit" button to use the button_yellow class, and can you change the text in that case to "Keep On Hold"? So the buttons in this case would be, "Approve - Keep On Hold - Delete"

d - In places where the comment being edited is already Active, can you change the text of the "On Hold" button to "Place On Hold" (button_yellow). So, the buttons in this case would be, "Approve - Place On Hold - Delete"

e - Please keep the order of the buttons consistent in all cases -- green, yellow, red. And please keep the Cancel button on a separate line below the top row of buttons. Can you center both rows of buttons in the overlay container? I think there should be sufficient room to keep all three buttons on one row, but if not, let me know (perhaps we could decrease left and right padding of buttons).

2 - One other feature we need to implement on this page is the ability to interface with an incoming client comment request. I am forwarding you a separate email with an example of this functionality, but when a new comment comes in, the blog owner receives an email notification with the text of the comment and the details of the person who left it, along with three buttons -- Approve, Edit and Delete. These will link back to the blog-post-form.aspx page for the blog post in question.

Upon arrival (and assuming the user is already logged in), the page should behave as follows:

a - If the "Approve" button has been clicked, when the page loads it should scroll down to the comments section (and directly to the comment in question, if possible), and the newly approved comment should be highlighted using a JQuery highlight effect (if it is not too much of a pain). Then (or at the same time) the message bar should slide in from the top with the notification, "The Blog Post Comment has been approved."

b - If the "Delete" button has been clicked, when the page loads, an overlay should automatically launch with a confirmation message, "Are you sure you want to delete this blog post comment?" If Yes is clicked, the overlay should close and a Success message should slide in from the top. If No is clicked, the comment edit form for the comment should load into the overlay, with options to Approve, Keep On Hold, Delete, Cancel.

c - If the "Edit" button has been clicked, when the page loads, the overlay should appear with the comment edit form, again with the buttons Approve, Keep On Hold, Delete, Cancel.

Also, I realize that the links in the email I'm forwarding you are not pointing to the correct page yet -- I'll get that changed. If you need me to adjust the querystring parameters that are passed into the blog-post-form.aspx page, just let me know what I need to do.

Last, in cases where the user clicks an Approve, Edit, or Delete link in an email notification and arrives at the admin site without being logged in, when they are then redirected to the homepage, it would be good if, after logging in successfully, they could be redirected back to the proper blog post detail page with the appropriate overlay or confirmation message for their selected action.

And I just want to say, it's great having you on the team and thanks for your excellent work.

Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

Vihang,

Thanks for clarifying. I do believe it would be best to proceed with #1 as proposed above, and make the Blog Management page consistent with the Content Management framework, as I do anticipate adding more features to the Blog page as we go along. Specifically, I expect that we will want to integrate some of the "Page Component" functionality with the Blog Posts in the same way that we are doing with the Content Pages (although not all of the components).

I do realize this will require a number of changes to the Blog table structure, etc., and that it will require some time to implement those changes when we get to them (to allow multiple page components for blog posts) but hopefully it will not present too much of a problem, and converting the blog functionality over to the same content framework should help with that process.

Thanks. (And it's fine, of course, to bill me for the time it takes to convert the blog to the content manager framework -- I consider that part of our learning curve and worth the time / money.) Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

Ben,

I have an exam tomorrow. So, I will get back to you on these tasks by Sunday.

Thanks Posted by Shah Vihang(unfuddle username: vihang)

Battler45 commented 4 years ago

Ben,

I've incorporated changes for #8 and #9. Please review the changes and let me know your feedback.

Regarding "Site Config" file path, there was an issue in initializing fck-editor as the xml/css paths in js were referring to "includes" folder. So I have moved site_config files to "includes" folder.

Also, I did not get your point #2 (in #9) about saving component id in database. I believe it needs to be done in content manager form. Please confirm this.

Thanks Posted by Shah Vihang(unfuddle username: vihang)

Battler45 commented 4 years ago

Ben,

I couldn't verify if deleted comments should be displayed in the comments sections. Please let me know if they are to be displayed, if yes should user be provided an option to undelete the comment?

Thanks Posted by Shah Vihang(unfuddle username: vihang)

Battler45 commented 4 years ago

Ben,

I have implemented blog post comments functionality. Please check the same and let me know your feedback.

Thanks Posted by Shah Vihang(unfuddle username: vihang)

Battler45 commented 4 years ago

Vihang,

I realized today (much to my chagrin) that in porting over the blog post functionality from the old admin area, I neglected to include the "Blog Post Comment" functionality. To get a sense of what this is and how it works, take a look at the blog here:

http://www.schulerbuilthomes.com/blog/

You'll see that the first post ("Raving Fans!") has 5 comments. If you click, "View Post Detail" you'll see the comments listed in the Discussion section. It's pretty straightforward.

Now, if you will log in to the old admin area at:

http://client.sierrainteractive.com

Using:

schulerbuilthomes.com schulerbuilder delta100

And then go to Manage Blog, you'll see the admin view for those same posts. If you click the "5 Comments" link beneath the "Raving Fans" title, you'll see a page where all of the comments are listed and there is an Edit icon to the right of each one. If you click the Edit link, it uses AJAX to slide in an Edit form where the user can update the comment and / or change its status (Approve, Edit, Delete).

Deleted comments are (obviously) deleted. Approved comments are allowed to appear on the front-end website. On-Hold comments are visible in the admin area but not on the front-end website.

So, your mission (should you choose to accept it) would be to replicate this functionality with a few slight differences.

In the new admin area, I think we should include a new fieldset on the blog-post-form.aspx page below "Post Contents" called "Post Contents". This fieldset would list the blog post comments in a similar format to what you see on the old admin area website, with an edit link next to each one.

However, for simplicity's sake, rather than sliding the content into the page using AJAX, I think it would probably be simpler to display the comment form in an overlay with the appropriate buttons. The Textarea field for the post comment does not need to be an FCK Editor window -- a standard Text Area is fine.

Also, the "Post a Comment" functionality needs to be enabled as on the old admin site (you'll see it below the comments). This allows the blog owner to post comments in reply to comments / queries from site visitors. When clicked the post a comment link should launch an overlay with the comment form, and such comments should automatically have status "Approved" by default.

If you will return to the old admin area for a moment and click the "HOLD" button beneath a comment (after having clicked its edit button), you'll see that a Yellow "Comment Is On Hold" label appears next to the comment title -- please replicate this functionality if you can.

If you click the Edit button again for the same comment, you'll now see that the available buttons are DELETE and APPROVE (HOLD is not an option because the comment is already at that status). So, I think you get the picture. (SUBMIT retains the current status, whatever it may be.)

The table you'll be dealing with in the database for all of this is SICM_BlogPostComments. There are also a number of stored procedures which you may be able to use in porting over the functionality:

SICM_spInsertBlogPostComment

SICM_spUpdateBlogPostComment

SICM_spUpdateBlogPostCommentStatus

I know I've covered a lot of ground here -- I'm sure you'll have questions. Please let me know.

Thanks. Posted by Peskoe Ben(unfuddle username: bpeskoe)