Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/29/2012 in all areas

  1. Soma, I use this all the time, because it's such a timesaver. Just stopping by to say thanks!
    2 points
  2. Ryan, just for the record, Apple seems to support the file api now in Safari 6, I uploaded a file some minutes ago with drag-drop and it worked. Caniuse.com also lists the File API as supported on Safari 6: http://caniuse.com/#search=File%20API
    1 point
  3. Thanks, that's kind of you arjen. Glad it's well recognized and helpful.
    1 point
  4. inside phop you can do: echo "<img src='{$page->image->url}'/>"; and outside php: <img src='<?php echo $page->image->url ?>'/>
    1 point
  5. Hi this was discussed a little in another thread: http://processwire.c...age__hl__mailer I actually use templates and Mandrill to send some of my transactional emails such as welcome emails and confirmations. It's relatively easy to do this using SMTP. Here's an example: <?php require_once "Mail.php"; require_once "Mail/mime.php"; $email = new Page(); $email->template = $templates->get("email-template"); $email->somePageVariable = "example"; $email->setOutputFormatting(true); $body = $email->render(); // Header info $from = "<info@yoursite.com>"; $to = "<user@name.com>"; $subject = "Thank you for registering!"; // Send via Mandrill $host = "ssl://smtp.mandrillapp.com"; $port = "465"; $username = "info@yoursite.com"; // Your mandrill user name $password = "secretKey"; // Your mandrill API key $headers = array ( 'From' => $from, 'To' => $to, 'Subject' => $subject, ); $smtp = Mail::factory('smtp', array ( 'host' => $host, 'port' => $port, 'auth' => true, 'username' => $username, 'password' => $password )); $message = new Mail_mime(); $message->setHTMLBody($body); $mail = $smtp->send($to, $message->headers($headers), $message->get()); if (PEAR::isError($mail)) { echo($mail->getMessage() . "\n"); } else { echo("Message successfully sent!\n"); } Because the template can pull in content anywhere from your site, you can easily make templates for upcoming events, latest news, etc. For inlining CSS, premailer now offers an API. I think it's best to use netcarver's tag parser for user-specific details when bulk mailing. You could render these in the template and pass in the user ID to that, but then you'd have to inline the CSS after rendering each and every email. It should be possible to avoid this by rendering the template, sending to premailer, and then looping through the recipients replacing the first_name, surname etc. I've not tried this out yet though. Stephen
    1 point
  6. Hi, thanks for the feedback. Never thought about this really important problem. Agree Agree I think the best way to contribute will be the official logo + slogan somewhere in the footer section.
    1 point
  7. I'd use it and it works perfect. Thanks for your time and effort all
    1 point
  8. I have this same issue when doing one-time migrations of finished sites on my localhost MAMP/dev server (which runs sites off subdirs) to the live server. But the solution is really simple. When I export the database to an SQL dump (via PhpMyAdmin), I drag the resulting SQL file into TextWrangler/BBedit, and perform a search/replace: "/newsite/" => "/". Then I import it to new server (again via PhpMyAdmin). Problem solved on 5 seconds.
    1 point
  9. Thanks Soma, that was it! I enabled "Allow Page Numbers?" on the language gateway template and now it works.
    1 point
  10. Without SQL you could do it with simple bootstrap or in a template: foreach($pages->find("template=basic-page") as $p){ $p->body = str_replace("/newsite/","/",$p->body); $p->save(); }
    1 point
  11. I've not tested this code but it's a first guess at how I might try this. It assumes $email and $pass hold sanitized input from a custom login form. $who = wire()->users->get("email=$email")->name; if($who) $user = wire()->session->login($who, $pass); if($user) { // they authenticated ok... } else { // they didn't }
    1 point
  12. You can always reset your password just by pasting this temporarily into any one of your templates, and then viewing a page that uses the template: $u = $users->get('admin'); // or whatever your username is $u->of(false); $u->pass = 'your-new-password'; $u->save();
    1 point
  13. Just want to make sure I've got it written down as to what specifically would help: Addition of an option to support intentionally-empty translations, and not have them count towards the untranslated count. Addition of a tool that finds all translatable files and also calls out those that don't have any translations (i.e. new files) Addition of a tool that bundles all translation files into a ZIP or something like that, ready for download. Does this sound right, or anything else? I can't get started on these right away, but thought it would be good to get them written down so they can become part of the roadmap at least.
    1 point
  14. How 'bout help.processwire.com or docs.processwire.com? Anyway, from those options above guide.processwire.com gets +1 from me.
    1 point
×
×
  • Create New...