benbyf

Testings Nearly Finished Photographers Site

Recommended Posts

Hey Everyone!

right I'm nearing the end of development on this photography agencies site and I was wondering if anyone could have a quick look for bugs etc.

http://nicegrp.co.uk/dev/hs/

It's not quite finished so there may be obvious stuff, also there's ALOT, going on in the front end, for example:

- pages are cached client side (to prevent unnecessary ajax requests for seen pages)

- Ajax page requests & pushstate

- pdf module for gallery pages

- slideshow animations

- add image to your custom gallery

- alot of menu logic

- responsive

- lazy loading images on gallery pages

Let me know what you think.

Thanks

  • Like 10

Share this post


Link to post
Share on other sites

Looks and feels great. Immediately browsed through the galleries. 

Just the tennis background image on the Affiliates page ( http://nicegrp.co.uk/dev/hs/affiliates/ ) ist about 2.3MB. Took a while before it loaded and I'm not sture how mobile users like those large image files.

  • Like 2

Share this post


Link to post
Share on other sites

Indeed - it is a great site. very nicely built.

Must agree with Philipp here. In fact, there are several images that are too large. Sure, they're not all 2.3MB, but they're a tad too big.

May I suggest that you have a look at this article for more information on how to work around this:

http://www.smashingmagazine.com/2014/02/03/one-solution-to-responsive-images/

The article makes reference to these as well:

http://www.smashingmagazine.com/2013/07/08/choosing-a-responsive-image-solution/

http://adaptive-images.com/ (this looks quite promising)

And perhaps a loading indicator? Changing the title to "Loading..." was not easily noticeable for me; perhaps some people have slow connections/latency may question if a page is even loading.

Otherwise, I like it! :D

  • Like 1

Share this post


Link to post
Share on other sites

You can always make those images responsive. Thanks to Horst, PWs native images sizer provides images with much more quality than before. It's really easy to create responsive images with JS or even with the new SRCSET attribute for images or the <picture> element and respective polyfills http://scottjehl.github.io/picturefill/#examples

It's great that you give the option to collapse the menu to show the images in bigger, but I think the wording could be better: I don't really want to "collapse the menu", what I really want is to see the content in bigger. What I mean is that the wording could be something like "enlarge content" and turning it into "show menu" as you already have there. I also think that this ability should only be present in the gallery pages as there's no point on seeing the blog or the copyright notice in larger.

Just a suggestion :)

  • Like 1

Share this post


Link to post
Share on other sites

Really nice and clean website here, top notch photos everywhere!

May I ask you to point us (at least me) in the right direction to use requests and pushstate with processwire?

Thanks!

Share this post


Link to post
Share on other sites

Really nice and clean website here, top notch photos everywhere!

May I ask you to point us (at least me) in the right direction to use requests and pushstate with processwire?

Thanks!

maybe more is to read here: https://processwire.com/talk/topic/4792-festival-site-with-processwire-and-ajax-boom-festival/

------

Edit: A very good site @benbyf. The only thing that I (personally) would change is the behave when clicking on a photographers name: one should get the "Main Gallery" directly, no need to click two times before seeing the first photo. / but also a bit nitpicking, I know :)

Edited by horst

Share this post


Link to post
Share on other sites

Thanks everyone, an image is still a hard won problem, especially when your not restricting the client in their uploads to much. Will look harder into this, but still loathed to use polyfills for images.

Really nice and clean website here, top notch photos everywhere!

May I ask you to point us (at least me) in the right direction to use requests and pushstate with processwire?

Thanks!

I was thinking about writing a lengthy description / tutorial on this site, as there's loads in it after it's live. I'll endeavour to do so after your interest.

  • Like 6

Share this post


Link to post
Share on other sites

+1! New descriptions and tutorials are always welcome!

  • Like 2

Share this post


Link to post
Share on other sites

HEY,

Thank you all for your comments! My client loved seeing them too, so thank you.

The site is now live: http://horton-stephens.com/

Tutorial coming this week, anything in particular people would like to know?

Thanks

  • Like 3

Share this post


Link to post
Share on other sites

Loving the work. Im working on a very similar project, but I hadnt figured out how one would implement a add to custom list. I would really love to know how you plan on accomplishing this.

I have just a couple observations. A small thing that was kind of confusing from a navigation standpoint is how the links go to the parent page where the photographer is on as opposed to the page itself, it wasn't until I moused away from the link, and it faded the rest of the images that I understood why you did this. I think from a gut point click perspective if I were to click on an artist I would expect an artist page.

One little detail I think would really jazz up your page transitions, as you will be performing fades, would be using a little plugin like imagesloaded. Then you could fade images once they are loaded, and get rid of the loading of those big pretty images that you have.

https://github.com/desandro/imagesloaded

Share this post


Link to post
Share on other sites

Thanks MuchDev.

In terms of the images, I am using a image loader for the galleries if you scroll down (try turning javascript off and your get the first 2 images), but I'm not using one ofr the page load itself so maybe something I can improve if the client agrees.

  • Like 1

Share this post


Link to post
Share on other sites

Thanks MuchDev.

In terms of the images, I am using a image loader for the galleries if you scroll down (try turning javascript off and your get the first 2 images), but I'm not using one ofr the page load itself so maybe something I can improve if the client agrees.

As I said though, just a suggestion. I did see the photographer loading which is what led me to want to comment in the first place. I really like you use of infinite loading on the pages. Also your tag display system is pretty slick, I like the ability to grab selections of work based on a tag, I have a mondo tag system I've been developing that will be very similar. Great work though, it is really coming along!

  • Like 1

Share this post


Link to post
Share on other sites

caching help? As pages can be got directly or via ajax Im having massive caching issues (as it wont work with ajax), anyone have any solutions they can direct me too?

Currently a page template is if'ing in ./head and ./foot if not ajax so that I'm only grabbing page content instead of all the page resources etc. But, obviously to me now, I'm unable to caching any of the pages with ajax on them as they get served without the head and foot as the ajaz version is more likely to be cached. interesting problem.

Share this post


Link to post
Share on other sites

I don't understand what caching issues you mean. Do you use ProCache or other Caching methods?

Share this post


Link to post
Share on other sites

the PW template caching (goto a template in the admin and click the Cache tab )

Share this post


Link to post
Share on other sites

Hi, i discovered a bug with Chrome 37. When i use my browers back button the URL changes but the content stays the same. Seems the soft-cached version isn´t injected.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By cosmicsafari
      Hi all,
      I have been asked by a client whether we can setup load balancing for their existing Processwire site.
      From my investigations on Google and within these forums, it definitely seems possible but as a newbie with a basic understanding of the subject im a bit lost.
      Does anyone know of any existing tutorials for settings up load balancing with PW?
      What items would need to be changed on their current stand alone install, is there a list of best practices worth consulting etc?
      As I understand it we would need to have some sort of copying mechanism (rsync script most likely) in order to make sure any uploaded assets are shared between the main server and the fallback ones, other than that im not sure what else would need to be ammended.
      Any thoughts/help would be greatly appreciated.
    • By tpr
      ProcessNetteTester
      Run Nette Tester tests within ProcessWire admin.
      (continued from here)

      Features
      AJAX interface for running Nette Tester tests, in bulk or manually display counter, error message and execution time in a table run all tests at once or launch single tests show formatted test error messages and report PHP syntax errors stop on first failed test (optional) hide passed tests (optional) display failed/total instead passed/total (optional) re-run failed tests only (optional) auto scroll (optional) include or exclude tests based on query parameters start/stop all tests with the spacebar reset one test or all tests (ctrl+click) TracyDebugger File Editor integration https://modules.processwire.com/modules/process-nette-tester/
      https://github.com/rolandtoth/ProcessNetteTester
    • By tpr
      Update 2018-07-09: ProcessNetteTester module is available in the Modules Directory and on GitHub.

      This is a short tutorial on how to use Nette Tester with ProcessWire.
      As you will see it's very easy to setup and use and it's perfect for testing your code's functionality. With bootstrapping ProcessWire it's also possible to check the rendered markup of pages using the API, checking page properties, etc. It's also a great tool for module developers for writing better code. 
      While there will be nothing extraordinary here that you couldn't find in Tester's docs this can serve as a good starting point.
      Prerequisites: PHP 5.6+
      01 Download Tester
      Go to https://github.com/nette/tester/releases and download the latest release (currently 2.0.2). Download from the link reading "Source code (zip)". You can use composer also if you wish.
      02 Extract Tester files
      Create a new directory in your site root called "tester". Extract the zip downloaded here, so it should look like this:
      /site /tester/src /tester/tools /tester/appveyor.yml /tester/composer.json /tester/contributing.md /tester/license.md /tester/readme.md /wire ... 03 Create directory for test files
      Add a new directory in "/tester" called "tests". Tester recognizes "*.Test.php" and "*.phpt" files in the tests directory, recursively. 
      04 Create your first test
      In the "tests" directory create a new "MyTest.php" file.
      The first test is a very simple one that bootstraps ProcessWire and checks if the Home page name is "Home". This is not the smartest test but will show you the basics.
      Add this to "/tester/tests/MyTest.php":
      <?php namespace ProcessWire; use \Tester\Assert; use \Tester\DomQuery; use \Tester\TestCase; use \Tester\Environment; require __DIR__ . '/../src/bootstrap.php'; // load Tester require __DIR__ . '/../../index.php'; // bootstrap ProcessWire Environment::setup(); class MyTest extends TestCase {     // first test (step 04)     public function testHomeTitle()     {         $expected = 'Home'; // we expect the page title to be "Home"         $actual = wire('pages')->get(1)->title; // check what's the actual title Assert::equal($expected, $actual); // check whether they are equal     }     // second test will go here (step 06)     // third test will go here (step 07) } // run testing methods (new MyTest())->run(); I've added comment placeholders for the second and third tests that we will insert later.
      05 Run Tester
      Tester can be run either from the command line or from the browser. The command line output is more verbose and colored while in the browser it's plain text only (see later).
      Running from the command line
      Navigate to the "/tester" directory in your console and execute this:
      php src/tester.php -C tests This will start "/tester/src/tester.php" and runs test files from the "/tester/tests" directory. The "-C" switch tells Tester to use the system-wide php ini file, that is required here because when bootstrapping ProcessWire you may run into errors (no php.ini file is used by default). You may load another ini file with the "-c <path>" (check the docs).
      If the title of your Home page is "Home" you should see this:

      If it's for example "Cats and Dogs", you should see this:

      Running from the browser
      First we need to create a new PHP file in ProcessWire's root, let's call it "testrunner.php". This is because ProcessWire doesn't allow to run PHP files from its "site" directory.
      The following code runs two test classes and produces a legible output. IRL you should probably iterate through directories to get test files (eg. with glob()), and of course it's better not allow tests go out to production.
      <?php ini_set('html_errors', false); header('Content-type: text/plain'); echo 'Starting tests.' . PHP_EOL; echo '--------------------------' . PHP_EOL; $file = __DIR__ . '/PATH_TO/FirstTest.php'; echo basename($file) . ' '; require $file; echo '[OK]' . PHP_EOL; $file = __DIR__ . '/PATH_TO/SecondTest.php'; echo basename($file) . ' '; require $file; echo '[OK]' . PHP_EOL; echo '--------------------------' . PHP_EOL; echo 'Tests finished.'; exit; Navigate to "DOMAIN/testrunner.php" in your browser to execute the file. If every test succeeds you should get this:

      If there are failed tests the execution stops and you can read the error message. If there were more tests (eg. ThirdTest), those won't be displayed under the failed test.

      06 DOM test
      This test will check if a page with "basic-page" template has a "h1" element. We will create the page on the fly with ProcessWire's API. To keep things simple we will add the new test as a new method to our MyTest class.
      Add this block to the MyTest class:
      public function testBasicPageHeadline() {     $p = new Page();     $p->template = 'basic-page';     $html = $p->render();     $dom = DomQuery::fromHtml($html);     Assert::true($dom->has('h1')); } This will most likely be true but of course you can check for something more specific, for example "div#main". Note that we have used the DomQuery helper here (check the "use" statement on the top of the file).
      07 Custom function test
      You will probably want to make sure your custom functions/methods will work as they should so let's write a test that demonstrates this.
      I don't want to complicate things so I'll check if the built-in "pageName" sanitizer works as expected. Add this to the myTest class:
      public function testPageNameSanitizer() {     $expected = 'hello-world';     $actual = wire('sanitizer')->pageName('Hello world!', true);     Assert::equal($expected, $actual); } This should also be true. Try to change the expected value if you are eager to see a failure message.
       
      08 Next steps
      You can add more methods to the MyTest class or create new files in the "tests" directory. Check out the range of available Assertions and other features in the docs and see how they could help you writing more fail-safe code.
      Once you make a habit of writing tests you'll see how it can assist making your code more bulletproof and stable. Remember: test early, test often 🙂
      If you find out something useful or cool with Tester make sure to share.
    • By paulb
      Hello,
      I recently started making a blog using Processwire and since i'm completely new, I struggle with a few things.
      I'm trying to make a comment section in my blog post, so I followed the tutorial and pasted the two code lines in my template.
      18 echo $page->comments->render(); 19 echo $page->comments->renderForm();  
      but now I have this error on my page :
      Error: Call to a member function render() on null (line 18 of C:\wamp64\www\processwire\site\assets\cache\FileCompiler\site\templates\Post.php)  
      Am I missing something?
      Thanks for your help.
    • By flashmaster
      Hi im new to this forum and i need some help with a booking system that i have trying to implement under Processwire. I hope that i can explain as much as i can what my problem is.
      Here is the orginal script https://github.com/olejon/phpmyreservation
      I downloaded the script and got some help to fix it because it was all messed up. I have attached a file "ReservationSystem.rar" and it should work out of the box. Also attached the database file "Phpmyreservation.sql".
      The thing is the script works great as it is now but when i install a blank version of processwire and import the script to the template folder it wont work. I have tried many things but cant get it to work just error after error etc. Please ask me if you need some more information about this. I know you are the experts so thats why im asking you.
      ReservationSystem.rar
      phpmyreservation.sql