Quote of the Day Web Part, Reprised – Part 2

, , ,

[Via EndUserSharePoint.com] In the previous article we’ve discussed all the different ingredients of the Quote of the Day Web Part. Additionally we have created the basics to retrieve quotes from a list and display them on the page. In Part 2 of the article I revise the mechanism for retrieving random quote of the day.

Check out the full article Quote of the Day Web Part, Reprise – Part 2 at EndUserSharePoint.com.


Possibly related posts

15 Responses to “Quote of the Day Web Part, Reprised – Part 2”

  1. Jeff Dalton Says:

    The quote of the day stuff works great, however if the list is large (365 entries) the list view shows all the items very quickly before getting transformed by the code down to a single item. Changing the view limits the entries being selected. Thoughts? Thanks in advance!

  2. Waldek Mastykarz Says:

    @Jeff: unfortunately that's the downside of using a List View Web Part for it. Another approach, that would be more suitable for lists with many items, would be to use SharePoint Web Services to retrieve the random quote. It would be more complex though.

  3. Jeff Dalton Says:

    Thanks for getting back to me, Waldek! I figured that was the case and I was stuck if I wanted to keep it simple.

  4. Waldek Mastykarz Says:

    @Jeff: No problem. I hope my answer will help you make the choice.

  5. Dan Says:

    Waldek – the jquerry source in this dwp give a pw challege:

    (taken from the EUSP dwp download "quote of the day")

    Is there another one to call (that doesn't have a password challenge?)

  6. Dan Says:

    (thanks!)

  7. Waldek Mastykarz Says:

    @Dan: Do you mean registering at the EUSP.com site to download the WP?

  8. Barbara Stroud Says:

    Waldek,

    I recently purchased the book SharePoint 2010 at Work and wanted to use your Quote of the Day Web Part. The book's publisher provided me with the code you have in the book, but it doesn't work for me. I followed your steps for naming the list, web part etc. and added the code in the HTML section of the CEWP but no luck. All I get is the message than "An error has occured while loading Quote of the Day."

    I couldn't see where I might have to edit the code for my environment. Is there something else I should be doing? While I am not a developer nor can I code, I do a lot of work in SP2010 frontend using code snippets so I can do some modification if needed. Any help you could provide would be wonderful.

  9. Waldek Mastykarz Says:

    @Barbara: Sorry to hear that the code sample didn't work for you. Which version are you referring to: the one that uses customization or the one that uses a Sandboxed Solution?

  10. Barbara Stroud Says:

    Waldek, the code I used came from O'Reilly Publishing's site for code with the book SharePoint 2010 at Work. It is supposed to be the first documented code of Chapter 6 and was posted as a text file. Do I need to customize it somehow to my site? Thanks for helping.

    Regards,

    Barbara

  11. Waldek Mastykarz Says:

    @Barbara: If we're talking about the same script then almost at the very end there is the following line:

    Mavention.QuoteOfTheDay.displayQuote('/', 'Quotes',

    The first parameter of the displayQuote function is a server-relative URL of the site where the Quotes list is stored and the second parameter is the name of the Quotes list. If you have created the Quotes list under a different name or in a location other than the Root Web you would need to modify those parameters.

  12. Barbara Stroud Says:

    Waldek, so I think you are saying that if my URL to the list is http://XXXXX/projects/clientcentricity/Lists/Quotes/AllItems.aspx (XXXXX being the name of the server), I would replace '/' with '/projects/clientcentricity/Lists/'. I tried that but got the same error message. Do I have the paramater wrong? So sorry if I'm misunderstanding. This is not really my forte. Appreciate the help.

  13. Waldek Mastykarz Says:

    @Barbara: You've got it almost right. The URL should be '/projects/cliencentricity' without /Lists. Let me know if it helps.

  14. Barbara Stroud Says:

    Perfect, Waldek. We are now all anxiously waiting to see which quote will show up tomorrow. Thanks so much for your help.

  15. Waldek Mastykarz Says:

    Great to hear it's working :)

Leave a Reply

Security Code:

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS
Copyright © 2007 - 2012 Waldek Mastykarz

Creative Commons License