Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 23/11/2024 Black Friday 2024

    BIG SALE, 30% discount for all our extensions. Use BF24 coupon code. Hurry up the discount is valid till 3 December.

  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?
component
Go to bottomPage: 12
TOPIC: SEF URLs
#61289
Re:SEF URLs 8 Years, 6 Months ago Karma: 2
What complete changes do I need to make?
Code:


$segments[] = $quizId . '-' . strtolower(preg_replace('/\-+/', '-', $quiz->QuizName));
$str = preg_replace('/\-+/', '-', $str);

The administrator has disabled public write access.
 
#61290
Re:SEF URLs 8 Years, 6 Months ago Karma: 766
It is enough to replace multiple dashes in a quiz name:

Code:


$segments[] = $quizId . '-' . strtolower(preg_replace('/\-+/', '-', $quiz->QuizName));



Regards,
ARI Soft
The administrator has disabled public write access.
 
#61291
Re:SEF URLs 8 Years, 6 Months ago Karma: 2
this does not work
extra dashes are not removed
The administrator has disabled public write access.
 
#61294
Re:SEF URLs 8 Years, 6 Months ago Karma: 766
Find "_prepareSegments" method in router_ariquiz.php file and replace the following code:

Code:


$updatedSegments[] = preg_replace(
'/[^A-z0-9\-\_]/i', 
'', 
iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $segment)
);



with the following one:

Code:


$updatedSegments[] = preg_replace('/\-+/', '-', preg_replace(
'/[^A-z0-9\-\_]/i', 
'', 
iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $segment)
));



Regards,
ARI Soft
The administrator has disabled public write access.
 
#61297
Re:SEF URLs 8 Years, 6 Months ago Karma: 2
I have such a code in the file router_ariquiz.php:
Code:



function _prepareSegments($segments)
{
        $translit_tables = array(
            'cyrillic' => array(
                'original' => array(
                    'а','б','в','г','д','е','ё','ж','з','и','й','к','л','м','н','о','п',
                    'р','с','т','у','ф','х','ц','ч','ш','щ','ъ','ы','ь','э','ю','я',
                    'А','Б','В','Г','Д','Е','Ё','Ж','З','И','Й','К','Л','М','Н','О','П',
                    'Р','С','Т','У','Ф','Х','Ц','Ч','Ш','Щ','Ъ','Ы','Ь','Э','Ю','Я'
                ),

                'translit' => array(
                    'a','b','v','g','d','e','io','zh','z','i','y','k','l','m','n','o','p',
                    'r','s','t','u','f','h','ts','ch','sh','sht','a','i','y','e','yu','ya',
                    'A','B','V','G','D','E','Io','Zh','Z','I','Y','K','L','M','N','O','P',
                    'R','S','T','U','F','H','Ts','Ch','Sh','Sht','A','I','Y','e','Yu','Ya'
                )
            )
        );

        $updatedSegments = array();
        foreach ($segments as $segment) {
            foreach ($translit_tables as $translit_table) {
                $updatedSegments[] = str_replace(
                    $translit_table['original'],

                    $translit_table['translit'],

                    $segment
                );
            }
        }

if (!function_exists('iconv'))
return $updatedSegments;

setlocale(LC_ALL, 'en_US.UTF8');

foreach ($updatedSegments as &$segment)
{
$segment = preg_replace(
'/[^A-z0-9\-\_]/i', 
'', 
preg_replace(
                    '/[\s-\_]+/i',
                    '-',
                    iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $segment)
                )



that it needs to be changed?
The administrator has disabled public write access.
 
#61303
Re:SEF URLs 8 Years, 6 Months ago Karma: 766
Try to add the following code:

Code:


foreach ($updatedSegments as &$segment) $segment = preg_replace('/\-+/', '-', $segment);



before this code:

Code:


if (!function_exists('iconv'))
return $updatedSegments;



Regards,
ARI Soft
The administrator has disabled public write access.
 
Go to topPage: 12