School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 300,481 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,775 people online right now. Registration is fast and FREE... Join Now!




Creating a 'Read More of This Post' link to my blogspot posts.

 

Creating a 'Read More of This Post' link to my blogspot posts.

papuccino1

19 Apr, 2009 - 05:06 PM
Post #1

C# Programmer
Group Icon

Joined: 2 Mar, 2008
Posts: 943



Thanked: 33 times
Dream Kudos: 50
My Contributions
Hey guys, this is my first post here in the Blogging section of the site. I was wondering if it was possible to create a 'Read More' link to every post I make.

I write pretty long posts and I don't want every single post to show up at the home page.

Here's my site so you can see why I need this option for my blog.

My Blog

Thank you biggrin.gif

User is offlineProfile CardPM
+Quote Post


SixOfEleven

RE: Creating A 'Read More Of This Post' Link To My Blogspot Posts.

1 May, 2009 - 07:55 AM
Post #2

Code Guru
Group Icon

Joined: 18 Oct, 2008
Posts: 2,910



Thanked: 165 times
Dream Kudos: 725
Expert In: C, C#, XNA, Game Programming, Programming Concepts

My Contributions
QUOTE(papuccino1 @ 19 Apr, 2009 - 05:06 PM) *

Hey guys, this is my first post here in the Blogging section of the site. I was wondering if it was possible to create a 'Read More' link to every post I make.

I write pretty long posts and I don't want every single post to show up at the home page.

Here's my site so you can see why I need this option for my blog.

My Blog

Thank you biggrin.gif


I do it all the time on my blog. I write an intro to the tutorial and post a link to the actual tutorial. I have a website and use the:

*edit*
I go to the HTML view, you could just use the link button.

CODE

<a href="http://www.domain.com/index.html>Link</a>


What you could do is find a free hosting service, if you don't have hosting, create web pages there and use the link to send your readers to the pages. Hope that helps. smile.gif

*edit*
I went to your blog, didn't understand anything but the code. tongue.gif I had a slight problem having the code come out nice too, no spacing and lines would wrap over unpredictably.

This post has been edited by SixOfEleven: 1 May, 2009 - 08:04 AM
User is offlineProfile CardPM
+Quote Post

PsychoCoder

RE: Creating A 'Read More Of This Post' Link To My Blogspot Posts.

1 May, 2009 - 08:20 AM
Post #3

Dyslexics Untie!
Group Icon

Joined: 26 Jul, 2007
Posts: 14,714



Thanked: 501 times
Dream Kudos: 11450
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net, jQuery

My Contributions
If you're working with PHP you can create a function that truncates the length (that you provide, or use a default value). Here's an example of accomplishing this

CODE

/*  
** Function for truncating text and adding trailing characters
** default characters is the ellipse (...) but can be whatever the
** user chooses. The default length is 75 characters but the
** user can change that as well. The function has 3 parameters:
**
** $textToTruncate - The text we wish to truncate
** $truncLen - Maximum length we want the text to be  
** $truncateChars - characters to append to end of truncated text
                  (default is the ellipse)
*/  

function truncateText($textToTruncate, $maxLength = 75, $trailingChars='...')  
{
    $maxLength -= mb_strlen($trailingChars);  
    
    if (mb_strlen($textToTruncate)> $maxLength)  
    {  
       //Since we're here then the text is longer than
       //the maximum length we wish to allow so we need
       //to truncate the text and add the truncate characters
       return mb_substr($textToTruncate,0,$maxLength).$trailingChars;  
    }  
    else  
    {
       // string was already short enough, return the string  
       $truncatedText = $textToTruncate;  
    }

    //return the truncated text
    return $truncatedText;
}


Hope this helps smile.gif
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/8/09 03:59AM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month