From: Tara S. <te...@cl...> - 2001-11-11 11:46:22
|
Can anybody tell me what the difference between Element() and QElement()=20 functions in lib/stdlib.php is? I've seen the code difference, but I'm=20 not sure when one should use Element and when one should use QElement. thanks Tara --=20 Je r=E9ponds au mieux de mes connaissances Climb to the Stars! - http://climbtothestars.org/ no tables: http://climbtothestars.org/coding/tableless/ Pompeurs Associ=E9s - http://pompage.net/ |
From: Jeff D. <da...@da...> - 2001-11-11 15:53:38
|
On Sun, 11 Nov 2001 12:42:35 +0100 "Tara Star" <te...@cl...> wrote: > Can anybody tell me what the difference between Element() and QElement() > functions in lib/stdlib.php is? I've seen the code difference, but I'm > not sure when one should use Element and when one should use QElement. It looks like you've figured out the answer already but just in case: The only difference is that QElement runs the element contents through htmlspecialchars(). Htmlspecialchars() encodes characters like '<', '>', '&', etc... as HTML entities ('<', ...). So you should use Element() when the HTML element you're producing contains sub-elements, and QElement() when the elements contents are plain text. Does that help? |
From: Tara S. <te...@cl...> - 2001-11-11 16:26:54
|
Jeff Dairiki wrote: [snip] > So you should use Element() when the HTML element you're producing > contains > sub-elements, and QElement() when the elements contents are plain text. >=20 > Does that help? yes!!! Extra question: I have two languages on my wiki, often mixed on the same pages. I'd like=20 a way to allow users to specify that a bloc of text is a given language,=20 for example by inserting [en] or [fr] in front of a paragraph. The wiki would then parse these little tags, and depending on something=20 in the preferences setting, would show one of them (or both!) as a=20 little flag or well... anything (that's not the difficult part). Like=20 that people who only speak one language can make their language (or at=20 least blocks defined as their language) more visible. My question is: where in the wiki script would such parsing be done? in=20 transform.php? what kind of "tag" could be used, which wouldn't=20 interfere with the rules already in place? (e.g. [en] and [fr] are nice,=20 but the wiki will try to make them into pages...) If you have any ideas on the question, I'd love to hear them! Tara --=20 Je r=E9ponds au mieux de mes connaissances Climb to the Stars! - http://climbtothestars.org/ no tables: http://climbtothestars.org/coding/tableless/ Pompeurs Associ=E9s - http://pompage.net/ |
From: Adam S. <ad...@pe...> - 2001-11-11 22:32:47
|
> It looks like you've figured out the answer already but just in case: > The only difference is that QElement runs the element contents through > htmlspecialchars(). Htmlspecialchars() encodes characters like '<', > '>', '&', etc... as HTML entities ('<', ...). there's been some really good info coming out on the mailing list recently and i've been wanting to put it up on the wiki site for future reference but i'm not sure where i should put it. i think i heard jeff/steve say that /wiki/ was going to be the new main wiki but it appears to be using a different set of page data then the main one ... so should i add content to the new /wiki/ or to the old /phpwiki/ ? adam. |
From: Jeff D. <da...@da...> - 2001-11-12 03:41:12
|
On Sun, 11 Nov 2001 14:32:42 -0800 (PST) "Adam Shand" <ad...@pe...> wrote: > so should i add content to the new /wiki/ or to the old /phpwiki/ ? I'd vote for the new one (/wiki/). I think we will be switching soon. |
From: Jeff D. <da...@da...> - 2001-11-12 03:47:40
|
On Sun, 11 Nov 2001 19:41:09 -0800 "Jeff Dairiki" <da...@da...> wrote: > On Sun, 11 Nov 2001 14:32:42 -0800 (PST) > "Adam Shand" <ad...@pe...> wrote: > > > so should i add content to the new /wiki/ or to the old /phpwiki/ ? > > I'd vote for the new one (/wiki/). I think we will be switching soon. Forgot to add: That would be great if you'd massage some of this stuff into the wiki! Thanks very much. Perhaps you could start a category tag (CategoryPhpWikiManual?) for pages which should be included in the phpwiki distribution. Jeff |
From: Adam S. <ad...@pe...> - 2001-11-12 04:45:41
|
> > I'd vote for the new one (/wiki/). I think we will be switching soon. okay, will do, will there be an automated migration of data from the old one to the new one? or will we just let people pick and choose what they think is worth while? > Forgot to add: That would be great if you'd massage some of this stuff > into the wiki! Thanks very much. no problem. to start with it'll mostly just be cut'n'paste from the mailing list but hopefully as the site becomes more and more useful we'll get some community refactoring going on :) > Perhaps you could start a category tag (CategoryPhpWikiManual?) for > pages which should be included in the phpwiki distribution. is there a reason categories need to be wiki words? is there any reason that CategoryDocumentation or CategoryManual wouldn't work just as well? adam. |
From: Jeff D. <da...@da...> - 2001-11-12 04:54:55
|
On Sun, 11 Nov 2001 20:45:38 -0800 (PST) "Adam Shand" <ad...@pe...> wrote: > okay, will do, will there be an automated migration of data from the old > one to the new one? or will we just let people pick and choose what they > think is worth while? As of four days ago, when Steve put up the new wiki, the contents were identical. I've been manually propagating non-Sandboxish changes to the main (/phpwiki) wiki over to the new (/wiki) wiki. So it should all already be there (the good along with the bad.) > no problem. to start with it'll mostly just be cut'n'paste from the > mailing list but hopefully as the site becomes more and more useful we'll > get some community refactoring going on :) That's a fine plan. > Is there any reason that CategoryDocumentation or CategoryManual > wouldn't work just as well? No. |