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

[eluser]Unknown[/eluser]
Hi, is there any way to unlink segment by name?
I got http://localhost/gallery/category/photo/32

And Dreadcrumb
Home > Gallery > Photo > 32

I want to unlink Photo, got someone any ideas?


---
Peace
#82

[eluser]phederic[/eluser]
you are a genius! thanks!!!!!
#83

[eluser]cahva[/eluser]
[quote author="Archa" date="1276647233"]Hi, is there any way to unlink segment by name?
I got http://localhost/gallery/category/photo/32

And Dreadcrumb
Home > Gallery > Photo > 32

I want to unlink Photo, got someone any ideas?
[/quote]

In the current autocrumb no, but fortunately I needed the same so I added the feature to it Smile

I made a fork of it and you can find it here:
http://bitbucket.org/cahva/codeigniter-autocrumb
#84

[eluser]ardinotow[/eluser]
Just noticed a bug on first breadcrumb link. Using replacer on first breadcrumb link will cause URL link have the same word that replace it. Anyway, bug has been fixed. Get the source here: http://bitbucket.org/ardinotow/autocrumb

Happy Fasting to all Muslims all over the world!
#85

[eluser]carnalito[/eluser]
Hi,

you did:

Code:
if ($j == 0)
                {
                    $uri_array = array_replace($uri_array_original, $replacement);
                }

and "corrected" this to:

Code:
if ($j = 0)
                {
                    $uri_array = array_replace($uri_array_original, $replacement);
                }

This new code is allways true, so why using this if-statement?!
#86

[eluser]ardinotow[/eluser]
Thanks for reviewing my code. No, It's not always true because if-statement is inside foreach-loop. Is that what you mean?
#87

[eluser]carnalito[/eluser]
Hi,

you are welcome.

No this is not what i mean. Your statement is a assignment, so $j = 0 is allways true, because the value of $j is now 0.

Know what i mean?
#88

[eluser]danmontgomery[/eluser]
$j=0 never evaluates to true. The assignment operator doesn't return a value based on success, the statement evaluates to the new value of $j.

Code:
if($j=0)
// is
if(0)

which is always false.
#89

[eluser]carnalito[/eluser]
i never used this statement in an if-construct - i assumed that it is true.

Nevertheless, the code is not good...
#90

[eluser]ardinotow[/eluser]
The code is a bit complicated because using many array loops and replacements. Sure, code is not clear enough and looks ugly for some people but I try my best to make this helper more easier to use.

Cheers




Theme © iAndrew 2016 - Forum software by © MyBB