View previous topic :: View next topic |
Author |
Message |
Graam
Joined: 20 Dec 2002 Posts: 134
|
Posted: Tue Apr 08, 2003 10:05 pm Post subject: |
|
|
It's not all done yet. I'm still hunting through this evil file for the (more...) bit... _________________ tin-men
powered by  |
|
Back to top |
|
 |
mikelittle
Joined: 11 May 2002 Posts: 376 Location: UK
|
Posted: Tue Apr 08, 2003 10:20 pm Post subject: |
|
|
Oops, sorry when you edited to say 'They've all worked.' I thought you were including the more thing.
The <!--more--> tag is expanded in function get_the_content (line 372 or there abouts) in b2template.functions.php.
BUT my copy works fine without any changes.
I think there was a thread about this on the forum. I'll try to find it...
...aargh! can't find it. I'm sure it was something to do with the $pagenow.
Anyway, here is my copy of get_the_content()
Code: |
function get_the_content($more_link_text='(more...)', $stripteaser=0, $more_file='') {
global $id,$postdata,$more,$c,$withcomments,$page,$pages,$multipage,$numpages;
global $HTTP_SERVER_VARS, $preview;
global $querystring_start, $querystring_equal, $querystring_separator;
global $pagenow;
$output = '';
if ($more_file != '') {
$file=$more_file;
} else {
$file=$pagenow; //$HTTP_SERVER_VARS['PHP_SELF'];
}
$content=$pages[$page-1];
$content=explode('<!--more-->', $content);
if ((preg_match('/<!--noteaser-->/', $postdata['Content']) && ((!$multipage) || ($page==1))))
$stripteaser=1;
$teaser=$content[0];
if (($more) && ($stripteaser))
$teaser='';
$output .= $teaser;
if (count($content)>1) {
if ($more) {
$output .= '<a name="more'.$id.'"></a>'.$content[1];
} else {
$output .= ' <a href="'.$file.$querystring_start.'p'.$querystring_equal.$id.$querystring_separator.'more'.$querystring_equal.'1#more'.$id.'">'.$more_link_text.'</a>';
}
}
if ($preview) { // preview fix for javascript bug with foreign languages
$output = preg_replace('/\%u([0-9A-F]{4,4})/e', "''.base_convert('\\1',16,10).';'", $output);
}
return($output);
}
|
_________________ Mike Little
http://zed1.com/journalized/
"Share what you know. Learn what you don't." |
|
Back to top |
|
 |
Graam
Joined: 20 Dec 2002 Posts: 134
|
Posted: Wed Apr 09, 2003 7:04 am Post subject: |
|
|
I can't see what's different to that and my old section, but its seemed to work... Thanks alot for the help. _________________ tin-men
powered by  |
|
Back to top |
|
 |
thmz
Joined: 03 Nov 2002 Posts: 14 Location: ID
|
|
Back to top |
|
 |
Sargant
Joined: 20 Apr 2003 Posts: 14
|
Posted: Sun Apr 20, 2003 5:19 pm Post subject: |
|
|
another bugfix if anyone's interested, regarding previous_post() and next_post()
In b2template.functions.php:
Line 439 Code: | $string = '<a href="'.$siteurl.'/'.$blogfilename.$querystring_start.'p'.$querystring_equal.$p_id.$querystring_separator.'more'.$querystring_equal.'1'.$querystring_separator.'c'.$querystring_equal.'1">'.$previous; |
Line 484 Code: | $string = '<a href="'.$siteurl.'/'.$blogfilename.$querystring_start.'p'.$querystring_equal.$p_id.$querystring_separator.'more'.$querystring_equal.'1'.$querystring_separator.'c'.$querystring_equal.'1">'.$next; |
|
|
Back to top |
|
 |
lcf
Joined: 05 May 2003 Posts: 92 Location: Malaysia
|
Posted: Thu May 15, 2003 10:48 am Post subject: |
|
|
Anyone post the full code and install instruction, please?
I dunno where should I begin...  _________________ LcF
http://weblog.lcfwebsite.com |
|
Back to top |
|
 |
Graam
Joined: 20 Dec 2002 Posts: 134
|
Posted: Mon Jun 16, 2003 1:36 pm Post subject: |
|
|
Michel's code should work, you just need to read down if you run into any problems with comments and the such (like me ). _________________ tin-men
powered by  |
|
Back to top |
|
 |
bennych
Joined: 18 Dec 2002 Posts: 7
|
Posted: Tue Jul 22, 2003 11:01 am Post subject: |
|
|
how to make domain.com/archives/1877
or
domain.com/1877
or
domain.com/year/month/title ?
|
|
Back to top |
|
 |
Graam
Joined: 20 Dec 2002 Posts: 134
|
Posted: Tue Jul 22, 2003 1:08 pm Post subject: |
|
|
With b2evo you can have domain.com/yourblog.php/year/month/day/post _________________ tin-men
powered by  |
|
Back to top |
|
 |
Versatile
Joined: 11 Aug 2003 Posts: 3
|
Posted: Tue Oct 21, 2003 11:53 pm Post subject: wrap it up |
|
|
Can someone wrap it up it 1 zipfile please. _________________ "Unix IS user friendly
- it's just selective about who its friends are. " |
|
Back to top |
|
 |
Graam
Joined: 20 Dec 2002 Posts: 134
|
Posted: Fri Oct 24, 2003 8:51 pm Post subject: |
|
|
b2 is dead. Move to wordpress or b2evo. I know with b2evo, this is a feature that you can turn on. _________________ tin-men
powered by  |
|
Back to top |
|
 |
allusion
Joined: 16 Jun 2002 Posts: 73 Location: Houston
|
|
Back to top |
|
 |
caffeinated
Joined: 08 Aug 2003 Posts: 5
|
Posted: Wed Nov 05, 2003 11:54 pm Post subject: |
|
|
I'm using 3 different templates at the same time, one for the main index, one for the categories, and one for the stories, so it's not just not an index.php file. How can I make this search-engine friendly url feature work with my setup?
http://tristancafe.com/forum |
|
Back to top |
|
 |
|