Jump to content

joer80

Members
  • Posts

    364
  • Joined

  • Last visited

Everything posted by joer80

  1. I am starting a new project and need help making the plan for it. I am wanting one website for controlling inventory, and many other websites that display the inventory. I am wondering what the best setup would be? I first thought about doing a multisite install and putting everything into one pw cms, but the satellite websites are getting to be very different from each other and I am wondering if this is not going to work out. I am thinking I should just keep the inventory in one pw system, and leave the other websites to just read the central inventory system to keep things simple. I dont think it will be worth it to have all 20 or so websites from the same templates and fields. As far as I can see, this leaves me with either having my satellite websites mount the inventory website in addition to itself, or having the inventory website provide a web service/api of the inventory for them to query. (I am pretty sure pw3 allows for 2 cms setups to run at the same time, but I am not sure how to do it.) Which is going to be a better method? Thanks for any input you can offer!
  2. Perfect! I knew this had to exist! Thanks for pointing this out for me!
  3. I have made a field for php code and a field for html code but there is no syntax highlighting. Would this be hard to add or does it already exist? Thanks!
  4. Do you have to pay to get access to your mls feed?
  5. I did a clean install of ProcessWire 3.0.22 devns and noticed if I import a repeater from ProcessWire 2.6 and add to a template, I can no longer save a page that uses it. This is the error it shows: Can't save page 0: /admin/access/permissions/logs-view/for-page-1/: Pages using template 'permission' are not moveable (template::noMove) Not sure if this is repeatable or not yet! If I delete the field and create it manually, it works just fine! Thanks!
  6. Nice! When I have been working on thousands of pages, I have been using cron jobs to pull a limited group at a time, and adding a status field or a last run timestamp field that I can update to know if its run or not yet on that page. Basically breaking the job into many small batches. This may be another way to go about this for me.
  7. NGINX isnt just good for VPS with small amount of memory, its good for websites with tons of traffic as well! Even easier to get working than trying to make apache work right. Looking forward to the official support for this!
  8. These work great! I would much rather do it this way and use pdo. This is the working code I am using: $statement = wire()->database->prepare('INSERT INTO tablename (comment) VALUES (:comment)'); $statement->bindParam(":comment", $comment); $statement->execute();
  9. Think I have it! It doesn't appear necessary to pass a connection. This worked: $comment = "The boat is 17' long. "; $comment = mysql_real_escape_string($comment); $sql= "INSERT INTO tablename (Comments) VALUES ('$comment')"; $database = $this->wire('database'); $database->exec($sql);
  10. Ok, I am wanting to know the best practice for escaping a variable to prepare it for an sql insert when I am not using selectors. Its a traditional mysql query, but I want to use the same connection variables processwire uses. Without escaping it, it will throw an error out because $comment has an unescaped ' in it. What is the proper way to escape out the comment using the processwire database connection information? I tried the $comment= $this->wire('database')->quote($comment); but that doesnt seem to work. Thanks! Code: $comment = "The boat is 17' long. "; $sql= "INSERT INTO tablename (Comments) VALUES ('$comment')"; $database = $this->wire('database'); $database->exec($sql);
  11. That works great! How did you know to do it that way? I couldn't find this in any of the documentation!
  12. I am trying to write a selector to populate a drop down (page field) in the "Custom selector to find selectable pages" section. Is it possible to do this following: isCity=1|id=58617 I want the page list to show if it is a certain id, or if it is marked as a city. (To get an "all cities" option) Thanks!
  13. I think people have looked at it and found the processwire admin hard codes local folders so it would be hard to have a website only use a remote server for files without modifications to processwire. (Only save files in s3)
  14. Ok, Thanks! It looks like we are basically putting /'s in the page id and using it for the path.. Is it still going to be an issue using the page cache feature? That comment was about a year and a half ago.
  15. I am using the $config->pagefileExtendedPaths setting to get around the hard limit on the number of directorys in the assets folder. How does it pick the path? I understand it makes a 0 directory, but what is the rest? (03/033) ie. www.website.com/site/assets/files/0/03/033/filename.jpg Thanks!
  16. Can I pass a remote file path to WireUpload to have it download it using curl? Or do they need to always be local?
  17. Core already offers field imports and exports. When you export a repeater field that has fields in it, it should bring the sub fields with it. It would save so much time. That should be in core in my opinion. Lets forget about why other cms are so popular. It would make our lives easier to group fields and export them as a group. The side effect of the automation and faster dev times is more people using the system. My suggestion of allowing people to upload style tweaks to existing repeater groups to the processwire website is not something I can do through a module. Unless modules can edit the processwire website. It is something that would get less experienced developers involved in the project. This is pretty detailed, I created a feature request post for this.
  18. I don't think allowing repeater groups in the modules section makes it a new cms, or a canooe, or take away the power of the api. It would however expand your audience. The repeater group should be decoupled from css style by default, but we also should also allow people to upload and share compatible styles to that group as an option. Les wordpress and moar processwire everwear is a good thing for earth.
  19. I would like to be able to import/export a repeater, and it also bring over their fields tied to the repeater. ie. If I export my Homepage Carousel repeater, it will also export the link text field, and the image field and keep them as part of the repeater. Right now I need to import/export all the fields and recombine them. Thanks!
  20. I really think we can do just a few things and convert almost all wordpress websites over. Site profiles serve a great role, and are perfect for providing a turn key website starting point as is, but they are not specific enough to take processwire mainstream. They only start a project, they can not add to it and make it custom. From what I have seen, Markup modules and Text formaters will set your html bones in a spesific way and set the class names for you, but they are not bringing style/css options to users. As far as I know, we don't serve the need I am talking about. We need to have a styles section for sharing design that styles those html tags and bones the markup modules generate. But they need to be tied to modules they are made for. Field level template files are in the same boat. It will set the html bones automatically, and give you say a bootstrap naming scheme for a field, but it wont style it various ways. We need some way to export/package up and share, and preview the look and feel of a section of a page. This is what I suggest: We should be able to pack up a repeater group, and upload it to the processwire website as a repeater group module, and let people import the whole repeater group at once. Now, in addition, people should be able to attach style options/css to that repeater group module listing also. CSS already set for that repeaters class names. They could import the repeater group with or without a selected sub style into their existing project. That is a wordpress killer. So you pull up the repeater group, and there would be a tab for compatibile styles attached to that module. Then you could preview them and choose to package that in with the module download. Also, people could upload new css design options to a repeater group module without needing to be the author of it. Just name the style, and provide the css file and images needed to lay on top of that repeaters bones. Users would be able to download a "contact us" repeater group, and then preview and select which css style they want to download and run with it. Or a user can select a Homepage carousel repeater group, with a, b, or c design option included in the download. I have never had luck moving things like repeaters from one project to another. This should be exportable and importable. The design section should let you preview the design/group before you download it. Once installed, the css and js snippets would just get merged into your existing files. No matter how many design modules, it doesnt add requests. To do this, the design module would need its own assets folders to hold any images, js, css, etc. that were used. The cms would loop through the design module folders and merge them into one file when a new module was added. We are a good niche for people that hand code their own design, but something like this would take the project mainstream into people that dont do their own design, but want to have something better than wordpress to build on top of. I really think that is why wordpress is growing so fast. You have a lot of exiting design to choose from. I think expanding your audience is key to growing processwire in 2016. Meeting more peoples needs. The lack of group by in the api just kinda drives me nuts because I use it often and have seen people suggest looping through every page using the api and adding to another array and I dont think that is a good solution.
  21. The number of lines is not the issue. Just one line of code can either be neat and readable or a mess. Saying the api works for simple websites is not good enough either. We need to be able to work for medium difficulty websites and custom intranets in an elegant way. Check out this difference in one of my websites. At the shear number of manual joins I had to do just to return 3 columns manually of one template. Lets say you are working with cars and want to build a drop down that pulls all models attached to an inventory, the model id, model name, and make name so you can pass that id to another page in a form submit, and show the user what that id is. ie. '123' "BMW" 3 Series You could do a group by or a distinct select. This is what it would look like if you drop to sql outside the api: $SQL = "SELECT Distinct modelPage.id as modelPageID, field_livefeed_model.data as modelTitle, field_livefeed_make.data as modelMake FROM field_livefeed_condition, pages, field_livefeed_model, field_livefeed_make, field_livefeed_status, pages as modelPage, field_title as fieldtitleModel WHERE (field_livefeed_condition.pages_id = pages.id) and (field_livefeed_model.data = fieldtitleModel.data) and (fieldtitleModel.pages_id=modelPage.id) and (pages.id = field_livefeed_model.pages_id) and (field_livefeed_make.pages_id = pages.id) and (pages.id = field_livefeed_status.pages_id) and (pages.templates_id='53') and (field_livefeed_status.data = '1') ORDER BY field_livefeed_condition.data ASC"; I did template id 53 because I didnt want to add yet another join for the template name. Or I could have just done something like: $pages->queryArray('template=Inventory, status=1, groupby=Model, sort=title'); or distinct could be something like $pages->queryArray('template=inventory, distinctfields=model->id|model->title|make->title, sort=make->title'); I think its worth adding even if its no extra lines of code.
  22. The cms should be decoupled, but we should make it easy for people to share design as well. Even if you are not sharing the cms but layers that fit on top.
  23. I also think we need to have a modules type section for front end design. Processwire excels at backend information, but we need to excel at making and sharing good looking field/row/template styles.
×
×
  • Create New...