[Via EndUserSharePoint.com] In March, Mark Miller of EndUserSharePoint.com (EUSP) has created a Quote of the Day web part. And while it has been downloaded and installed on many sites, it has one shortcoming: you had to edit the web part’s code to manage the quotes. Recently Mark asked me whether it would be possible to do something about it, to make the web part more end-user friendly.
I came up with an idea to base the Quote of the Day Web Part on the standard List View Web Part. Sounds interesting enough? Check out my article Quote of the Day Web Part, Reprised – Part 1 on EndUserSharePoint.com. For all of you who are subscribed to the EUSP Weekly Newsletter Mark Miller has a surprise.

















September 5th, 2009 at 6:27 pm
Sry for the trouble. But i am having a little bit of problem. I can't use your quote of the day web part as i can't import web part.
Is there an other way to have quote of the day without the web part, etc like using CEWP (jquery)?
Please assist.
I have already downloaded your web part.
September 5th, 2009 at 9:44 pm
@Francis: could you provide some more information about the issue you're experiencing while importing the Web Part?
As for an alternative: the above Web Part is a CEWP with jQuery
September 6th, 2009 at 5:32 am
Could you share the jQuery for this CEWP?
I can't use import Web Part function in Sharepoint as the permission for that is not given.
Thanks in advance.
September 6th, 2009 at 9:46 am
@Francis: the jQuery is inside the Web Part file. You can open it in Notepad and extract the jQuery from there.
September 6th, 2009 at 5:30 pm
Sorry but it still doesn't work.
This was what i did step by step:
1) Create List called "Quotes"
2) Have 2 columns, first "Quote", second "Author"
3) Add Web Part List: Quotes
4) Add Web Part CEWP and put in your source in source editor as below-mentioned:
var Imtech = Imtech || {};
Imtech.QuoteOfTheDay = function(listName) {
var selector = "table[class=ms-listviewtable][summary='" + listName + "'] > tbody > tr";
var quote = { text: null, author: null, obj: null };
var renderQuote = function() {
quote.obj.parents("table:first").parents("td:first").html('
')
}
this.init = function() {
var quotes = $(selector).not(":first");
quote.obj = $(quotes[0]);
quote.text = $("td:first", quote.obj).text();
quote.author = $("td:last", quote.obj).text();
renderQuote();
}
}
var quoteOfTheDay;
$(function() {
quoteOfTheDay = new Imtech.QuoteOfTheDay("Quotes");
quoteOfTheDay.init();
});
I cannot even see it replacing the Web Part List (Quotes) with first quote & its author.
I even tried to change the view to "Summary View" but with no effect.
Would appreciate for more assistance.
September 7th, 2009 at 3:11 am
I realised it is having the problem when i have your other image-slideshow jquery running in the same page.
http://blog.mastykarz.nl/images-slideshow-sharepoint-2007-jquery/
How can i get the the image-slideshow & quote of the day working together?
September 7th, 2009 at 7:17 am
@Francis: I'd suggest you try to debug the JavaScript to find out what's causing the problem. You can use Firebug for Firefox for that or Visual Studio for Internet Explorer. That should give you more idea of what the problem is and how to solve it.
September 7th, 2009 at 4:40 pm
Sorry i am not sure about debugging the JavaScript. But it happens when both slideshow & quote of the day is running from the same page. Only the slideshow is working but not the quote of the day. Could it be something in the coding. I use exactly your source.
February 17th, 2010 at 9:31 pm
Waldek,
Greetings! I am experiencing a similar problem as Francis. I have imported the Webpart, and also have attempted to create it from scratch by copying the code with no success. I have followed the instructions in the article word for word.
It seems that it may not "see" the Quotes List. To keep it simple, I used the same naming conventions. I figured once I got it to work, I'll figure out how to change the names.
Here is the code in Source Editor within teh Quotes Script webpart:
jQuery.fn.extend({
random: function() {
return $(this[Math.floor(Math.random() * this.length)]);
}
});
var Imtech = Imtech || {};
Imtech.QuoteOfTheDay = function(listName) {
var selector = "table[class=ms-listviewtable][summary='" + listName + "'] > tbody > tr";
var quote = { text: null, author: null, obj: null };
var renderQuote = function() {
quote.obj.parents("table:first").parents("td:first").html('
')
}
this.init = function() {
var quotes = $(selector).not(":first");
quote.obj = $(quotes[0]);
quote.text = $("td:first", quote.obj).text();
quote.author = $("td:last", quote.obj).text();
renderQuote();
}
}
var quoteOfTheDay;
$(function() {
quoteOfTheDay = new Imtech.QuoteOfTheDay("Quotes");
quoteOfTheDay.init();
});
Your help is most appreciated. Thank you!