Jump to content

Sava

Members
  • Posts

    10
  • Joined

  • Last visited

Everything posted by Sava

  1. Hi, thanks once again @virtualgadjo for help, little update in the end i did manage to create what i wanted ? Kind regards
  2. Now I am stuck and the part when I want to show user images before sending them and give option to user to delete image if he input wrong one.
  3. Thanks @virtualgadjo for the help. I modified some of the code from the example and this works perfectly // Create a new instance of the wireMail class $m = wireMail(); // Set the email parameters $m->to('test@test.com')->from('test@test.com'); $m->subject('Test attachments'); $m->body($message); // Loop through the uploaded files and add them as attachments to the email foreach($files as $filename) { $m->attachment($upload_path . $filename); } // Send the email with all the attachments $m->send(); foreach($files as $filename) { unlink($upload_path . $filename);} have a nice day
  4. I am having a bit of a problem with my form trying to send an attachment from the upload form and I would really appreciate help. ? Frontend code: <div class="uk-margin"> <label class="uk-form-label" for="form-stacked-text">Name</label> <input id="name" name="name" class="uk-input uk-border-rounded" type="text"> </div> <div class="uk-margin"> <label class="uk-form-label" for="form-stacked-text">Your images</label> <input type="file" multiple> </div> Backend code: if ($input->post('name')) { $name = $input->post->name; $to = 'info@example.com'; $subject = 'Contact'; $message = "Name: " . $name; $headers = "From:" . $email; $mail = wireMail(); $mail->to($to); $mail->subject($subject); $mail->body($message); $mail->send(); $session->redirect($page->url); } I tried the WireMail::attachment() method but no success $m = wireMail(); $m->to('user@domain.com')->from('hello@world.com'); $m->subject('Test attachment'); $m->body('This is just a test of a file attachment'); $m->attachment('/path/to/file.jpg'); $m->send();
  5. Sorry for the unclear question but your answer @monollonom was exactly what I need. Thank you
  6. Thank you for a great module, I am just wondering how do I get URL to create a download link? ?
  7. Thank you @Robin S $page->id was the thing I needed ?
  8. Thanks for the help Robin, yesterday I figured I can use "find". But only thing that is a problem now I can't get title or id for page refrence $catFav = $user->favorites->find("template=blog-single, cat_single=$page->path"); Ex. When I try to use one category id, it works. $catFav = $user->favorites->find("template=blog-single, cat_single=(category id)"); But when I try something like $page->path or title to get them all working, it just doesn't work EDIT: I used $page->id in cat_single and it worked ?
  9. Hi, I am bit stuck and would really appreciate your help. I created a page reference filed for "user" template called "favourite" which stores the favourite user's "post". There is no problem while i try to loop it like foreach($user->favorite as $item) { echo "<li><a href='$item->url'>$item->title</a></li>"; } In "post" template there is a page reference filed "category". Now here is the part where I get stuck. I am trying to display user favourite posts in that category Ex: in category A user has no favourites. in category B user has 4 favourites Hope you can understand my problem and help me, thank you ?
  10. Hi @ryan Thank you for awesome module, but I am having a problem while trying to import images and some of the links are broken. Is there any way to just skip if the link is broken and just continue importing?
×
×
  • Create New...