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

[eluser]Yorick Peterse[/eluser]
[quote author="ray73864" date="1245162767"]I can't seem to run the latest committed version using WampServer, i downloaded it and extracted it out to a folder in wamp\www called 'pharmacy', then went to 'http://localhost/pharmacy/installer' and went through all the steps.

Then when i browse to 'http://localhost/pharmacy', Firefox comes up with:

Quote:Content Encoding Error

The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.

The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.

* Please contact the website owners to inform them of this problem.
[/quote]

Weird, very weird. Do you have something such as Gzip enabled ?

[eluser]BenneX[/eluser]
[quote author="Phil Sturgeon" date="1245113358"]Might be going a little far.

I think I can get away with just modifying the parse_single() function to allow syntax such as {helpername:helperfunction|"arg1":"arg2":"arg3"}. What do you guys think?[/quote]

Hmm. Sounds very well, but I think it doesn't make very much sense. It won't optimate the work of an theme-designer. The main term of a template-system is to give the theme-designer as few as possible placeholders to allow a great flexability. It should be easy to see what the placeholder will print out to make it easy to pose the dynamic output whereever you want. A call of a function within the views means an untransparent output, because you don't know the format of the returned output. To make it absolutely clear, an easy Example:

Code:
<!-- Here it's easy to handle -->
<div id="content">
&lt;h2&gt;{CONTENT_HEADLINE}&lt;/h2&gt;
&lt;p&gt;{CONTENT_INTRO_TEXT}&lt;/p&gt;
&lt;!-- And here it's impossible to handle --&gt;
&lt;? $this->content->createTable('Headline', $this->data->tableXY, 'cellpadding="0" id="tableXY"'); ?&gt;
&lt;!-- Better is to allow this --&gt;
&lt;h3&gt;{TABLE_XY_HEADLINE}&lt;/h3&gt;&lt;table {TABLE_XY_PARAMS}>
&lt;!-- TABLE_XY_ROW begin --&gt;
<tr>
&lt;!-- TABLE_XY_COL begin --&gt;
<td>{TABLE_XY_VALUE}</td>
&lt;!-- TABLE_XY_COL end --&gt;
</tr>
&lt;!-- TABLE_XY_ROW end --&gt;
</table>
</div>

Okay, a table is not the best example, but you'll see you have full control of the markup. Know it's very easy to add a specific class for advanced styling. You only need to add them in the template-file and see clearly where to do it. A function call is just in one case transparent... when it loads another viewfile but a placeholder is a better solution too.

I love the template-system of phpBB2 very much. Very useful and not overblewed Wink Maybe it can be migrated to ci? What you guys think about?

greetz

[eluser]Yorick Peterse[/eluser]
Please wrap it in code tags, that's easier to read and it won't f*ck up the forum layout Smile

[eluser]BenneX[/eluser]
[quote author="ray73864" date="1245167157"]Onto my next question too, how do i create a new module? i have followed the website post and have looked at the other modules, i can get the module to work fine on the website itself, and i can get it to work in the admin section too.

However i can't for the life of me figure out how to get the admin controller to appear in the sidebar with the rest of the modules.

my details.xml file looks like this:

Quote:&lt;?xml version="1.0" encoding="UTF-8"?&gt;
<module version="0.1" type="content">
<name>Chamber Members</name>
<description>Displays a table listing all the chamber members.</description>
<is_frontend>1</is_frontend>
<is_backend>1</is_backend>
<required>1</required>
<controllers>
<controller name="admin">
<method>index</method>
<method>create</method>
<method>edit</method>
<method>delete</method>
</controller>
</controllers>
<navigation>
<admin>
<new_item href="admin/members/create">New Chambers Member</new_item>
</admin>
</navigation>
</module>
[/quote]

Maybe it breaks down by trying to add the icon you haven't set...

[eluser]BenneX[/eluser]
[quote author="Yorick Peterse" date="1245168229"]Please wrap it in code tags, that's easier to read and it won't f*ck up the forum layout Smile[/quote]

It's wrapped in code-tags... :ohh:

...but I've forgotten to close it right Confusedhut:

[eluser]ray73864[/eluser]
[quote author="Yorick Peterse" date="1245167538"][quote author="ray73864" date="1245162767"]I can't seem to run the latest committed version using WampServer, i downloaded it and extracted it out to a folder in wamp\www called 'pharmacy', then went to 'http://localhost/pharmacy/installer' and went through all the steps.

Then when i browse to 'http://localhost/pharmacy', Firefox comes up with:

Quote:Content Encoding Error

The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.

The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.

* Please contact the website owners to inform them of this problem.
[/quote]

Weird, very weird. Do you have something such as Gzip enabled ?[/quote]

Nothing has changed from before (ie. i haven't changed any settings in wampserver at all), the previous commit that i grabbed still works fine (11th June)

c:\wamp\logs\access.log shows:

Quote:127.0.0.1 - - [16/Jun/2009:19:31:26 +0800] "GET /pharmacy/ HTTP/1.1" 200 1854

c:\wamp\logs\access.log shows a similar line for /capelcci/ which works fine but is still using the 2009-06-11 commit.

[eluser]ray73864[/eluser]
[quote author="BenneX" date="1245168398"][quote author="ray73864" date="1245167157"]Onto my next question too, how do i create a new module? i have followed the website post and have looked at the other modules, i can get the module to work fine on the website itself, and i can get it to work in the admin section too.

However i can't for the life of me figure out how to get the admin controller to appear in the sidebar with the rest of the modules.

my details.xml file looks like this:

Quote:&lt;?xml version="1.0" encoding="UTF-8"?&gt;
<module version="0.1" type="content">
<name>Chamber Members</name>
<description>Displays a table listing all the chamber members.</description>
<is_frontend>1</is_frontend>
<is_backend>1</is_backend>
<required>1</required>
<controllers>
<controller name="admin">
<method>index</method>
<method>create</method>
<method>edit</method>
<method>delete</method>
</controller>
</controllers>
<navigation>
<admin>
<new_item href="admin/members/create">New Chambers Member</new_item>
</admin>
</navigation>
</module>
[/quote]

Maybe it breaks down by trying to add the icon you haven't set...[/quote]

I did have an icon setting in there before, but when i examine the sidebar.php view, the idea is that if it doesn't find an <icon></icon> setting, it will just use the default folder_48 icon.

[eluser]Phil Sturgeon[/eluser]
Ray: Wipe everything in application/cache/modules_m/.

[quote author="BenneX" date="1245167970"]Sounds very well, but I think it doesn't make very much sense. It won't optimate the work of an theme-designer. The main term of a template-system is to give the theme-designer as few as possible placeholders to allow a great flexability. It should be easy to see what the placeholder will print out to make it easy to pose the dynamic output whereever you want. A call of a function within the views means an untransparent output, because you don't know the format of the returned output.[/quote]

It's not just about making a designers life easier, it is about making easy syntax available. Combined with an explanation page to describe how the hell it all works it would let almost anyone get using CodeIgniter links, asset inserting, form inputs, etc all using the simplified syntax that CodeIgniter helpers use.

I don't believe your example of how to create a table solves anything, in fact that looks complicated as hell to a non-tech.

I spent several years working with phpBB2 and their templating system is (at least, was) awful. It is a stripped down customised version of Smarty that is missing half the features and offers no improvements to the CI world.

So far looks like the poll is swinging in favour of modified CI parser and I am starting to agree.

[eluser]ray73864[/eluser]
[quote author="Phil Sturgeon" date="1245172344"]Ray: Wipe everything in application/cache/modules_m/.[/quote]

Thanks Phil, that fixed my problem. I actually quite like how you have the modules set up for working with, makes it very easy to create a new module... Is there a possibility that you could put up a page on your website detailing the 'details.xml' file?

[eluser]Phil Sturgeon[/eluser]
I would but I dont plan on keeping it very long. It will either be handled with the ReflectorClass or done in the db.

I think I will have to make a FAQ module soon. :-P




Theme © iAndrew 2016 - Forum software by © MyBB