Jump to content

elabx

Members
  • Posts

    1,479
  • Joined

  • Last visited

  • Days Won

    21

Everything posted by elabx

  1. Try to go here: http://localhost/phpMyAdmin/ And try google how to setup a database with phpMyAdmin! Let us know if you reach any dead ends.
  2. Hi @JonathanEnsz ! Welcome to the ProcessWire forums! Where are you setting up your website? Are you using a hosting service? Maybe locally? In any chance, a database is the part of your setup that in combination with ProcessWire makes it all work. A MYSQL database is a whole other software that commonly runs along PHP applications such as ProcessWire to persist data. In more concrete terms, you have to: Create a database. Most commonly through a tool in the panel administration of your server, or through an application that understands the databases like phpmyadmin. Create a database user/asign it to the database. A database must have a user with the right permissions to add data, update data, etc. If you reach a screen where you have to set permissions, just allow them all. Identify the host of the database. Most of the time, this is localhost (like literally you will write this on the ProcessWire installation screen). Some other times, the host has a special url address. ProcessWire will use the database user, the database name and the database password to connect to the database at a certain host and after that it creates it's minimum set of data for it to work.
  3. I think this post has the info you need:
  4. Agree an all your points! Thanks for the feedback!
  5. Hi everyone! I'm with the task of paginating 5 million pages and things are getting a bit slow here lol I found out that you can disable counting within the selector and that bring huge performance benefits, basically making the queries instantly. I am just wondering I'd still like to have pagination, specially because the sets of data won't really change often so I only need to count once in a while and the find() call seems to hit the database and counting on every request. Maybe I'm missing something and there is a way for the count value to stay cached? Would you recommend me to hack a bit into the pagination module?
  6. @Jonathan Lahijani do you have your update script published as a module or would have the possibility to share it with me to work an MLS website import I want to propose to a client? Of course I understand if this is proprietary software of some sort, though any clue would help.
  7. This particular feature doesn't exist in ListerPro as far as I know if you want to discard that already. (although it is a great product in bunch of other aspects).
  8. You could probably do this with some hooks on the field rendering and javascript added to the admin.
  9. Just curious, what are you using from ProcessWire that is useful for your project?
  10. Check to have pagination enabled in the template where your are rendering the pager. https://processwire.com/docs/front-end/markup-pager-nav/
  11. If you are going to retrieve them using find() you will have to use check access, another possibility I can think of tight now is: $pages->find('template=series')->explode('products'); But I guess not as practical because it returns an array of WireArrays.
  12. Repeaters are pages placed under the admin which users of role "guest" cannot access due to the way access control works. It's a bit confusing because you don't think of repeater elements as pages per se, but since they actually are that, the same rules as for the rest of the pages apply, they are kind of "admin pages" Hope I made myself clear!
  13. @MarkE Let me get this to a github repo today!
  14. Namespace issue?? Try adding namespace ProcessWire at the very top
  15. You can go into the parent page of the branch you wish to sort, and on the Children tab, you should see the sorting setting.
  16. So I basically meant like I felt it needs a bit more of a well thought structure to make it more maintainable for the future (and I think it had some missing parts? can't remember). I have had to give maintenance to other projects *cough* Recurme *cough* and although that one was particularly complex, I learned my lesson that I definitely don't want to release MVP's that turn into a pain to maintain later just for the sake of getting it out there, I might be just wrong of course. (joshua always insisted I was too conservative in this aspect haha) I agree some of the features could be taken off, like the editor and widgets. I also remember some bits were missing to make it fully functional at the point we envisioned, I think a bit of stuff with repeaters/repeater matrix, don't remember now honestly but it indeed works for the most part! We really feel it shows a lot of the power ProcessWire "hides"!
  17. How is your inputfield's formatted value configured? try setting it to be formatted as a single item.
  18. Try calling wire('pages') instead of $pages.
  19. Did you try adding a pagination variable to the ajax call to alter the selector that gets the content?
  20. Could you share some code? This is a good guess. You need to keep track of your pagination somewhere and pass it to the selector like "text%=$q, start=$currentPage, limit=10"
  21. What I've done is write a php script that I run from the command line to avoid memory/execution timeout issues. I also always use PHP League's CSV library which iterates the CSV without loading it all into memory.
  22. For what I see it appears to be loading the ogv or webm versions and they seem to be encoded like that, try removing the other files and leave mp4.
  23. I THINK, you'd probably need to hook here. Does the subfield dot notation does not work?
  24. There is a setting in the Input tab, where you can set the year range!
  25. This is one of the most common solutions, but as in everything with PW, it's your call how you do it! What you could do with your approach is place that php script outside of the sites directory which is protected by apache from being accessed directly for security reasons. So on your ajax request, the url is just /archive-list-render.php?q=etc Now, on you archive-list-render.php, load the PW API: <?php //This is the index.php in the web root directory, sibling to site, wire, etc. include("./index.php"); $q = $sanitizer->text($input->get('q')) $foundPages = $pages->find("somfield=$q"); //imaginary doSomethingWithPages method.. $response = doSomethingWithPages($foundPages); echo $response; Another approach for simple cases is using the same page where the ajax requests originates from, and detect if it's an ajax call otherwise render the site. This can get tricky depending on appending or prepending files into the template. (Very well exemplified on Ryan's post bellow) <?php if($config->ajax){ //ajax processing/render stuff } else{ //normal render stuff } Ryan's post:
×
×
  • Create New...