More in this section

Forums / Developing with Sitefinity / Picture in Blog/Forum

Picture in Blog/Forum

3 posts, 1 answered
  1. Muhammad Saqib
    Muhammad Saqib avatar
    95 posts
    Registered:
    09 Sep 2009
    03 Nov 2009
    Link to this post
    Hi,

    I am relatively new to Sitefinity, So can any one please help me .
    I want to display the Author Picture in Blog and Forum Posts. Is there any article/code available for this.
    Please do let me know,
    Secondly what is the best way to learn How TO, development in sitefintiy
    Thanks alot.
    Regards
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    03 Nov 2009
    Link to this post
    Hi Muhammad Saqib,

    Thank you for using our services.

    Forum avatars is available out of the box. You just need your forum controls to display the users images. To do this first I should note that you will need to edit the external template for Single Threads control. In order to do this you will need the external templates for your version of Sitefinity, which can be downloaded from your Client.Net account. For more information on working with external templates, please take a look at the following article - How to map a view to an external template, in Sitefinity 3.6 or later?

    After you have downloaded and extracted the external templates, its time to move on to the following. Since Sitefinity 3.6, we have added some additional profile fields added, in this collection we added the Photo field as well:
    web.config:
    <properties
            <add name="LastPasswordChangedDate" /> 
            <add name="FirstName"/> 
            <add name="LastName"/> 
            <add name="Position"/> 
            <add name="Photo_Hidden"/> 
            <add name="Photo" defaultValue="~/Sitefinity/Common/Images/defaultavatar.gif"/> 
            <group name="InstantMessenger"
              <add name="IM_Type"/> 
              <add name="IM_Value"/> 
            </group
            <group name="Phone"
              <add name="Value"/> 
              <add name="Type"/> 
            </group>

    Having that said, you might try to add the following in your forum templates:
    ~/Sitefinity/ControlTemplates/Forums/SingleThread.ascx :
    <prof:ManageProfile ID="userProfile" runat="server"
        <ViewTemplate
            <asp:Literal ID="FirstName" runat="server"></asp:Literal>  
            <asp:Literal ID="LastName" runat="Server"></asp:Literal
            <asp:Image ID="Photo" runat="server" /> 
        </ViewTemplate
    </prof:ManageProfile>

    As for the blog posts you will have to extend the blog posts module to include an additional metafield. this metafield will store the link to the post author's avatar image. For guidance on how to achieve this, please take a look at - Adding image to Blog module

    Regards,
    Radoslav Georgiev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Answered
  3. Muhammad Saqib
    Muhammad Saqib avatar
    95 posts
    Registered:
    09 Sep 2009
    05 Nov 2009
    Link to this post
    Thanks, My Problem is solved :-)
Register for webinar
3 posts, 1 answered