This question about Using an extension: Answered

Picture problems with PersonalInfoAddon and NatSkin

After installing the PersonalInfoAddon, with the current version of NatSkin (with downgraded DBCache as described in order to work) everything works as described EXCEPT the "Change picture" link. This opens a blank page.

If I change the skin back to Pattern, everything works fine.

If I attach a picture and then edit the metadata (as described in Support.Question505 ), the picture is visible in the profile.

Any help on how to enable users to use the "Change picture" link?

-- StefanosKouzof - 28 Jan 2011

I found that the problem is that PersonalInfoAddon uses Pattern Skin templates for uploading / editing / setting user pictures. So, if you don't have pattern skin (eg using only NatSkin), the edit picture link comes out blanc. The solution is to add to all relative links the " ;skin=pattern ".

The topics that need editing are:

  • PersonalInfoPictureViewTemplate : add ";skin=pattern" to the link
Replace  

<a href='%SCRIPTURLPATH{"rename"}%/%WEB%/%TOPIC%?template=PersonalInfoPictureDeleteView&attachment=%ENCODE{"%A_FILE%"}%' rel='nofollow' class='foswikiButton'>Delete...</a> 

With 

<a href='%SCRIPTURLPATH{"rename"}%/%WEB%/%TOPIC%?skin=pattern;template=PersonalInfoPictureDeleteView&attachment=%ENCODE{"%A_FILE%"}%' rel='nofollow' class='foswikiButton'>Delete...</a> 

  • PersonalInfoPictureDeleteViewTemplate : add ";skin=pattern" to the link (2 links)
Replace  

?template=PersonalInfoPictureView">

With

?template=PersonalInfoPictureView;skin=pattern">

  • PersonalInfoPictureUploadViewTemplate : add ";skin=pattern" to the link
Replace  

?template=PersonalInfoPictureView">

With

?template=PersonalInfoPictureView;skin=pattern">

  • PersonalInfo topic in Main web : replace the personalInfo sectional include with the included section from PersonalInfoModules and add ";skin=pattern" to the link
Replace

%INCLUDE{"PersonalInfoModules" section="personalInfo"}%

With

%STARTSECTION{"personalInfo"}%%INCLUDE{"PersonalInfoLayoutModules" section="paragraphWithImageLeftStyle"}%<div class="pIparagraphFrame personalInfo%IF{"$'FORMFIELD{\"WorkStatus\" topic=\"%BASETOPIC%\"}'!='Current'" then=" pIFormer"}%">
---+!! <noautolink>%FORMFIELD{"FirstName" topic="%BASETOPIC%"}% %FORMFIELD{"LastName" topic="%BASETOPIC%"}%</noautolink>
<form name="main" action="%SCRIPTURLPATH{"save"}%/%BASEWEB%/%BASETOPIC%" method="post">
<input type="hidden" name="editaction" value="form" />
%INCLUDE{"PersonalInfoLayoutModules" section="paragraphWithImageLeft" imgName="%FORMFIELD{"Picture" topic="%BASEWEB%.%BASETOPIC%" format="$value" default="" alttext=""}%" imgWeb="%BASEWEB%" imgTopic="%BASETOPIC%" imgWidth="120" imgTitle="" text="%INCLUDE{"PersonalInfo" section="personalInfoFields"}%
%IF{"not defined editUserData" then="<div class='personalInfoFormDataActions foswikiUnvisited foswikiSmall'>[[%SCRIPTURL{view}%/%BASEWEB%/%BASETOPIC%?editUserData=on][Edit data]] <span class='foswikiSeparator'>|</span> <span class='foswikiUnvisited'>[[%SCRIPTURL{view}%/%BASEWEB%/%BASETOPIC%?template=PersonalInfoPictureView;skin=pattern][%MAKETEXT{Change picture}%]]</span> <span class='foswikiSeparator'>|</span> %IF{"$'FORMFIELD{\"WorkStatus\"  topic=\"%BASETOPIC%\"}'!='Current'" then="<input type='image' src='%ICONURLPATH{userinactive}%' alt='Set active' /> Set active<input type='hidden' name='WorkStatus' value='Current' />" else="<input type='image' src='%ICONURLPATH{useractive}%' alt='Set inactive' /> Set inactive<input type='hidden' name='WorkStatus' value='Former' />"}% <span class='foswikiSeparator'>|</span> [[PersonalInfoFaceBook][Find other users]]</div>" }% %IF{"defined editUserData" then="<div class='personalInfoFormDataActions'><input type='submit' class='foswikiSubmit' name='save' id='save' value='%MAKETEXT{Save}%' /> <input type='submit' class='foswikiButtonCancel' name='cancel' id='cancel' value='%MAKETEXT{Cancel}%' /></div>" }%" }% </form></div><!--/pIparagraphFrame-->%ENDSECTION{"personalInfo"}%

-- StefanosKouzof - 31 Jan 2011

QuestionForm edit

Subject Using an extension
Extension NatSkin, PersonalInfoAddOn
Version Foswiki 1.0.9
Status Answered
Topic revision: r2 - 31 Jan 2011, StefanosKouzof
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy