Welcome Guest, Not a member yet? Register   Sign In
Autocrumb - Lightweight Breadcrumb Helper (ver.12.05.1)
#11

[eluser]ardinotow[/eluser]
[quote author="mattpointblank" date="1260808942"]Not bad. Maybe add some ability to make strings look a little nicer automatically? Eg convert 'search_direct' to 'Search Direct' (without adding it into the config manually)?[/quote]
Thanks, I've made new updates

** Breadcrumb Helper 1.0.2 **

New Features:
1. Auto link beauty. E.g. if we have ‘search_direct’ as a segment in URL then it automatically convert to ‘Search Direct’ without using $config['replacer'].
2. Can unlink the last segment of breadcrumb. If $config['unlink_last_segment'] set to TRUE then the last segment in breadcrumb will not have a link.

Enjoy,
Ardinoto

-Feedback, comments, and feature request are welcome-
#12

[eluser]mattpointblank[/eluser]
Fast work! Thanks.
#13

[eluser]ardinotow[/eluser]
You're welcome Smile
#14

[eluser]Tooker[/eluser]
Awesome.
#15

[eluser]ardinotow[/eluser]
[quote author="Tooker" date="1260953266"]Awesome.[/quote]
Glad you like it. Still need more feedback guys...
#16

[eluser]Kromack[/eluser]
Thank's for this helper !

Nevertheless, is it possible to replace the default string 'Home' without hacking the helper file ?

I tried this but it doesn't work :

Code:
$config['replacer'] = array(

    'Home' => 'Accueil'

);

Thanks Wink

EDIT : Hum can't make it works as expected, the line $uri_array = array_replace($uri_array, $replacement); just crash the script : /
#17

[eluser]ardinotow[/eluser]
[quote author="Kromack" date="1262788506"]Thank's for this helper !

Nevertheless, is it possible to replace the default string 'Home' without hacking the helper file ?

I tried this but it doesn't work :

Code:
$config['replacer'] = array(

    'Home' => 'Accueil'

);

Thanks Wink

EDIT : Hum can't make it works as expected, the line $uri_array = array_replace($uri_array, $replacement); just crash the script : /[/quote]

You cannot change "Home" with replacer. Fortunately, it now can be modified via
Code:
$config['set_home'] = 'Accueil'
Please download the new update below. Inform me if this update can't solve your problem.
#18

[eluser]Kromack[/eluser]
Thanks for this new release.

My problem was I'm running PHP 5.2 and array_replace() is available since PHP 5.3.0.

To solve the issue, I've just added this function inside your helper :

http://www.php.net/manual/fr/function.ar....php#94458

Thanks Smile

EDIT :

The function above do not works when using replacer.

Here's mine :

Code:
/**
* @see http://www.php.net/manual/fr/function.array-replace.php
*/
if (!function_exists('array_replace'))
{
  function array_replace( array &$array, array &$array1 )
  {
      
      foreach($array as $k=>$v) {
          
          if(array_key_exists($k, $array1)) {
              
              $array[$k] = $array1[$k];
              
          }
      }
      
    return $array;
  }
}
#19

[eluser]ardinotow[/eluser]
[quote author="Kromack" date="1263336201"]Thanks for this new release.

My problem was I'm running PHP 5.2 and array_replace() is available since PHP 5.3.0.

To solve the issue, I've just added this function inside your helper :

http://www.php.net/manual/fr/function.ar....php#94458

Thanks Smile

EDIT :

The function above do not works when using replacer.

Here's mine :

Code:
/**
* @see http://www.php.net/manual/fr/function.array-replace.php
*/
if (!function_exists('array_replace'))
{
  function array_replace( array &$array, array &$array1 )
  {
      
      foreach($array as $k=>$v) {
          
          if(array_key_exists($k, $array1)) {
              
              $array[$k] = $array1[$k];
              
          }
      }
      
    return $array;
  }
}
[/quote]
Thanks for the patch. Now it include in version 1.0.4

** Breadcrumb Helper 1.0.4 **

New Features:
1. Added patch for PHP 5 - 5.2

Enjoy,
Ardinoto

-Feedback, comments, and feature request are welcome-
#20

[eluser]123wesweat[/eluser]
@ardinotow, tx for this helper. I am trying it out and i like it so far, but
somehow i don't get the last segment to show in the breadcrumbs.

like
mydomain.com/south/jobs/hiring-a-plumber-4.html

the breadcrumbs show
home >> area >> south

but i like to show
home >> area >> south >> hiring a plumber

i am using
$routes['mydomain.com/south/jobs/:any']

Any tips?

ps
Code:
$uri_array_original = explode("/", $uri);
print_r($uri_array_original);
outputs
Array ( [0] => [1] => south[2] => jobs[3] => hiring-a-plumber-4.html )

ok i think it has to do with
Code:
if (preg_match("/^([a-z_-])+$/i", $value))
i change it so /2010 is displayed
Code:
if (preg_match("/^([0-9|a-z_-])+$/i", $value))

but it doesn't work for hiring-a-plumber-4.html




Theme © iAndrew 2016 - Forum software by © MyBB