Jump to content

Pixrael

Members
  • Posts

    395
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Pixrael

  1. Does anyone know how to save an Array or a WireArray back to the YAML field in the page? In the source code I saw some functions for "Dump", but I don't know which one would be the right one, or how to use it.
  2. @ryan I know you are now traveling, but when you had some time I would like to know your opinion about this, maybe you have been in this situation before. If I implement the option 3, a simple calculation (as example) 5 tools with 3 different types of data to be stored by 3000 users would yield a total of approximately 45,000 pages only to store configurations and data lists, apart from the user's profile data. . it would be correct?
  3. Check this: https://mediamanager.kongondo.com/
  4. @OllieMackJames Just yesterday I was reviewing the amember.com website, I see it's a hosting solution to install on my server. Anyway this would be for the administration of accesses, permissions and payments (which is very interesting and I will try it for sure) but my problem now is how to save all the information of the tools (which is a lot) for each user to use internally in PW for calculations, analysis, etc. Thank you very much for your answer
  5. Hello, I'm building a website with a membership system that allows users to access different tools, each one has different configuration and data according to the user needs. I try to find the best approach to store that customized information in the PW tree, but I don't find any similar situation in the forum. Ex. the context for each user could be like: - Tool A - Settings - Recent results - Saved results - Tool B - Settings - Saved results - Todo list - Tool C - Settings - Working list - Related "Tool A" saved results - Globals - Entries list (can be access from any tool) As you can see is a complex interrelated system ? My ideas to record all this are: - Option 1) Add a field to the user template, ex. Repeater matrix to record a JSON or YAML for each tool/task that the user access. - Option 2) Add a field to the tool template (or to a tool child template) ex. Profield Table (in the tool context the fields are the same) and each row is for one user data. - Option 3) Create a page tree apart, like "settings", the child template have a field JSON or YAML and 2 Page Reference fields, for tool-customer match. - Option 3b) Same but different child templates, one for each data type to store, ex. Profield Table for todo/task list, JSON or YAML for settings, etc. What do you think, some idea? Did your work with something like that before? Please PD: Due to the nature of the membership systems (users can in-out constantly) I suppose that is better a solution that can remove the user data from the system easily.
  6. A solution that I also thought was to send the generated image using base64 data in the response, but even though it served to display the result to the user, I need a fixed URL since the purpose of the tool is that once the image is the desired one, the user can import it into a third application using that URL, each image will be valid only for 24hr, after that it will be deleted from the server using cron jobs
  7. @MoritzLost Thanks for your comments. The first thing I tried was this ?v=XXXX technique, but do not works 100%, at least in chrome (several days testing that) not always reload the file. I don't know why, maybe chrome use more aggressive approach to save bandwidth or for speed.. "why force it to load it again?" .. because this is a tool that generate a picture to download, the customer can modify the tool paramaters and regenerate the picture again infinitely.. I don't want to create new pictures each time the user click the generate button (to save disk space at server), my approach is to create only one picture per user session, and use the token value as file name, so the tool overwrite it each time the picture is regenerate. I use ajax for that and with the response I change the src attribute in an image element to display the result.. this is the reason why I need that image must be forced to download each time when I change the src attribute.. Oh, this description looks a little complicated.. I explain correctly?
  8. That mod_rewrite route don't works.. but (for the records) the following trick works smoothly ? <FilesMatch "^([a-zA-Z0-9]+)-([0-9]+)\.png$"> FileEtag None <ifModule mod_headers.c> Header Unset ETag Header Set Cache-Control "max-age=0, no-store, no-cache, must-revalidate" Header Set Pragma "no-cache" Header Set Expires "Thu, 1 Jan 1970 00:00:00 GMT" </ifModule> </FilesMatch>
  9. In order to deceive the browser images cache in a javascript image src update, I use this htaccess trick to force the browser to reload "new" image from the server, the number es a time() var. I want that Apache rewrite this request: /site/downloads/9VefFf6vstUR0q1ywzPgjXw4PfAgYqGp-1562618833.png to this: /site/downloads/9VefFf6vstUR0q1ywzPgjXw4PfAgYqGp.png and this is my declaration in htaccess: <IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^site/downloads/([a-zA-Z0-9]+)-([0-9]+)$ site/downloads/$1.png [R=302,NC,L] </IfModule> But I don't know if it well defined, or if the PW htaccess is in conflict with this configuration.. PW show me the 404 page and the server don't send the picture url back. Any idea?
  10. Oh! So easy? !!! .. I'll try it tomorrow at the office. THANK YOU!
  11. I have spent the whole day searching the forum without finding the answer! It seems that the only way to use the repeaters is using FOREACH! I have a template with a repeater field assigned, on the Page I already have several records saved in the repeaters and I need to access the information of one of the repeater items, but in order to select it I need to ask for the current value of one of the item fields. Ex: Page - Repeater Field --- Item1 ----- FieldA = 2 ----- FieldB = BAR ----- FieldC = FOO --- Item2 ----- FieldA = 6 ----- FieldB = FOO ----- FieldC = BAR I need to get the FieldC value of the item that has value=2 in the FieldA ????
  12. Maybe you can try with this: https://www.payoneer.com/solutions/pay-service-provider/ ?
  13. Why I'm still using jQuery in 2019
  14. Awesome! Keep a record of this post for the future module documentation! You mean "Shipping Package" will be the "Calculate Rate" based on the carriers API?
  15. If you're not in a hurry, you can wait the new version of Padloper from @kongondo ... it looks great
  16. Like here for the module version ?
  17. For multi-language SEO tags you can use a FieldtypeFieldsetGroup in your templates (put it on a new tab for easy access): https://processwire.com/blog/posts/processwire-3.0.73-and-new-fieldset-types/ .. echo this vars inside an included file (or use a Markup Region) in the main template file. PS: I never try with FieldtypeFieldsetPage, but can works too
  18. Try to change it in the PHP settings: https://stackoverflow.com/questions/8927404/how-to-change-session-save-path-in-php-ini-file
  19. Forget it, it was just an idea. I think it doesn't work. That is why ask at the end of the paragraph
  20. maybe is more efficient to use: $config-> homepagehits .. increment it by 1 at home.php template file and later echo it at any template file.. you never need to query any additional page (homepage) to get that counter because $config is present always by default at your hand.. hummm.. is this correct?
  21. https://github.com/processwire/processwire-issues/issues/224
×
×
  • Create New...