1 tilqicom Dec 20, 2009 16:51
3 tilqicom Dec 21, 2009 01:22
Good to know, at least its doable and being worked on.. maybe i ll poke him to ask at what stage he is at, if he doesnt respond in a few days
4 sam2kb Dec 21, 2009 09:55
Just uncheck "301 redirect to canonical URL" and use domain.com/?p=444
5 tilqicom Dec 21, 2009 18:26
but if i uncheck redirect canonical urls; then it wont redirect to the new url afaik. For example i made a typo and fixed the title so that url has changed twice but this time it wont redirect the former to the latter, right ?
6 sam2kb Dec 21, 2009 21:19
then it wont redirect to the new url afaik.
It's true, but why do you think search engines won't like urls like domain.com/p1234 ? They are short and don't use params, why do you really need "/some_category/my_long_url_ggg" ?
I even made a plugin which makes nice URLs like "p1234" when post is saved :)
7 tilqicom Dec 21, 2009 21:34
naturally i ve missed that plugin.. ll check it sometime for sure..
about the search engines, its at least important for my quote website, to include authors names and what they said the quote about, coz people search like "einstein maths quotes" in Turkish and they end up at my site..context is a secondary priority for google, links come first
8 sam2kb Dec 21, 2009 21:39
This is not a public plugin, it's too small for it, I use it on my website only. The idea is to get the ID of created/edited item and make an URL out of it.
function AfterItemInsert( & $params )
{
if( !empty($params['Item']->ID) )
{
global $DB;
$DB->query('UPDATE T_items__item SET
post_urltitle = "'.$DB->escape('p'.$params['Item']->ID).'"
WHERE post_ID = '.$params['Item']->ID);
return true;
}
}
function AfterItemUpdate( & $params )
{
return $this->AfterItemInsert( $params );
}
9 tilqicom Dec 21, 2009 22:09
cool.. i ll give it a try... where do i insert this... into index.main.php under skin ? somewhere after title ?
10 blueyed Dec 22, 2009 03:13
I've started working on it a while ago, but stopped.
The bug (https://bugs.launchpad.net/b2evolution/+bug/433738) and branch for this is still there, and I'll come back to it, but only in 2010..
11 sam2kb Dec 23, 2009 10:38
tilqicom wrote:
cool.. i ll give it a try... where do i insert this... into index.main.php under skin ? somewhere after title ?
Put that code in a plugin. You can use the plugins/skeleton.plugin.php as a starting point.
Blueyed said he was going to implement that a couple of months ago. Apparently he hasn't done it yet.