Saturday, October 09, 2010

SharePoint 2010 Language Pack on Windows 7

Detailed post on how to install the SharePoint server language pack on Windows 7

http://johnnyharbieh.wordpress.com/2010/04/08/installing-language-packs-on-windows-7-for-sharepoint-server-2010-rc/

Thursday, September 30, 2010

SharePoint Multilingual User Interface “MUI”

In a MOSS 2007 project, the customer requested from us to make the interface of the document library in the English site displayed in Arabic and vice versa based on the user choice, because the one who will manage the documents may not be able to understand the Arabic and another one may not be able to understand English.

I searched for a ready solution but I did not find any, and for sure I’ll not develop the same screens to make the same functionality just to add this feature. And working on client side, jQuery for example to replace the text based on an array will be also a long and should be done not just based on the text string.

Another solution is to change the UI culture of the response in a custom MasterPage based on the user selections, but this was the result:



Some text is translated and it seems that not all the text are came out of the recourse files.

Then it seems that this request is also requested from many people, Microsoft put it as a built in option in SharePoint 2010, which is known as Multilingual User Interface “MUI”, all what you need it to go to the Language Settings and select the alternate language:




Then the user will be able to see it in the personal menu, and he can swap between the languages as he wants to:



Then the page will be displayed as shown here: (note that the site name is “Home”)







And you can translate the site name by selecting the Overwrite translations from the Language Settings then change the site to the Arabic language, and from the site settings you will be able to change the site name to Arabic:






Wednesday, September 29, 2010

SharePoint IE8 Accelerator

I was working on a SharePoint project where part of the requirements is to revamp the user interface of the portal. One of the problems is that the development company that develop the portal in the beginning were using about 10 MasterPages and 160 PageLayout. But after studding the needed MasterPages and the actual needed PageLayouts with the customer we got out that we just need 1 MasterPage and 5 PageLayouts! About 3% only are needed.

Most pages are not linked to right PageLayout as it is referring to URLs on the development and testing servers, so the first step here is to find out how to update the PageLayouts of the pages to the new ones and to keep all the WebParts in each place in the corresponding Zone.

In the 160 old PageLayouts the Zones are not named with a descriptive name just the GUID, the WebParts are not named as well, so I need a tool that a user can use easily to migrate to the new PageLayouts in the proper zone.

And while I’m working on this tool, I figured out that many pages are including Closed WebParts that we will need to delete them for better performance (15 closed webpart in the homepage only, while the displayed are just 4 webparts). And some of them have no DLLs anywhere.

The Solution:
1. Make a sitemap for the portal, and decide what is the important sections to be migrated first
2. Break the inheritance for the MasterPages in the sub sites during the migration process
3. Make a list of all the pages in the portal with current PageLayout
4. Make a list of all the weparts and the current zones for each webpart
5. Save all the above information in a database
6. Make a page that takes the page URL as a parameter and displays the page information (PageLayout, Webparts (and the closed as well in red), Zones)
7. Make the page to be displayed as preview for an IE8 accelerator as you can see in the image below
8. Develop another page that takes the page URL as a parameter when clicking on the accelerator in case I need to change the PageLayout or the WebParts
9. From the managing page I can select the new PageLayout to the page just by selecting from the layouts list, but it will not be changed now.
10. After that select the new zone I want to add the webparts to, or I can select to delete it
11. I can also set the new PageLayout to all the similar pages that were taking the same old PageLayout
12. Also I can set the same new arrangements of the webparts to the similar pages that were using the same old layout and have the same new layout altered in the database
13. And I can see which webparts are not yet matched to a new zone, in case I have any webpart missing.
14. At the end I can just click on the button “Change” and the application will do it based on my settings



In this solution The IE8 Accelerator helped me a lot, thanks Microsoft! And the project completed on time and the customer is happy AlHamd Lellah.

And for sure, I want to thank all who was supporting this project. (Thank You All!)

Sunday, July 25, 2010

Bug in Search PageLayouts in SharePoint 2010

Today I was working on a SharePoint 2010 site, and I tried to let the search site use the same masterpage as the site not the minimal.master which is the default.

But after changing the master page I found that the search text box is disappeared, but I can found the text box in the HTML source.


And after a while I found that the problem is that the webpart zone is added in the "PlaceHolderTitleBreadcrumb" place holder and not in the "PlaceHolderMain".



And when I tried to edit the page I found it like this:



And also the search result page is the same:



As you can see in the image, the search filtration is not in the place as it should as well.

Saturday, July 24, 2010

Installing WSS 3.0 extensions beside SPS2010

I was trying to open a sharepoint 2007 project on my x64 windows 7 with SPS2010
First download the x64 extensions:

http://www.microsoft.com/downloads/details.aspx?familyid=FB9D4B85-DA2A-432E-91FB-D505199C49F6&displaylang=en

But you will not be able to install it because you don't have WSS 3.0 installed, so go to this post and follow the steps http://www.dotnetspark.com/kb/2014-installing-visual-studio-extensions-for.aspx to tell your PC that you have the WSS 3.0 installed.

Tuesday, June 22, 2010

Silverlight Organization Chart - Part 4 - Drawing

I have received too many messages to post the code for drawing the lines and the boxes for the Organization Chart, which actually the easy part after calculating the positions, but here it is:

Drawing Lines:

here in this method it is simply drawing a line

public void DrawLine(Canvas canvas, double x1, double y1, double x2, double y2)
{
Line line = new Line();
line.X1 = x1;
line.Y1 = y1;
line.X2 = x2;
line.Y2 = y2;
line.Stroke = Util.GetColorFromHex("#FF6495ed");
line.StrokeThickness = LinesStrokeThickness;
canvas.Children.Add(line);
}

Where LinesStrokeThickness = 1 And GetColorFromHex is a method that convert the RGB color to brush color:

public static SolidColorBrush GetColorFromHex(string myColor)
{
return new SolidColorBrush(
Color.FromArgb(
Convert.ToByte(myColor.Substring(1, 2), 16),
Convert.ToByte(myColor.Substring(3, 2), 16),
Convert.ToByte(myColor.Substring(5, 2), 16),
Convert.ToByte(myColor.Substring(7, 2), 16)
)
);
}

Drawing the box with the lines:

In this method it is drawing the NodeBox and set its values, also it put it in the right place based on the calculations.

public void AddBox(Canvas canvas, double x, double y, double? parentX, string ID, string name, string title, string department, string extension, bool root, bool subNodes)
{
NodeBox nb = new NodeBox(drawingScale);
nb.Name = ID;
nb.EmployeeName = name;
nb.Title = title;
nb.Department = department;
nb.Extension = extension;
nb.Width = buttonWidth;
nb.Height = buttonHeight;
nb.SetValue(Canvas.LeftProperty, x - nb.Width / 2);
nb.SetValue(Canvas.TopProperty, y);

canvas.Children.Add(nb);

// The line above the box
if (root)
DrawLine(canvas, x, y - minVerticalSpace, x, y);


// Draw the horizontal line to the parent
if (parentX != null)
DrawLine(canvas, x, y - minVerticalSpace, Convert.ToDouble(parentX), y - minVerticalSpace);


// Draw the line under the box
if (subNodes)
DrawLine(canvas, x, y + buttonHeight, x, y + buttonHeight + minVerticalSpace);

}

in-shaa Allah, this post help you to complete your organization chart based on Silverlight.

Columns associated with mappings have been deleted/renamed

I was working on a project where we are using the new linq with sharepoint 2010 , and I have received this error:

Message: Columns associated with mappings have been deleted/renamed.
Source : Microsoft.SharePoint.Linq
Target site : Void ValidateMapping()
Stack trace :
at Microsoft.SharePoint.Linq.EntityTracker.ValidateMapping()
at Microsoft.SharePoint.Linq.EntityTracker.SubmitChanges(ConflictMode failureMode, Boolean systemUpdate)
at Microsoft.SharePoint.Linq.DataContext.SubmitChanges(ConflictMode failureMode, Boolean systemUpdate)
at Microsoft.SharePoint.Linq.DataContext.SubmitChanges()
at MyNameSpace.MethodName()


And I did not find any article talking about this error: "Columns associated with mappings have been deleted/renamed" when searching on google.

After re-generating the class using the SPMetal command and receiving the same error, I found that the submitted list name is for another list. so just to share it with you :)

Saturday, March 27, 2010

SPSArabia: XSLT in SharePoint

Today it was my pleasure and honor to speak in SharePoint Saturday Arabia, my session was about “XSLT in SharePoint” starting from the difference between CSS and XSLT then different ways to transform the XML client side and server side then extending the XSLT with C# objects and methods, all of this as an introduction for the XSLT List View webpart and other webparts that use the XSLT like the CQWP.

But unfortunately I didn’t manage my time and I just give the introduction and just opened the SharePoint and the XSLT ListView WP.

It was nice experience for me to join like this event. And thanks for @AymanElhattab @MarwanTarek and @mohdyehia for organizing the event.

The presentation is available on http://www.slideshare.net/omourad/sps-arabia-xslt-in-sharepoint

The Videos will be available soon on:

Wednesday, March 17, 2010

برامج إدارة الأملاك العقارية

للمجال العقاري بالمملكة العربية السعودية نظام خاص يحكم المالك والمستأجر بأسس اجتماعية وحضارية قبل أن تكون أسس اقتصادية، فلم يغفل النظام العقاري بوضع معايير لاختلاط السكن العائلي بالسكن الفردي والذي يكون في الغالب من العمالة الواردة إلى المملكة مما حافظ على احترام الحياة الأسرية حتى للوافدين من خارج المملكة. ثم تواجد المحال التجارية ببعض الشوارع والطرق وتواجد العمائر السكنية والفلل الخاصة بشوارع أخرى يكون فيها الهدوء والأمان أكثر. وكما أن هناك اختلاف بين السكن العائلي والسكن الفردي فإن هناك قوانين وأسس تطبق على العقارات حسب مكانها كالتي يتم امتلاكها أو استئجارها في مدينتي مكة والمدينة.

ومما هو ملحوظ في الآونة الأخيرة قيام الحكومة السعودية بتبني الكثير من المشاريع العقارية الضخمة مما ساعد على نمو الاقتصاد العقاري وتشجيع الكثير من الشركات للعمل قدما في تصميم وتخطيط المدن والأبراج الضخمة. كما أن لصدور القانون بإمكانية تملك غير السعوديون من وحدات سكنية وغيرها أثره في الإقبال على المنتج العقاري سواء من ناحية العرض أو الطلب. ثم قانون الرهن العقاري والذي سيعطي إمكانات ائتمانية والبيع بطريقة التقسيط.

اعتبارات كثيرة تؤخذ بالحسبان عندما نتكلم عن العقار بالمملكة دينيا وقوميا وإقليميا، حيث يحق فقط للمسلمين بالتملك أو الاستئجار بالمناطق المقدسة ، ولا يحق لغير السعوديين بالتعاقد على استئجار العقارات لمدد تزيد عن السنتين بهذه المناطق ، واختلاف ذلك عن التملك عن طريق الورث الشرعي، وعندما نتكلم عن النظم المختلفة فهناك امتيازات أخرى لمواطني مجلس التعاون الخليجي عن غيرهم ، وهناك من هم سعوديون ولكن لم تكتمل إجراءات التجنس لهم.

كل هذه المتغيرات يجب أخذها بالحسبان عندما نتكلم عن سوق العقار بالمملكة العربية السعودية ، ولكن عندما نتكلم عن تصميم وتطبيق برامج إدارة الأملاك فإنه يجب إضافة الكثير والكثير من الاعتبارات الأخرى ، فكما وضح نظام العقار السعودي العلاقة بين المالك المستأجر أو البائع و المشتري فإن برامج إدارة الأملاك يجب أن تضيف لهذه العلاقة الكثير من المعايير والتي تضمن إبقاء العلاقة على أتمها مما يضمن بقاء عملية الاستثمار والربح لمتبادل لأطول مدة ممكنة.

على غير الكثير من الأعمال الاقتصادية الأخرى، فإن سوق العقار يحول المشتري من باحث عن السلعة لشخص لديه سلعة ممكن عرضها للبيع ومن ثم يتم تحويله لبائع، كما أن متملك أو مستأجر العقار يكون دائما في حاجه لأعمال الصيانة والتحسينات على العقار.

ولا يجب أن نغفل في تصميم البرامج المماثلة طبيعة صاحب العقار، فقد تكون ملكية العقار ملكية فردية أو تكون ملكية مشتركة بنسب شراكة مختلفة وقد تكون شراكة بين أفراد ومؤسسات، وقد يرغب كل على حده من متابعة عوائد العقارات الخاصة به أو الرسوم المطلوبة منه. ويرغب المستأجر في معرفة مواعيد سداد القيمة الايجارية أو يطلب تذكيره قبل موعد السداد بفترة ما، وقد يقوم بطلب لعمل صيانة معينة بالوحدة أو يقوم بتقديم شكوى ومتابعة حالة طلبه. و يقوم مسؤول بالنظام بمتابعة فريق الصيانة والنظافة والأمن من نفس البرنامج.

وعملية البحث عن عقار عملية صعبة حيث يتنقل الباحث بين الكثير من المكاتب سائلا عن طلبه ، وحتي يصل إلى مبتغاه فإنه يمر بالكثير ممن يخبروه بأن طلبه ليس موجود حالياً، ولكن إذا قام موظف المكتب بتسجيل بيانات السائل ومواصفات طلبه ومراسلته عندما يتوفر العقار المناسب فإن ذلك سيساعد السائل ويجعله عميل لهذا المكتب أو الشركة، كما سيقلل من فترة الانتظار حتى يتم استئجار عقار ما مما سيجعل صاحب أو مالك العقار عميل دائم لهذا المكتب.

علاقات كثيرة ومتغيرات أكثر يجب على مصمم هذا النوع من البرامج من فهمها واعتبار كل تفاصيلها بجانب كل تفاصيل المدخلات والمخرجات بالبرنامج حتى يأتي بثمرة عمله من تطبيق هذا النظام.

Sunday, March 14, 2010

SPS2010 New Navigation Options

I’m back to continue writing about SharePoint after I bought a new laptop to be able to try SPS2010.

One of the new things in SharePoint 2010 is the updated navigation page, as you can set whether to show the sub sites and the pages in Global Navigation or the Current Navigation only, before you just have one option for both the Global Navigation and the Current Navigation.



Also one of the options here is the Maximum number of items to show within this level of navigation, which is the maximum number of navigation item to be displayed, this is very useful to avoid the long horizontal scroll bar displayed in many projects. The default number is 20, but by setting the number to zero all the items will be displayed.

But I don’t know why they did not separate the sorting settings for the Global and the Current?

Friday, February 05, 2010

Storytelling Alice


مما لا شك فيه أن النفس البشرية تمل من الأشياء الرتيبة وتميل دائما للتغيير. والتغيير قد يشمل تغيير المكان الذي اعتدنا فعل شيء ما فيه كتغيير مكان الاستذكار مثلا. وقد نميل لتغيير الأدوات كأن نشتري جهاز محمول جديد أو تغيير المشروب الذي نشربه أثناء قيامنا ببعض المهام.

ومن الأشياء الصعب تغييرها هي عادات الناس وطريقة حياتهم اليومية ولذلك تحتاج لأفكار وحيل للتمكن من التغيير ، و في هذا الرابط http://www.thefuntheory.com/ بعض الأمثلة على ما أقصد ، وبه يقوم الناس بفعل نفس الأشياء التي اعتادوا عليها ولكن بطريقة مرحة فيقومون بفعلها بطيب خاطر.

ومقولة تعلم وأنت تلعب ليست ببعيد عن ما أتكلم عنه، حيث ذكرت فيما سبق كيف كان لها تأثير علي شخصيا، وهذا ما تقوم به العديد من المدارس بالخارج حيث أن أكثر من ألفان مدرسة يقومون باستخدام برنامج يسمى "أليس" لتعليم الطلاب المبادئ الأساسية لبرمجة الحاسب باستخدام الأشياء. واسم "أليس" يرجع إلى القصة الشهيرة "أليس في بلاد العجائب" التي يحبها الكثير من الأطفال حول العالم.

باستخدام "أليس" يقوم الطالب بسرد قصة ثلاثية الأبعاد بالاستعانة ببعض الشخصيات الموجودة بمكتبة الشخصيات ويعطيها بعض الأوامر كأن يضع شخصية ويعطيها اسم "محسن" ويصدر أمر لمحسن ليتحرك للأمام أو أن يدور أو أن يقول شيء ما. وللشخصية بعض الخصائص كمكانه على الشاشة وحجمه وخلافه.

ومن الظريف أن الطالب يستطيع عمل الدوال الخاصة به كأن يقوم بعمل دالة اسمها "أرقص" ويعطيها بعض المعطيات كسرعة الرقصة وعدد مرات الرقص مثلا، وبالدالة يستخدم الأوامر الموجودة للحركة كأن يحرك القدم اليسرى بارتفاع ما ثم يخفضها ثم اليمنى مع اليد، وهكذا حتى ينهي تفاصيل الرقصة والتي أصبحت أمرا من أوامر الشخصية "محسن" بالقصة.

ومن الداعمين لهذا البرنامج أسماء كبيرة مثل جوجل و ديزني وصن وآخرون وبالإمكان الحصول على برنامج "أليس" مجانا من خلال هذا الرابط http://www.alice.org/

وقد تكلمت عن هذ البرنامج على شاشة التلفاز في برنامج "أي تي شو" على القناة الفضائية الثقافية المصرية
وأتمنى أن أرى هذا البرنامج أو شبيه له يتم استخدامه في مدارسنا بالدول العربية حتى نبني أجيال من المبرمجين تربوا على متعة العلم.

Wednesday, January 27, 2010

One Team - One Target

"هذه الشركة عملت أشياء كثيرة معنا عندما كان بالإمكان ... جاء اليوم الذي نقف بجانب إدارتها" هذا ما سمعته من مصطفى مراد ، من العاملين بإحدى الشركات المنافسة للشركة التي أعمل بها ، و انتابني إحساس الغبطة لهذه الشركة حيث تمنيت أن يكون من العاملين معنا و ليس مع منافسينا شخص بهذا الحب والولاء لشركته.

"يا عم احنا مالنا ... هي دي شركة ابونا" جملة نسمعها مثل "هي الشركة لو كسبت هانشوف منها حاجه؟" و الكثير من الأقوال التي نسمعها من العديد على مرور الأعوام خلال التنقل بين الشركات ، و قد يكون قائل هذه العبارات على صواب و قد يكون على خطأ ، لكن الأكيد انه مخطأ في حديثه بهذه الأقوال لما فيها من ضرر على معنويات المستمعين و حماسهم بالعمل.


قمت بإدارة فريق جوالة على مدار العديد من السنوات وقد حقق هذا الفريق الكثير من البطولات منها المستوى الأول لجنوب القاهرة والمركز الأول للقاهرة و قد تم تصوير الفريق تليفزيونيا في إحدى إحتفالات مدينة حلوان لما عرف عنه من عمل الأشياء بإتقان و بطريقة مختلفة عن ما هو معهود بين باقي الفرق.

وأحيانا يكون بين اعضاء الفريق من يشارك لمجرد انه يحب الصحبة و يكون منهم العضو المساعد ومنهم العضو الكسول الذي لا يقوم بدوره إلى جانب التفوه بعبارات تدعو للتكاسل وإهمال الأعمال و يرفع شعار "طز" و "تدفع كام؟"، وهذا هو النوع الذي حاولت علاجه أو عزله عن الفريق لأنه مثل السوس الذي ينخر بالمكان.

و أخيرا أحب أن أتذكر دائما مجموعة العمل التي عملت معها منذ عام مضى و كان شعارنا وقتها "One Team One Target" فهذا كان مثال الفريق المتعاون الذي استمتعت بالعمل معه.

Tuesday, January 05, 2010

تعلم وأنت تلعب

"تعلم وأنت تلعب" هذا ما كان يقوله لي والدي دائما بعد أكتشافي أن اللعب الذي كان يلعبه معي له علاقة بالدروس الموجودة في كتاب المدرسة بطريقة أو بأخرى. وكنت أصرخ عندما أكتشف هذه المؤامرة "دي مذاكرة ... ده مش لعب ... انت دحكت عليا" ولا أدري كيف كان يجد كل هذه الأفكار حتي يجعل معلومة ما تصل إلى عقلي ، حيث كنت أبعد ما يكون عن المذاكرة مما دفعه يوما لربطي بالمكتب وكنت مستمتع بكل هذا لأنه في النهاية تم إخراجه في صورة لعب.

و عندما أصبح لدينا جهاز كمبيوتر وكنت بالسنة الخامسة الابتدائية و قد تعلمنا عليه سويا، أصبح اللعب بطريقة مختلفة وكان التركيز الأكبر على الرياضيات والفيزياء عن طريق عمل برامج بلغة الكويك بيسيك والتيربو سي لرسم المعادلات من الدرجة الأولى والثانية والثالثة وهكذا وحل أكثر من معادلة بدرجات مختلفة بالطريقة الرسومية ثم عمل لعبة صغيرة فكرتها محاولة إصابة هدف عشوائي على الشاشة عن طريق تحديد زاوية وسرعة القذيفة و تطبيق قوانين العجلة والسرعة والجاذبية الأرضية، و من الأشياء التي بدأت عليها لغة السي كانت توضيح رسومي للعلاقة بين الزاوية وجيب الزاوية ومحصلات القوة وخلافه.

و هذه الأشياء ترسخ بالعقل لمدد أطول من المذاكرة العادية، حتى أنني قمت يوما بحساب أشياء تحسب بالآلة الحاسبة ولم يكن معي يومها غير المنقلة والمسطرة حيث كنت قد نسيت أن عندي امتحان ولم أحضر معي الآلة.

ولكن لماذا كل هذه المقدمة؟ لقد قمت بشراء جهاز أكس بوكس جديد وعندما كنت أتصفح موقع http://www.xbox.com رأيت أن هناك بعض الألعاب تم تطويرها عن طريق بعض الهواة، مما استدرجني لمعرفة المزيد عن كيفية عمل ذلك، فوجدت أن البداية في غاية السهولة، بالطبع عمل ألعاب كالتي نشتريها من السوق أو نحصل عليها من الانترنت ليست بالعملية السهلة مطلقا، ولكن البداية كما ذكرت في غاية السهولة، وهذا هو هدفي من كتابة هذه الصفحة، حيث سأقوم بكتابة ما سأتعلمه عن كيفية عمل برامج تعمل على جهاز الكمبيوتر وجهاز الأكس بوكس، وسأقوم بكتابة هذه المواضيع باللغة العربية إن شاء الله حيث أن هناك العديد من المصادر باللغة الإنجليزية.

وهدفي في هذا ليس عمل الألعاب فقط و لكن لتعليم البرمجة أثناء عمل الألعاب أيضا ، وأقصد هنا البرمجة بلغة السي شارب. وقد قمت بعمل بعض الاتصالات بمن قد يقوموا بتبني ودعم فكرة تعليم الشباب في مرحلة الإعدادي والثانوي بالمملكة العربية السعودية كيفية برمجة الألعاب واستخدامها في فهم أشياء مختلفة منها المناهج الدراسية وعلى رأسها كيفية البرمجة أصلا خلال عمل اللعبة. وهذا سيحتاج للعديد من الأيادي للمساعدة في تنفيذ و إنجاح هذا الأمر ولهذا قد يتم عمل مجموعة بدعم من شركة ميكروسوفت تضم المهتمين بهذا الأمر، فإن كان لك رغبة في الانضمام لتكوين هذه المجموعة رجاءا أرسل لي سواء كنت مبرمج أو مصمم جرافيكس.

How to Install and Use RTSP Simple Server

  How to Install and Use RTSP Simple Server   1.   Create a folder to store the app mkdir /etc/rtsp-server cd /etc/rtsp-server   2.  Downloa...