The following warnings occurred:
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message



GetSimple Support Forum
Front page Teasers - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Feature Requests (http://get-simple.info/forums/forumdisplay.php?fid=7)
+--- Thread: Front page Teasers (/showthread.php?tid=611)



Front page Teasers - ubuntulistener - 2010-04-02

A teaser implementation for the front page?


Front page Teasers - Zegnåt - 2010-04-02

Exactly what do you mean by teaser?

You can already give the front page a completely different design by putting an extra template file in your theme folder and choosing this one for the index. This is how the official GetSimple website offers a different front page too.


Front page Teasers - ubuntulistener - 2010-04-03

Zegnåt Wrote:Exactly what do you mean by teaser?

You can already give the front page a completely different design by putting an extra template file in your theme folder and choosing this one for the index. This is how the official GetSimple website offers a different front page too.


Hiya Zegnat -- teaser are short excerpts of new posts. - Usually the title and the first sentence or paragraph of an article.

You've probably tried Drupal or WordPress or similar CMS, in which, when you create a new page/post, one of the options is to split the body of the article at any given point and post the the title and 'excerpt' on the front page of the installation/site, so that when you create a new page, not only is a new page.xml file created, but the front-page get updated/concatenated to include the excerpt with a link to the full article.


Front page Teasers - Zegnåt - 2010-04-03

Aa, now I get it.

Well, you’ll need to query all pages the way you would build a menu. Instead of just reading the information for a menu you’ll also make your script read the description field in which you have written a teaser. Then output that data in the form of a list.

Though this wouldn’t be so hard, there is no script for it released at the moment (as far as I know).


Front page Teasers - n00dles101 - 2010-04-03

I have one implememted on my site

Http://www.digimute.com

rebuilding my laptop at the mo, will post when i'm doNe

mike


Front page Teasers - n00dles101 - 2010-04-07

yeah forget that, I'm using texTile for editing...

I'm adding a random string to pages that I want to print a teaser for , in my case "[***]"

When printing out the page I see if this string exists, if it does I print everything up to the string followed by a link to the full page. I also have fancy URLs turned off...

Code:
echo stripslashes(substr($page['content'],0,strpos($page['content'],"[***]")));
echo "<a href=\"index.php?type=blog&amp;id=".$page['url']."\">Read More....</a>";

When printing the full page I retrieve the full page, and remove the string before echoing.

Code:
if ($_GET['type']=="blog"){
    $content= str_replace("[***]","",$content);
    echo $content;
    }


Simple and no changes need to the backend...

Mike,.,,,


Front page Teasers - ccagle8 - 2010-04-18

I just added a new function to GS called get_page_excerpt($length, $html);

$length = the amount of characters you want in your excerpt. Default = 200
$html = should html be shown or stripped out? Default = FALSE (html is stripped)

This will be part of GS 2.02


Front page Teasers - ubuntulistener - 2010-04-21

ccagle8 Wrote:I just added a new function to GS called get_page_excerpt($length, $html);

$length = the amount of characters you want in your excerpt. Default = 200
$html = should html be shown or stripped out? Default = FALSE (html is stripped)

This will be part of GS 2.02


Great!


Front page Teasers - hansvries - 2010-08-15

for those who didn't upgraded to 2.02 i'm using this function in theme_functions.php:
Code:
function get_short_content($page){  
        $path = "data/pages";
        $thisfile = @file_get_contents('data/pages/'.$page.'.xml');
        $data = simplexml_load_string($thisfile);
        echo '<p>';
        echo '<b>';
        echo stripslashes(htmlspecialchars_decode($data->title, ENT_QUOTES));
        echo '</b></p><p>'   ;
        echo substr((stripslashes(htmlspecialchars_decode($data->content, ENT_QUOTES))),0,350);;
        echo '.............</p><p>' ;
        echo '<a href="index.php?id='.$page.'">Read more</a></p>' ;
}

and then call in your template or component

Code:
<?php get_short_content('pagetitle');?>

Cheers