1
0
mirror of https://github.com/e107inc/e107.git synced 2025-05-03 10:49:12 +02:00

Wrong category assembling (news, 'rewrite' config;

eURL Admin interface - no expanded items by default, more intuitive but flexible interface on discussion level
This commit is contained in:
secretr 2011-12-05 15:44:16 +00:00
parent a2c8e9046e
commit f6c73c1868
2 changed files with 14 additions and 6 deletions

View File

@ -403,6 +403,7 @@ class eurl_admin_form_ui extends e_admin_form_ui
$label = vartrue($section['label'], $index == 0 ? LAN_EURL_DEFAULT : eHelper::labelize(ltrim(strstr($location, '/'), '/')));
$cssClass = $checked ? 'e-showme' : 'e-hideme';
$cssClass = 'e-hideme'; // always hidden for now, some interface changes could come after pre-alpha
// XXX use e_form
$text .= "
@ -433,10 +434,13 @@ class eurl_admin_form_ui extends e_admin_form_ui
Should become: /nothings-gonna-change-my-world
Good SEF reference: http://davidwalsh.name/generate-search-engine-friendly-urls-php-function
[Miro] Solution comes from the module itself, not related with URL assembling in anyway (as per latest Skype discussion)
*/
// FIXME TODO XXX
// Global On/Off Switch Example
// [Miro] there is no reason of switch, everything could go through single entry point at any time, without a need of .htaccess (path info)
// Control is coming per configuration file.
$example = "
<tr><td>Enable Search-Engine-Friendly URLs</td>
<td><input type='checkbox' name='SEF-active' value='1' />
@ -478,8 +482,9 @@ class eurl_admin_form_ui extends e_admin_form_ui
$example .= "</td>
</tr>";
return $example.$text;
return $text;
}

View File

@ -49,13 +49,12 @@ class core_news_rewrite_url extends eUrlConfig
$r = array();
$parm = array();
## news are passing array as it is retrieved from the DB, map vars to proper values
if(isset($params['news_id']) && !empty($params['news_id'])) $params['id'] = $params['news_id'];
if(isset($params['news_title']) && !empty($params['news_title'])) $params['id'] = $params['news_title']; // TODO - news_sef
if(isset($params['category_name']) && !empty($params['category_name'])) $params['category'] = $params['category_name'];
if($route[0] == 'view')
{
## news are passing array as it is retrieved from the DB, map vars to proper values
if(isset($params['news_id']) && !empty($params['news_id'])) $params['id'] = $params['news_id'];
if(isset($params['news_title']) && !empty($params['news_title'])) $params['id'] = $params['news_title']; // TODO - news_sef
switch ($route[1])
{
case 'item':
@ -69,6 +68,10 @@ class core_news_rewrite_url extends eUrlConfig
}
elseif($route[0] == 'list')
{
## news are passing array as it is retrieved from the DB, map vars to proper values
if(isset($params['category_id']) && !empty($params['category_id'])) $params['id'] = $params['category_id'];
if(isset($params['category_name']) && !empty($params['category_name'])) $params['name'] = $params['category_name']; // TODO - news_sef
switch ($route[1])
{