Some chars not replaced
- klp29
-
Topic Author
- Offline
- New Member
-
www.crazynight.dk/jreviews/Polterabend-a...rabend_c111_m89.html
:] Have a smiley day
Kenneth Lund
Using SefAdvanced at:
www.bryllup.dk - online weddingplanning
www.kennethlund.dk - personal blog
www.soundpeople.dk - social network for producers
Please Log in or Create an account to join the conversation.
- klp29
-
Topic Author
- Offline
- New Member
-
customcomp=>cc,
mtree=>forhandleroversigt,
fireboard=>bryllupsforum,
jreviews=>anbefalinger
But still, jrevies shows up unchanged in URLs like:
www.crazynight.dk/jreviews/Polterabend-a...rabend_c111_m89.html
Which really should be www.crazynight.dk/anbefalinger/Polterabe...rabend_c111_m89.html
:] Have a smiley day
Kenneth Lund
Using SefAdvanced at:
www.bryllup.dk - online weddingplanning
www.kennethlund.dk - personal blog
www.soundpeople.dk - social network for producers
Please Log in or Create an account to join the conversation.
- Saka
-
- Offline
- Administrator
-
About the replace jreviews=>anbefalinger it should work if the component has sef_ext.php and not using router.php (check that sef_ext.php exists). Also try removing new lines and test with:
mtree=>forhandleroversigt,fireboard=>bryllupsforum,jreviews=>anbefalinger
Emir Sakic
www.sakic.net
Please Log in or Create an account to join the conversation.
- klp29
-
Topic Author
- Offline
- New Member
-
<?php
/**
* jReviews - Reviews Extension
* Copyright (C) 2006-2008 Alejandro Schmeichler
* This is not free software, do not distribute it.
* For licencing information visit http://www.reviewsforjoomla.com
* or contact sales@reviewsforjoomla.com
**/
(defined( '_VALID_MOS') || defined( '_JEXEC')) or die( 'Direct Access to this location is not allowed.' );
if (!defined('DS')) define('DS', DIRECTORY_SEPARATOR);
class sef_jreviews {
var $__Menu;
function &getInstance() {
static $instance = array();
if (!isset($instance[0]) || !$instance[0]) {
$instance[0] =& new sef_jreviews();
require( dirname(__FILE__) . DS . 'jreviews' . DS . 'framework.php');
App::import('Model','Menu','jreviews');
$instance[0]->__Menu = &RegisterClass::getInstance('MenuModel');
}
return $instance[0];
}
function create($string) {
$_this =& sef_jreviews::getInstance();
$url = '';
$hasMenuId = preg_match('/Itemid=([0-9]{1,})/',$string,$menu_id);
$isMenuLink = strpos($string,'url=menu');
$sefstring = '';
// Process internal "url" parameter
$temp = explode('&url=', $string);
if(isset($temp[1])) {
$url = urldecode($temp[1]);
}
if (eregi('&url=',$string) && !$isMenuLink)
{
$query_string = explode('/',$url);
// Properly urlencodes the jReviews parameters contained within the url parameter
foreach($query_string AS $key=>$param) {
$query_string[$key] = urlencodeParam($param);
}
$url = implode('/',$query_string);
$sefstring .= $url;
} elseif(isset($menu_id[1]) && ($isMenuLink || $hasMenuId)) {
$sefstring .= $isMenuLink ? str_replace('menu',$_this->__Menu->getMenuName($menu_id[1]),$url) : $_this->__Menu->getMenuName($menu_id[1]);
} else {
$sefstring = $string;
}
return rtrim($sefstring,'/').'/';
}
function revert ($url_array, $pos) {
$_PARAM_CHAR = ':';
$url = array();
$_this =& sef_jreviews::getInstance();
global $QUERY_STRING;
// First check if this is a menu link by looking for the menu name to get an Itemid
if(isset($url_array[$pos+2]) && $menu_id = $_this->__Menu->getMenuId($url_array[$pos+2])) {
$_GET['Itemid'] = $_REQUEST['Itemid'] = $menu_id;
$QUERY_STRING = "option=com_jreviews&Itemid=$menu_id";
for($i=$pos+2;$i<count($url_array);$i++) {
if($url_array[$i] != '' && false!==strpos($url_array[$i],$_PARAM_CHAR)) {
$parts = explode($_PARAM_CHAR,$url_array[$i]);
if(isset($parts[1]) && $parts[1]!='') {
$url[] = $url_array[$i];
$_GET[$parts[0]] = $_REQUEST[$parts[0]] = $parts[1];
}
}
}
$QUERY_STRING .= '&url=menu/' . implode('/',$url);
} else {
// Not a menu link, so we use the url named param
for($i=$pos+2;$i<count($url_array);$i++) {
if($url_array[$i] != '') {
$url[] = $url_array[$i];
}
}
$url = implode('/',$url);
if(preg_match('/_m([0-9]+)/',$url,$matches)) {
$menu_id = $_GET['Itemid'] = $_REQUEST['Itemid'] = $matches[1];
} else {
$menu_id = $_GET['Itemid'] = $_REQUEST['Itemid'] = '';
}
$_GET['url'] = $_REQUEST['url'] = $url;
$_GET['option'] = $_REQUEST['option'] = 'com_jreviews';
$QUERY_STRING = "option=com_jreviews&Itemid=$menu_id&url=$url";
}
// return $QUERY_STRING;
}
}
:] Have a smiley day
Kenneth Lund
Using SefAdvanced at:
www.bryllup.dk - online weddingplanning
www.kennethlund.dk - personal blog
www.soundpeople.dk - social network for producers
Please Log in or Create an account to join the conversation.
- Saka
-
- Offline
- Administrator
-
To find out what's wrong I would have to install it and test it, can't say what's wrong from the top of my head. And it takes time, I don't even have a copy of jReviews. Then fixing it only for you would still leave the issue in author's distribution and other users would still have the same problem. It is by far best for the author to fix it and include in his distribution.
Emir Sakic
www.sakic.net
Please Log in or Create an account to join the conversation.
- alejo
-
- Offline
- New Member
-
- Thank you received: 0

There are two issues here which I believe are not related to JReviews atll:
1) The characters not being replaced in an article link:
But the URL www.crazynight.dk/13-hvad-bør-i-få-bekræftet.html is only partly translated, as it ends up as www.crazynight.dk/13-hvad-boer-i-faa-bekræftet.html where "æ" in "bekræftet" is not translated to "ae" as it should.
JReviews uses the JRoute class to generate article urls. So even without JReviews those links will not have the replacements of SEF Advance. This is something klp29 needs to confirm by checking the article urls in a core Joomla article page or using Joomla latest news module.
2) The article urls where the replacement is working are in fact JReviews urls, so I don't see any problem there with JReviews:
It's very strange, because in another URL on the same site, "æ" in "planlægning" IS replaced by" ae":
www.crazynight.dk/jreviews/Polterabend-a...rabend_c111_m89.html
This is a JReviews category url, replacements are working.
3) The fact that the component url segment is not being replaced from " jreviews" to "anbefalinger" is entirely SEF Advance's responsibility. If the user didn't have a sef_ext.php file, then the JReviews urls wouldn't appear as sef at all like they are now.
I hope that helps.
jReviews :: Directory / Ratings / Reviews
www.reviewsforjoomla.com
Please Log in or Create an account to join the conversation.