Custom announcment board in Sharepoint 2007 - sharepoint

First off, please bear with me. My question concerns more specifically with custom lists, custom code inside Sharepoint 2007. My experience is more with applications that work outside but access data (Client Object Model) in Sharepoint 2010.
At work I was recently tasked with the following request:
Create a custom announcement board where everyone can create an announcement but only admins and creators can edit it.
The main list page was going to provide a summary of the details, title and an icon that depicts the type of announcement (gif of a baby if birth announcement).
Upon clicking on an announcement, a detailed page containing more detail of the announcement and up to 4 pictures will be displayed.
When entering data the pictures can only be a maximum size.
Here is how I was going to attack this. I was going to create a Custom List that allowed for the addition of Picture columns and all the other columns I required. I would then modify the NewForm, EditForm and DispForm pages to meet our requirements. Picture size would be controlled through Javascript of Jquery on the page. My question to you experts out there is does this sound feasible? Is there a better way?
Thank you for any help

I wouldn't edit the list forms - not in this case at least. One way you could build this would be as a publishing site. You can create custom page layouts to suit the design of the announcements. There would be a bit of work to build it into a polished solution. Depends on how far you want to go.

Related

SharePoint 2013 KnockoutJS Lookup columns

I have a basic knockoutjs project loading data from a SharePoint 2013 list scenario. Getting data and displaying data is easy, the problem that I'm running into is on the edit mode displaying the proper control. Everything should not be a textbox. This means the people picker control to dropdownmenus to calendar controls.
MSFT has some pretty good documentation on using the client side people picker control here"http://msdn.microsoft.com/en-us/library/office/jj713593.aspx
The problem that I have is calling this control inside my viewmodel.
Setting the value of the control doesn't look difficult courtesy of this blog post: http://www.sharepointcolumn.com/sp2013-setting-people-picker-value-in-newform-aspx/
I attempted to looking into computed values, but that doesn't seem to work. Does anyone have a blog post that I skipped over? The closest related post that I can find: http://yetanothersharepointblog.wordpress.com/2012/12/11/working-with-sharepoint-lookup-columns-in-knockout-js/
Lastly since it seems that I'm the only one doing this, does anyone think that I should not be reinventing the wheel with my forms and should just link each item to the appropriate SharePoint list item in edit or display view? I suppose that would be easier.
From a SharePoint Professional to another, I would highly recommend you to do that.
Just redirect the user to the item edit/display item page an let SharePoint take the leash of how to handle UI form elements.
Because, assume that you implement your custom form, what if the user decides to add one more site column to the list? Will you update your code to support another field?
From my personal experience with the beast I've come to the conclusion that structural implementation over already existent functionality tends to go wrong.
Also, if you have some kind of listing of items custom made and you want to provide editing, try to do something opening a pretty SP.UI.ModalDialog, its elegant and you use the sharepoint to do the work for you.
But it's just an advise.

A minimal code webpart that displays a single picked item from a list

I'm not sure this is possible, but figured I´d give it a shot. First a few pre-requeistes and environment details:
I´m using SharePoint 2010, SharePoint
Designer 2010, VS 2010
I want to create as little code as
possible, preferably, create it all via UI or Designer
use out of the box components as much
as possible
Here is What I want to do:
Have a custom list with custom columns (easy part)
Create a webpart with an edit interface to select a single item from this list
This same webpart when visible would display the contents of this selected item in a given layout
I know I can do this creating a custom web part and code it all from scratch, I guess my main question is, is there a way to do this with less code and more out of the box components in SP2010. If not, I guess I'm left with lots of C# code.
Any tips, or pointers in this direction will be most welcome. Thanks in advance.
I think what you're looking for is the Data Form Web Part.
Unfortunately, I can't find any good tutorials for 2010, but hopefully the steps should be similar to setting it up in 2007.
Thanks all for the update. In the end, i had to create quite a bit of code to get this to work:
created a web part that enumerates
the content type,
creates a light box that has a picker
then stores the ID of the content in a column
Not the easiest way,but the only way I could get it working. Thanks again!

Sharepoint Branding

I'm just tasked by my boss to create a Sharepoint solution for the scenerio below.
(I'm a total newbie to Sharepoint. So please forgive me if i use the terminology wrong)
The portal should open in a custom look than the default Sharepoint design and it should have links to the products. Every product page should have different look and feel but have same types of content. For example every product should have Published Materials list but with different set of content.
So, an example of the desired map is like this:
/Home
-Latest News
-Core Team List
-Products
-Product 1
-Product 2
-Product 3
I found Sharepoint a whole new and strange world. I thought i'm good at learning, until i met Sharepoint. Everything seems very detailed and i'm living difficulties in finding useful information quickly. Because i have no Sharepoint background and i don't event know what i'm lookin' for.
Could you please help me by telling me how can i accomplish this or even just telling me the name of "thing" that i'm trying to accomplish.
Thank you in advance.
PS. Oh, by the way, I learned the word Branding in my search for the holy grail. I don't even know that the word fits or not...
I did try the method you post on other page (Restaurant review site in SharePoint) but unfortunately i couldn't succeed. I stucked at choosing what type of content type in the "Create Content Type" page at first and then tried some parent types but i couldn't get it show up in Sharepoint Designer 2007's New Sharepoint Content "Publishing Page" dialog.
So i tried something else.
At my homepage created a new Document Library of type "Web Part Page" called "Products". It created me a some sort of list whose all items are web pages. At this point i felt that i'm near to accomplish something at last.
Here are some questions i've collected: :)
I add two Announcements web part to different "Products" pages. When I add a new announcement to the list from one product page, it shows up in the other one too! How can I make their content only visible in page that the content created on?
*[Theming is a recurring theme in my posts]* Is it possible to change the view of each Product page at this setup so they have different design and color?
Thanks.
Check out the links I posted in the answer to this question for some links to SharePoint 101 tutorials online:
Restaurant review site in SharePoint
Given you're looking for 'branding' that will mean a custom Master Page. A Master Page is what will determine the overall layout of your SharePoint Web Application's pages. After creating a standard SharePoint application, connect with SharePoint Designer and play with that Master Page for a while until you get the hang of it.
In modifying or creating custom Master Pages, it is important to take note of all the controls (special ASP.NET server-side tags) in particular Content Place Holders; if you create your own Master Page and these are missing you're in a world of uninformative-error-message hurt.
You're going to want to create Lists ( http://office.microsoft.com/en-us/sharepointtechnology/HA011199881033.aspx ) to represent 'News' and 'Products'... for Products you may even want to create a Content Type.
Once you create 'News' and 'Products' lists, to see those lists of Products you'll want to make views and use List View Web Parts ( http://office.microsoft.com/en-us/help/HA100240521033.aspx ) to include those views in Pages... but at the subject of Web Parts this is probably getting a bit overwhelming so I'll stop here. Comment me if you'd like more.
Addendum
"Is is possible to show only categories of a document library in home page and documents of the selected category in another page?"
-> Yes, and there are several ways. I'd suggest you look into either defining a View for that list which filters based on the category field, then add List View Web Parts to your home page, or writing custom XSLT for the Content Query Web Part, and then add it to your home page. Writing the XSLT for he Content Query web part is a little more difficult, but using the List View has it's short comings in being not-as-configurable, much like this guy is finding out: No-code solution for calendar view of SharePoint news items
"But how can i change a list item to show its details as a whole new page with its own web parts and theme?"
-> Here's the kicker; in SharePoint, each Site you create has a special list for Pages, and each Page actually belongs to a Content Type.
So you can take any content type and turn it into a page; all you have to do is create a Page Layout for it, and add that Content Type to the list.
(So, an example. This is purely speculative; I'm not saying do this specifically, and you probably can't do it exactly as I describe it as I'm oversimplifying a little)
You create a Content Type 'Product', but you also decide 'Category' should be a Content Type too. So you create a content type for 'Catagory', and you give it a lookup column, which refers to items in the 'Product' List. You specify that the lookup can contain multiple items.
Now you want a Page where people can see a category, and all the Products which belong to it. You create a 'Page Layout' (an aspx file) for the 'Catagory' Content Type. In the Page Layout aspx file you can include web controls which render the Catagory's fields, such as 'title' and 'description' and you can probably even add one to render the 'Products' lookup field. (maybe you'll have to code it yourself)
I hope I haven't lost you.
Now that you've created a Page Layout for 'Catagory' you can add 'Catagory' to the Pages list/library and then create pages which represent Catagories, and when people edit those pages, they will also edit the Catagory.
More Addendum
If "Announcements" is a list, the web part you added was a list view web part, and so it just shows the contents of the list (which is independent of the product pages)
You'll want o specify filters of your view. I dunno if you can specify unique filters on the web part... but you can try :)
You might want to consider looking into The Content Query Web Part.
I don't fully understand your second question, but I get the feeling the answer is yes... what do you mean by "view"? You gotta be careful with the lingo; do you mean the Page Layout? or the List View Web Part? or the List View? or the Master Page? ...
you HAVE to check out Heather Solomon. She is the shiznat when it comes to sharepoint branding.
A good start would be using Sharepoint Designer.
Use SharePoint Designer to do your CSS work, particularly in discovering the CSS rules in play. DO NOT publish the finished work from SD; if you do, future Windows Updates may wipe out your files. Instead, deploy your customizations as a Feature. In MOSS 2007, you can add a single custom CSS file using Central Admin - this will then be applied AFTER core.CSS at runtime, To the best of my knowledge, this is the only practical way of doing this.
You need to indicate whether you are using WSS or MOSS. With WSS, you can use themes.

How to tie a dropdown list to a gridview in Sharepoint 2007?

This should be a really really simple thing, but for some reason it is just eluding me.
I want a Sharepoint page which will have a drop down list that is tied to a database lookup table.
When an item is selected and they click a GO button, I want it to update a gridview that is also on the page.
I'm looking for a simple how to - while assuming I'm a sharepoint idiot. BTW, I am using the Microsoft Office Sharepoint Designer.
Thanks,
Edit:
My need is actually very simple. I want to filter the results of a query using a drop down list. This used to be called a master - detail relationship.
For example, my regular data has school name, application name, and how long the application was running. Because there could be a hundred applications per school and there are 60+ schools, I only want to show one schools information at a time.
So, I want to put a drop down list at the top of the screen which contains the list of schools. When one is selected, the gridview should be updated to reflect the new schools information.
Chris.
I currently use a drop down tied to one sharepoint list to filter a dataview of another sharepoint List.
The instructions are here:
http://blogs.msdn.com/sharepointdesigner/archive/2007/03/05/asp-net-controls-filter-the-data-view.aspx
I'm not exactly sure of the specific needs here, but it seems that you are trying to stretch a bit beyond what Sharepoint Designer is well suited to. To look up data, you do have access via the dataview web part, which is here:
http://office.microsoft.com/en-us/sharepointdesigner/HA100948041033.aspx
However your filtering needs may prevent you from using this. If you want to do it .net without knowing too much about MOSS, you can use the "son of smartpart" (google it) which allows you to host standard .net user controls in webparts.
Hope this helps!

How can commenting be added to news articles in an existing Sharepoint 2007 news site?

A client is asking to incorporate commenting on their news articles. They're using the Sharepoint news site template for their news publishing, etc. They want a simple commenting system, much like what is available on most blog engines, only they want it at the bottom of each news article.
I just thought I would ask around about an out of the box solution before I go quoting a custom dev solution. Thanks in advance!
I struggled with this a while back and the solution we found was to use a discussion borad list (out of the box) and we created a custom web part that we added to the page layout for news.
We had to do som trickery to add support for anonymous comments, but on the whole it works good and wasen't to much code.
The Community Kit for SharePoint does the whole commenting thing for blogs.
you may have to cut out the commenting part of it to get it to work with your news section however.
The commenting section of the Enhanced Blog Edition of CKS does to approval of comments and spam checking.
I had the same request. I didn't find an existing solution, so I did it by copying from the standard Blog site template, plus custom coding.
From the template: Copy the definition for the blog comments list. Remove the lookup fields, and use a feature to create the list on all publishing sites.
Custom code: Add a feature receiver to the comments feature, and use it to add the lookup fields for page id and title, (using the pages list as destination). This needs to be done in code because you can't configure the destination list for lookup fields in XML, (or at least I don't know how).
Write controls for querying the comments list and adding to it, and place on the page layout.
Simpler approach: Don't use the standard blog comments list, just create your own, where the page reference is just a number and not a lookup field. Pro: Less work. Con: You miss out on the views that come with the standard list.

Resources