We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Displaying photos without floatbox and show the number of photo views. | Forum

Kurt
Kurt Oct 21 '14

I would like to display photos

on the page rather then in a floatbox. I have found if I copy the URL while the floatbox is displayed then exit floatbox and enter that URL in as the address the picture displays the way I like. This would allow my users to use the sharethis plugin to share their photos on Facebook.


I would also like each photo to have a hit counter that would display the number of times a photo was viewed.

The Forum post is edited by Kurt Oct 21 '14
Steve
Steve Oct 21 '14
Me too...


good luck !

ross Team
ross Oct 21 '14
Topic was moved from General Questions.
Kieron H Leader
Kieron H Oct 28 '14
im looking for this aswell 
Daisy Team
Daisy Nov 24 '14
Kurt, first of all we will add the Social Sharing buttons (Social Media sharing plugin) into the Photo View floatbox in the upcoming update - this will allow your users to share their photos directly from floatbox.

But, if you still want the photo view page to be open instead of the floatbox - you will need to customize the Photo plugin code.  But, be advised, if you then update the Photo plugin - your changes will be lost.

Anyway, here are the instructions:

Go to /ow_plugins/photo/static/js/photo.js file.

Search for the following string:


var url = _methods.locationUtils.parseUrl(_vars.urlHome, ['pathname'])['pathname'] + 'photo/view/' + photoId + '/' + listType, search;

Add the following condition below the string:

                if ( window.location.href != _vars.urlHome.slice(0, -1) + url )
                {
                    window.location = url;
                    return;
                }

Clear compiled resources by enabling the DEV_MODE and clear the browser cache. That's it.

As to the photo view counter - this is possible as a new plugin development only.

I suggest that you download our new Plugin Skeleton plugin to see how to use this or that function. Here is URL to the Store item: http://www.oxwall.org/store/item/695

If you are not familiar with the plugin development, it would be better for you to find a developer who can help you with it. Please visit our Oxwall Market (http://www.oxwall.org/market/specialists). Or search for the existing plugins in the Store.
Kurt
Kurt Nov 29 '14

Daisy

Thanks for the reply. Having the social sharing buttons on the photo floatbox is exactly what I am looking for. I have successfully installed 1.7.2, however, the social media sharing buttons do not appear on the photo view page.

Do I need to reinstall the social media sharing plugin?

Also should the social sharing buttons appear on the photo album page?


Daisy Team
Daisy Dec 10 '14
Kurt, everything should wok correctly. Did you check this functionality at our demo?

Have you configured this plugin? You should create an account at https://www.addthis.com/settings/publisher and enter the Profile ID into the plugin settings.


20 Hours a Day
20 Hours a Day May 9 '15
@Daisy

adding this condition to under the string in photo.js as you instructed, resulted only in the photo page constantly refreshing when the newsfeed photo was clicked on.  I'm running 1.7.3, and all I want to do is disable the floatbox entirely.

Actually here is what I want to do with my responsive theme.....

While a visitor is using their smartphone, I need the photo to show up in FULL quality resolution and show vote and comments while disabling the floatbox entirely in the newsfeed.

As it is, the photo will show up in the newsfeed with the quality slightly degraded until the visitor triggers the floatbox and then they can vote and see full quality.  I understand that by increasing the quality of the photos will slow the newsfeed, but it is what I would like to do.

Do you have a suggestion on photo quality increase, and to floatbox disable under @media (max-width: 480px)?