A_NextGen_Basic_Album_Urls

Class A_NextGen_Basic_Album_Urls.

Defined (1)

The class is defined in the following location(s).

/products/photocrati_nextgen/modules/nextgen_basic_album/package.module.nextgen_basic_album.php  
  1. class A_NextGen_Basic_Album_Urls extends Mixin 
  2. function create_parameter_segment($key, $value, $id = NULL, $use_prefix = FALSE) 
  3. if ($key == 'nggpage') { 
  4. return 'page/' . $value; 
  5. } elseif ($key == 'album') { 
  6. return $value; 
  7. } elseif ($key == 'gallery') { 
  8. return $value; 
  9. } else { 
  10. return $this->call_parent('create_parameter_segment', $key, $value, $id, $use_prefix); 
  11. function remove_parameter($key, $id = NULL, $url = FALSE) 
  12. $retval = $this->call_parent('remove_parameter', $key, $id, $url); 
  13. $settings = C_NextGen_Settings::get_instance(); 
  14. $param_slug = preg_quote($settings->router_param_slug, '#'); 
  15. if (preg_match("#(/{$param_slug}/.*)album--#", $retval, $matches)) { 
  16. $retval = str_replace($matches[0], $matches[1], $retval); 
  17. if (preg_match("#(/{$param_slug}/.*)gallery--#", $retval, $matches)) { 
  18. $retval = str_replace($matches[0], $matches[1], $retval); 
  19. return $retval;