I have installed FDM and set it up to work with tinymce without much problem.
However I have two issues at the moment:
1) I have a TV called "tags" which allows for the tagging of content using a check box. How do I include this TV for use with my FDM call?
2) I have structure like follows:
--USERS(container)
---User1 (container / contains the FDM call)
------user1 page1
------user1 page 3
--User2 (container / contains the FDM call)
------user2 page10
My FDM call is contained in a templated which is used when the User container is automatically generated. the call is:
[!FDM? &eform_tpl=`fdmEform` &canpost=`users` &disableedit=`1` &disablepublish=`1` &disableunpublish=`1` &disabledelete=`1` &redirect=`[*id*]` &trusted=`users` &model=`9` &script=`tinyfdm`!]
Now with that A) how do i make it so only the author can edit content but everyone can view? B) so new user pages are created under the correct container.
thanks
Which date ? How do you output that date ?
-> When I create new document, it outputs the date 31-12-1969 16:00:22 . WHY?
I’m using this code in the fdmEform chunk for text TV ’documentTags’.
-> How can I add TV in my form? Any rules in adding except "tv" prefix?
<input name="tvdocumentTags" id="tvdocumentTags" value="[+tvdocumentTags+]" type="text" eform="documentTags:string:0" />
Why don’t you use &model parameter ?
-> My newly created document has UNchecked: rich text. Why?
-> Is it possible to uncheck "Show in menu" checkbox by default ?
I want the following:
1) New FDM pages to be created under this one
2) Only the owner/creator to be able to edit them?
[!FDM? &eform_tpl=`fdmEform` &canpost=`users` &disableedit=`1` &disablepublish=`1` &disableunpublish=`1` &disabledelete=`1` &parent=`[*id*]` &trusted=`users` &model=`78` &script=`tinyfdm` &redirect=`[*id*]`!]
#1 worked great.
I don’t understand your answer to #2 though.
$modx->runSnippet('FDM', $Params)$Params['disable'. $disablethat] = '1';
eval("$Params['disable'". $disablethat ."] = '1';")
[*id*] is referring to the ID of the page with the FDM snippet call (it returns the id of the current page). Maybe [+id+] would work?
Quote from: c-m at Oct 30, 2008, 11:57 AM
#1 worked great.
I don’t understand your answer to #2 though.
I’ll try to explain Eol’s interesting answer to your question #2.
You asked: "Only the owner/creator to be able to edit them?"
I think Eol’s suggesting to use php and query the DB (e.g. using the DB API) in order to know the "createdby" field of the document; if there is correspondence between the current weblogged user and the createdby info, you know that FDM should render, say, the "edit" and "delete" buttons. So, you could make the FDM call from php, using theway, where the $Params will be dynamically generated with that previously explained knowledge; that is, something like this in a foreach or whatever:$modx->runSnippet('FDM', $Params)
$Params['disable'. $disablethat] = '1';
...even if I suspect that syntax won’t work but I hope it makes the idea; probably you will use something like:
eval("$Params['disable'". $disablethat ."] = '1';")