Feedback and Email Link Problem

Topics: Developer Forum, User Forum
Jan 16, 2010 at 9:31 PM

I want to report a couple related items here:

(1) If I leave FeedbackEmailAddress blank, my generated web page documentation set includes a "Send Feedback" link in each page header that, when clicked, launches the appropriate email program but leaves the "To:" field blank. This seems to be a defect: if it is going to have the "Send Feedback" link it must have a "To:" value filled in; if none is supplied, then the link should not be rendered.

(2) There is no way to provide an email address for the "Send Feedback" link without also causing the "Send Comments" link in the footer to appear. To address (1) one must fill in FeedbackEmailAddress, which then forces the display of the footer link as well. One should be able to do one without the other. I think this is also a defect (though one could argue I am asking for an enhancement).

(3) Call me paranoid, but I do not like seeing a realized email address when one selects "view source" for a web page, to prevent web trawling programs from capturing it. The fact that  the "Send Feedback"   header link embeds it in javascript, and the "Send Comments" footer link uses a %40 instead of an "@" ameliorate the situation a bit but I am not sure how much. (I am not an expert in this, just concerned about privacy(!) . So it would be nice to be able to turn off "Send Feedback" if desired (yes, this is an enhancement request :-).

Coordinator
Jan 16, 2010 at 10:49 PM

The feedback link in the header is a resource item in Sandcastle (VS2005 only).  You can either edit it in the presentation style to suppress it for all projects (set its related item to an empty element) or add a resource file to the project to override the items on a project by project basis.  You can also edit the format of the footer in the same way.  The footer layout is part of the SHFB resource item files if you want to modify it for all projects.

Eric

 

Jan 17, 2010 at 4:03 AM

It does not sound like you are saying that (1) is a bug, so what is the correct way to supply an email address to the "Send Feedback" link?

 

Coordinator
Jan 17, 2010 at 5:31 PM

The project's FeedbackEMail address is used as the e-mail address for the link.  The e-mail address will also show up in the footer if specified.  If you do not want to use the project property, you will need to add a resource items file to the project and override the content of the "fb_alias" item.  Another alternative is to use the project property but use the resource items file to alter the "comments" item which contains the layout for the footer area.

Eric

 

Mar 2, 2010 at 7:38 PM

What is the simplest way to, "edit it in the presentation style to suppress it for all projects (set its related item to an empty element)"?

For the Sandcastle Send Feedback link - I think you are referring to the feedBack_content.xml file. Do you know what item element is related to the Send Feedback option (fb_Send)? Are you saying that removing the value for this element will disable the link?

For Sandcastle Help File Builder - I think you are talking about <item id="comments"> in SharedBuilderContent_en-US.xml. So I would just remove everything between the item tags?

--brian

Coordinator
Mar 3, 2010 at 2:29 AM

For the link in the header of each topic it's the fb_headerFeedBack item in feedBack_content.xml.  The fb_Send item is related to the ratings control items in shared_content.xml which are commented out and no longer used.  Remove all content between the starting and ending item tags for the ID and it will effectively be render as an empty string.  In the case of the link in the header, the anchor tag still gets rendered but because there is no inner text, it isn't visible or clickable.

Eric

 

Mar 3, 2010 at 10:03 PM

I have changed "<item id="fb_headerFeedBack">Send Feedback</item>" in feedBack_content.xml to

<item id="fb_headerFeedBack"></item>

and then

<item id=""></item>

Neither have resulted in the removal of the two links. Have I misinterpreted your instructions?

--brian

Coordinator
Mar 3, 2010 at 11:57 PM

You need an ID, you just remove the content of the element as in your first example.  Perhaps I'm not understanding what you are trying to remove.  Where exactly are the items that you are trying to remove in a rendered topic?  Is this for the VS2005 style or one of the others (Hana or Prototype)?

Eric

 

Mar 4, 2010 at 1:21 AM
Edited Mar 4, 2010 at 2:45 PM

Hmm, the first example did not succeed. The PresentationStyle property is set to vs2005.

1) I'm trying to remove the "Send Feedback" text and the associated email link in the header.
2) Remove the email link, text and preceding verbiage in the footer ("Send comments on this topic to...")

I believe these are associated with the FeedbackEMailAddress and FeedbackEMailLinkText project properties.

I did succeed in removing the email link, text and preceding verbiage in the footer ("Send comments on this topic to...") by removing the information between the "contents" item tag in the file SharedBuilderContent_en-US.xml but this did not affect the "Send Feedback" text and email link in the header obviously. Is there a "correct" way to do this?

    <!-- <item id="comments"><p/>Send comments on this topic to
        <a id="HT_MailLink" href="mailto:{@UrlEncFeedbackEMailAddress}?Subject={@UrlEncHelpTitle}">{@HtmlEncFeedbackEMailAddress}</a>
        <script type="text/javascript">
        var HT_mailLink = document.getElementById("HT_MailLink");
        var HT_mailLinkText = HT_mailLink.innerHTML;
        HT_mailLink.href += ": " + document.title;
        HT_mailLink.innerHTML = HT_mailLinkText;
        </script></item> -->
    <item id="comments"></item>

--brian

Coordinator
Mar 4, 2010 at 1:55 AM

I just remembered that fb_headerFeedBack is overridden by SHFB.  You'll find it in the VS2005BuilderContent_*.xml files in the SharedContent\ folder in the SHFB installation folder.

Eric

 

Mar 4, 2010 at 4:19 PM

Yep, that did it for the header email link. Thanks!

Is there a "better" approach for eliminating the footer email link?

--brian

Coordinator
Mar 4, 2010 at 7:48 PM

The e-mail link in the footer is in the comments item so you have to clear it or change the text to get rid of the link.  If you don't want to modify the Sandcastle and SHFB resource item files, you could create a resource items file to override them on a project by project basis.  You'd just have to add that file to each project if you never use the feedback e-mail address property.

Eric