You want to be able to tell on every ajax powered portfolio-item page whether the visitor reached that page from another portfolio item page or from the main portfolio archive page.
There is an array that holds the order of the portfolio after it is sorted so that when the next or previous arrow is clicked , the correct portfolio item is shown. If you look at the source code of any ajax portfolio page, the section of the source code that looks like the code below (just with a different number of ajax 'pages' or slides and different id numbers) would be present that dictates the order of the sorted portfolio items with the first one always being where the visitor landed from the archive page.
<div class="portfolio-details-inner" style="">
<div class="ajax_slide ajax_slide_474" data-slide-id="474" style="">data for this slide</div>
<div class="ajax_slide ajax_slide_233 open_slide" data-slide-id="233" style="z-index: 3; left: 0%; -webkit-transition: none; opacity: 1;">
<div class="ajax_slide ajax_slide_244" data-slide-id="244" style="">data for this slide</div>
<div class="ajax_slide ajax_slide_571" data-slide-id="571" style="">data for this slide</div>
The first (ajax_slide) is always the portfolio slide that was used to enter the portfolio item page initially, which in the case of the above example is 474. In the above example the visitor is on the second slide, so you can be 100% sure that the visitor arrived there only by hitting the Next/Previous buttons. Why?
You can see it has an 'open_slide' class while the other <div>'s don't, and it is the second ajax_slide div, when we know that the first ajax_slide div has to be where the entry is made from the archive. Since the first div doesn't have the open_slide class, we know that in this instance the visitor already hit the next button (or previous a few times) to reach this slide.
So if that class is located on any div except the first one (except 474), you can be 100% sure that a next/previous button was used to access that page. If the open_slide class is on the first div though, you can not guarantee that it was entered from the portfolio archive because if you keep hitting the next/prev arrows the visitor will eventually loop around and return to 474.
You can use Jquery to check which child div of portfolio-details-inner currently has the open_slide class programmatically and thereby know how the page was reached. There are another dozen ways you can learn the information you need, but you will need to modify a portion of the theme to record that information yourself.
However that is outside the scope of the support team.