Jump to content

Manaus

Members
  • Posts

    217
  • Joined

  • Last visited

Everything posted by Manaus

  1. RT @giacheme: "Made In" - The value of country of origin for future brands http://t.co/hUkNaR5jOo #MadeInItaly #Expo2015 http://t.co/NZ6bSL…

  2. Thanks Jan, sort of figured it out: instead of using $http.post('url', data) I used a config object: var config = { method: 'POST', url: '/ajaxprocessingpage/', data: $.param({dati: jsobject}), headers: {'Content-type': 'application/x-www-form-urlencoded'} } $http(config) .then()... In this case, It is accessed on the ajaxProcessingPage as an array using $input->post->dati So complicated... !
  3. Hello, I'm trying to submit a form through AngularJs $http object, but I can't get any response. My post values are a json object: {"user":"johndoe", "email":"jd@..."} But in the receiving page, I'm using this code [at no avail]: var_dump($input->post) // WireInputData (size=0) echo $_SERVER['HTTP_X_REQUESTED_WITH'] // returns void echo 'hi' // works var_dump(json_decode($input->post, true)); // returns null echo $config->ajax; // no response Thanks for any help
  4. Nostalgica: "Ho bisogno di un anno sabaudo"

  5. Hi, I'm using this code to get the only file of a page. I uploaded the file using the admin pages. <? if ($page->name == "myproject3"): $myfile = "somefile.pdf"; $myfile = $page->documents->get('name='.$myfile); echo $myfile->url; But I get nothing, not even null... Thanks for any suggestion
  6. RT @mynameischrisd: .@sainsburys not sure this is supposed to be in your window... http://t.co/Zk9GCliIWO

  7. RT @MailUp: Quanto rende 1€/$ investito in Email Marketing? Scoprilo qui: http://t.co/9QxhfY9b5Q http://t.co/bUq0J5vubg

  8. RT @drmonkeyninja: RT @ElSatanico: Something to bear in mind when you use a grandiose title on LinkedIn.... http://t.co/bhUbT3c8IZ

  9. Ten years of Textpattern! #Happy10Txp 10 years it's being a better Cms world!

  10. Very interesting articles ChiefPundit, I feel some RSS might be beneficial to the overall project.
  11. RT @_nilswerner: Hah, all you Angular JS guys are actually doing what XSLT has been doing for years!

  12. RT @jonathangmeyer: Look at the definition of "necklace" in this Hello Kitty children's book: http://t.co/6Owkj9WyjZ

  13. RT @ZuckerbergCEO: - Qual è la password Wi-Fi? - Abbi rispetto siamo al funerale di tuo nonno. - Tutto attaccato?

  14. Hello, I have a function trying to print the current user name, but I can't manage to get something. This is my code: function dothing($thepage) { echo $thepage->title; if ($user->isSuperuser()) { // do different } } Tried also function dothing($thepage) { if ($wire->user->isSuperuser()) { // dodo } } But no avail Thanks for any suggestion
  15. @Soma yes, of(true) was the problem Thanks everybody
  16. @adrian yes it does
  17. Hello, I have some troubles on adding an uploaded file to a page, here is the code: <? $theReply = new Page(); $theReply->parent = $theparentPage; $theReply->template = $templates->get("mytemplate"); $theReply->of(false); $theReply->name = $sanitizer->name(first_n_words($input->post->reply, 5)); $theReply->save(); $theReply->of(true); if ($_FILES['attachment']['size'] > 0) { $upload_path = $config->paths->assets . "files/attachments/"; $doc_Upload = new WireUpload('attachment'); $doc_Upload->setMaxFiles(1); $doc_Upload->setOverwrite(false); $doc_Upload->setDestinationPath($upload_path); $doc_Upload->setValidExtensions($allowedExtensions); $doc_Uploaded = $doc_Upload->execute(); foreach ($doc_Uploaded as $du) { $pathname = $upload_path . $du; $theReply->documents->add($pathname); // <===== Call to a member function add() on a non-object unlink($pathname); } $theReply->save(); [...] } $theReply exists, $doc_Uploaded exists, still I get the error in the comment Any help would be greatly appreciated Thanks
  18. RT @fostertype: Why do typefaces cost money? Go try to make one and find out.

×
×
  • Create New...