Comments on: Quote of the Day Web Part, Reprised – Part 1 http://www.endusersharepoint.com/2009/01/12/quote-of-the-day-web-part-reprised-part-1/ No GeekSpeak on SharePoint 2007 WSS and MOSS Thu, 07 Oct 2010 21:39:11 -0400 http://wordpress.org/?v=2.8.6 hourly 1 By: hpnotiqcrunk http://www.endusersharepoint.com/2009/01/12/quote-of-the-day-web-part-reprised-part-1/comment-page-1/#comment-13274 hpnotiqcrunk Fri, 29 May 2009 20:14:22 +0000 http://www.endusersharepoint.com/?p=1154#comment-13274 I'm using this webpart and it works great - my only concern is that it'll flash the list behind the scenes (very quickly) and then render the current 'Quote of the Day'. I loaded up a quick sample of five quotes and every page refresh - it'll flip then display. Any suggestions? I’m using this webpart and it works great – my only concern is that it’ll flash the list behind the scenes (very quickly) and then render the current ‘Quote of the Day’.

I loaded up a quick sample of five quotes and every page refresh – it’ll flip then display.

Any suggestions?

]]>
By: Sheetal http://www.endusersharepoint.com/2009/01/12/quote-of-the-day-web-part-reprised-part-1/comment-page-1/#comment-13048 Sheetal Fri, 22 May 2009 11:24:21 +0000 http://www.endusersharepoint.com/?p=1154#comment-13048 Thanks for the help AutoSponge. I tried it with 1.3.1 but it didn't work. It worked for 1.2.6 version of Jquery. Thanks for the help AutoSponge.

I tried it with 1.3.1 but it didn’t work. It worked for 1.2.6 version of Jquery.

]]>
By: AutoSponge http://www.endusersharepoint.com/2009/01/12/quote-of-the-day-web-part-reprised-part-1/comment-page-1/#comment-13037 AutoSponge Thu, 21 May 2009 23:26:14 +0000 http://www.endusersharepoint.com/?p=1154#comment-13037 @Sheetal, Actually, the problem is a bug in IE for jquery 1.3.2 using the :visibility filter (used in accordion left-nav). See if you can go down to 1.3.1 where :visibility still works in IE. @Sheetal,

Actually, the problem is a bug in IE for jquery 1.3.2 using the :visibility filter (used in accordion left-nav).

See if you can go down to 1.3.1 where :visibility still works in IE.

]]>
By: Sheetal http://www.endusersharepoint.com/2009/01/12/quote-of-the-day-web-part-reprised-part-1/comment-page-1/#comment-13019 Sheetal Thu, 21 May 2009 11:17:25 +0000 http://www.endusersharepoint.com/?p=1154#comment-13019 I have downloaded jquery-1.3.2.js and saved it in a document library. I referenced while using Quote of the Day Web Part which is working fine. On the same page i hav used the Accordin to Left Navigation example which stopped working when the above reference was given.Can you tell me what could be the problem? Is the Quotes Script is overwritting the Left NAvigation Script? Can anyone help me with this problem... I have downloaded jquery-1.3.2.js and saved it in a document library. I referenced while using Quote of the Day Web Part which is working fine. On the same page i hav used the Accordin to Left Navigation example which stopped working when the above reference was given.Can you tell me what could be the problem? Is the Quotes Script is overwritting the Left NAvigation Script? Can anyone help me with this problem…

]]>
By: Randy Williams (MVP) http://www.endusersharepoint.com/2009/01/12/quote-of-the-day-web-part-reprised-part-1/comment-page-1/#comment-12633 Randy Williams (MVP) Fri, 08 May 2009 01:29:14 +0000 http://www.endusersharepoint.com/?p=1154#comment-12633 Thanks Wally. This will come in very handy for one of my projects! Thanks Wally. This will come in very handy for one of my projects!

]]>
By: Toby http://www.endusersharepoint.com/2009/01/12/quote-of-the-day-web-part-reprised-part-1/comment-page-1/#comment-11685 Toby Tue, 31 Mar 2009 13:25:13 +0000 http://www.endusersharepoint.com/?p=1154#comment-11685 You're calling the randomByDay function! Change your code to call the random function described on this page. You’re calling the randomByDay function!
Change your code to call the random function described on this page.

]]>
By: Dhana http://www.endusersharepoint.com/2009/01/12/quote-of-the-day-web-part-reprised-part-1/comment-page-1/#comment-11679 Dhana Tue, 31 Mar 2009 04:20:36 +0000 http://www.endusersharepoint.com/?p=1154#comment-11679 Hi Toby, The code whic you have listed is working perfectly but problem which i face is making to display random quotes every refresh of the page,currently i quotes get changed one per day, which i want to display a new quote every refresh of the page, i followed the steps which you have mentioned but unable to make it work. Plz check the below code and provide me the updated code. blockquote p { font: italic bold 1.2em/1.2 "Calibri" , serif; } blockquote p.author { font: normal 0.8em/2 Calibri; color: #000000; text-align: left; } jQuery.fn.extend({ randomByDay: function() { var now = new Date(); return $(this[now.getFullDate() % this.length]); } }); Date.prototype.getFullDate = function() { var dateAsString = ""; dateAsString += this.getFullYear(); var month = this.getMonth() + 1; if (month < 10) { dateAsString += 0; } dateAsString += month; var day = this.getDate(); if (day < 10) { dateAsString += 0; } dateAsString += day; return parseInt(dateAsString); } 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('<blockquote>' + quote.text + '' + quote.author + '</blockquote>') } this.init = function() { var quotes = $(selector).not(":first"); quote.obj = quotes.randomByDay(); 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(); }); Hi Toby,

The code whic you have listed is working perfectly but problem which i face is making to display random quotes every refresh of the page,currently i quotes get changed one per day, which i want to display a new quote every refresh of the page, i followed the steps which you have mentioned but unable to make it work. Plz check the below code and provide me the updated code.

blockquote p
{
font: italic bold 1.2em/1.2 “Calibri” , serif;
}
blockquote p.author
{
font: normal 0.8em/2 Calibri;
color: #000000;
text-align: left;
}

jQuery.fn.extend({
randomByDay: function() {
var now = new Date();
return $(this[now.getFullDate() % this.length]);
}
});

Date.prototype.getFullDate = function() {
var dateAsString = “”;
dateAsString += this.getFullYear();
var month = this.getMonth() + 1;
if (month < 10) {
dateAsString += 0;
}

dateAsString += month;

var day = this.getDate();
if (day < 10) {
dateAsString += 0;
}

dateAsString += day;

return parseInt(dateAsString);
}

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(’

‘ + quote.text + ” + quote.author + ‘

‘)
}

this.init = function() {
var quotes = $(selector).not(”:first”);
quote.obj = quotes.randomByDay();
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();
});

]]>
By: Toby http://www.endusersharepoint.com/2009/01/12/quote-of-the-day-web-part-reprised-part-1/comment-page-1/#comment-11678 Toby Tue, 31 Mar 2009 02:13:20 +0000 http://www.endusersharepoint.com/?p=1154#comment-11678 Dhana, I got it working but a couple details will help if you're new to web parts. see comment #16 - there are 3 things you need to do, create the list as described above and name it "Quotes", put a view of that list on the web page and set the 1st column to be the text of the quote and the 2nd column to be the author name, put a Content Editor Web part on the page - this is where the script goes. good luck. Dhana,
I got it working but a couple details will help if you’re new to web parts.
see comment #16 – there are 3 things you need to do, create the list as described above and name it “Quotes”, put a view of that list on the web page and set the 1st column to be the text of the quote and the 2nd column to be the author name, put a Content Editor Web part on the page – this is where the script goes.
good luck.

]]>
By: Dhana http://www.endusersharepoint.com/2009/01/12/quote-of-the-day-web-part-reprised-part-1/comment-page-1/#comment-11649 Dhana Mon, 30 Mar 2009 10:53:32 +0000 http://www.endusersharepoint.com/?p=1154#comment-11649 Random Quotes part is not working even after adding the Code. can you please send me the screenshot of where to add the code to get random quotes on every reload of the page Random Quotes part is not working even after adding the Code. can you please send me the screenshot of where to add the code to get random quotes on every reload of the page

]]>
By: Toby http://www.endusersharepoint.com/2009/01/12/quote-of-the-day-web-part-reprised-part-1/comment-page-1/#comment-11123 Toby Wed, 04 Mar 2009 20:59:32 +0000 http://www.endusersharepoint.com/?p=1154#comment-11123 oops DL, DT, DD tags got eaten... but you get the idea. oops DL, DT, DD tags got eaten… but you get the idea.

]]>