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


Recent Events
  • 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.

  • 21/11/2023 BLACK FRIDAY 23 is coming

    BIG SALE, 35% discount for all our extensions. Use BF23 coupon code. Hurry up the discount is valid till 27 November.


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?

SEF URLs
(1 viewing) (1) Guest
component
Go to bottomPage: 12
TOPIC: SEF URLs
#61275
SEF URLs 7 Years, 2 Months ago Karma: 2
Hello!

What changes need to be made to the router, so that all letters are in lowercase and there are no extra dashes?
Now:
Quiz Name - Numbers 1-10: Listen & Answer (First English Lessons) (id 103)
URL - 103-Numbers-1-10-Listen--Answer-First-English-Lessons

Should be so: 103-numbers-1-10-listen-answer-first-english-lessons

Thanks!
The administrator has disabled public write access.
 
#61278
Re:SEF URLs 7 Years, 2 Months ago Karma: 760
Hello,

Open <joomla_directory>/components/com_ariquiz/router/router_ariquiz.php and see "buildTask_quiz" method. Replace the following code:

Code:


$segments[] = $quizId . '-' . $quiz->QuizName;



with the following one:

Code:


$segments[] = $quizId . '-' . strtolower($quiz->QuizName);



Regards,
ARI Soft
The administrator has disabled public write access.
 
#61280
Re:SEF URLs 7 Years, 2 Months ago Karma: 2
Thanks, its works.
But the second problem has not been solved. How to remove unnecessary dashes?

URL - /103-numbers-1-10-listen--answer-first-english-lessons

Globally, the router creates duplicates if the links are obtained with a lot of dashes.


/103-numbers-1-10-listen-answer-first-english-lessons = /103-numbers----1-----10------listen-----answer----first----english-----lessons

How to solve this?
The administrator has disabled public write access.
 
#61285
Re:SEF URLs 7 Years, 2 Months ago Karma: 760
Use the following code:

Code:


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



Regards,
ARI Soft
The administrator has disabled public write access.
 
#61287
Re:SEF URLs 7 Years, 2 Months ago Karma: 2
Thanks for the answer, but this solution does not work. - (dash) in the creation of the url is created in several instances.
URL - /103-numbers-1-10-listen----answer-first-english-lessons
The administrator has disabled public write access.
 
#61288
Re:SEF URLs 7 Years, 2 Months ago Karma: 760
Sorry, it is not clear what's wrong. In any case you can use the following code snippet to replace multiple dashes with one - symbol:

Code:


$str = preg_replace('/\-+/', '-', $str);



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