Jump to content

MuchDev

Members
  • Posts

    378
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MuchDev

  1. Exciting time, congrats on the success of your previous project and starting this new project. I don't know if I can point to any pitfalls that are specific to processwire but more in relation to site structure as Processwire is extremely forgiving when it comes to adapting to various uses. I suppose that I would mainly focus on your layout as you would normally but take note on how you want to relate all of your items to one another and how you are going to present these items to your editors in a way that they can keep the site up to date reliably. In dealing with a product site you will want to be mindful of the items that you have on your site making sure that your structure doesn't create any bad habits in the people that update the site, like allowing editors to create duplicate items in different parts of your site and such. I have to say though I know I thought similarly as you when I started a smaller sized site that I may need to use something like elastic search to search my site, but actually quickly abandoned this after I found the cache field. Using this field, add all the fields that you want to be searchable in a more general search, and then if you want to have a more granular product search, you can jump into the bread and butter of Processwire and search the fields specifically and sort the items as needed. I power my whole site off just the cache field and text searches. You can build a couple of these to handle different item types and just perform a search on a field directly without having to join all of the fields, this can really speed up your searches. Interested to see how this progresses and hope you keep us updated on your progress
  2. Hey there @arjen totally forgot about this question, I did end up finding that thing and am now happily using it to keep an eye on changes. Super helpful module!
  3. Hey man, love this module! This data has helped me many times. I was wondering though as I have been querying against this data in the database if you had any plan to add any other search options. I have had the need to find changes on individual items and being able to insert a text string for a field could be super helpful.
  4. I like this post, could be a really cool experiment. You could also use a php based ssh client to connect your machines and execute some scripts / bootstrap processwire via shell. You could then use ssh keys to secure your connection. Even going further you could do something on your server to limit your ssh connections of this user to one ip. What did you end up doin bernhard?
  5. That is a great idea! Thank you kongondo I will tinker with this this afternoon. Awesome looking module!!
  6. Good call! I will give this a go Thanks for the recommendation.
  7. Hey guys, just working on beefing up a admin view and was wondering if anyone had already made a module that computes its value based on a computation of other fields. I would like to run some math on several fields to deal with deducting and computing taxes based on several other fields on a form and thought this could make a pretty slick module. Most simply what I would like is a field that is only used on edit views which allows me to do something as simply as (field1 + field2) / field3. Possibly something that can be customized on each template or the like.
  8. Yeah this is doable I suppose but Robin does have a good point, this could add some time to your queries as they would be saving the data to the same database that you are querying. You may want to look into something so that you can track analytics on the terms that you are tracking. I have used piwik in the past for this and google analytics also has a really great method of logging this. One other method if you just want a log would be to use the processwire $log variable to save a log of the term to a log file. https://processwire.com/api/variables/log/ If you want to save to a page you can do this (just stole this from an old post by soma so I don't have to type): $p = new Page(); // create new page object $p->template = 'page'; // set template name here $p->parent = $pages->get('/search-terms/'); // set the parent $p->name = 'mynewpage_url'; // give it a name used in the url for the page $p->title = 'My New Page'; // set page title (not neccessary but recommended) $p->save(); To use mail just read about wiremail
  9. Hey that is really cool then you don't have to hack your .htaccess
  10. Well I found another and they have the project which you can run locally https://github.com/justincavery/am-i-responsive/ I had to remove the SAMEORIGIN header from xampp but it worked locally.
  11. I just used it on one site I made and it worked, but for some reason a lot of the big name sites I input it fails. I wonder if it relies on a server being permissive. Weird I found one site that works and it just happens to be one of mine https://www.davidsongalleries.com maybe the site is just slow
  12. Found one site that will do it http://techsini.com/multi-mockup/index.php
  13. MuchDev

    Padloper showcase

    Thanks SiNNut. Yeah I am aware of some new smartphone issues. I was in a mad dash to get it finished over the weekend and didn't take the time to wiggle it around. Thanks for the reminder interesting about the home page overflow issue, must have missed a tag somewhere:)
  14. MuchDev

    Padloper showcase

    I am happy to share a project. Just threw the switch the other day on https://www.davidsongalleries.com I built this site a couple years ago but am always adding something. Now we have sales using padloper!
  15. ACK I'll be damned that is exactly what it was, deleted the closing ?> and all is well. Figured the compiler would pick something like that up. Thanks dude!
  16. Hello hello. I am working on a fairly simple little utility module at the moment that hooks to Pages::saveReady. The issue is that when this module is active I am unable to access most of processwire unless I manually navigate to it. If I load a page like https://www.domain.com/processwire and the page performs a redirect I see a white screen. Clicking through and loading and even saving pages also causes a white screen. I have been trying to replicate this locally but of course the simple module performs perfectly. I have tried restoring the db and loading a new version of processwire and no dice. I am also running an exact copy of the db locally with a copy of the modules directory as well and am not getting this issue locally. Anyone see anything here that I should investigate? Weird things I don't know about php? Version issues? **Edit** I have just created a template using this exact code and it runs properly as well without any errors on my live site. <?php class ApplyShippingClass extends WireData implements Module { public static function getModuleInfo() { return array( 'title' => 'Apply Shipping Class When Page Saves', 'version' => 006, 'summary' => '', 'singular' => true, 'autoload' => true, 'href' => '', ); } public function init() { $this->addHookAfter('Pages::saveReady', $this, 'applyClass'); } function getSizeClassTitle($item) { //Max widths or heights to align with sizing classes $sizes = Array( 0 => Array( 'Value' => 6, 'Name' => 'X-Small (0" - 6")' ), 1 => Array( 'Value' => 12, 'Name' => 'Small (6" - 12")' ), 2 => Array( 'Value' => 24, 'Name' => 'Medium (12" - 24")' ), 3 => Array( 'Value' => 40, 'Name' => 'Large (24" - 40")' ), 4 => Array( 'Value' => PHP_INT_MAX , 'Name' => 'X-Large (40"+)' ), ); for($i = 4; $i > 0; $i--) { if($item->artwork_width < $sizes[$i]['Value'] && $item->artwork_height < $sizes[$i]['Value']) { $largest = $sizes[$i]["Name"]; } } return $largest; } ?>
  17. One thing I did on a past site was to get a database copy from the live site, restore on a local machine, do all the stuff locally then restore. I had around 20,000 items I was importing and ran into timeout / memory issues. I was also pre-processing images which was helpful as I was able to upload those as well. My current server sometimes eats up the ram due to image variations for large images but I currently run that site on a server with 15gb. If this is a one time deal you may be able to think this way, otherwise there might be some more server / php / apache memory settings you can tweak to get usage down.
  18. I am a total offender of using a ridiculous amount of templates, but there are many ways around this. Most of the time you can standardize your templates so that every different type of page doesn't need to use a different template, and just includes the functions that are applicable for that part of your site. Over the years there have been several discussions on this subject, and what I have seen everything come down to is just a matter of implementation. If you find that you are getting too many templates then possibly look into how you can make your code a bit more reusable and aware of its context. Here is a good starter, but I recommend googling our forum and focus on posts in relation to page structure.
  19. Oh yeah derp derp good deal you got settled
  20. isn't that what $config->httpUrl does?
  21. Man, I really wanna try this out on my dev box. You happen to know an easy way of installing imagemagick on windows/xampp?
  22. I just make crap up that is easy to remember muchdevelopment.com I bought my name back when the internet was young, but then let it lapse, now some crummy artist bought it and holds it ransom. Apparently I also do voice over work.
  23. Well you might wanna check into the docs a bit for how to create a simple module that hooks before save. The logic is that you will change the data on the page and then when it is finished saving (as you will be modifying the data on the page before it is comitted) your data will be present. Good place to start: http://processwire.com/api/modules/ or http://modules.processwire.com/modules/helloworld/ Also are you trying to create this page title so that you can display it as the pages title in your head? If so you can also just echo out those fields. <head> <?php $pageTitle = $page->title; $pageTitle .= ' | '.$page->fieldName; $pageTitle .= ' | '.$page->fieldName2; ?> <title><?=$pageTitle;?></title> </head> Or are you trying to create this so that you can view the pages a certain way in your admin, if so then they have you covered here. Go to the template that you are wanting to see the title in a certain format and go to the advanced tab.
  24. Check around I have had this issue many times for many reasons that were not related to php versions. Do a google search for : Your site config could be unreadable or there could be permission issues with various processwire folders. One thing that I found on the forums a while back was setting //In your site > config.php $config->sessionName = session_name();
  25. Thanks man:) In its current and very simple state it will style all templates with the same settings. If you were styling your forms on a template using your own code I would just style them there or make a hook for your specific templates. But....this is a feature I would like to add. I'll look in to in in a week or two. You could also if you are in a hurry make a couple copies of the module for different templates using the same settings and rename the modules for now if you want to use it in it's current state. This is not ideal but it would solve what you need for the moment. Also feel free to fork my code and hack it to hell for your own purposes
×
×
  • Create New...