Welcome Guest, Not a member yet? Register   Sign In
DTE BreadCrumb Class
#13

[eluser]ericsodt[/eluser]
[quote author="morozgrafix" date="1231984491"]Hello Dean,

Thank you for quick reply. I think you missing session_start(); call on line 2 of Breadcrumb.php in your latest version it should be this:

Code:
<?php  if (!defined('APPPATH')) exit('No direct script access allowed');
session_start();

/*
* @Author: Dean Ericson
* @Email: [email protected]
*
*/
//...

I also was looking around to be able to change delimiter within same project. For example to be able to specify individual delimiters for different pages. I have modified setBreadCrumb method in Breadcrumb.php (I know this may not be most efficient solution, but it works for me)

Code:
//...
function setBreadCrumb($bcObjArr){
    $this->title=$bcObjArr['title'];
    $this->url=$bcObjArr['url'];
    $this->isRoot=$bcObjArr['isRoot'];
    if(isset($bcObjArr['delimiter'])){
        $this->delimiter=$bcObjArr['delimiter'];    
    }
    
    $CI =& get_Instance();
    $CI->breadcrumblist->add($this);
    if(isset($this->delimiter)){
        $CI->breadcrumblist->setDelimiter($this->delimiter);
    }
    $_SESSION['breadCrumbList'] = $CI->breadcrumblist->getBreadCrumbs();        
}
//...

Now, delimiter could be specified within $bc array in my controller like this:
Code:
//...
$bc = array (
    'title' => 'Latest Reports',
    'url' => '/qareports',
    'delimiter' => ' any_new_delimiter ',
    'isRoot' => true
);
//...

With this change delimiter could be set from $bc array, if not set here it would be picked up from config.php (your latest change in 1.6 release) and then if not found in config.php would be defaulted to hardcoded setting.

Oh, and one more thing, I've noticed that word delimiter was misspelled in your code, it was spelled as "delimeter" - I ended up correcting spelling throughout the code.

Once again thank you for sharing your code and your quick replies.

Sergey.[/quote]

Sergey,

I realized I spelled it wrong on version 1.5, but didn't have the time to go through and fix it (being lazy really). I will make the changes you have brought to light. Yes I am missing the session_start() at the top of the page... I made the update quickly last night and left that out... no excuse really. I will also incorporate your changes into the next release (1.7) which I should be able to get out tonight or tomorrow depending on my work schedule.

Thank you for your feedback!!


Messages In This Thread
DTE BreadCrumb Class - by El Forum - 12-16-2008, 01:06 PM
DTE BreadCrumb Class - by El Forum - 12-16-2008, 08:31 PM
DTE BreadCrumb Class - by El Forum - 12-16-2008, 08:37 PM
DTE BreadCrumb Class - by El Forum - 01-01-2009, 05:28 PM
DTE BreadCrumb Class - by El Forum - 01-01-2009, 05:48 PM
DTE BreadCrumb Class - by El Forum - 01-01-2009, 05:52 PM
DTE BreadCrumb Class - by El Forum - 01-01-2009, 07:26 PM
DTE BreadCrumb Class - by El Forum - 01-13-2009, 06:50 PM
DTE BreadCrumb Class - by El Forum - 01-13-2009, 07:17 PM
DTE BreadCrumb Class - by El Forum - 01-13-2009, 08:32 PM
DTE BreadCrumb Class - by El Forum - 01-13-2009, 09:02 PM
DTE BreadCrumb Class - by El Forum - 01-14-2009, 01:54 PM
DTE BreadCrumb Class - by El Forum - 01-14-2009, 02:02 PM
DTE BreadCrumb Class - by El Forum - 01-14-2009, 02:12 PM
DTE BreadCrumb Class - by El Forum - 01-14-2009, 02:17 PM
DTE BreadCrumb Class - by El Forum - 01-14-2009, 09:28 PM
DTE BreadCrumb Class - by El Forum - 03-03-2009, 03:45 PM
DTE BreadCrumb Class - by El Forum - 03-15-2009, 11:06 AM
DTE BreadCrumb Class - by El Forum - 04-29-2009, 07:58 PM
DTE BreadCrumb Class - by El Forum - 06-10-2009, 07:54 AM
DTE BreadCrumb Class - by El Forum - 06-11-2009, 04:33 PM
DTE BreadCrumb Class - by El Forum - 08-03-2009, 01:38 AM
DTE BreadCrumb Class - by El Forum - 09-23-2009, 02:05 PM
DTE BreadCrumb Class - by El Forum - 10-06-2009, 07:10 AM
DTE BreadCrumb Class - by El Forum - 12-21-2009, 01:21 PM
DTE BreadCrumb Class - by El Forum - 12-21-2009, 01:29 PM
DTE BreadCrumb Class - by El Forum - 12-21-2009, 01:49 PM
DTE BreadCrumb Class - by El Forum - 04-10-2010, 12:45 AM
DTE BreadCrumb Class - by El Forum - 04-10-2010, 08:22 AM
DTE BreadCrumb Class - by El Forum - 09-06-2010, 02:49 PM
DTE BreadCrumb Class - by El Forum - 09-06-2010, 04:17 PM
DTE BreadCrumb Class - by El Forum - 09-06-2010, 04:23 PM
DTE BreadCrumb Class - by El Forum - 09-06-2010, 04:29 PM
DTE BreadCrumb Class - by El Forum - 10-28-2010, 12:43 PM
DTE BreadCrumb Class - by El Forum - 06-18-2011, 05:18 PM
DTE BreadCrumb Class - by El Forum - 07-16-2012, 02:05 PM



Theme © iAndrew 2016 - Forum software by © MyBB