Welcome Guest, Not a member yet? Register   Sign In
Ionize - Free & Open Source creative CMS
#31

[eluser]BrianDHall[/eluser]
- Note on a problem inherant in CI itself. Visit your installation of Ionize, such as yourdomain.com. Now tack on some random extra bits, such as yourdomain.com/?googleclick=test - which is what many click-tracking sort of websites do, especially pay-per-click.

You'll get a 404 error page.

I fix this on my servers by setting the uri_protocol to PATH_INFO in config.php. I don't know why this problem still exists in the CodeIgniter core, but I figured I'd mention it here anyway as at first I thought it was an Ionize problem Smile
#32

[eluser]Michel-Ange[/eluser]
@easylancer : Their is a tag wich permit to load "partial" views.

This tag give you the possibility to load pure PHP partials, or nested partials.

The partials should be located in a subfolder from the /themes/your_theme/views/ folder.

Attributes :
- path : the path to your partial view
- parse :
"no" : the partial is a pure PHP with PHP var in it
"yes" : the partial contains some other templates tags

Code:
<ion:partial path="partials/your_partial_without_extension" parse="no" />

This method is not documented as it need to be tested more deeply. Will you test it ? Smile
#33

[eluser]BrianDHall[/eluser]
[quote author="Michel-Ange" date="1258395965"]The only CI hack is in CodeIgniter.php :

Code:
// Load the local application controller
// Note: The Router class automatically validates the controller path.  If this include fails it
// means that the default controller in the Routes.php file is not resolving to something valid.
/*
if ( ! file_exists(APPPATH.'controllers/'.$RTR->fetch_directory().$RTR->fetch_class().EXT))
{
    show_error('Unable to load your default controller.  Please make sure the controller specified in your Routes.php file is valid.');
}
include(APPPATH.'controllers/'.$RTR->fetch_directory().$RTR->fetch_class().EXT);
*/

/**
* Begin addition
* Purpose: Enable Controller cascading
*/
if( ! $RTR->fetch_controller_path())
{
    show_error('Unable to load your default controller.  Please make sure the controller specified in your Routes.php file is valid.');
}
include($RTR->fetch_controller_path());

/*
* End Addition
*/

If you have another idea, I'm open to well coded suggestions ![/quote]

I believe I have a solution!

First, change the core file back to the way it was - uncomment the original code, and comment out the addition.

Then in application/libraries/Router.php, add a new function:

Code:
public function fetch_directory()
    {
        $folders = explode('/',APPPATH);

        $dots = '';

        foreach ($folders as $folder)
        {
            $dots .= '../';
        }

        if($this->module_path)
        {
            $path = $this->config->item('module_path') . $this->module_path . '/';
        }
        else
        {
            $path = APPPATH;
        }

        return $dots . $path . 'controllers/' . ($this->directory ? $this->directory . '/' : '');
    }

That's it! The trick is using ../ in paths. So first we reverse the effect that APPPATH/controllers has in CodeIgniter.php, then we proceed as normal. No other changes needed!

To start with, everything works perfectly.

EDIT: I had some other problems that were my own darn fault, had an old CI install on this one.
#34

[eluser]BrianDHall[/eluser]
OK, now I do actually have a really weird problem when changing CodeIgniter installation systems.

Everything appears to work perfectly, except somehow things go wrong in the display of the front-end and backend only in a few areas.

On the front-end, the left and right arrows at the top of the page next to the photo stop working.

Lower on the page where the article is displayed, it becomes a funky scroll box ONLY in internet explorer? But the previously mentioned arrows seem to disappear in all browsers.

On the back-end the top navigation bar (with Dashboard and all that) just stops working ONLY in IE8 in compatability mode. Nothing is clickable, and nothing drops down when you mouse over. I'm not getting any errors, so don't know where to look.

When compat mode is off and the weird page quirks showup (the previously mentioned bullet and such oddness), the navigation bar works fine! When the compat is on and the page looks ok, the bar stops working.

So there is just something in here I'm missing, perhaps a piece of javascript of CSS or some tiny bit of logic that relies on either the CI core or the location of the system folder.

It causes problems in all the browsers I've tested, but just shows up the worst on IE8 in regular mode.

The internal logic all seems to work fine other than that. I've edited pages, added articles, deleted languages, the works. All fine.

And all this is flicked on and off with a simple switch of the system folder in index.php.

Two html files attached in zip - one is the HTML of the working page, one of the broken one. A quick diff shows major differences, seemingly connected to javascript controlled items.

The only difference that generates these two is a different CI system folder.
#35

[eluser]Référencement Google[/eluser]
That's where you should consider just update the Codeigniter.php file instead of trying to hack Ionize. it's just 5 lines to change, not a big deal, just not forget do it after an update of CI's core.

I really hope one day they will make possible to hack the core like we can hack the other libs...
#36

[eluser]BrianDHall[/eluser]
[quote author="Too Pixel" date="1258422911"]That's where you should consider just update the Codeigniter.php file instead of trying to hack Ionize. it's just 5 lines to change, not a big deal, just not forget do it after an update of CI's core.

I really hope one day they will make possible to hack the core like we can hack the other libs...[/quote]

OK, jeesh, how about a 1 liner? Wink

Don't know if the function is used elsewhere, but here is the fetch_controller_path() with the return value changed and 1 additional line - of course renamed to what CI expects:

Code:
public function fetch_directory()
    {
        // Fix for CodeIgniter's hard-coded routing path
        $dots = preg_replace('/\w+(\/)/', '..\1', APPPATH) . '../';
        
        if($this->module_path)
        {
            $path = $this->config->item('module_path') . $this->module_path . '/';
        }
        else
        {
            $path = APPPATH;
        }

        return $dots . $path . 'controllers/' . ($this->directory ? $this->directory . '/' : '');
    }

Can't be any more simple a solution than that to avoiding a core hack.

I'm big on no core hacks because if it is going to use CI I want it to work on the same base all my other applications run on. One common codebase to maintain, so when I have to hack, fix, or extend something in the core I don't have to worry about other applications and their changes - just mine.
#37

[eluser]BrianDHall[/eluser]
Upon further checking, I'm afraid IE8 is really sucking on handling the default template. Screenshot attached.

The image scrolling feature at the top doesn't work - clicking results in...just nothing happening.

I also circled in red the weird gap IE8 products. None of this is effected by compatibility mode - works the same either way.

So other than IE8 issues and the system folder issue, running great so far!

Great work guys, this is way more than I expected.

Err, btw - I noticed a comment about modules. That feature isn't supposed to do anything yet, right? It says paypal installed and the install links are blank pages, and no way to uninstall. I assumed that was just a placeholder Smile
#38

[eluser]Michel-Ange[/eluser]
Brian : Don't care bout the example website : it is just a website quickly developped to illustrate Ionize possibilities, that's all !
If it's not working, it's not so important regarding to the backend perfection !

By the way, a big thank for your help. We will study your hack !
#39

[eluser]Michel-Ange[/eluser]
You're also right about the module : The structure and code is there, but there is no example module for the moment.
I will develop one for my next project.
#40

[eluser]Kip zonder Kop[/eluser]
First, thank you for this CMS. I like it.

What I try to accomplish is to create a menu in which one or more of the entries lead to another location then an Ionize page but - for example - to another website or sub-domain. Is that possible and if not so, what would be the best place to implement such functionality? Are you planning such functionality.

I think conceptually the introduction of another simple page type is needed here, a kind of external page. Only redirection to another location is needed. Shouldn't be too difficult. This way Ionize sites can serve as an umbrella over other sites.




Theme © iAndrew 2016 - Forum software by © MyBB