<?xml version='1.0' encoding='UTF-8'?>
<rss version='2.0'>
	<channel>
		<title>cotonti.com : Create Alias From Title</title>
		<link>https://www.cotonti.com</link>
		<description>Neueste Themenbeiträge</description>
		<generator>Cotonti</generator>
		<language>en</language>
		<pubDate>Wed, 29 Apr 2026 05:57:27 -0000</pubDate>

		<item>
			<title>Lombi</title>
			<description><![CDATA[Yeah, on paper it sounds logical, however my own testing showed that php does not recognise those characters as lowercase versions of the other (and vice versa). So we've been doing dual-case replaces ever since.]]></description>
			<pubDate>Di, 10 Nov 2009 01:11:27 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=3461&d=0#post18490]]></link>
		</item>
		<item>
			<title>musiconly</title>
			<description><![CDATA[I'm using str_ireplace — Case-insensitive version of str_replace, so I guess I wouldn't need to put the capitalized ones in my array.<br />
<br />
Since I haven't found solution for this specific problem, I included capitalized letters in array <img class="aux smiley" src="https://www.cotonti.com/./images/smilies/smile.gif" alt=":)" />]]></description>
			<pubDate>Sa, 07 Nov 2009 23:13:08 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=3461&d=0#post18443]]></link>
		</item>
		<item>
			<title>Lombi</title>
			<description><![CDATA[lol i really dont get your problem. it replaces the small characters fine cause you put them in. it doesnt do anything to the big characters cause you HAVENT PUT THEM IN <img class="aux smiley" src="https://www.cotonti.com/./images/smilies/smile.gif" alt=":)" /><br />
<br />
just make another line, using BIG CHARACTERS <img class="aux smiley" src="https://www.cotonti.com/./images/smilies/grin.gif" alt=":D" />]]></description>
			<pubDate>Sa, 07 Nov 2009 21:40:22 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=3461&d=0#post18440]]></link>
		</item>
		<item>
			<title>musiconly</title>
			<description><![CDATA[... in case non-latin chars are present in string, and using that converted string as a page alias <img class="aux smiley" src="https://www.cotonti.com/./images/smilies/smile.gif" alt=":)" /><br />
seems to me i'll have to add capitalized letters in that replacement array <img class="aux smiley" src="https://www.cotonti.com/./images/smilies/sad.gif" alt=":(" />]]></description>
			<pubDate>Fr, 06 Nov 2009 02:19:58 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=3461&d=0#post18412]]></link>
		</item>
		<item>
			<title>GHengeveld</title>
			<description><![CDATA[Basically this is about replacing strange non-Latin-1 with their Latin-1 look-a-likes.]]></description>
			<pubDate>Do, 05 Nov 2009 20:29:39 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=3461&d=0#post18406]]></link>
		</item>
		<item>
			<title>musiconly</title>
			<description><![CDATA[The only thing he posted was auto-create alias when adding new entry. I'm talking about creating the alias for the things that are already in database.]]></description>
			<pubDate>Do, 05 Nov 2009 16:24:19 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=3461&d=0#post18403]]></link>
		</item>
		<item>
			<title>Kilandor</title>
			<description><![CDATA[Lombi has a solution from this that uses javascript. I'm sure he will post it when he see's this, It may already be posted somewhere I think?]]></description>
			<pubDate>Do, 05 Nov 2009 09:31:14 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=3461&d=0#post18401]]></link>
		</item>
		<item>
			<title>musiconly</title>
			<description><![CDATA[$rec = strtolower($rec) <br />
outputs:<br />
<pre class="code">Đorđe Balašević opet u Kerempuhu - �orde_balasevic_opet_u_kerempuhu_22</pre>
changed format from ansi, to uft8 without bom, utf8.. and still weird char:S]]></description>
			<pubDate>Do, 05 Nov 2009 07:33:48 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=3461&d=0#post18400]]></link>
		</item>
		<item>
			<title>GHengeveld</title>
			<description><![CDATA[You could make it all lowercase first. But then you won't have capitals in your url.<br />
<br />
I'm sure there's an existing solution for this problem that I just don't know about.]]></description>
			<pubDate>Do, 05 Nov 2009 07:24:06 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=3461&d=0#post18399]]></link>
		</item>
		<item>
			<title>musiconly</title>
			<description><![CDATA[Hey guys, I got stuck... again.. <img class="aux smiley" src="https://www.cotonti.com/./images/smilies/sad.gif" alt=":(" /><br />
<br />
Here's the thing, since I have 10,000+ pages and around 50 of them have alias, I want to auto create alias from page title.<br />
<br />
I want to do this because of few reasons:<br />
1. Improve current SEO<br />
2. Prepare database for Cotonti(yep, still using Sed125) - my nice urls will look like site.com/category/alias<br />
<br />
Anyways, I'm not even a mediocre PHP programmer so don't laugh at my approach. It's almost working <img class="aux smiley" src="https://www.cotonti.com/./images/smilies/grin.gif" alt=":D" /><br />
<br />
Basic idea (since my titles consist of croatian letters like č,ć,š,ž,đ):<br />
Turn: Đorđe Balašević - koncert u Šibeniku<br />
into: Dorde_Balasevic_koncert_u_Sibeniku<br />
<br />
<div style="margin:4px 0px 4px 0px"><input type="button" value="Current Code" onclick="if(this.parentNode.getElementsByTagName('div')[0].style.display != '') { this.parentNode.getElementsByTagName('div')[0].style.display = ''; } else { this.parentNode.getElementsByTagName('div')[0].style.display = 'none'; }" /><div style="display:none" class="spoiler"><div class="highlight"><pre class="php">&lt;?PHP
/* ====================
Seditio - Website engine
Copyright Neocrome
<a href="http://www.neocrome.net" rel="nofollow">http://www.neocrome.net</a>
&#091;BEGIN_SED&#093;
File=plugins/calias/calias.php
Version=100
Updated=2006-mar-30
Type=Plugin
Author=Neocrome
Description=
&#091;END_SED&#093;

&#091;BEGIN_SED_EXTPLUGIN&#093;
Code=calias
Part=main
File=calias
Hooks=standalone
Tags=
Order=10
&#091;END_SED_EXTPLUGIN&#093;
==================== */

if (!defined('SED_CODE') || !defined('SED_PLUG')) { die('Wrong URL.'); }

//Function - Find and replace chars
	
	function sars($rec){
		$find = array(' ', 'ć', 'č', 'ž', 'đ', 'š', '?', '!', ' ?', ' !', '&amp;', '\'', '(', ')', '.', ',', '&quot;', '-');
		$repl = array('_', 'c', 'c', 'z', 'd', 's', '', '', '', '', 'i', '_', '_', '_', '', '', '', '');
		$newstring = str_ireplace($find, $repl, $rec);
		$newstring2 = str_ireplace('__', '_', $newstring); //In case double _ shows
		return $newstring2;
	}
	
	//Just a basic loop to see if everything is working as it should be
	$sql = sed_sql_query(&quot;SELECT * FROM sed_pages WHERE page_state = 0&quot;);
	

	while( $row = sed_sql_fetcharray($sql) ) {
		echo $row&#091;'page_title'&#093; .&quot; - &quot;. sars($row&#091;'page_title'&#093;) . &quot;_&quot;.$row&#091;'page_id'&#093; .&quot;&lt;br /&gt;&quot;;
		
	}

?&gt;</pre></div></div></div>
<br />
What's wrong? Well, I get this kind of output:<br />
<br />
<pre class="code">Đorđe Balašević opet u Kerempuhu - Đorde_Balasevic_opet_u_Kerempuhu_22
Šta ćeš bez mene? - Šta_ces_bez_mene_28</pre>
<br />
And it should be <br />
<pre class="code">Đorđe Balašević opet u Kerempuhu - Dorde_Balasevic_opet_u_Kerempuhu_22
Šta ćeš bez mene? - Sta_ces_bez_mene_28</pre>
<br />
As you can see, output IS case sensitive, and it shouldn't be since I'm using str_ireplace. Right?<br />
<br />
I don't get it <img class="aux smiley" src="https://www.cotonti.com/./images/smilies/surprised.gif" alt=":O" /> <br />
<br />
And second thing, has anyone created this &quot;plugin&quot; already and is willing to share it <img class="aux smiley" src="https://www.cotonti.com/./images/smilies/grin.gif" alt=":D" /> I'm sure lots of people could use it. <br />
<br />
Thanks in advance!]]></description>
			<pubDate>Do, 05 Nov 2009 06:00:38 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=3461&d=0#post18398]]></link>
		</item>
	</channel>
</rss>