 |
|
 |
hi:
I read about your article ,it is really fantastic!now i got a question ,how can I intergret a activex in a webaprt?
thank you
|
|
|
|
 |
|
 |
In this code i want to display poster image instead of black screen.
Can any one help?
|
|
|
|
 |
|
|
 |
|
 |
Only the site admins can see the web part....please help....this is a great piece of coding and I hope that I am using it correctly....thanks in advance for any assistance.
|
|
|
|
 |
|
 |
First I'm so sorry for all people whom were asking before, since I was so busy for the whole year, i did not have the time to review their requests.
regarding the flash size be sure you've put the suitable width an height for flash in th FlashInfo category, and leave the width & height of the web part empty (the default properties in the layout ).
and for the second issue I guess they don't have read access on document library
hope that helps
|
|
|
|
 |
|
 |
I managed to remedy the sizing issue, but I still have the issue of only Admins being able to see the web part even if every other group or person has full control on the site.
|
|
|
|
 |
|
 |
Never mind...answered my own question....must remember to upload the files to a list that everyone has read access to....DoH!!!
|
|
|
|
 |
|
 |
I am running the code for WSS 3.0 and it works fine, but the Flash animation only fill about half of web part, no matter how big or small I specify the web part to be. Any ideas??
|
|
|
|
 |
|
 |
Webparts that are made for WSS 3.0/MOSS 2007 should derive from the System.Web.UI.WebControls.WebParts.WebPart class. WSS 3.0 only includes the Web Part class Microsoft.SharePoint.WebPartPages.WebPart for backwards compatibility purposes, and this should be used only when migrating existing code from WSS 2.0. I have taken the liberty to rewrite the webpart to work with the right WebPart class. using System; using System.Web; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.ComponentModel;
namespace FlashWebPart { public class FlashWebPart : WebPart { private int flashWidth; private int flashHeight; private string flashUrl; [Personalizable(PersonalizationScope.Shared), WebBrowsable(true), WebDisplayName("Width"), WebDescription("Width of the flash"), Category("Configuration")] public int FlashWidth { get { return flashWidth; } set { flashWidth = value; } } [Personalizable(PersonalizationScope.Shared), WebBrowsable(true), WebDisplayName("Height"), WebDescription("Height of the flash"), Category("Configuration")] public int FlashHeight { get { return flashHeight; } set { flashHeight = value; } } [Personalizable(PersonalizationScope.Shared), WebBrowsable(true), WebDisplayName("URL"), WebDescription("Url of the flash file"), Category("Configuration")] public string FlashUrl { get { return flashUrl; } set { flashUrl = value; } } protected override void Render(HtmlTextWriter writer) { if (!String.IsNullOrEmpty(FlashUrl)) { string outHTML = "<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" " + "codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,12,36\" " + "WIDTH=" + flashWidth + " HEIGHT=" + flashHeight + "> " + "<PARAM NAME=movie VALUE=\"" + flashUrl + "\"> " + "<PARAM NAME=WMODE VALUE=\"Transparent\">" + "<PARAM NAME=quality VALUE=high> " + "<EMBED src=\"" + flashUrl + "\" quality=high wmode=\"transparent\" WIDTH=\"" + flashWidth + "\" HEIGHT=\"" + flashHeight + "\" TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\"></EMBED> " + "</OBJECT>"; writer.Write(outHTML); } else { writer.Write("Modify Webpart to add content URL"); } } } }
|
|
|
|
 |
|
 |
I am new to Sharepoint and can't get a very simple embed statement to work. I am attempting to prototype using a web content web part. I have a swf that I pass paramters to in this fashion: <embed src="http://whatever/jim/SWF/Gallery.swf?Path='http://whatever/jim/SWF/images.xml'" width="400" height="400" /> If I hard code the location of the xml file into the swf and don't use the Query string as below it works fine: <embed src="http://whatever/jim/SWF/Gallery.swf" width="400" height="400" > As soon as I add the query string to pass the path of the xml file the swf loads and doesn't find the xml file. I've verified that my embed statement is correct by using it inside a standard html file on the share point server. The issue is once I'm inside the web content web part. Any help on this would be appreciated. Thanks, Jim
|
|
|
|
 |
|
 |
Dear Mahdi
this is great and thank you for that,
do you have any idea about adding this web part functionality to the CQWP or to the RichHtmlEditor of the page layout?
i think it will be great
best regards
|
|
|
|
 |
|
 |
This looks like something that would be VERY useful, but unfortunately we're running WSS v3.0 (not MOSS).
Any ideas on running this or an alternative in WSS v3?
Thanks!
|
|
|
|
 |
|
 |
the same code is working for WSS 3.0, just replace XML in "*.webpart" file as described in the second comment reply
|
|
|
|
 |
|
 |
When I try to deploy this code in visual studio 2005,
this message is shown : "Error'FlashWebPart.FlashWebPart' does not contain a definition for 'ExportMode..."
But when I change the inheritance Microsoft.SharePoint.WebPartPages.WebPart to
System.Web.UI.WebControls.WebParts.WebPart the code runs.
Why is it happenning?
|
|
|
|
 |
|
 |
Quote "I don't recommend this approach for many reasons"
Could you please give more arguments than editing HTML....
|
|
|
|
 |
|
 |
Is there a reason why you specified Port 80 for the Site Collection?
I've noticed that my Flash SWF never seems to load. Is there a special document library type or list type you need to store the SWF content in?
|
|
|
|
 |
|
 |
Hi tonyjo
I've specified Port 80 because this is my working environment, and never tried it using another port, you can store your flash file in a document library, just you need to set the right URL to this flash in URL property.
|
|
|
|
 |
|
 |
Hello Mahdi,
I used your code for creating the webpart and after deploying the webpart appears at the sharepointservices butI can not get in the swf-url. I miss the category 'flashInfo' like shown in your screenshoot. What is my mistake? Thanks a lot.
|
|
|
|
 |
|
 |
Dear Gertrud2,
I hope you are doing well,
be sure that you've inherited the right class as the following:
[Guid("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")]
[XmlRoot(Namespace = "FlashWebPart")]
public class FlashWebPart : Microsoft.SharePoint.WebPartPages.WebPart
because the above class is not the default class when you create new web part project.
by the way, some people told me that sharepoint refused XML of the ".webpart" file when they defined the XMLRoot Namespace, to solve this problem also; locate the ".webpart" file in the following path:
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\FlashWebPart_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
and replace the XML according to the following template:
<?xml version="1.0"?>
<WebPart xmlns="http://schemas.microsoft.com/WebPart/v2">
<Assembly>AssemblyName(with no .dll extension),
Version=VersionNumber, Culture=Culture,
PublicKeyToken=PublicKeyToken</Assembly>
<TypeName>WebPartNamespace.WebPartClassName</TypeName>
<Title>DefaultWebPartTitle</Title>
<Description>WebPartDescription</Description>
</WebPart>
|
|
|
|
 |
|
 |
Thanks a lot. That's it. Great!
|
|
|
|
 |
|
|
 |
|
 |
Dear Mahdi,
Asalam,
If i build the Solution i got created two xml file in
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\FlashWebPart_xxxx
folder that is elementManifest.xml and feature.xml,
In which file can i place your code. could you explain me detail.
Without [XmlRoot(Namespace = "FlashWebPart")] its deployed successfully but
i can't able to get "Flash Info" in webpart property.
Waiting for your reply soon
thanks
jerald
|
|
|
|
 |
|
 |
Dear Jerald,
you should replace the template of the ".webpart" file,(i.e: FlashWebPart.webpart)
unfortunately, due to unknown reasons you won't get any new property viewable without [XmlRoot(Namespace = "FlashWebPart")], but I think this problem will be fixed later.
|
|
|
|
 |
|
 |
This will help a lot. Thank you
|
|
|
|
 |
|
 |
You're welcome !!
Mahdi Abdulhamid
http://www.devexpert.net
|
|
|
|
 |