Re: [PHP] latest posts help

2011-02-06 Thread Ashley Sheridan
"Michael Simiyu"  wrote:

>hello , am working on showing the last 3 posts showed on a message
>board ( bitweaver ) and i would like to know what to add on the below
>line of code to show the last 3 this is what i have that shows the
>last post
>
>Code:
>{$board.last.title|default:"Post..."|truncate:40}
>a>
>
>
>what should i add to the code above to pull the last 3 posts so i
>could have it like this... (the code below just shows the latest in a
>list format )
>
>Code:
>{if !empty($board.last)}
>» {$board.last.title|default:"Post..."|truncate:40}
>a>
>
> » title="{$board.last.title|default:"Post..."}">{$board.last.title|
>default:"Post..."|truncate:40}
>
> » title="{$board.last.title|default:"Post..."}">{$board.last.title|
>default:"Post..."|truncate:40}
>
> {/if}
>
>
>
>Best Regards
>Michael S.

This is a php list, so we can only really answer questions about php. That code 
looks like a smarty template (although correct me if I'm wrong) while smarty is 
written in php, they are not the same thing.


Thanks
Ash
http://www.ashleysheridan.co.uk
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] latest posts help

2011-02-06 Thread Michael Simiyu
hello , am working on showing the last 3 posts showed on a message  
board ( bitweaver ) and i would like to know what to add on the below  
line of code to show the last 3 this is what i have that shows the  
last post


Code:
{$board.last.title|default:"Post..."|truncate:40}a>



what should i add to the code above to pull the last 3 posts so i  
could have it like this... (the code below just shows the latest in a  
list format )


Code:
{if !empty($board.last)}
» {$board.last.title|default:"Post..."|truncate:40}a>

   
» title="{$board.last.title|default:"Post..."}">{$board.last.title| 
default:"Post..."|truncate:40}

   
» title="{$board.last.title|default:"Post..."}">{$board.last.title| 
default:"Post..."|truncate:40}

   
{/if}



Best Regards
Michael S.