I am trying to install multiTV and i get the following ( i am on MODX 1.0.6)
Warning: include_once(assets/plugins/phx/phx.parser.class.inc.php) [function.include-once]: failed to open stream: No such file or directory in /home/manager/includes/document.parser.class.inc.php(790) : eval()'d code on line 10
Warning: include_once() [function.include]: Failed opening 'assets/plugins/phx/phx.parser.class.inc.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php:/home/manager/includes/') in /home/manager/includes/document.parser.class.inc.php(790) : eval()'d code on line 10
Fatal error: Class 'PHxParser' not found in /home/usacrace/subsites/dev/manager/includes/document.parser.class.inc.php(790) : eval()'d code on line 12
-
☆ A M B ☆
- 24,524 Posts
Do you have the phx plugin installed?
yes, i moved the two files to assets/plugins/phx/modifiers
PS, thank you for your fast reply on my post.
-
☆ A M B ☆
- 24,524 Posts
If you moved it, that's why the system can't find it. It's supposed to be in assets/plugins/phx/.
in both location i get the same erro
in the instructions it stated to move multitvisnotempty.phx.php and multitvisempty.phx.php to assets/plugins/phx/modifiers
-
☆ A M B ☆
- 24,524 Posts
Oh, those files. Ok. Well, MODx can't find the core phx class file. Is that file that's mentioned in the error in the location where it's looking?
assets/plugins/phx/phx.parser.class.inc.php
Check the permissions as well to make sure the file is readable.
it was about
Part 3: PHx modifier
================================================================================
Since the JSON string in multiTV starts with `[[` and ends with `]]` (Note 1), you *can't* check if the multiTV is empty by i.e. ```[*multittvname:ne=``:then=`not empty`*]```.
But you could to use the PHx modifier in the folder `phx-modifier` in that case. Move the two files to `assets/plugins/phx/modifiers` and call it like this ``[+phx:multitvisempty=`tvname|docid`:then=`xxx`:else=`yyy`+]`` or like this ``[+phx:multitvisnotempty=`tvname|docid`:then=`xxx`:else=`yyy`+]``. If the docid is not set it defaults to current document.
Notes:
--------------------------------------------------------------------------------
1. The JSON string the multitv is converted to starts with `[[` and ends with `]]` so the MODX parser thinks it contains a snippet and you can't place the template variable directly in the template.
2. If the snippet output is assigned to placeholder and PHx is installed, the page should be set to uncached and the Snippet should be called cached. Otherwise PHx will 'steal' the placeholders before the Snippet could fill them.
3. MODX does not like `=`, `?` and `&` in snippet parameters. If the template code has to use those signs, put the template code in a chunk or change the default templates in the config file.
4. To allow multiTV contain single and double quote characters the html source code that contains the multiTV value is a textarea and not an input. If the multiTV should be modified by ManagerManager the file mm.inc.php has to be patched.
where would i place the code [+phx:multitvisempty=`tvname|docid`:then=`xxx`:else=`yyy`+]
-
☆ A M B ☆
- 24,524 Posts
Well, that's as far as I can go; I'm not at all familiar with that particular add-on.
Thank you for your help though.