boardom Forum Index boardom
b2 message board
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

/archives/p/X instead of /?p=X (experimental)
Goto page Previous  1, 2, 3, 4
 
Post new topic   Reply to topic    boardom Forum Index -> How to ?
View previous topic :: View next topic  
Author Message
Graam



Joined: 20 Dec 2002
Posts: 134

PostPosted: Tue Apr 08, 2003 10:05 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
mikelittle



Joined: 11 May 2002
Posts: 376
Location: UK

PostPosted: Tue Apr 08, 2003 10:20 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Graam



Joined: 20 Dec 2002
Posts: 134

PostPosted: Wed Apr 09, 2003 7:04 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
thmz



Joined: 03 Nov 2002
Posts: 14
Location: ID

PostPosted: Sun Apr 13, 2003 12:28 pm    Post subject: Reply with quote

HEY! It works on my site http://thomas.warnadunia.net/
Thank you for the idea. Thankz!
_________________
http://thomas.warnadunia.net/ - what is your color?
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Sargant



Joined: 20 Apr 2003
Posts: 14

PostPosted: Sun Apr 20, 2003 5:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
lcf



Joined: 05 May 2003
Posts: 92
Location: Malaysia

PostPosted: Thu May 15, 2003 10:48 am    Post subject: Reply with quote

Anyone post the full code and install instruction, please?

I dunno where should I begin... Sad
_________________
LcF
http://weblog.lcfwebsite.com
Back to top
View user's profile Send private message Visit poster's website
Graam



Joined: 20 Dec 2002
Posts: 134

PostPosted: Mon Jun 16, 2003 1:36 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
bennych



Joined: 18 Dec 2002
Posts: 7

PostPosted: Tue Jul 22, 2003 11:01 am    Post subject: Reply with quote

how to make domain.com/archives/1877
or
domain.com/1877
or
domain.com/year/month/title ?
Back to top
View user's profile Send private message
Graam



Joined: 20 Dec 2002
Posts: 134

PostPosted: Tue Jul 22, 2003 1:08 pm    Post subject: Reply with quote

With b2evo you can have domain.com/yourblog.php/year/month/day/post
_________________
tin-men
powered by
Back to top
View user's profile Send private message Visit poster's website
Versatile



Joined: 11 Aug 2003
Posts: 3

PostPosted: Tue Oct 21, 2003 11:53 pm    Post subject: wrap it up Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
Graam



Joined: 20 Dec 2002
Posts: 134

PostPosted: Fri Oct 24, 2003 8:51 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
allusion



Joined: 16 Jun 2002
Posts: 73
Location: Houston

PostPosted: Mon Oct 27, 2003 6:19 pm    Post subject: Reply with quote

I've just added a feature to WordPress that does this right. Check out

http://photomatt.net/archives/2003/10/26/dig-those-permalinks/
_________________
Matthew Mullenweg
Wordpress
Back to top
View user's profile Send private message Visit poster's website AIM Address
caffeinated



Joined: 08 Aug 2003
Posts: 5

PostPosted: Wed Nov 05, 2003 11:54 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    boardom Forum Index -> How to ? All times are GMT + 1 Hour
Goto page Previous  1, 2, 3, 4
Page 4 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2 © 2001, 2002 phpBB Group