Welcome Guest, Not a member yet? Register   Sign In
COMPER Template Parser 2 (NEW 2.5 Beta is out!)
#21

[eluser]darrentaytay[/eluser]
Still no luck including files. I don't get anything now - it's like it's not calling the preg callback.

It get's inside private function _includes() but not inside private function _include_content()

My code is:

Code:
<head>
        <!-- INCLUDE metadata -->
    </head>

And inside metadata is:

Code:
<meta http-equiv="content-type" content="text/html; charset=utf-8">
#22

[eluser]Tominator[/eluser]
Sorry, I can't help you.

As you can see in video Includes works. I've tested it in many sites before I released parser. If _include_content() is not called, problem is in your template file.
#23

[eluser]darrentaytay[/eluser]
Damn, ok.

Thanks anyway
#24

[eluser]Tominator[/eluser]
I was thinking about your problem. And I have a question. Have you changed name of library from Parser to something else?
#25

[eluser]Migranux[/eluser]
Hi,
Really a good job, i would like to know just one thing ; do you know if your parser is compatible with HMVC implementation from wiredesignz.
Thanks again Wink
Migranux
#26

[eluser]darrentaytay[/eluser]
[quote author="Tominator" date="1298912256"]I was thinking about your problem. And I have a question. Have you changed name of library from Parser to something else?[/quote]

I didn't change the name of the library, however, I deleted my current installation ( including the tweaks I had made to it ) and re-installed it, pasted my tweaks back in and now it works - crazy.

I am very happy with it, so thanks again.

One thing, can you do comparisons such as?

Code:
<!-- if user_type = "admin" -->
Do this
<!-- end -->

Or can it only test for true/false?
#27

[eluser]Tominator[/eluser]
@Migranux: I don't know. Probably not, because your templates should be stored in app/view folder. In next update I'm going to make it more flexible. My problem is, that I don't exactly know how HMVC works.

dt17: Yes it's true you can only test for TRUE or FALSE. This is one big disadvantage, but I'm still finding the way how to change it. Good massage is, that when you pass TRUE or FALSE it works. Let me explain it more:

Code:
<!-- IF TRUE -->

This will work

<!-- END -->

Usage:
Code:
<!-- BEGIN blog -->

  <!-- IF {published} -->
  
       {post_content}

  <!-- END -->

<!-- END blog -->
#28

[eluser]lnguyen[/eluser]
Thank for reply. I did find answer for my problem. Your lib is so good. sorry for my eng..
#29

[eluser]Tominator[/eluser]
Hi!

I'm preparing new update. What's going to change?
* NEW: Conditions will support PHP functions! (<!-- IF strtolower("{user_type}") == "admin" --&gtWink
* FIX: Paths will be able to change via config.
* FIX: Little bug in conditions. Never mind Big Grin

And I want to hear your voice about paths. I want to implement them this way:

Code:
$template_folder = '/%appdata%/views/';
$theme_folder = '/%appdata/views/%theme%/tpl/'; //(where tpls should be stored)

The question is: Is this solution good enought? Thanks for answers!

@lnguyen: Thank you!

Have a nice day,
Tom
#30

[eluser]InsiteFX[/eluser]
Why not create a config file for all your settings then load it?
Code:
$config['template_folder'] = '/appdata/views/';
$config['theme_folder']    = '/appdata/views/theme/tpl/'; //(where tpls should be stored)

// then use
$this->config->load('config_name');

InsiteFX




Theme © iAndrew 2016 - Forum software by © MyBB