The following warnings occurred:
Warning [2] Undefined array key "threadviews_countguests" - Line: 745 - File: showthread.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php 745 errorHandler->error_callback
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
/inc/functions_post.php 830 postParser->parse_message
/showthread.php 916 build_postbit
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
/inc/functions_post.php 861 postParser->parse_message
/showthread.php 916 build_postbit
Warning [2] Undefined property: MyLanguage::$thread_modes - Line: 46 - File: showthread.php(1650) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php(1650) : eval()'d code 46 errorHandler->error_callback
/showthread.php 1650 eval




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Front page Teasers
#6
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,.,,,
My Github Repos: Github
Website: DigiMute
Reply


Messages In This Thread
Front page Teasers - by ubuntulistener - 2010-04-02, 11:53:11
Front page Teasers - by Zegnåt - 2010-04-02, 19:33:34
Front page Teasers - by ubuntulistener - 2010-04-03, 10:54:25
Front page Teasers - by Zegnåt - 2010-04-03, 16:52:16
Front page Teasers - by n00dles101 - 2010-04-03, 16:55:28
Front page Teasers - by n00dles101 - 2010-04-07, 10:12:19
Front page Teasers - by ccagle8 - 2010-04-18, 23:42:01
Front page Teasers - by ubuntulistener - 2010-04-21, 14:21:38
Front page Teasers - by hansvries - 2010-08-15, 23:28:48



Users browsing this thread: 1 Guest(s)