[ Video Sharing CMS v4 ] URL name

Started by lusgan,

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

lusganTopic starter

How can I have the media title appear in the URL?
  •  

PHPVibe A.

You need to detail or show me this...since by default is there.
You have some Arabic language, or what's the issue so I know how to help...

lusganTopic starter

I have Armenian titles and they are not showing in the url.  Please see link below.

http://www.lusavorchiganteghe.org/video/12388/-/
  •  

PHPVibe A.

#3
Try this, open lib/functions.php

find

// seo rewrite function
function nice_url($url) {
$string ='';
//$url = check_invalid_utf8($url);
// translate other languages
$url = url_translate($url);
// remove all chars
$url = preg_replace("/[^a-z0-9]+/","-",strtolower($url));
//remove doubled -
$url = str_replace(array('-----','----','---','--'),'-', $url);
return urlencode(strtolower($url));
}


and replace with

// seo rewrite function
function nice_url($iniurl) {
$string ='';
//$url = check_invalid_utf8($url);
// translate other languages
$url = url_translate($iniurl);
// remove all chars
$url = preg_replace("/[^a-z0-9]+/","-",strtolower($url));
if(nullval($url) || ($url == "-") || ($url == "--")) {
//Foreign
$url = str_replace(' ','-', $iniurl);
}
//remove doubled -
$url = str_replace(array('-----','----','---','--',' '),'-', $url);
return urlencode(strtolower($url));
}


lusganTopic starter

I replaced it with the new code, still the same.
  •  

PHPVibe A.

My bad

if(nullval($url) || ($url == "-") && ($url == "--")) {

should be

if(nullval($url) || ($url == "-") || ($url == "--")) {

lusganTopic starter

  •  

PHPVibe A.


conghandang

Can I edit seo url for vietnamese:
I just Upgrade 3.6 to phpvibe 3.6 edition II

it error: /video/20906/ph-ng-trinh-vs-hoang-h-o-nh-y-hi-n-i-vong-i-u-b-c-nh-y-hoan-v-nhi-2014-season-1-/


Thanks..
  •  

conghandang

  •  

Marius P.

Yeah, there is no change there, so this patch applies.
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

Similar topics (7)