<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sharepoint 2013 dans la vraie vie</title>
	<atom:link href="https://blog.developpez.com/sp2013irl/feed" rel="self" type="application/rss+xml" />
	<link>https://blog.developpez.com/sp2013irl</link>
	<description></description>
	<lastBuildDate>Tue, 29 Oct 2013 10:33:01 +0000</lastBuildDate>
	<language>fr-FR</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.42</generator>
	<item>
		<title>Sharepoint Developer Tools</title>
		<link>https://blog.developpez.com/sp2013irl/p12299/outils/sharepoint-tools</link>
		<comments>https://blog.developpez.com/sp2013irl/p12299/outils/sharepoint-tools#comments</comments>
		<pubDate>Tue, 29 Oct 2013 10:33:01 +0000</pubDate>
		<dc:creator><![CDATA[guitou12]]></dc:creator>
				<category><![CDATA[Outils / Tools]]></category>

		<guid isPermaLink="false">http://blog.developpez.com/sp2013irl/?p=92</guid>
		<description><![CDATA[Hi, in this article will be presented some tools that are essential for every SharePoint developer. SharePoint Manager 2013 SharePoint Manager is like the toolbox that Microsoft would have forgotten to provide with its product. It will allow you to &#8230; <a href="https://blog.developpez.com/sp2013irl/p12299/outils/sharepoint-tools">Lire la suite <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Hi,</p>
<p>in this article will be presented some tools that are essential for every SharePoint developer.</p>
<p><a href="http://spm.codeplex.com/" target="_blank">SharePoint Manager 2013</a></p>
<p>SharePoint Manager is like the toolbox that Microsoft  would have forgotten to provide with its product.</p>
<p>It will allow you to have a quick view over all your  Web Applications, your sites collections, your associated/activated features on all spaces, lists, document libraries, every element properties.<br />
You will certainly gain some time using it !<br />
<a href="http://blog.developpez.com/sp2013irl/files/2013/08/SPManager1.png"><img src="http://blog.developpez.com/sp2013irl/files/2013/08/SPManager1-300x186.png" alt="SPManager" width="300" height="186" class="alignnone size-medium wp-image-19" /></a></p>
<p><em>A quick example of the features described above</em></p>
<p>You will have ton install and run SP Manager on the server where SharePoint is installed.<br />
It may require Administrator rights, depending on which user you are currently logged on.</p>
<p>If you had the choice of one tool in addition to Visual Studio, download SharePoint Manager 2013 !! (also exists in version 2010)</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p><a href="http://archive.msdn.microsoft.com/ULSViewer" target="_blank">ULS Viewer</a></p>
<p>Once the SharePoint developments started, you will soon realize that when SP is not happy with what you did he almost never says it.</p>
<p>The only solution is to go in the log directory and open the latest. First mistake is to open it with Notepad or another text editor, you may get scared and never want to do it again.</p>
<p>Microsoft has developed a tool that will provide a quick and friendly way of reading logs.</p>
<p><a href="http://blog.developpez.com/sp2013irl/files/2013/08/ULS-Viewer.png"><img src="http://blog.developpez.com/sp2013irl/files/2013/08/ULS-Viewer-300x222.png" alt="ULS Viewer" width="300" height="222" class="alignnone size-medium wp-image-23" /></a></p>
<p>Run ULS-Viewer, select the logs location (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\<strong>15</strong>\LOGS\ for SP 2013, \<strong>14</strong> for SP2010 etc) and you will realize that lots of things are happening (event if you don&rsquo;t do anything in the web interface)</p>
<p>Fortunately, Microsoft is providing filtering capabilities for all the log activity.<br />
<a href="http://blog.developpez.com/sp2013irl/files/2013/08/ULS-Viewer2.png"><img src="http://blog.developpez.com/sp2013irl/files/2013/08/ULS-Viewer2-300x222.png" alt="ULS Viewer2" width="300" height="222" class="alignnone size-medium wp-image-25" /></a></p>
<p>You will be able to filter by severity, then on defined text strings .</p>
<p>A real example is filtering on field <strong>Correlation</strong> when SharePoint will pop an error with an associated Guid, you will only see the errors related to the given problem.</p>
<p>This is, in my opinion, the second must-have tool, on my development machine it is always opened.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p><a href="http://featureadmin.codeplex.com/" target="_blank">SharePoint Feature Administration and Clean Up Tool</a></p>
<p>This is a tool that I use more often but that is also useful.</p>
<p>More focused on the features management in your farm, it will allow you to find in one click all defective features (after a migration, for example) or to quickly see the features enabled at a given scope (Farm / Site / Web)</p>
<p><a href="http://blog.developpez.com/sp2013irl/files/2013/08/FeatureAdmin-for-SharePoint-2013-v2.3.png"><img src="http://blog.developpez.com/sp2013irl/files/2013/08/FeatureAdmin-for-SharePoint-2013-v2.3-300x253.png" alt="FeatureAdmin for SharePoint 2013 - v2.3" width="300" height="253" class="alignnone size-medium wp-image-33" /></a></p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p><a href="http://ilspy.net/" target="_blank">ILSpy</a></p>
<p>Sometimes in a developer&rsquo;s life you might want to get your hands dirty and see what Microsoft&rsquo;s guys have been doing in SharePoint code.</p>
<p>ILSpy spy will allow you to load and decompile assemblies that you used without knowing its content.</p>
<p><a href="http://blog.developpez.com/sp2013irl/files/2013/08/ILSpy.png"><img src="http://blog.developpez.com/sp2013irl/files/2013/08/ILSpy-300x174.png" alt="ILSpy" width="300" height="174" class="alignnone size-medium wp-image-35" /></a><br />
<em>Above :  Microsoft.SharePoint.Portal.CommunityEventReceiver class methods</em></p>
<p>Lots of DDls used by SharePoint are stored in C:\Program Files\Common Files\microsoft shared\Web Server Extensions\<strong>15</strong>\ISAPI (\<strong>14</strong> for SP2010 etc.), you will probably find what you are looking for there.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p><strong>CAML Designer for SP 2013</strong></p>
<p>If you are experiencing the need to develop customized views or retrieve specific items in lists you may most likely use CAML queries.</p>
<p>With CAML Designer you can quickly generate the correct syntax to get the desired result without the need to deploy lots of times your solution.</p>
<p><a href="http://blog.developpez.com/sp2013irl/files/2013/08/CAML-Designer-for-SharePoint-2013.png"><img src="http://blog.developpez.com/sp2013irl/files/2013/08/CAML-Designer-for-SharePoint-2013-300x198.png" alt="CAML Designer for SharePoint 2013" width="300" height="198" class="alignnone size-medium wp-image-39" /></a>.</p>
<p>Complete information about using it can be found on the developer&rsquo;s site.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p><a href="http://www.microsoft.com/en-us/download/details.aspx?id=38182" target="_blank">Sharepoint Color Palette Tool</a></p>
<p>If Microsoft&rsquo;s blue is not really your favorite color and you want to enjoy the new features of SP2013 branding, then this tool is for you.</p>
<p>It will allow you to generate a color palette file (.Spcolor) in two clicks, you can import it into the gallery themes (http://url/_catalogs/theme/15) and apply it either through the interface (<strong>Change the look</strong> Menu) or through code.</p>
<p><a href="http://blog.developpez.com/sp2013irl/files/2013/08/SharePoint-Color-Palette-Tool.png"><img src="http://blog.developpez.com/sp2013irl/files/2013/08/SharePoint-Color-Palette-Tool-300x198.png" alt="SharePoint Color Palette Tool" width="300" height="198" class="alignnone size-medium wp-image-42" /></a><br />
Here is a shimmering green</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>This is a good overview of what you can find as SharePoint development assistance, this list is not exhaustive and will be completed when I find new tools.</p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Etendre ou modifier le Portail des communautés</title>
		<link>https://blog.developpez.com/sp2013irl/p12282/communautes/etendre-ou-modifier-le-portail-des-communautes</link>
		<comments>https://blog.developpez.com/sp2013irl/p12282/communautes/etendre-ou-modifier-le-portail-des-communautes#comments</comments>
		<pubDate>Wed, 16 Oct 2013 09:53:46 +0000</pubDate>
		<dc:creator><![CDATA[guitou12]]></dc:creator>
				<category><![CDATA[Communautés / Communities]]></category>
		<category><![CDATA[Portail / Portal]]></category>

		<guid isPermaLink="false">http://blog.developpez.com/sp2013irl/?p=50</guid>
		<description><![CDATA[Bonjour, j&#8217;ai récemment rencontré plusieurs problématiques avec le nouveau template de site &#171;&#160;Portail des communautés&#160;&#187; / &#171;&#160;Community Portal&#160;&#187;. Pour rappel, un site communautaire est un template qui fournit de base un liste de discussions (sorte de forum) avec un système &#8230; <a href="https://blog.developpez.com/sp2013irl/p12282/communautes/etendre-ou-modifier-le-portail-des-communautes">Lire la suite <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Bonjour,</p>
<p>j&rsquo;ai récemment rencontré plusieurs problématiques avec le nouveau template de site &laquo;&nbsp;Portail des communautés&nbsp;&raquo; / &laquo;&nbsp;Community Portal&nbsp;&raquo;.</p>
<p>Pour rappel, un site communautaire est un template qui fournit de base un liste de discussions (sorte de forum) avec un système assez poussé de gestion des membres (possibilité de s&rsquo;inscrire, gestion de badges pour les membres les plus actifs etc.)</p>
<p><a href="http://technet.microsoft.com/fr-fr/library/jj219805.aspx" target="_blank">Voilà ce que Microsoft dit à propos des communautés et du portail associé</a></p>
<p>Créer un portail des communautés :</p>
<p><a href="http://blog.developpez.com/sp2013irl/files/2013/10/comPort1.png"><img src="http://blog.developpez.com/sp2013irl/files/2013/10/comPort1-268x300.png" alt="comPort1" width="268" height="300" class="alignnone size-medium wp-image-52" /></a></p>
<p>Le portail des communautés OOTB : </p>
<p><a href="http://blog.developpez.com/sp2013irl/files/2013/10/comPort2.png"><img src="http://blog.developpez.com/sp2013irl/files/2013/10/comPort2-300x142.png" alt="comPort2" width="300" height="142" class="alignnone size-medium wp-image-53" /></a></p>
<p>L&rsquo;affichage est plutôt sympa, avec les informations principales (Titre, Description, Nombre de membres, Nombre de topics et de réponses), on a aussi accès à plus d&rsquo;informations avec une popup</p>
<p><a href="http://blog.developpez.com/sp2013irl/files/2013/10/comPort4.png"><img src="http://blog.developpez.com/sp2013irl/files/2013/10/comPort4-300x144.png" alt="comPort4" width="300" height="144" class="alignnone size-medium wp-image-56" /></a></p>
<p>De base nous obtenons donc un site qui diffère un peu des autres templates standard par le fait qu&rsquo;il ne possède pas de Logo, pas de colonne de menu gauche.</p>
<p>Le contenu principal est géré par une webPart de type Content Search, préconfigurée pour afficher toutes les communautés <strong>accessibles</strong> (et par accessibles j&rsquo;entend à minima que l&rsquo;utilisateur courant ait un droit <strong>Visitor </strong>sur les communautés ou la collection qui les contient)</p>
<p>Les communautés sont triées par popularité (formule barbare incluse ci dessous <img src="https://blog.developpez.com/sp2013irl/wp-includes/images/smilies/icon_wink.gif" alt=";-)" class="wp-smiley" /> )</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">[formula:((CommunityMembersCount*0.5)+CommunityTopicsCount+(CommunityRepliesCount*0.5))/(log(abs(Created-{0})+1)+log(abs(LastModifiedTime-{0})+1)+1)]</div></div>
<p>La paramètre {0} étant généré par la méthode suivante</p>
<div class="codecolorer-container csharp default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #6666cc; font-weight: bold;">ulong</span> NowInTicks<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; DateTime utcNow <span style="color: #008000;">=</span> DateTime<span style="color: #008000;">.</span><span style="color: #0000FF;">UtcNow</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; <a href="http://www.google.com/search?q=checked+msdn.microsoft.com"><span style="color: #008000;">checked</span></a><br />
&nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6666cc; font-weight: bold;">ulong</span> num <span style="color: #008000;">=</span> <span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">ulong</span><span style="color: #008000;">&#41;</span>utcNow<span style="color: #008000;">.</span><span style="color: #0000FF;">Second</span> <span style="color: #008000;">*</span> 10000000uL<span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; num <span style="color: #008000;">+=</span> <span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">ulong</span><span style="color: #008000;">&#41;</span>utcNow<span style="color: #008000;">.</span><span style="color: #0000FF;">Minute</span> <span style="color: #008000;">*</span> 600000000uL<span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; num <span style="color: #008000;">+=</span> <span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">ulong</span><span style="color: #008000;">&#41;</span>utcNow<span style="color: #008000;">.</span><span style="color: #0000FF;">Hour</span> <span style="color: #008000;">*</span> 36000000000uL<span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; num <span style="color: #008000;">+=</span> <span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">ulong</span><span style="color: #008000;">&#41;</span>utcNow<span style="color: #008000;">.</span><span style="color: #0000FF;">DayOfYear</span> <span style="color: #008000;">*</span> 864000000000uL<span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; num <span style="color: #008000;">+=</span> <span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">ulong</span><span style="color: #008000;">&#41;</span>utcNow<span style="color: #008000;">.</span><span style="color: #0000FF;">Year</span> <span style="color: #008000;">*</span> 316224000000000uL<span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>utcNow<span style="color: #008000;">.</span><span style="color: #0000FF;">Month</span> <span style="color: #008000;">&amp;</span>gt<span style="color: #008000;">;</span> <span style="color: #FF0000;">2</span> <span style="color: #008000;">&amp;</span>amp<span style="color: #008000;">;&amp;</span>amp<span style="color: #008000;">;</span> <span style="color: #008000;">!</span>DateTime<span style="color: #008000;">.</span><span style="color: #0000FF;">IsLeapYear</span><span style="color: #008000;">&#40;</span>utcNow<span style="color: #008000;">.</span><span style="color: #0000FF;">Year</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; num <span style="color: #008000;">+=</span> 864000000000uL<span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">return</span> num<span style="color: #008000;">;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
<span style="color: #008000;">&#125;</span></div></div>
<p>N&rsquo;ayant pas encore acquis la médaille Fields j&rsquo;ai encore un peu de mal à décortiquer la totalité, ce que j&rsquo;en ait retenu c&rsquo;est que le nombre de membres et le nombre de topics (et réponses) sont importants dans le classement. Les dates de création de dernière modification jouent aussi.</p>
<hr />
<p>Le portail des communauté est donc un site qui peut être très utile OOTB, et qui se met en place en quelques clics.<br />
Par contre si vous avez besoin de modifier ce site vous allez au devant de quelques problèmes.</p>
<ul>1 &#8211; Pas de bandeau ni de possibilité d&rsquo;insérer des WebParts supplémentaires</ul>
<p><a href="http://blog.developpez.com/sp2013irl/files/2013/10/comPort3.png"><img src="http://blog.developpez.com/sp2013irl/files/2013/10/comPort3-300x75.png" alt="comPort3" width="300" height="75" class="alignnone size-medium wp-image-61" /></a></p>
<p>Concrètement la div qui affiche normalement le ruban est volontairement cachée, ce qui vous en conviendrez ne facilite pas l&rsquo;ajout de nouvelles WebParts par exemple.</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;s4-ribbonrow&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;height: 0px&quot;</span>&gt;</span> <span style="color: #ddbb00;">&amp;amp;</span> Display à none</div></div>
<ul>2 &#8211; Les possibilités de modification de la WebPart &laquo;&nbsp;Communautés populaires&nbsp;&raquo; sont limitées</ul>
<li>Il est impossible de modifier le titre de la WebPart, ce sera toujours &laquo;&nbsp;Communautés Populaires&nbsp;&raquo; / &laquo;&nbsp;Popular communities&nbsp;&raquo;</li>
<p></p>
<li>Par défaut vous ne disposez que des templates d&rsquo;affichages définis avec la WebPart</li>
<p></p>
<p>Les besoins exprimés par le client n&rsquo;étant pas satisfait par le template OOTB il a fallu composer avec ces problématiques.</p>
<hr />
<ul><strong>Problématique 1 : Le titre de la WebPart ne convient pas</strong></ul>
<p>Ok, donc là pas de solution miracle il va falloir aller fouiller dans les entrailles SP, à l&rsquo;aide d&rsquo;<a href="http://blog.developpez.com/sp2013irl/p12208/outils/des-bons-outils-du-travailleur-sharepoint" title="ILSpy" target="_blank">ILSpy</a></p>
<p>Un export de la WebPart nous donne le type <strong>Microsoft.SharePoint.Portal.WebControls.ExistingCommunitiesWebPart</strong> </p>
<p>Un rapide aperçu de la classe en question<br />
<a href="http://blog.developpez.com/sp2013irl/files/2013/10/comPort5.png"><img src="http://blog.developpez.com/sp2013irl/files/2013/10/comPort5-300x131.png" alt="comPort5" width="300" height="131" class="alignnone size-medium wp-image-75" /></a></p>
<p>On remarque qu&rsquo;elle est sealed (donc pas possible d&rsquo;en hériter) et qu&rsquo;elle est basée sur la ContentBySearchWebPart (ça on s&rsquo;en doutait au vu de l&rsquo;interface)</p>
<p>Allons voir ce qui se cache sous notre problème de titre non modifiable<br />
<a href="http://blog.developpez.com/sp2013irl/files/2013/10/comPort6.png"><img src="http://blog.developpez.com/sp2013irl/files/2013/10/comPort6.png" alt="comPort6" width="212" height="157" class="alignnone size-full wp-image-77" /></a></p>
<p>Hum&#8230; mystère résolu, pas de setter et le getter renvoie une chaîne vide, mais alors comment est généré notre titre par défaut ?</p>
<p><a href="http://blog.developpez.com/sp2013irl/files/2013/10/comPort7.png"><img src="http://blog.developpez.com/sp2013irl/files/2013/10/comPort7-300x84.png" alt="comPort7" width="300" height="84" class="alignnone size-medium wp-image-79" /></a></p>
<p>Ok donc tout est géré une méthode spécifique appelée dans le Render via une ressource multilangues.</p>
<p>Pour modifier le titre il va donc falloir développer notre propre WebPart en s&rsquo;inspirant de l&rsquo;existante.</p>
<hr />
<ul><strong>Problématique 2 : Je dois afficher les communautés dont je suis membre (et pas uniquement celles auxquelles j&rsquo;ai accès)</strong></ul>
<p>La requête KQL passée pour récupérer les communautés est la suivante : <strong>WebTemplate:Community</strong></p>
<p>Comme dit plus haut elle va remonter toutes les communautés auxquelles j&rsquo;ai possibilité d&rsquo;accéder, mais pas forcément celles dont je suis membre (pour rappel le fait d&rsquo;être membre d&rsquo;une communauté est conditionné par la présence d&rsquo;un objet SPUser dans la liste <strong>Community Members</strong></p>
<p>Après quelques recherches j&rsquo;ai trouvé la méta donnée qui permet d&rsquo;obtenir ces informations : <strong>MemberOWSUSER:{User.Name}</strong><br />
Si vous exécutez cette requête dans une WebPart vous constaterez que les résultats remontés ne sont hélas pas des communautés mais items de listes (plus précisément les liens vers les objets SPUser dans chaque communauté où l&rsquo;utilisateur est membre)</p>
<p>Le problème est que l&rsquo;on souhaite remonter des communautés (afin que le template fourni affiche correctement les informations)</p>
<p>Même constatation que pour la problématique 1, sans développement ça ne sera possible.</p>
<hr />
<ul><strong>Problématique 3 : Par défaut toutes les communautés sont privées, pourtant je dois pouvoir afficher les communautés populaires pour pouvoir demander à les rejoindre</strong></ul>
<p>Etant donné que le moteur de recherche est par défaut &laquo;&nbsp;bridé&nbsp;&raquo; sur les objets auxquels l&rsquo;utilisateur a accès, obtenir le résultat en standard ne semble pas possible à priori.</p>
<li><strong>Hypothèse 1 :</strong> Créer un Result Source retournant les communautés avec un &laquo;&nbsp;Credential Informations&nbsp;&raquo; ayant des droits élevés</li>
<p><span><br />
Sur papier la solution semble idéale, le Result Source renverrait toutes les communautés et donc on pourrait tout simplement les afficher à partir de là.<br />
Bon il s&rsquo;avère que dans les faits je n&rsquo;ai jamais réussi à obtenir le résultat attendu, le compte utilisé pour le Result Source a pourtant les privilèges qu&rsquo;il faut (si je lance la requête via ce user j&rsquo;obtiens bien des résultats corrects)</span><br />
</p>
<li><strong>Hypothèse 2 :</strong> Créer une WebPart à partir de la WebPart ExistingCommunitiesWebPart dans laquelle j&rsquo;exécute la requête de récupération des communautés dans un bloc de privilèges élevés (afin de retourner toutes les communautés)</li>
<p>
<span>Cette solution fonctionne et c&rsquo;est ce que je vais présenter ci dessous.</span></p>
<hr />
<p>Création de la WebPart vide<br />
<a href="http://blog.developpez.com/sp2013irl/files/2013/10/comPort8.png"><img src="http://blog.developpez.com/sp2013irl/files/2013/10/comPort8-300x208.png" alt="comPort8" width="300" height="208" class="alignnone size-medium wp-image-90" /></a></p>
<p>Créer un élément de type WebPart, dans le fichier .cs collez le code ci dessous (code d&rsquo;ExistingCommunitiesWebPart)</p>
<div class="codecolorer-container csharp default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">Microsoft.Office.Server.Search.Query</span><span style="color: #008000;">;</span><br />
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">Microsoft.Office.Server.Search.WebControls</span><span style="color: #008000;">;</span><br />
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">Microsoft.SharePoint.Security</span><span style="color: #008000;">;</span><br />
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">Microsoft.SharePoint.Utilities</span><span style="color: #008000;">;</span><br />
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System</span><span style="color: #008000;">;</span><br />
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Collections.Generic</span><span style="color: #008000;">;</span><br />
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Globalization</span><span style="color: #008000;">;</span><br />
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Security.Permissions</span><span style="color: #008000;">;</span><br />
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Web</span><span style="color: #008000;">;</span><br />
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Web.UI</span><span style="color: #008000;">;</span><br />
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Web.UI.WebControls.WebParts</span><span style="color: #008000;">;</span><br />
<span style="color: #0600FF; font-weight: bold;">namespace</span> Microsoft<span style="color: #008000;">.</span><span style="color: #0000FF;">SharePoint</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Portal</span><span style="color: #008000;">.</span><span style="color: #0000FF;">WebControls</span><br />
<span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#91;</span>SharePointPermission<span style="color: #008000;">&#40;</span>SecurityAction<span style="color: #008000;">.</span><span style="color: #0000FF;">LinkDemand</span>, ObjectModel <span style="color: #008000;">=</span> <span style="color: #0600FF; font-weight: bold;">true</span><span style="color: #008000;">&#41;</span>, AspNetHostingPermission<span style="color: #008000;">&#40;</span>SecurityAction<span style="color: #008000;">.</span><span style="color: #0000FF;">LinkDemand</span>, Level <span style="color: #008000;">=</span> AspNetHostingPermissionLevel<span style="color: #008000;">.</span><span style="color: #0000FF;">Minimal</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span><br />
&nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">sealed</span> <span style="color: #6666cc; font-weight: bold;">class</span> ExistingCommunitiesWebPart <span style="color: #008000;">:</span> ContentBySearchWebPart<br />
&nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #6666cc; font-weight: bold;">bool</span> _includeSubSites<span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">override</span> <span style="color: #6666cc; font-weight: bold;">string</span> Title<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; get<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">return</span> <span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Empty</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">override</span> PartChromeType ChromeType<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; get<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">return</span> PartChromeType<span style="color: #008000;">.</span><span style="color: #0000FF;">None</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">bool</span> IncludeSubSites<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; get<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">return</span> <span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span>_includeSubSites<span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span>_includeSubSites <span style="color: #008000;">=</span> value<span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">public</span> ExistingCommunitiesWebPart<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">base</span><span style="color: #008000;">.</span><span style="color: #0000FF;">BypassCBSFeatureCheck</span> <span style="color: #008000;">=</span> <span style="color: #0600FF; font-weight: bold;">true</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span>_includeSubSites <span style="color: #008000;">=</span> <span style="color: #0600FF; font-weight: bold;">true</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">protected</span> <span style="color: #0600FF; font-weight: bold;">override</span> <span style="color: #6666cc; font-weight: bold;">bool</span> RequiresWebPartClientScript<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">return</span> <span style="color: #0600FF; font-weight: bold;">false</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #6666cc; font-weight: bold;">ulong</span> NowInTicks<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DateTime utcNow <span style="color: #008000;">=</span> DateTime<span style="color: #008000;">.</span><span style="color: #0000FF;">UtcNow</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?q=checked+msdn.microsoft.com"><span style="color: #008000;">checked</span></a><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6666cc; font-weight: bold;">ulong</span> num <span style="color: #008000;">=</span> <span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">ulong</span><span style="color: #008000;">&#41;</span>utcNow<span style="color: #008000;">.</span><span style="color: #0000FF;">Second</span> <span style="color: #008000;">*</span> 10000000uL<span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; num <span style="color: #008000;">+=</span> <span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">ulong</span><span style="color: #008000;">&#41;</span>utcNow<span style="color: #008000;">.</span><span style="color: #0000FF;">Minute</span> <span style="color: #008000;">*</span> 600000000uL<span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; num <span style="color: #008000;">+=</span> <span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">ulong</span><span style="color: #008000;">&#41;</span>utcNow<span style="color: #008000;">.</span><span style="color: #0000FF;">Hour</span> <span style="color: #008000;">*</span> 36000000000uL<span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; num <span style="color: #008000;">+=</span> <span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">ulong</span><span style="color: #008000;">&#41;</span>utcNow<span style="color: #008000;">.</span><span style="color: #0000FF;">DayOfYear</span> <span style="color: #008000;">*</span> 864000000000uL<span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; num <span style="color: #008000;">+=</span> <span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">ulong</span><span style="color: #008000;">&#41;</span>utcNow<span style="color: #008000;">.</span><span style="color: #0000FF;">Year</span> <span style="color: #008000;">*</span> 316224000000000uL<span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>utcNow<span style="color: #008000;">.</span><span style="color: #0000FF;">Month</span> <span style="color: #008000;">&amp;</span>gt<span style="color: #008000;">;</span> <span style="color: #FF0000;">2</span> <span style="color: #008000;">&amp;</span>amp<span style="color: #008000;">;&amp;</span>amp<span style="color: #008000;">;</span> <span style="color: #008000;">!</span>DateTime<span style="color: #008000;">.</span><span style="color: #0000FF;">IsLeapYear</span><span style="color: #008000;">&#40;</span>utcNow<span style="color: #008000;">.</span><span style="color: #0000FF;">Year</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; num <span style="color: #008000;">+=</span> 864000000000uL<span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">return</span> num<span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">protected</span> <span style="color: #0600FF; font-weight: bold;">override</span> <span style="color: #6666cc; font-weight: bold;">void</span> OnLoad<span style="color: #008000;">&#40;</span>EventArgs e<span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">base</span><span style="color: #008000;">.</span><span style="color: #0000FF;">DataProvider</span> <span style="color: #008000;">!=</span> <span style="color: #0600FF; font-weight: bold;">null</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6666cc; font-weight: bold;">string</span> propertyName <span style="color: #008000;">=</span> <span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Format</span><span style="color: #008000;">&#40;</span>CultureInfo<span style="color: #008000;">.</span><span style="color: #0000FF;">InvariantCulture</span>, <span style="color: #666666;">&quot;[formula:((CommunityMembersCount*0.5)+CommunityTopicsCount+(CommunityRepliesCount*0.5))/(log(abs(Created-{0})+1)+log(abs(LastModifiedTime-{0})+1)+1)]&quot;</span>, <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> <span style="color: #6666cc; font-weight: bold;">object</span><span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ExistingCommunitiesWebPart<span style="color: #008000;">.</span><span style="color: #0000FF;">NowInTicks</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span>_includeSubSites<span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">base</span><span style="color: #008000;">.</span><span style="color: #0000FF;">DataProvider</span><span style="color: #008000;">.</span><span style="color: #0000FF;">QueryTemplate</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;WebTemplate:Community&quot;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">base</span><span style="color: #008000;">.</span><span style="color: #0000FF;">DataProvider</span><span style="color: #008000;">.</span><span style="color: #0000FF;">QueryTemplate</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;WebTemplate:Community AND contentclass:STS_Site&quot;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">base</span><span style="color: #008000;">.</span><span style="color: #0000FF;">DataProvider</span><span style="color: #008000;">.</span><span style="color: #0000FF;">SourceID</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;8413CD39-2156-4E00-B54D-11EFD9ABDB89&quot;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">base</span><span style="color: #008000;">.</span><span style="color: #0000FF;">DataProvider</span><span style="color: #008000;">.</span><span style="color: #0000FF;">FallbackSort</span> <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> List<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">base</span><span style="color: #008000;">.</span><span style="color: #0000FF;">DataProvider</span><span style="color: #008000;">.</span><span style="color: #0000FF;">FallbackSort</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span><a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> ResultSort<span style="color: #008000;">&#40;</span>propertyName, SortDirection<span style="color: #008000;">.</span><span style="color: #0000FF;">Descending</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">base</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ResultsPerPage</span> <span style="color: #008000;">=</span> <span style="color: #FF0000;">30</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">base</span><span style="color: #008000;">.</span><span style="color: #0000FF;">RenderTemplateId</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;~sitecollection/_catalogs/masterpage/Display Templates/Search/Control_SearchResults.js&quot;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">base</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ItemTemplateId</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;~sitecollection/_catalogs/masterpage/Display Templates/System/Item_CommunityPortal.js&quot;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">base</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ShowAdvancedLink</span> <span style="color: #008000;">=</span> <span style="color: #0600FF; font-weight: bold;">false</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">base</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ShowPreferencesLink</span> <span style="color: #008000;">=</span> <span style="color: #0600FF; font-weight: bold;">false</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">base</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ShowAlertMe</span> <span style="color: #008000;">=</span> <span style="color: #0600FF; font-weight: bold;">false</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">base</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ShouldHideControlWhenEmpty</span> <span style="color: #008000;">=</span> <span style="color: #0600FF; font-weight: bold;">false</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">base</span><span style="color: #008000;">.</span><span style="color: #0000FF;">EmptyMessage</span> <span style="color: #008000;">=</span> StringResourceManager<span style="color: #008000;">.</span><span style="color: #0000FF;">GetString</span><span style="color: #008000;">&#40;</span>LocStringId<span style="color: #008000;">.</span><span style="color: #0000FF;">CommunityPortalNoCommunities</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">base</span><span style="color: #008000;">.</span><span style="color: #0000FF;">OnLoad</span><span style="color: #008000;">&#40;</span>e<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #6666cc; font-weight: bold;">void</span> RenderTitle<span style="color: #008000;">&#40;</span>HtmlTextWriter writer<span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6666cc; font-weight: bold;">string</span> localizedString <span style="color: #008000;">=</span> SPUtility<span style="color: #008000;">.</span><span style="color: #0000FF;">GetLocalizedString</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;$Resources:spscore,CommunityPortal_WebPart_Title&quot;</span>, <span style="color: #0600FF; font-weight: bold;">null</span>, <a href="http://www.google.com/search?q=checked+msdn.microsoft.com"><span style="color: #008000;">checked</span></a><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">uint</span><span style="color: #008000;">&#41;</span>CultureInfo<span style="color: #008000;">.</span><span style="color: #0000FF;">CurrentUICulture</span><span style="color: #008000;">.</span><span style="color: #0000FF;">LCID</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; writer<span style="color: #008000;">.</span><span style="color: #0000FF;">AddAttribute</span><span style="color: #008000;">&#40;</span>HtmlTextWriterAttribute<span style="color: #008000;">.</span><span style="color: #6666cc; font-weight: bold;">Class</span>, <span style="color: #666666;">&quot;ms-webpart-chrome-title&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; writer<span style="color: #008000;">.</span><span style="color: #0000FF;">RenderBeginTag</span><span style="color: #008000;">&#40;</span>HtmlTextWriterTag<span style="color: #008000;">.</span><span style="color: #0000FF;">Div</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; writer<span style="color: #008000;">.</span><span style="color: #0000FF;">AddAttribute</span><span style="color: #008000;">&#40;</span>HtmlTextWriterAttribute<span style="color: #008000;">.</span><span style="color: #6666cc; font-weight: bold;">Class</span>, <span style="color: #666666;">&quot;ms-webpart-titleText-withMenu ms-webpart-titleText&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; writer<span style="color: #008000;">.</span><span style="color: #0000FF;">AddAttribute</span><span style="color: #008000;">&#40;</span>HtmlTextWriterAttribute<span style="color: #008000;">.</span><span style="color: #0000FF;">Title</span>, localizedString<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; writer<span style="color: #008000;">.</span><span style="color: #0000FF;">RenderBeginTag</span><span style="color: #008000;">&#40;</span>HtmlTextWriterTag<span style="color: #008000;">.</span><span style="color: #0000FF;">H2</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; writer<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span>localizedString<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; writer<span style="color: #008000;">.</span><span style="color: #0000FF;">RenderEndTag</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; writer<span style="color: #008000;">.</span><span style="color: #0000FF;">RenderEndTag</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">protected</span> <span style="color: #0600FF; font-weight: bold;">override</span> <span style="color: #6666cc; font-weight: bold;">void</span> Render<span style="color: #008000;">&#40;</span>HtmlTextWriter writer<span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ExistingCommunitiesWebPart<span style="color: #008000;">.</span><span style="color: #0000FF;">RenderTitle</span><span style="color: #008000;">&#40;</span>writer<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">base</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Render</span><span style="color: #008000;">&#40;</span>writer<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
<span style="color: #008000;">&#125;</span></div></div>
<p>Modifiez tout d&rsquo;abord le nom de la classe ainsi que le namespace afin qu&rsquo;ils correspondent à votre besoin / votre projet</p>
<p>La méthode qui va principalement nous intéresser est OnLoad car c&rsquo;est dans celle ci que sont définis la requête et les templates d&rsquo;affichage des résultat.</p>
<p><strong>Par rapport à la problématique 3</strong> (l&rsquo;exécution de la requête avec des privilèges élevés) le code suivant remontera correctement toutes les communautés (que l&rsquo;utilisateur y ait accès ou non)</p>
<div class="codecolorer-container csharp default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0600FF; font-weight: bold;">protected</span> <span style="color: #0600FF; font-weight: bold;">override</span> <span style="color: #6666cc; font-weight: bold;">void</span> OnLoad<span style="color: #008000;">&#40;</span>EventArgs e<span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SPSecurity<span style="color: #008000;">.</span><span style="color: #0000FF;">RunWithElevatedPrivileges</span><span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">delegate</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">base</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ActiveDataProvider</span> <span style="color: #008000;">!=</span> <span style="color: #0600FF; font-weight: bold;">null</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6666cc; font-weight: bold;">string</span> propertyName <span style="color: #008000;">=</span> <span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Format</span><span style="color: #008000;">&#40;</span>CultureInfo<span style="color: #008000;">.</span><span style="color: #0000FF;">InvariantCulture</span>, <span style="color: #666666;">&quot;[formula:((CommunityMembersCount*0.5)+CommunityTopicsCount+(CommunityRepliesCount*0.5))/(log(abs(Created-{0})+1)+log(abs(LastModifiedTime-{0})+1)+1)]&quot;</span>, <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> <span style="color: #6666cc; font-weight: bold;">object</span><span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PopularCommunitiesWP<span style="color: #008000;">.</span><span style="color: #0000FF;">NowInTicks</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">base</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ActiveDataProvider</span><span style="color: #008000;">.</span><span style="color: #0000FF;">QueryTemplate</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;WebTemplate:Community&quot;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">// Local Sharepoint Results</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">base</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ActiveDataProvider</span><span style="color: #008000;">.</span><span style="color: #0000FF;">SourceID</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;8413CD39-2156-4E00-B54D-11EFD9ABDB89&quot;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">base</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ActiveDataProvider</span><span style="color: #008000;">.</span><span style="color: #0000FF;">FallbackSort</span> <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> List<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">base</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ActiveDataProvider</span><span style="color: #008000;">.</span><span style="color: #0000FF;">FallbackSort</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span><a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> ResultSort<span style="color: #008000;">&#40;</span>propertyName, Microsoft<span style="color: #008000;">.</span><span style="color: #0000FF;">Office</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Server</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Search</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Query</span><span style="color: #008000;">.</span><span style="color: #0000FF;">SortDirection</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Descending</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">base</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ResultsPerPage</span> <span style="color: #008000;">=</span> <span style="color: #FF0000;">30</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">base</span><span style="color: #008000;">.</span><span style="color: #0000FF;">RenderTemplateId</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;~sitecollection/_catalogs/masterpage/Display Templates/Search/Control_SearchResults.js&quot;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">base</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ItemTemplateId</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;~sitecollection/_catalogs/masterpage/Display Templates/System/Item_CommunityPortal.js&quot;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">base</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ShowAdvancedLink</span> <span style="color: #008000;">=</span> <span style="color: #0600FF; font-weight: bold;">false</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">base</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ShowPreferencesLink</span> <span style="color: #008000;">=</span> <span style="color: #0600FF; font-weight: bold;">false</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">base</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ShowAlertMe</span> <span style="color: #008000;">=</span> <span style="color: #0600FF; font-weight: bold;">false</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">base</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ShouldHideControlWhenEmpty</span> <span style="color: #008000;">=</span> <span style="color: #0600FF; font-weight: bold;">false</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">base</span><span style="color: #008000;">.</span><span style="color: #0000FF;">EmptyMessage</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;No communities&quot;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">base</span><span style="color: #008000;">.</span><span style="color: #0000FF;">OnLoad</span><span style="color: #008000;">&#40;</span>e<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></div>
<p>Il est bien évidemment possible de raffiner la requêtes suivant vos problématiques (collections spécifiques etc.)</p>
<p>Le sourceID est le GUID par défaut du scope &laquo;&nbsp;Local SharePoint Results&nbsp;&raquo;, scope par défaut du moteur de recherche FAST interne.</p>
<p>Le FallbackSort est le mode de tri par défaut (formule détaillée plus haut), vous pouvez le modifier pour afficher par ordre alphabétique ou autre&#8230;</p>
<p>Le RenderTemplateId et le ItemTemplateId sont les templates d&rsquo;affichages globaux et de chaque item, vous pouvez récupérer les existants et les adapter à vos besoins.</p>
<p><strong>Par rapport à la problématique 1</strong> (Modification du titre de la WebPart) vous avez plusieurs possibilités.<br />
Si votre site est multilangue alors vous devez probablement utiliser les fichiers de ressources pour gérer les libellés.<br />
Dans ce cas modifiez dans la méthode <strong>RenderTitle </strong>la ligne suivante avec vos informations</p>
<div class="codecolorer-container csharp default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6666cc; font-weight: bold;">string</span> localizedString <span style="color: #008000;">=</span> SPUtility<span style="color: #008000;">.</span><span style="color: #0000FF;">GetLocalizedString</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;$Resources:NomFichierResource,nomChaineResource&quot;</span>, <span style="color: #0600FF; font-weight: bold;">null</span>, <a href="http://www.google.com/search?q=checked+msdn.microsoft.com"><span style="color: #008000;">checked</span></a><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">uint</span><span style="color: #008000;">&#41;</span>CultureInfo<span style="color: #008000;">.</span><span style="color: #0000FF;">CurrentUICulture</span><span style="color: #008000;">.</span><span style="color: #0000FF;">LCID</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></div>
<p>Dans le cas où vous n&rsquo;auriez qu&rsquo;une langue à gérer vous pouvez tout simplement définir la variable <strong>localizedString</strong>.<br />
Il est aussi possible de supprimer l&rsquo;override du <strong>Title </strong>afin de redonner à l&rsquo;utilisateur la possiblité de définir lui même le titre de sa WebPart. (pensez à supprimer l&rsquo;appel à RenderTitle dans ce cas)</p>
<p>Il nous reste à voir la <strong>réponse à la problématique 2 </strong>(Afficher les communautés dont je suis membre)</p>
<p>Nous avons vu tout à l&rsquo;heure que la requête <strong>MemberOWSUSER:{User.Name}</strong> ne remontait que des items de liste et non des communautés, par contre ce qui peut nous être utile est le chemin url de la communauté.<br />
Une solution est donc d&rsquo;exécuter une 1ère requête interne qui récupérera tous les chemins des communautés dont l&rsquo;utilisateur est membre, puis ensuite une requête qui va récupérer les objets communautés pour affichage.</p>
<div class="codecolorer-container csharp default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #6666cc; font-weight: bold;">string</span> GetFinalQueryFullCommunitiesPath<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; StringBuilder fullQuery <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> StringBuilder<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6666cc; font-weight: bold;">string</span> curentUser <span style="color: #008000;">=</span> SPContext<span style="color: #008000;">.</span><span style="color: #0000FF;">Current</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Web</span><span style="color: #008000;">.</span><span style="color: #0000FF;">CurrentUser</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Name</span><span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ResultTableCollection myResultCol <span style="color: #008000;">=</span> SPSearchUtils<span style="color: #008000;">.</span><span style="color: #0000FF;">ExecKQLQuery</span><span style="color: #008000;">&#40;</span>SPContext<span style="color: #008000;">.</span><span style="color: #0000FF;">Current</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Site</span>, <span style="color: #666666;">&quot;MemberOWSUSER:<span style="color: #008080; font-weight: bold;">\&quot;</span>&quot;</span> <span style="color: #008000;">+</span> curentUser <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;<span style="color: #008080; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>myResultCol<span style="color: #008000;">.</span><span style="color: #0000FF;">Count</span> <span style="color: #008000;">&amp;</span>gt<span style="color: #008000;">;</span> <span style="color: #FF0000;">0</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DataTable resultTables <span style="color: #008000;">=</span> myResultCol<span style="color: #008000;">.</span><span style="color: #0000FF;">Filter</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;TableType&quot;</span>, KnownTableTypes<span style="color: #008000;">.</span><span style="color: #0000FF;">RelevantResults</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">FirstOrDefault</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Table</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; List lCommunityImMember <span style="color: #008000;">=</span> resultTables<span style="color: #008000;">.</span><span style="color: #0000FF;">AsEnumerable</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ToList</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; List lCommPath <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> List<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">foreach</span> <span style="color: #008000;">&#40;</span>DataRow dr <span style="color: #0600FF; font-weight: bold;">in</span> lCommunityImMember<span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">// Colonne 19 champ ParentLink</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6666cc; font-weight: bold;">string</span> listURL <span style="color: #008000;">=</span> dr<span style="color: #008000;">.</span><span style="color: #0000FF;">ItemArray</span><span style="color: #008000;">&#91;</span><span style="color: #FF0000;">19</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6666cc; font-weight: bold;">string</span> webURL <span style="color: #008000;">=</span> listURL<span style="color: #008000;">.</span><span style="color: #0000FF;">Substring</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">0</span>, listURL<span style="color: #008000;">.</span><span style="color: #0000FF;">IndexOf</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;Lists&quot;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">-</span> <span style="color: #FF0000;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; StringBuilder searchPath <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> StringBuilder<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; searchPath<span style="color: #008000;">.</span><span style="color: #0000FF;">AppendFormat</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot; Path:{0}&quot;</span>, webURL<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lCommPath<span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span>searchPath<span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fullQuery<span style="color: #008000;">.</span><span style="color: #0000FF;">Append</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;(&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">foreach</span> <span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">string</span> str <span style="color: #0600FF; font-weight: bold;">in</span> lCommPath<span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fullQuery<span style="color: #008000;">.</span><span style="color: #0000FF;">Append</span><span style="color: #008000;">&#40;</span>str<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">// Filtrage par communautés </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fullQuery<span style="color: #008000;">.</span><span style="color: #0000FF;">Append</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;) AND WebTemplate:Community&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">return</span> fullQuery<span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></div>
<p>et ensuite de passer la requête générée au moteur de la WebPart (dans OnLoad)</p>
<div class="codecolorer-container csharp default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0600FF; font-weight: bold;">base</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ActiveDataProvider</span><span style="color: #008000;">.</span><span style="color: #0000FF;">QueryTemplate</span> <span style="color: #008000;">=</span> GetFinalQueryFullPopularCommunitiesPath<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></div>
<hr />
<p>Voilà j&rsquo;espère que cette note un peu détaillée vous a permis d&rsquo;appréhender un peu mieux les possibilités du Portail des communautés et de sa WebPart associée.</p>
<p>N&rsquo;hésitez pas à revenir vers moi pour plus de détails ou si des points sont peu compréhensibles.</p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Des bons outils du travailleur SharePoint</title>
		<link>https://blog.developpez.com/sp2013irl/p12208/outils/des-bons-outils-du-travailleur-sharepoint</link>
		<comments>https://blog.developpez.com/sp2013irl/p12208/outils/des-bons-outils-du-travailleur-sharepoint#comments</comments>
		<pubDate>Mon, 02 Sep 2013 07:18:36 +0000</pubDate>
		<dc:creator><![CDATA[guitou12]]></dc:creator>
				<category><![CDATA[Outils / Tools]]></category>

		<guid isPermaLink="false">http://blog.developpez.com/sp2013irl/?p=13</guid>
		<description><![CDATA[Bonjour, je présenterai ici les divers outils qui sont plus ou moins indispensable à tout développeur SP. SharePoint Manager 2013 SharePoint Manager est un peu la boite à outils que Microsoft aurait oublié de fournir avec sa construction. Il va &#8230; <a href="https://blog.developpez.com/sp2013irl/p12208/outils/des-bons-outils-du-travailleur-sharepoint">Lire la suite <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Bonjour,</p>
<p>je présenterai ici les divers outils qui sont plus ou moins indispensable à tout développeur SP.</p>
<p><a href="http://spm.codeplex.com/" target="_blank">SharePoint Manager 2013</a></p>
<p>SharePoint Manager est un peu la boite à outils que Microsoft aurait oublié de fournir avec sa construction.</p>
<p>Il va vous permettre d&rsquo;avoir une vue rapide sur toutes vos Web Applications, vos collections de sites, les features associées/activées à chaque espace, les listes, les bibliothèques, les propriétés de chaque élément bref vous allez obligatoirement gagner du temps à vous en servir.<a href="http://blog.developpez.com/sp2013irl/files/2013/08/SPManager1.png"><img src="http://blog.developpez.com/sp2013irl/files/2013/08/SPManager1-300x186.png" alt="SPManager" width="300" height="186" class="alignnone size-medium wp-image-19" /></a><br />
<em>Un rapide exemple des fonctionnalités décrites plus haut</em></p>
<p>SP Manager est à installer et exécuter sur le serveur où est bien évidemment installé SP.<br />
Il se peut qu&rsquo;il vous demande de l&rsquo;exécuter en mode administrateur cela dépendra de l&rsquo;utilisateur que vous utilisez.</p>
<p>Si vous n&rsquo;aviez le choix que d&rsquo;un outil en plus de Visual Studio alors n&rsquo;hésitez pas téléchargez SharePoint Manager 2013 (existe aussi en version 2010)</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p><a href="http://archive.msdn.microsoft.com/ULSViewer" target="_blank">ULS Viewer</a></p>
<p>Une fois les développements SP commencés vous allez vite vous apercevoir que lorsque SP n&rsquo;est pas content il n&rsquo;est pas forcément très prolixe en explications.<br />
La seule solution qui s&rsquo;impose est d&rsquo;aller faire un tour dans le répertoire des logs et d&rsquo;ouvrir le dernier en date.<br />
La première erreur est de l&rsquo;ouvrir avec notepad (ou un autre éditeur texte) vous risquez de prendre peur et de ne plus jamais vouloir refaire ça.</p>
<p>Microsoft dans sa grande bonté a développé un outil qui facilite (autant que faire se peut) la lecture des logs en question.<br />
<a href="http://blog.developpez.com/sp2013irl/files/2013/08/ULS-Viewer.png"><img src="http://blog.developpez.com/sp2013irl/files/2013/08/ULS-Viewer-300x222.png" alt="ULS Viewer" width="300" height="222" class="alignnone size-medium wp-image-23" /></a></p>
<p>Lancez l&rsquo;outil, sélectionnez l&rsquo;emplacement des logs (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\<strong>15</strong>\LOGS\ pour SP 2013, \<strong>14</strong> pour SP2010 etc) et vous vous rendrez vite compte qu&rsquo;il se passe énormément de choses (même sans action de votre part au niveau de l&rsquo;interface web)</p>
<p>Heureusement Microsoft avait prévu le coup et a fourni des fonctionnalités de filtrage de l&rsquo;activité.<br />
<a href="http://blog.developpez.com/sp2013irl/files/2013/08/ULS-Viewer2.png"><img src="http://blog.developpez.com/sp2013irl/files/2013/08/ULS-Viewer2-300x222.png" alt="ULS Viewer2" width="300" height="222" class="alignnone size-medium wp-image-25" /></a></p>
<p>Ainsi vous serez en mesure de filtrer par sévérité, puis sur des chaines de texte définies.</p>
<p>Un exemple concret sera le filtrage par le champ <strong>Correlation</strong> lorsque SP vous indiquera un Guid d&rsquo;erreur vous verrez uniquement les erreurs liées au problème remonté.</p>
<p>C&rsquo;est à mon avis le 2ème outil supplémentaire indispensable, sur ma machine de développement il est ouvert continuellement.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p><a href="http://featureadmin.codeplex.com/" target="_blank">SharePoint Feature Administration and Clean Up Tool</a></p>
<p>Voilà un outil dont je me sers plus rarement mais qui a aussi son utilité.</p>
<p>Plus axé sur la gestion des features au sein de votre ferme il vous permettra en un clic de trouver les features défectueuses (après une migration par exemple) ou bien de voir rapidement les features activées pour un scope donné (Farm / Site / Web)<br />
<a href="http://blog.developpez.com/sp2013irl/files/2013/08/FeatureAdmin-for-SharePoint-2013-v2.3.png"><img src="http://blog.developpez.com/sp2013irl/files/2013/08/FeatureAdmin-for-SharePoint-2013-v2.3-300x253.png" alt="FeatureAdmin for SharePoint 2013 - v2.3" width="300" height="253" class="alignnone size-medium wp-image-33" /></a></p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p><a href="http://ilspy.net/" target="_blank">ILSpy</a></p>
<p>Parfois dans la vie d&rsquo;un développeur il arrive que vous ayez envie de mettre un peu plus les mains dans le cambouis et de voir ce que font réellement les méthodes que les ptits gars de chez Microsoft vous ont pondu.</p>
<p>Pour ça ILSpy va vous permettre d&rsquo;aller charger et de dé-compiler les assemblies qui jusque là restaient opaque à vos yeux. </p>
<p><a href="http://blog.developpez.com/sp2013irl/files/2013/08/ILSpy.png"><img src="http://blog.developpez.com/sp2013irl/files/2013/08/ILSpy-300x174.png" alt="ILSpy" width="300" height="174" class="alignnone size-medium wp-image-35" /></a><br />
<em>Ci dessus les méthodes de la classe Microsoft.SharePoint.Portal.CommunityEventReceiver</em></p>
<p>Une grande partie des DLLs utilisées par SP sont stockées dans C:\Program Files\Common Files\microsoft shared\Web Server Extensions\<strong>15</strong>\ISAPI (\<strong>14</strong> pour SP2010 etc.) vous devriez donc y trouver votre bonheur.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p><strong>CAML Designer for SP 2013</strong></p>
<p>Si d&rsquo;aventure vous éprouvez le besoin de développer des vues personnalisées ou bien de récupérer des items spécifiques dans des listes vous risquez très probablement d&rsquo;en passer par des requêtes CAML.</p>
<p>CAML designer vous permettra rapidement de générer la syntaxe correcte pour arriver au résultat voulu, vous gagnerez du temps en déploiements et tests divers.<br />
<a href="http://blog.developpez.com/sp2013irl/files/2013/08/CAML-Designer-for-SharePoint-2013.png"><img src="http://blog.developpez.com/sp2013irl/files/2013/08/CAML-Designer-for-SharePoint-2013-300x198.png" alt="CAML Designer for SharePoint 2013" width="300" height="198" class="alignnone size-medium wp-image-39" /></a>.</p>
<p>Toutes les infos sur son utilisation se trouvent sur le site des développeurs.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p><a href="http://www.microsoft.com/en-us/download/details.aspx?id=38182" target="_blank">Sharepoint Color Palette Tool</a></p>
<p>Si le bleu Microsoft n&rsquo;est pas vraiment votre couleur favorite et que vous souhaitez profiter des nouvelles fonctionnalités de branding SP2013 alors cet outil est fait pour vous.</p>
<p>Il va vous permettre en 2 clics de générer une palette de couleurs (fichier .spcolor) qu&rsquo;il sera ensuite possible d&rsquo;importer dans la gallerie de thèmes (http://url/_catalogs/theme/15) et d&rsquo;appliquer soit via l&rsquo;interface (Menu <strong>Modifier l&rsquo;apparence / Change the look</strong>) soit via du code.</p>
<p><a href="http://blog.developpez.com/sp2013irl/files/2013/08/SharePoint-Color-Palette-Tool.png"><img src="http://blog.developpez.com/sp2013irl/files/2013/08/SharePoint-Color-Palette-Tool-300x198.png" alt="SharePoint Color Palette Tool" width="300" height="198" class="alignnone size-medium wp-image-42" /></a><br />
Voici un vert des plus chatoyants</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>Voilà déjà un bon tour d&rsquo;horizon de ce qui se fait comme aide au développement SP, cette liste n&rsquo;est bien entendu pas exhaustive et sera complétée au fur et à mesure de mes découvertes.</p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Bienvenue sur mon blog Sharepoint 2013</title>
		<link>https://blog.developpez.com/sp2013irl/p12205/non-classe/bienvenue</link>
		<comments>https://blog.developpez.com/sp2013irl/p12205/non-classe/bienvenue#comments</comments>
		<pubDate>Fri, 30 Aug 2013 12:56:06 +0000</pubDate>
		<dc:creator><![CDATA[guitou12]]></dc:creator>
				<category><![CDATA[Non classé]]></category>

		<guid isPermaLink="false">http://blog.developpez.com/sp2013irl/?p=9</guid>
		<description><![CDATA[Bonjour, j&#8217;inaugure ce blog dans lequel je vais essayer de parler de divers sujets SharePoint 2013. Il me servira aussi de pense-bête à l&#8217;occasion. A bientôt ! Cordialement, Guitou]]></description>
				<content:encoded><![CDATA[<p>Bonjour,</p>
<p>j&rsquo;inaugure ce blog dans lequel je vais essayer de parler de divers sujets SharePoint 2013.</p>
<p>Il me servira aussi de pense-bête à l&rsquo;occasion.</p>
<p>A bientôt !</p>
<p>Cordialement,</p>
<p>Guitou</p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
