Not used $unicodeslugs from configuration.php
15 years 5 months ago #13856
by zlenko
my project ibaby.com.ua
Not used $unicodeslugs from configuration.php was created by zlenko
HikaShop not used $unicodeslugs from configuration.php Joomla 1.6
in files:
components\com_hikashop\controllers\product.php
components\com_hikashop\views\category\view.html.php
components\com_hikashop\views\product\view.html.php
this param need for URL in UTF8
example:
// zlenko_
// foreach($rows as $key => $row){
// $ids[]=$row->category_id;
// $rows[$key]->alias = JFilterOutput::stringURLSafe($row->category_name);
// }
if ($app->getCfg('unicodeslugs') == 1) {
foreach($rows as $key => $row){
$ids[]=$row->category_id;
$rows[$key]->alias = JFilterOutput::stringURLUnicodeSlug($row->category_name);
}
}
else {
foreach($rows as $key => $row){
$ids[]=$row->category_id;
$rows[$key]->alias = JFilterOutput::stringURLSafe($row->category_name);
}
}
// _zlenko
in files:
components\com_hikashop\controllers\product.php
components\com_hikashop\views\category\view.html.php
components\com_hikashop\views\product\view.html.php
this param need for URL in UTF8
example:
// zlenko_
// foreach($rows as $key => $row){
// $ids[]=$row->category_id;
// $rows[$key]->alias = JFilterOutput::stringURLSafe($row->category_name);
// }
if ($app->getCfg('unicodeslugs') == 1) {
foreach($rows as $key => $row){
$ids[]=$row->category_id;
$rows[$key]->alias = JFilterOutput::stringURLUnicodeSlug($row->category_name);
}
}
else {
foreach($rows as $key => $row){
$ids[]=$row->category_id;
$rows[$key]->alias = JFilterOutput::stringURLSafe($row->category_name);
}
}
// _zlenko
my project ibaby.com.ua
Please Log in or Create an account to join the conversation.
15 years 5 months ago #13860
by nicolas
Replied by nicolas on topic Re: Not used $unicodeslugs from configuration.php
Thank you for that information.
We will actually change it to:
The new stringURLSafe method which is in the JApplication class handles the slug automatically and should be used so that the code won't need to be changed anymore in the future should the slug option be moved somewhere else or another modification.
That will be included in next release.
We will actually change it to:
Code:
if(method_exists($app,'stringURLSafe')){
$prod->alias = $app->stringURLSafe($prod->product_name);
}else{
$prod->alias = JFilterOutput::stringURLSafe($prod->product_name);
}
That will be included in next release.
Please Log in or Create an account to join the conversation.
Time to create page: 0.167 seconds