Hi Everybody!
I'm new to drupal. I would like to make a website with a flash based interview appz. After user click send button I'd like to store the interview text as a node. I used the example "Accessing a service from Flash 8". It works fine.
I have made some changes in the flash code, because I don't want to load the node to the flash but I want to save the flash content to database as node:
var content = new Object();
content.type = "interview";
content.title = "some title";
content.body = "some body text";
var pc:PendingCall = node.save(content);
It works fine, but only when I'm logged in as administrator.
And I need two more things to set:
I need to set the user id (uid)
I tried with adding one more line:
content.uid = "2"; but it doesn't work.
every node that saved from flash has uid=0
the second thing to set is the url alias. I'd like to ganarate a url alias from the user submitted name, and after submitting I'd like to redirect to user to the host/interview/usernamepath page, which contains the interview text.
thanks for help
Comments
solution
try setting content.uid and content.name, it should work, at least it's working here
url alias
for the url alias you can try using path auto and get the generated path from the saved node
for some code have a look at
for some code have a look at this page: http://groups.drupal.org/node/13781