Part of the EllisLab Network
   
2 of 20
2
Autocrumb - Lightweight Breadcrumb Helper (ver.12.05.1)
Posted: 14 December 2009 02:28 PM   [ Ignore ]   [ # 11 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  180
Joined  06-11-2009

Fast work! Thanks.

Profile
 
 
Posted: 14 December 2009 05:34 PM   [ Ignore ]   [ # 12 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  162
Joined  03-19-2008

You’re welcome smile

 Signature 

AutoACL - Access Control Library++ with Very Private Page (VPP) Control
AutoCRUMB - The simplest breadcrumb helper ever
Autocrumb on bitbucket
Integrate CI 2 with Eclipse
———————————————————————————————-
Website: ardinoto.blogspot.com

Profile
 
 
Posted: 15 December 2009 10:47 PM   [ Ignore ]   [ # 13 ]  
Summer Student
Total Posts:  5
Joined  04-12-2008

Awesome.

Profile
 
 
Posted: 16 December 2009 08:40 PM   [ Ignore ]   [ # 14 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  162
Joined  03-19-2008
Tooker - 16 December 2009 03:47 AM

Awesome.

Glad you like it. Still need more feedback guys…

 Signature 

AutoACL - Access Control Library++ with Very Private Page (VPP) Control
AutoCRUMB - The simplest breadcrumb helper ever
Autocrumb on bitbucket
Integrate CI 2 with Eclipse
———————————————————————————————-
Website: ardinoto.blogspot.com

Profile
 
 
Posted: 06 January 2010 04:35 AM   [ Ignore ]   [ # 15 ]  
Grad Student
Avatar
Rank
Total Posts:  64
Joined  03-14-2008

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 :

$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 : /

 Signature 

ACICRUD Library - CKEditor Helper
@NukiumSolutions - My Blog (fr / en)

Profile
 
 
Posted: 11 January 2010 11:22 PM   [ Ignore ]   [ # 16 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  162
Joined  03-19-2008
Kromack - 06 January 2010 09:35 AM

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 :

$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 : /

You cannot change “Home” with replacer. Fortunately, it now can be modified via

$config['set_home''Accueil' 

Please download the new update below. Inform me if this update can’t solve your problem.

File Attachments
breadcrumb_helper_1.0.3.zip  (File Size: 4KB - Downloads: 197)
 Signature 

AutoACL - Access Control Library++ with Very Private Page (VPP) Control
AutoCRUMB - The simplest breadcrumb helper ever
Autocrumb on bitbucket
Integrate CI 2 with Eclipse
———————————————————————————————-
Website: ardinoto.blogspot.com

Profile
 
 
Posted: 12 January 2010 12:43 PM   [ Ignore ]   [ # 17 ]  
Grad Student
Avatar
Rank
Total Posts:  64
Joined  03-14-2008

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.array-replace.php#94458

Thanks smile

EDIT :

The function above do not works when using replacer.

Here’s mine :

/**
 * @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;
  
}
 Signature 

ACICRUD Library - CKEditor Helper
@NukiumSolutions - My Blog (fr / en)

Profile
 
 
Posted: 12 January 2010 11:58 PM   [ Ignore ]   [ # 18 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  162
Joined  03-19-2008
Kromack - 12 January 2010 05:43 PM

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.array-replace.php#94458

Thanks smile

EDIT :

The function above do not works when using replacer.

Here’s mine :

/**
 * @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;
  
}

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-

File Attachments
breadcrumb_helper_1.0.4.zip  (File Size: 4KB - Downloads: 238)
 Signature 

AutoACL - Access Control Library++ with Very Private Page (VPP) Control
AutoCRUMB - The simplest breadcrumb helper ever
Autocrumb on bitbucket
Integrate CI 2 with Eclipse
———————————————————————————————-
Website: ardinoto.blogspot.com

Profile
 
 
Posted: 03 February 2010 04:37 PM   [ Ignore ]   [ # 19 ]  
Lab Assistant
RankRank
Total Posts:  166
Joined  01-03-2010

@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

$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

if (preg_match("/^([a-z_-])+$/i"$value)) 

i change it so /2010 is displayed

if (preg_match("/^([0-9|a-z_-])+$/i"$value)) 

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

 Signature 

burak: Skinny controllers Fat models

Profile
 
 
Posted: 04 February 2010 10:25 PM   [ Ignore ]   [ # 20 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  162
Joined  03-19-2008

@123wesweat.
In last version autocrumb will stop finding any link name that contain a number. That’s why you cannot see “hiring-a-plumber-4” in crumb result. But if you use

if (preg_match("/^([0-9|a-z_-])+$/i"$value)) 
it should fine as long as you set url suffix in your application/config folder
$config['url_suffix'".html"

Another way to solved this problems is by download Autocrumb ver.2.0.0 below cool smile

 Signature 

AutoACL - Access Control Library++ with Very Private Page (VPP) Control
AutoCRUMB - The simplest breadcrumb helper ever
Autocrumb on bitbucket
Integrate CI 2 with Eclipse
———————————————————————————————-
Website: ardinoto.blogspot.com

Profile
 
 
   
2 of 20
2