Jump to content

dotnetic

Members
  • Posts

    1,037
  • Joined

  • Last visited

  • Days Won

    15

Everything posted by dotnetic

  1. If I try to upload the same file (an image) to the "files" field AND to the "image" field (for thumbnail generation) on a page. But if I do that I get an error which says: How can I tackle this problem? Is it somehow possible? Because I need the image for a thumbnail and the file from the files field can be downloaded.
  2. @gmclelland config.urls.root does not exist anymore. I also had this problem. Take a look at https://processwire.com/talk/topic/808-variable-for-domain-name/?p=93034
  3. If you use Tracy (which is excellent) then you could just do {{ bd(myVar) }} to dump a variable into the Tracy debug bar right from your twig template.
  4. I used a much simpler and faster method utilizing the pagefile class. My link looks like this: // Sorry for smarty language. but thats what I used {if $page->files|@count > 0} {foreach $page->files as $file} <p> {if $file->description} {$file->description} {else} {$file->name} {/if} <br> <a href="download/{$file->name}" class="link-icon">Download</a> | {$file->filesizeStr} </p> {*{/if}*} {/foreach} {/if} and then in my _init.php I used the following code if ($input->urlSegment1 == 'download') { $download_options = array( // boolean: halt program execution after file send 'exit' => true, // boolean|null: whether file should force download (null=let content-type header decide) 'forceDownload' => true, // string: filename you want the download to show on the user's computer, or blank to use existing. 'downloadFilename' => '', ); session_write_close(); if ($input->urlSegment2) { $pagefile = $page->files[$input->urlSegment2]; if($pagefile){ wireSendFile($pagefile->filename, $download_options); } } } EDIT: The downside when implementing this in the _init.php is, that you can´t send a Wire404Exception, because this file gets included (prepended) and PHP doesn´t like exeptions in included files. If you paste this code into one of your templates you could add trowing a Wire404Exception.
  5. @DedMoroz Did you see my PW 3 compatible module https://github.com/jmartsch/processwire-social-login? Maybe you want to use it instead?
  6. Thanks for these thoughts. They are almost the same, what I wish for the comments module.
  7. Maybe somebody can help me with this. I tried the following code for paginated comments: $commentLimit = 2; // comments to display per page $start = ($input->pageNum - 1) * $commentLimit; $desc = false; $selector = "page=$page, sort=-created, start=$start, limit=" . ($commentLimit + 1); // find the comments. replace "comments" with the name of your comments field // I also used the new find command and not the deprecated findComments $comments = FieldtypeComments::find("comments", $selector); in one of my template.php, but it throws an exeption: Class 'FieldtypeComments' not found What is wrong?
  8. @bernhard Did you release Alfred to the public? The gitlab page does not exist anymore and I can´t find it.
  9. Please update the download link on the website http://de.processwire.com as it points to an old ProcessWire 2.7 repository.
  10. Hi guys I need an estimate for the following task: I developed a job candidate application in ProcessWire and need an extension to a Lister Pro Page. My customer wants to display a summary table of the filtered data like in the attached screenshot. When you filtered the view, that summary should show how many candidates have which status according to the actual filtered view. If you change the filter, the summary table has to be updated also. Who can accomplish this task and what would it cost? I first need an estimate to tell it to my customer. If he says the price is ok I will provide you with FTP Data to a dev server version of that tool. Thank you in advance.
  11. Hey guys, hey @baba_mmx I just released a new version of this module on github. I also got a question, as I am planning to take this project under my wing: Should I make a new thread for it and add it to the modules directory? @baba_mmx would that be ok with you? One problem is that if I put it in the ProcessWire Modules directory it does not install it dependencies, as they are installed via composer. How could I handle this? What has been done in the latest release? v0.9.1 made the register form public so you can alter the markup and classes added Foundation classes for the errors and notices. Have to make this configurable added new function showMessage to echo messages and errors login user after successful registration removed automatic redirect enabled autocompletion for the form show either displayName from OAuth or email address after login added the ability to save the last name, first name and gender from OAuth in the user profile. Just add the fields "lastName", "firstName" and "gender" to the user template in ProcessWire
  12. You can do that with a .htacces and mod_rewrite. Don´t know exactly what you have to write, but google for "htaccess subfolder as root". Maybe here is a solution: http://stackoverflow.com/questions/990392/htaccess-rewrite-to-redirect-root-url-to-subdirectory
  13. Been there done that. I proudly present a ProcessWire 3 compatible version with the latest HybridAuth (only tested with Facebook). The code can be found on Github https://github.com/jmartsch/processwire-social-login with installation instructions. Please add your suggestions or create pull requests. The module and its dependencies are installed via composer. Have phun!
  14. @mr-fan Thank you. Maybe it is the way to go without the FrontendUser Module. I also saw your post and thought "That could be the solution I want to use, if there is no simple solution with the FrontendUser module".
  15. @pwFoo Could you give me an example how to do this? I think this could be of help for others too. EDIT: pls note that I do not want to send the username with the form, because it can be manipulated. See my previous post.
  16. @modifiedcontent Thank you for your suggestion. But relying on JavaScript is not good. I also think that a rewrite is not needed. I don´t want no username. I just don´t want the username in the form because it could be manipulated. The username should be the same as the email address, but sanitized as pageName.
  17. Hi, I would like to do a register form with email pre-registration validation, but without the username field. Instead the username should be the email sanitzed as a pageName. I have the following code right now: <?php namespace ProcessWire; // prepare register form // Additional email pre-register validation plugin (built-in) $fu->register(array('email', 'emailValidation', 'password')); $fu->form->setMarkup($form_markup); $fu->form->setClasses = ($form_classes); $fu->addHookBefore('FrontendUser::save', function ($event) { $user = wire('fu')->userObj; $form = wire('fu')->form; if (!count($form->getErrors())) { // set the username to sanitized email value // $user->name = $form->fhValue('email', 'pageName'); $user->addRole('editor'); } }); // process register / form submit $fu->process($profile_url); $register_form = $fu->render(); $view->set('registerForm', $register_form); // this is for Twig But when I submit that form I get an error: Call to a member function getErrors() on null in line 94 of FrontendUserRegisterEmailValidation.module I think it is because in the function "hookRegisterFormAfterProcess" there is line 84: $user = $form->get('username'); As I send no username, this can not work. So how can I make it work without touching the FrontendUserRegisterEmailValidation.module? Thanks in advance.
  18. @mr-fan You are right. I did not knew that Lister Pro came with additional downloadable modules. Found them in the Forum.
  19. @adrian Is it possible to hook the "Process Children CSV Export" to a Lister Pro View so that I can export all filtered entries that are actually shown? The process should be something like: Goto Lister Page Filter my results Press "Export as CSV" Button How would I do that?
  20. I do some more testing with different settings and report back.
  21. It just worked E-Mail looks fine. Umlauts work correct and the attachment is correct.
  22. @justb3a Is it only possible to retrieve the recentMedia of the sandbox user? EDIT: To clarify: Can I just access images of the access token user or can I get images from every user? I get the images of my own account (which is in sandbox mode) but if I enter something diffent in the field "Username" in the modules settings, I still get the same images and not the images of the other user. I even tried $instagram = $modules->get('InstagramFeed')->getRecentMedia("cocacola"); but still my own images appear. I also tried clearing the cache via the link in the modules setting.
  23. @BitPoet Do you have an estimate when you can add the fix for multipart? Because I have attachments and now my email client renders both, the text mail part and the html mail part (see screenshot). Maybe a small donation from me may motivate you to do it quickly? I don´t want to go back to PHPMailer again.
  24. @BitPoet I found the solution for long subjects. Please use the function mb_encode_mimeheader for that. So line 435 in WireMail.php should read if (@mail($to, mb_encode_mimeheader($this->subject), $body, $header, $param)) $numSent++; Now the long subject is separated into multiple lines and each one is correctly wrapped with the correct code.
×
×
  • Create New...