Jump to content

Manaus

Members
  • Posts

    212
  • Joined

  • Last visited

Posts posted by Manaus

  1. Hello, I created a template holding a file Field, accepting zip files.

    If I try to upload something via admin on the local machine, I see the advancement bar stuck at 99%, or 96% and so on, not completing the file upload. The zip is about 20Mb, and php max_post_size is set at 32.

    Thanks for any suggestion.

  2. Thanks guys I'm talking about the php files with business logic PW is using for generating pages.

    @Macrura good question, are they? I'm trying to comply with the law of the land. You might say "It depends on the contract". Well the fact that there's a possibility means that there is a global shared tendency to consider the use and the property as different business models. Sincerely I'm curious about what you guys would suggest. 

  3. Hello, I'm trying to get a page like /20141214-my-url-title, but seems like either it's a date or it's a title.

    For example, I tried Y-m-d-title, and I got 2014-12-14-310231sundayamerica-new_york which is nice in its own right, but not what I'm currently looking for.

    Thanks for any suggestion...!

  4. Hello, 

    is there an easy way to include an image, say the one attached to the post, in the text flow of the body field? 

    For example

    <p>Lorem ipsum</p>

    <img src="xyz" />

    <p>Dolor sit amet</p>

    I fear a common user/client could not care about understanding the usage of relative paths, even less the absolute ones. 

    I would fancy something like <thisarticleimage name="landscape.jpg" />

    Thanks for any suggestion

  5. 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... !

  6. 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

  7. 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

  8. 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

  9. 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

  10. Ciao 3fingers,

    well thats the usual compromise between getting less money or getting no money. An external source could prove that my estimate was not self-serving but objective.

    I'm going to make the video of the public and admin side

    Grazie!

    • Like 1
  11. Hello,

    I'm making a website (it's now almost complete), and the client is giving an estimate of the job done which is quite inferior to my request.

    I told him I might seek help from an independent developer to make an estimate, can any one help me?

    The assessment should be made considering the context Italian/European market.

    Thanks!

×
×
  • Create New...