Welcome Guest, Not a member yet? Register   Sign In
PyroCMS v0.9.7.4 - an open-source modular general purpose CMS

[eluser]Phil Sturgeon[/eluser]
Could you show me some screenshots and some source? There was no change that should have disabled styles for the backend. If you see the styles showing in source and they are linked to successfully, then something more strange must be going on.

[eluser]NateL[/eluser]
[quote author="Phil Sturgeon" date="1259901360"]Could you show me some screenshots and some source? There was no change that should have disabled styles for the backend. If you see the styles showing in source and they are linked to successfully, then something more strange must be going on.[/quote]

ah but of course... this whole time it was my .htaccess file.

Haven't exactly pinpointed what is wrong in the .htaccess file, but I know that now that I'm tinking with it, I'm seeing the Admin backend as it should appear.

Thanks anyway Smile

[eluser]bdegier[/eluser]
I'm running into some problems trying to develop a shoppingcart module for my application.

I've made a folder "shoppingcart" in the modules folder and wrote a controller and view. Now when i go to http://localhost/pyrocms/shoppingcart i get served my view nicely but how do I implement this in my layout?

I've stolen some code from the index page which loads the news module:

Code:
<?php if(module_exists('shoppingcart')): ?>
<?= $this->Shoppingcart->index(); ?>
<? endif; ?>

But this throws me the following error:
Quote:A PHP Error was encountered

Severity: Notice

Message: Undefined property: CI_Loader::$Shoppingcart

Filename: layouts/shoppingcart-page.php

Line Number: 46

Fatal error: Call to a member function index() on a non-object in C:\xampp\htdocs\pyrocms\application\themes\Bento\views\layouts\shoppingcart-page.php on line 46

So i tried the dirty method: Instead of including the module in one of the pages i placed the whole layout in the module view and then got this error:
Quote:A PHP Error was encountered

Severity: Notice

Message: Undefined variable: theme_view_folder

Filename: views/cart.php

Line Number: 73
An Error Was Encountered

Unable to load the requested file: metadata.php

[eluser]bdegier[/eluser]
This works but i'm not sure if this is the clean way of doing it:
Code:
<? if (is_module('shoppingcart')): ?>
<?= $this->load->module_view('shoppingcart', 'cart_index_view'); ?>
<? endif; ?>

[eluser]bdegier[/eluser]
By the way, when running PHP 5.3.0 i get this error:
Parse error: syntax error, unexpected $end in C:\xampp\htdocs\pyrocms\application\libraries\Loader.php(893) : eval()'d code on line 140

[eluser]tomcode[/eluser]
PyroCMS v0.9.7.3

got an installer error :

Parse error: syntax error, unexpected T_SL in /htdocs/philsturgeon-pyrocms-afca9da/installer/application/models/installer_m.php on line 245

[eluser]Phil Sturgeon[/eluser]
[quote author="tomcode" date="1260291141"]PyroCMS v0.9.7.3

got an installer error :

Parse error: syntax error, unexpected T_SL in /htdocs/philsturgeon-pyrocms-afca9da/installer/application/models/installer_m.php on line 245[/quote]

Sorry about that, that was a really stupid mistake. I tested before I merged my branch into master instead of after and I missed a conflict. That's been pushed to master now so I'll re-test and re-tag tonight.

[eluser]Phil Sturgeon[/eluser]
[quote author="bdegier" date="1260045118"]This works but i'm not sure if this is the clean way of doing it:
Code:
<? if (is_module('shoppingcart')): ?>
<?= $this->load->module_view('shoppingcart', 'cart_index_view'); ?>
<? endif; ?>
[/quote]

is_module is deprecated, use module_exists instead.

As for showing a layout, is this a normal "I have built a page and want to wrap the header and footer" sort of thing? If so, in your controller use the Layout library instead of worrying about anything in the view.

Code:
$this->layout->title('Something')->create('viewfile', $this->data);

The title() method is optional, it will guess based on controller and method names if nothing is provided.

You're gonna hate me but v0.9.8 will change how modules work quite a lot, BUT v0.9.8 will have module builders documentation so at least that's something...

[eluser]bdegier[/eluser]
Thanks for the reply. Can't wait for 0.9.8 :-)

[eluser]hugle[/eluser]
Hello,
I had issues with inling v. 0.9.7.3, but with .4 It's ok....

Btw, in the Gallery module, if I select few galleries with 'checkboxes' and click delete, I get an error:
"You need to select one or more galleries to delete."

And one question, is the any module ready to upload video files?Smile thanks!




Theme © iAndrew 2016 - Forum software by © MyBB