Oct 07, 2008, 02:21 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
modxcms.com web
  MODxCMS.com   Forums   Help Login Register  
News:Donate to MODx: Donations
Pages: 1 ... 8 9 [10] 11 12 ... 15   Go Down
  Print  
Author Topic: Support/Comments for PHx  (Read 41064 times)
0 Members and 1 Guest are viewing this topic.
cleveley
Jr. Member
*
Posts: 17


« Reply #135 on: May 29, 2007, 04:28 PM »

Thanks doze that worked like a treat.

Thanks loads.

John
Logged
grunt_lord
Full Member
***
Posts: 202


"Doing the most out of nothing"


WWW
« Reply #136 on: Jun 01, 2007, 07:00 PM »

Oh god!  You're saving my life and brain!  It's really an awesome plugin!  Two thumbs up!
Logged

Blaise Bernier

www.medialdesign.com - Solutions for small business, hosting, design and more!
ncrossland
Testers
*
Posts: 165


« Reply #137 on: Jun 25, 2007, 07:32 AM »

I've made some improvements to PHx, allowing it to get custom modifiers from files, as well as snippets. This is much easier when it comes to distributing custom modifiers (as they can simply be downloaded, rather than having to be copied into database) and copying between sites, or incorporating into new sites.

Can anyone see any drawback to this approach, or any reason why it shouldn't be used? I've contact the author, but no reply yet.

Logged
rthrash
Foundation
*
Posts: 9,269



WWW
« Reply #138 on: Jun 25, 2007, 08:27 AM »

Armand is very busy being a dad for the first time. I don't think anyone would object, and personally think it's a great idea. Smiley
Logged

MODx is a framework that allows web professionals to turn over sites to end-users for daily maintenance without worrying. Community participation and questions are encouraged, especially when you help us help you, read the wiki, and review snippet parameters – even if you have to look at the source. Searching the forums helps, too.
Ryan Thrash
MODx Co-Founder
Principal @ Collabpad
work productively.
work intelligently.
work together.
ncrossland
Testers
*
Posts: 165


« Reply #139 on: Jun 27, 2007, 04:15 AM »

Armand is very busy being a dad for the first time. I don't think anyone would object, and personally think it's a great idea. Smiley

Understandable then!! I'll tidy up the files and upload them to the repository.
Logged
Dimmy
Testers
*
Posts: 1,779


Я не говорю по-русски 私は日本語を話さない


WWW
« Reply #140 on: Jun 27, 2007, 04:24 AM »

Armand is very busy being a dad for the first time. I don't think anyone would object, and personally think it's a great idea. Smiley

Understandable then!! I'll tidy up the files and upload them to the repository.


Did you also include the hack: http://modxcms.com/forums/index.php/topic,14306.msg96738.html#msg96738

so that placeholders used in snippetcalls are not removed by phx?
Logged

"They say if you play a Microsoft CD backwards, you hear satanic messages. That's nothing, because if you play it forwards, it installs Windows."
Nederlands beste portal voor pda en mobiel internet
ncrossland
Testers
*
Posts: 165


« Reply #141 on: Jun 29, 2007, 09:14 AM »

Armand is very busy being a dad for the first time. I don't think anyone would object, and personally think it's a great idea. Smiley

Understandable then!! I'll tidy up the files and upload them to the repository.


Did you also include the hack: http://modxcms.com/forums/index.php/topic,14306.msg96738.html#msg96738

so that placeholders used in snippetcalls are not removed by phx?

Didn't know about that, but I will merge it in before I upload.
Logged
bS
Coding Team
*
Posts: 397



WWW
« Reply #142 on: Jun 29, 2007, 11:22 AM »

FYI: using the hack will result in  PHX not being recursive.
The reason phx takes on the placeholders is because it needs to resolve the value when they are nested.
Logged

Armand Pondman
MODx Coding Team
:: Jot :: PHx
Dimmy
Testers
*
Posts: 1,779


Я не говорю по-русски 私は日本語を話さない


WWW
« Reply #143 on: Jun 29, 2007, 01:46 PM »

Hello bs nice to see you back here, how is it at home? all good with the baby? an being a dad? I will be dad for the 2nd time soon (the end date was today so it can happen any day now)

back to PHx, could PHx just place the placeholder back if no phx additions are found on the placeholder? so if there is no :anyphxthing= in the placeholder do not touch it.

I use PHx alot but I also use eForm alot and even togetter like this:
Code:
[+betalingsmethode:is=`Ideal`:then=` [!eForm? &eFormOnBeforeMailSent=`eForm2db` &allowhtml=`1` &formid=`kassaform` &to=`[+email+]`&from=`website@website.com` &fromname=`MiN Website` &bcc=`website@website.com` &replyto=`website@website.com `&tpl=`kassaform` &language=`nederlands`&report=`kassareport` &thankyou=`idealsubmit` &subject=`Bestelling vanaf de MiN site`!] [!order_sessie!]`:else=`[!eForm? &eFormOnBeforeMailSent=`eForm2db` &allowhtml=`1` &formid=`kassaform` &to=`[+email+]`&from=`dimitri@1-vision.nl` &fromname=`MiN Website` &bcc=`website@website.com` &replyto=`website@website.com`&tpl=`kassaform` &language=`nederlands`&report=`kassareport` &gotoid=`60` &subject=`Bestelling vanaf de MiN site`!] [!order_sessie!]`+]

mm thinking of the above code does leave the placeholders in place but the next call is stripped of the tags

Code:
[!eForm? &debug=`1` &formid=`persfriendform` &to=`[+uwemail+]`&bcc=`[+email+]` &from=`[+uwemail+]` &replyto=`[+uwemail+]` &tpl=`persfriendform` &language=`nederlands` &report=`persfriendreport` &thankyou=`vriendverstuurd` &subject=`[+naam+] wil graag dat u even kijkt...`!]
« Last Edit: Jun 29, 2007, 02:37 PM by Dimmy » Logged

"They say if you play a Microsoft CD backwards, you hear satanic messages. That's nothing, because if you play it forwards, it installs Windows."
Nederlands beste portal voor pda en mobiel internet
bS
Coding Team
*
Posts: 397



WWW
« Reply #144 on: Jun 29, 2007, 02:30 PM »

it should leave the unresolved ones intact (if they have NO modifiers). The ones with modifiers that are unresolved are cleared by PHx the ones without it just leaves for MODx. It's been a while since i write the code but I know i have spent many nights solving the parser problems. Maybe it's time for a short review later this week to help you guys out Smiley
Logged

Armand Pondman
MODx Coding Team
:: Jot :: PHx
apatkar
Jr. Member
*
Posts: 9


« Reply #145 on: Jul 02, 2007, 08:18 PM »

I have a problem wth phx. I am using an expression like :
[+phx:if=`[+placeholder+]`:ne=``:then=`[+placeholder+]`:else=``+]
The problem is that if the string which replaces placeholder is above 8600 or so characters, i get the entire phx statement in the output with the placeholder being replaced both times.

How can i fix or work around this?
Logged
bS
Coding Team
*
Posts: 397



WWW
« Reply #146 on: Jul 03, 2007, 06:02 AM »

can you send me the complete output so i can reproduce?
Logged

Armand Pondman
MODx Coding Team
:: Jot :: PHx
apatkar
Jr. Member
*
Posts: 9


« Reply #147 on: Jul 03, 2007, 03:17 PM »

Okay, the output looks like this test page I made:
http://cehd.gmu.edu/test5/

I have uploaded my chunk and snippet -
This is the chunk: http://www.box.net/shared/rf8br7luup
This is the snippet: http://www.box.net/shared/2tt54lbgdn

The call to the snippet is a non-cacheable call [!snippet!] and caching for the page where call is implemented is turned off too.

The number on the test page is the length of characters of the string which replaces placeholder, which i have found by trial and error to be the treshold in my case (16615). Strangely, it also seems to depend on the size of my chunk, because if I reduce the size of any string in my chunk, it seems to work as expected. It doesnt depend on the placeholder though ([+this+] is as good as [+placeholder+]). The length of the chunk without the placeholder is 108 characters.

There is one more weirder problem -

If chunk is like this (in one line):

[+phx:if=`[+placeholder+]`:ne=``:then=`<div id="publications"><h2>Recent Publications He</h2><div>[+placeholder+]</div></div>`:else=`PE`+]

then i get a blank page as output.

But if chunk is like this (a newline after <\div> with two characters removed from the header to compensate for \n and maintain limit threshold):

[+phx:if=`[+placeholder+]`:ne=``:then=`<div id="publications"><h2>Recent Publications </h2><div>[+placeholder+]</div>
</div>`:else=`PE`+]

then i get the "[+phx...." in the output with both instances of [+placeholder+] replaced.
Logged
MEGU
Committed to MODx
*****
Posts: 817



WWW
« Reply #148 on: Jul 04, 2007, 09:46 PM »

Dear all,
and I thank to your great work, PHx.

I have two troubles by Jot and PHx.
One contributed to the forum of jot.
Please refer to it:
http://modxcms.com/forums/index.php/topic,12828.msg103702.html#msg103702

But when I found another problem, it seems that it is trouble of PHx, I think.
So I contribute this forum.

About version:
 MODx 0.9.5
 PHx 2.1.2
 Jot 1.1.2

I tried the following:
1. create a chunk, for example.  Name is "forluluminitest".
Code:
[[Jot? &docid=`287` &validate=`content:content required,title:title requred:#[abc]#`]]

2. create a template and write as following.
Code:
......
{{forluluminitest}}
[+jot.html.comments+]
[+jot.html.navigation+]
[+jot.html.form+]
......

3. create a document and select the template which created in the above.  And save.
4. access url of document which create in the above.
5. comment form appears.
6. input the required fields.  And click button of "submit".
7. Then I get an error as following.
Code:
  Error: preg_match() [function.preg-match]: Empty regular expression
  Error type/ Nr.: Warning - 2
  File: /home/example/www/assets/snippets/jot/jot.class.inc.php
  Line: 781
  Line 781 source: if (!preg_match($re,$value))

NEXT:
1. Disable PHx.
2. Try again.
3. I do not get error.  The contribution of comment is successful.

NEXT:
1. Run PHx.
2. rewrite the chunk as following.
Code:
[[Jot?  &docid=`287` &validate=`content:content required,title:title requred:#abc#`]]
(Of course, the meaning of Regular expression would differ).

3. Try again.
4. I do not get error.

I would like to use Regular expression (for example, #[abc]#) in Jot.
But it is disabled, if PHx is able.

Can I solve this problem?

Sincerely yours,
« Last Edit: Jul 04, 2007, 10:28 PM by MEGU » Logged
netProphET
Coding Team
*
Posts: 291


Time is Art


WWW
« Reply #149 on: Jul 05, 2007, 10:38 AM »

Hi,
PHx is prohibiting me from specifying a Chunk name with a TV.
ex. {{[*right-hand-images*]}}
I have looked through this thread, and while it feels similar to the problem people are having specifying an address in the eForm snippet, I tried TobyL's mod http://modxcms.com/forums/index.php/topic,14306.msg96738.html#msg96738, and it did not do the trick.
Is this being worked on, or has been solved elsewhere?
Kind regards,
Mike

Logged
Pages: 1 ... 8 9 [10] 11 12 ... 15   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP

Copyright © 2005-2008 MODxCMS, All rights reserved. Contact Us
Styles by ziworks.com

Powered by SMF 1.1.4 | SMF © 2005, Simple Machines LLC

Valid XHTML 1.0! Valid CSS!