Sharepoint Discussion Boards on a mobile device?
To my knowledge so far, I understand Sharepoint 2010 can not display a discussion board on a mobile platform. Has anyone else come up with a way to work around this issue? Thanks in advance.
January 17th, 2012 6:04pm

hi budward141,

The Discussion Board interface is not available on mobile devices in SharePoint. But you can develop a chat function on your page, and the chat function is similar with Discussion Board. Then you can view the page by mobile device.

Here is the webpart, you can download it .

http://www.lightningtools.com/blog/archive/2010/03/16/sharepoint-chat-web-part-for-sp-2010-ndash-sandbox-solution.aspx

About mobile device access SharePoint to look the following link.

http://msdn.microsoft.com/en-us/library/ms479269.aspx

Thanks,

Jack


Free Windows Admin Tool Kit Click here and download it now
January 19th, 2012 3:11am

While the discussion board is not available through a mobile device, an RSS feed to the discussion board is. The tough part is the security placed on the RSS feeds in SharePoint. If you allow annoymous permissions to the discussion board, you will have no problem reading the RSS feed in any mobile browser or mobile RSS feed application.
  • Proposed as answer by hutsona70 Thursday, January 19, 2012 4:52 AM
  • Marked as answer by Wayne Fan Wednesday, January 25, 2012 8:49 AM
January 19th, 2012 4:52am

Hi,

We first tried to use the RSS feeds but had a problem with NTLM Authentication, so we decided to use the SPServices library, using XML generated from a list by web services.

http://spservices.codeplex.com/

This library uses jquery: http://jquery.com/download/


Here is what we obtain:

http://img4.hostingpics.net/pics/542379printsmall.png

Here is the code of the whole yourname.aspx mobile page (located here: C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\LAYOUTS\Mobile) : 

<%-- Copyright (c) Microsoft Corporation. All rights reserved. --%><%@ Register TagPrefix="GroupBoardMobile" Namespace="Microsoft.SharePoint.Applications.GroupBoard.MobileControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %><%@ Page Language="C#" Debug="true" EnableViewState="false" inherits="Microsoft.SharePoint.Mobile.WebControls.SPMobileWikiPage,Microsoft.SharePoint,Version=15.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" %><%@ Assembly Name="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %><%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %><%@ Register TagPrefix="SPMobileA" Namespace="Microsoft.SharePoint.Mobile.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %><%@ Register TagPrefix="WPMobileA" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %><script runat="server"> protected override Microsoft.SharePoint.SPBasePermissions RightsRequired { get { return Microsoft.SharePoint.SPBasePermissions.ViewPages; } } </script><html id="defaultHtml" RunAt="Server"><head runat="server"><meta http-equiv="Content-type" content="text/html; charset=utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=9"/></head><body RunAt="Server"><SPMobileA:SPMobileForm RunAt="Server" PageType="HomePage" Paginate="true"><HeaderTemplate><SPMobileA:SPMobileComponent RunAt="Server" Templatename="Adv_MobileWebPartPageTitleWithNavigation"/></HeaderTemplate><SPMobileA:SPMobileComponent RunAt="Server" Templatename="Adv_WebPartMobileSummaryViewContents"/><WPMobileA:WebPartMobileWebPagePanel RunAt="Server"/></SPMobileA:SPMobileForm>

<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="http://site.domain/sites/testmob01/SiteAssets/jquery.SPServices-2013.01.min.js"></script>
<script language="javascript" type="text/javascript">

$(document).ready(function() {
  $().SPServices({
    operation: "GetListItems",
    async: false,
    listName: "Discussions List",
    CAMLViewFields: "<ViewFields><FieldRef Name='Title' /><FieldRef Name='Body' /><FieldRef Name='Modified' /><FieldRef Name='Author' /><FieldRef Name='ParentItemID' /><FieldRef Name='BestAnswerId' /></ViewFields>",
CAMLQuery:  "<Query><Where><Or><Eq><FieldRef Name='ContentType' /><Value Type='Text'>Message</Value></Eq><Eq><FieldRef Name='ContentType' /><Value Type='Text'>Discussion</Value></Eq></Or></Where></Query>",
CAMLQueryOptions: "<QueryOptions><ViewAttributes Scope='RecursiveAll'/></QueryOptions>",
    completefunc: function (xData, Status) {
 $(xData.responseXML).SPFilterNode("z:row").each(function() {
if ($(this).attr("ows_ParentItemID") === undefined)
{
var id = $(this).attr("ows_ID")
totobaid = $(this).attr("ows_BestAnswerId")
//var preauteur = $(this).attr("ows_Author").substring(3);
//var auteurparts = preauteur.split('#', 2);
//var auteur = auteurparts[1];
//var auteur = $(this).attr("ows_Author")
//debut FONCTIONNE MIEUX

function getSecondPart(str) {
return str.split('#')[1];
}

var auteur = getSecondPart($(this).attr("ows_Author"));

//fin
var liHtml = "<li class=\"toto18\" id=\"toto18" + id + "\">" + "<a class=\"toto18title\" href=\"" + "http://site.domain/sites/testmob01/SitePages/Topic.aspx?RootFolder=%2Fsites%2Ftestmob01%2FLists%2FCommunity%20Discussion%2F" + $(this).attr("ows_Title") + "&FolderCTID=0x01200200721B6CFB6F959B439B3C5AC456E0143C&SiteMapTitle=General&SiteMapUrl=http%3A%2F%2Fsp02test01%2Erec%2Egroupe%2Esite%2Efr%2Fsites%2Ftestmob01%2FSitePages%2FCategory%2Easpx%3FCategoryID%3D1%26SiteMapTitle%3DGeneral" + "\">" + $(this).attr("ows_Title") + "</a>" + "<div class=\"toto18body\">" + $(this).attr("ows_Body") + "</div>" + "<div class=\"toto18footer\">" + "Post le " + $(this).attr("ows_Modified") + " par " + auteur + "</div>" + "</li>";
$("#tasksUL").append(liHtml);
}
else
{
if ($(this).attr("ows_ID") == totobaid)
{
var parid = $(this).attr("ows_ParentItemID")
function getSecondPart(str) {
return str.split('#')[1];
}
var auteur = getSecondPart($(this).attr("ows_Author"));
var liHtml2 = "<li class=\"toto18msgbabody\">" + "<span class=\"toto18body\">" + $(this).attr("ows_Body") + "</span>" + "<div class=\"toto18msgbafooter\">" + $(this).attr("ows_Modified") + " - " + auteur + " MEILLEURE REPONSE" + "</div>" + "</li>";
var reldiv = "#" + "toto18" + parid
$(reldiv).append(liHtml2);
}
else
{
var parid = $(this).attr("ows_ParentItemID")
function getSecondPart(str) {
return str.split('#')[1];
}
var auteur = getSecondPart($(this).attr("ows_Author"));
var liHtml2 = "<li class=\"toto18msgbody\">" + "<span class=\"toto18body\">" + $(this).attr("ows_Body") + "</span>" + "<div class=\"toto18msgfooter\">" + $(this).attr("ows_Modified") + " - " + auteur + "</div>" + "</li>";
var reldiv = "#" + "toto18" + parid
$(reldiv).append(liHtml2);
}
}
}
);
    }
  });
});
</script>
<ul id="tasksUL" />

<style>

ul
{
list-style: none;
}

.toto18
{
margin-bottom: 10px;
margin-
padding-
padding-
padding-right: 10px;
padding-bottom: 10px;
background: #FFFAFA;
border-style:solid;
border-width:2px;
border-color: #DDBBBB;
list-style-image: none;
}

.toto18title
{
font-family: "Segoe UI","Segoe",Tahoma,Helvetica,Arial,sans-serif;
font-size:17px;
color: rgba(159, 0, 4, 1);
}

.toto18body
{
margin-
font-family: "Segoe UI","Segoe",Tahoma,Helvetica,Arial,sans-serif;
font-size:14px;
}

.toto18footer
{
border-top-style:solid;
border-width:1px;
border-color: #DDDDDD;
margin-
padding-
margin-bottom: 0px;
font-family: "Segoe UI","Segoe",Tahoma,Helvetica,Arial,sans-serif;
font-size:13px;
color: rgba(50, 50, 50, 1);
text-align: right;
}

.toto18msgfooter
{
margin-
padding-right: 10px;
font-family: "Segoe UI","Segoe",Tahoma,Helvetica,Arial,sans-serif;
font-size:11px;
color: rgba(150, 150, 150, 1);
text-align: right;
}

.toto18msgbafooter
{
margin-
padding-right: 10px;
font-family: "Segoe UI","Segoe",Tahoma,Helvetica,Arial,sans-serif;
font-size:11px;
font-weight: bold;
color: rgba(0, 0, 0, 1);
text-align: right;
}

.toto18msgbody
{
background: #FFFCFC;
border-style:solid;
border-width:1px;
border-color: #DDBBBB;
padding: 5px 5px 5px 5px;
margin-
}

.toto18msgbabody
{
background: #AAFFAA;
border-style:solid;
border-width:1px;
border-color: #DDFFFF;
padding: 5px 5px 5px 5px;
margin-
font-family: "Segoe UI","Segoe",Tahoma,Helvetica,Arial,sans-serif;
font-size:14px;
}

</style>
</body></html> 


You can refer here for the redirection system: http://msdn.microsoft.com/en-us/library/ms464268(v=office.14).aspx

Or use that kind of script that you can embed on the normal Sharepoint page (Mobile View Feature must be disabled in that case):

<script type="text/javascript">
function RedirectSmartphone(url){
    if (url && url.length > 0 && IsSmartphone())
    window.location = url;
}
function IsSmartphone(){
    if (DetectUagent("android")) return true;
    else if (DetectUagent("blackberry")) return true;
    else if (DetectUagent("iphone")) return true;
    else if (DetectUagent("opera")) return true;
    else if (DetectUagent("palm")) return true;
    else if (DetectUagent("windows")) return false;
    else if (DetectUagent("generic")) return true;
    else if (DetectUagent("ipad")) return false;
    else if (DetectUagent("ipod")) return true;
    return false;
}
function DetectUagent(name){
    var uagent = navigator.userAgent.toLowerCase();
    if (uagent.search(name) > -1)
    return true;
    else
    return false;
}
RedirectSmartphone("http://site.domain/sites/sitecoll/_layouts/15/mobile/yourpage.aspx");
</script> 

Hope this helps



Antoine


Free Windows Admin Tool Kit Click here and download it now
August 28th, 2013 3:11pm

Hi Antoine,

Is this a working solution for you? Am looking for a discussion board that users can access through a mobile app.

Is there some code you can share?

Appreciate the help.

Regards,

Priyanka

January 30th, 2014 9:25pm

Hi Priyanka,

We are looking for the same thing.  Have you had any luck?

-robotty

Free Windows Admin Tool Kit Click here and download it now
April 10th, 2014 7:04pm

Hi Priyanka,

We are looking for the same thing.  Have you had any luck?

-robotty


i just faced a similar problem is that the discussion forums does not provide a mobile views
August 11th, 2015 8:17pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics