tag:blogger.com,1999:blog-12044784.post115116921314313119..comments2024-03-27T19:16:37.461-07:00Comments on Food Blog S'cool: Expandable post summariesSamhttp://www.blogger.com/profile/07081680210434938456noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-12044784.post-1151672827470970682006-06-30T06:07:00.000-07:002006-06-30T06:07:00.000-07:00Woops, sorry Fahara, I just saw I forgot to copy t...Woops, sorry Fahara, I just saw I forgot to copy those lines of code, incidently, mine is a bit different, but regardless, glad it worked out for you:<BR/><BR/><script type="text/javascript"><BR/>var memory = 0;<BR/>var number = 0;<BR/></script>Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-12044784.post-1151437270897014642006-06-27T12:41:00.000-07:002006-06-27T12:41:00.000-07:00Gerald,I got a computery minded friend to look at ...Gerald,<BR/><BR/>I got a computery minded friend to look at why your script didnt quite work (it really didn't - I double checked) it needed the following inserted into the < body> section in the style sheet to set the memory to zero:<BR/><BR/>< script type="text/javascript"><BR/>< !--<BR/>memory = 0;<BR/>--><BR/>< /script><BR/><BR/>I mention this purely for the use of other people who might need to replicate this effect!<BR/><BR/>Thanks for your help - I have it sorted now :DFahara.https://www.blogger.com/profile/07885924719852143491noreply@blogger.comtag:blogger.com,1999:blog-12044784.post-1151240554807201132006-06-25T06:02:00.000-07:002006-06-25T06:02:00.000-07:00Fahara,The second chunk of code (after "Add this a...Fahara,<BR/><BR/>The second chunk of code (after "Add this after BlogItemBody) is what will automatically create that link for you in each post if there is an expandable part to it. If there is no expandable part to the post, this script will know not to show the "continue reading" link.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-12044784.post-1151229169500486182006-06-25T02:52:00.000-07:002006-06-25T02:52:00.000-07:00Hi Gerald, thanks for the advice, I tried it on my...Hi Gerald, thanks for the advice, I tried it on my style sheet (had to change the script type to "text/css" though, and it sorta works, but I need the script to create a 'click here to read fullpost' link as a footer in the post, I don't want to have to create a brand new link for the bottom of each post linking to the full article - I know it's possible cos I've done it before, any thoughts?Fahara.https://www.blogger.com/profile/07885924719852143491noreply@blogger.comtag:blogger.com,1999:blog-12044784.post-1151173414593838282006-06-24T11:23:00.000-07:002006-06-24T11:23:00.000-07:00Here is what you do for blogger:Add this to your s...Here is what you do for blogger:<BR/><BR/><B>Add this to your styles section:</B><BR/><BR/><MainOrArchivePage><BR/> span.fullpost {display:none;}<BR/></MainOrArchivePage><BR/><BR/><ItemPage><BR/> span.fullpost {display:inline;} <BR/></ItemPage><BR/><BR/><BR/><B>Add this after <$BlogItemBody$></B><BR/><BR/><MainOrArchivePage><BR/><script type="text/javascript"><BR/>spans = document.getElementsByTagName('span');<BR/>number = 0;<BR/>for(i=0; i < spans.length; i++){<BR/>var c = " " + spans[i].className + " ";<BR/> if (c.indexOf("fullpost") != -1) {<BR/> number++;<BR/> }<BR/>}<BR/>if(number != memory){<BR/> document.write("<a class='read-more-link' href='<$BlogItemPermalinkUrl$>#more'>Continue reading '<$BlogItemTitle$>'</a><br>");<BR/>}<BR/><BR/>memory = number;<BR/></script><BR/></MainOrArchivePage><BR/><BR/><B>Add this to your post template:</B><BR/><BR/><span class="fullpost"><a id="more"></a><BR/><BR/></span><BR/><BR/><BR/>When you post, everything before <span class="fullpost"> will appear on the index page and everything inside it will appear only on the post page.Anonymousnoreply@blogger.com