Message Preview

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Message Preview

    hey i see this code alot a places and i think its kool but i cant seem to get it

    when u get a new PM and it looks like this

    $user $pmpreview
    username hi there.....

    any one can help me wit this?

    #2
    well im using subjects but im guessing its just a query alowing a certain number of letters.
    Creator of
    Epix.Mobi

    Keep an Eye on us Big things coming soon!!!!
    Need something for your site hit me up here

    http://coding-talk.com/forum/main-fo...r-your-wapsite

    Comment


      #3
      thats easy lol.. just output the subject conect next to the username lol.. intergrate it into ur existing is statement.
      Want something coded email me at sales@webnwaphost.com for a prices.




      Comment


        #4
        try using
        Code:
        echo substr("$messagevariable", 0, 20);
        this would return the first 20 letters simply change the number 20 to how many chars u want to display

        i justed tested and its working
        Last edited by Loony; 02.11.09, 19:13. Reason: aded code tags
        Creator of
        Epix.Mobi

        Keep an Eye on us Big things coming soon!!!!
        Need something for your site hit me up here

        http://coding-talk.com/forum/main-fo...r-your-wapsite

        Comment


          #5
          Code:
          function word_limiter($str, $n = 10, $end_char = '…')
          {
          	if (strlen($str) < $n)
          	{
          		return $str;
          	}
          	
          	$words = explode(' ', preg_replace("/\s+/", ' ', preg_replace("/(\r\n|\r|\n)/", " ", $str)));
          	
          	if (count($words) <= $n)
          	{
          		return $str;
          	}
          			
          	$str = '';
          	for ($i = 0; $i < $n; $i++)
          	{
          		$str .= $words[$i].' ';
          	}
          
          	return trim($str).$end_char;
          }
          will return 10 words as well
          Creator of
          Epix.Mobi

          Keep an Eye on us Big things coming soon!!!!
          Need something for your site hit me up here

          http://coding-talk.com/forum/main-fo...r-your-wapsite

          Comment


            #6
            all u need is there just look at the other lava function and you will figure it out
            Creator of
            Epix.Mobi

            Keep an Eye on us Big things coming soon!!!!
            Need something for your site hit me up here

            http://coding-talk.com/forum/main-fo...r-your-wapsite

            Comment

            Working...
            X