Recent Topics

1 Feb 10, 2008 03:16    

My b2evolution Version: Not Entered

Greetings...

I noticed if my post title is long... the URL filename, slug for the permalink, gets cut off... very irritating and quite ugly if you are using titles in your links.... who uses part of a word for a url??

Is there anyway to increase the size of the "URL filename" ("slug" to be used in permalinks)?

b2evolution 2.4.0-rc2

thanx
LE

2 Feb 13, 2008 03:21

BUMP

.. I don't normally bump my own topics... sorry.

Perhaps I didn't explain the problem well enough.

My blog uses the title as the url. That is all fine, however if the title is LONG, the url will get cut off. example

the title: This is the title and it is very long indeed
slug: this-is-the-title-and-it-is-ve

so now the url looks ridiculous with the word cut off: www.mydomain.com/blog1.php/this-is-the-title-and-it-is-ve

It seems the max is 40 characters... does anyone have an idea where to change and increase this number?

thanx... and again, sorry for bumping the topic.

4 Feb 14, 2008 18:30

It was a great start... I was able to locate 2 of the 3 changes... but my post_urltitle is still short.

Does anyone know where the new location or the similar code is in 2.x?

Increase the allowed, overall URL length. One would think doing (1) and (2) would be all you need, but it's not. The overall URL (which includes the http://, the directory path AND the title) has it's length limited when the URL is validated. One needs to increase this value. To do this, edit b2evocore/_functions_bposts.php. Look around line 314 for the following and change the value from 100 to 500, as highlighted below:PHP:

 $urlbase = substr( $matches[1], 0, <strong><span style="background-color:#ffa">500</strong></span> ); 

5 Feb 15, 2008 13:58

inc/items/model/_item.funcs.php approx 132

	// Normalize to 40 chars + a number
	preg_match( '/^(.*?)((-|_)+([0-9]+))?$/', $urltitle, $matches );
	$urlbase = substr( $matches[1], 0, 40 );

¥

7 Feb 16, 2008 18:37

an easy lady wrote:

As of now, b2evo cuts off long urls for permalinks. Here is the hack to make them loooooonnnnnnnger in version 2.x. Credits go to astonishme for the original hack for version v0.9.1.0 and to ¥åßßå for her tips.

You'll be disappointed to know that the last update to my chromosomes broke one of the X's :(

¥

8 Feb 16, 2008 21:02

¥åßßå wrote:

an easy lady wrote:

As of now, b2evo cuts off long urls for permalinks. Here is the hack to make them loooooonnnnnnnger in version 2.x. Credits go to astonishme for the original hack for version v0.9.1.0 and to ¥åßßå for her tips.

You'll be disappointed to know that the last update to my chromosomes broke one of the X's :(

¥

:lol:

9 Feb 17, 2008 00:01

It must be the Blonde Bimbo title. Perhaps a change to Blonde Bimbart would help. ;)


Form is loading...