Giter Club home page Giter Club logo

oc-photoalbums-plugin's People

Contributors

gergo85 avatar graker avatar victor-vanherpt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

oc-photoalbums-plugin's Issues

Radnoimzre

Thanks for very nice plugin.

An exception has been thrown during the rendering of a template ("SQLSTATE[HY000]: General error: 1 no such function: RAND (SQL: select * from "graker_photoalbums_photos" order by RAND() asc limit 5)").

When using RandomPhotos Component on SQLite.

Pagination

Hello graker, is it possible to use pagination on your plugin? How to do that, if its possible? Pls give me a tutoruial.. Thanks

Album pagination

Hi Graker,
I am using your plugin to show photos on page. In most I care about photos pagination.
Everything works fine but I have a little problem with pagination.
I have got page /albums/:slug and on this page just added album component like this:

{% set album = photoAlbum.album %}

<h1>{{ album.title }}</h1>

{% if album.description %}
    <div class="album-description row">
        <div class="col-xs-12">
            {{ album.description|raw }}
        </div>
    </div>
{% endif %}

<div class="album-photos row">
    {% for photo in album.photos %}
        <div class="photo col-xs-12 col-sm-6 col-md-4 col-lg-3">
            <a href="{{ photo.url }}"><img
                    data-src="{{ photo.thumb }}"
                    src="{{ photo.thumb }}"
                    alt="{{ photo.title }}"
                    title="{{ photo.title }}"
                    style="max-width: 100%" />
            </a>
            <a href="{{ photo.url }}"><strong>{{ photo.title }}</strong></a>
        </div>
    {% else %}
        <div class="col-xs-12 no-data">Album doesn't have any photos yet</div>
    {% endfor %}
</div>

{% if photoAlbum.lastPage > 1 %}
<ul class="pagination">
    {% if photoAlbum.currentPage > 1 %}
    <li><a href="{{ this.page.baseFileName|page }}?page={{ photoAlbum.currentPage-1 }}">&larr; Prev</a></li>
    {% endif %}

    {% for page in 1..photoAlbum.lastPage %}
    <li class="{{ photoAlbum.currentPage == page ? 'active' : null }}">
        <a href="{{ this.page.baseFileName|page }}?page={{ page }}">{{ page }}</a>
    </li>
    {% endfor %}

    {% if photoAlbum.lastPage > photoAlbum.currentPage %}
    <li><a href="{{ this.page.baseFileName|page }}?page={{ photoAlbum.currentPage+1 }}">Next &rarr;</a></li>
    {% endif %}
</ul>
{% endif %}

I set photos on page to be 8. In the fragment "menu" I added albumList component to display all galleries in the dropdown submenu.

<ul class="submenu">
    {% for album in albumList.albums %}
        <li>
            <a href="albums/{{album.slug}}">{{ album.title|raw }}</a>
        </li>
    {% endfor %}
</ul>

It works perfectly but when I goes e.g. to /albums/myphotos?page=2, dropdown submenu is empty. It doesn't work even when I use other plugin e.g. rainlab blog to display list of albums. When I goes to /albums/myphotos?page=1 or just /albums/myphotos dropdown submenu shows albums.

The same situation when I want to add prev - next navigation in single album page.

{% set portfolios = albumList.albums %}
{% for portfolio in portfolios %}{% if this.param.slug == portfolio.slug %}
<div class="wrapper">
    <ul class="single-pagination">
        {% if not loop.first %}
        <li class="prev"><a href="{{'portfolio'|page}}/{{portfolios[loop.index0-1].slug}}"><img src="{{portfolios[loop.index0-1].latestPhoto.thumb}}" alt="prev"><span> {{portfolios[loop.index0-1].title}}</span></a></li>
        {% endif %}
        <li class="backtoworks"><a href="{{'portfolio'|page}}">Albums</a></li>
        {% if not loop.last %}
        <li class="next"><a href="{{'portfolio'|page}}/{{portfolios[loop.index0+1].slug}}"><img src="{{portfolios[loop.index0+1].latestPhoto.thumb}}" alt="next"><span> {{portfolios[loop.index0+1].title}}</span></a></li>
        {% endif %}
    </ul>
</div>
{% endif %}
{% endfor %}

When I add two components Album and Album list on the same page, photos pagination doesn't work. When I add partial to /albums page with above code, on ?page=2 prev - next navigation disappears, on ?page=1 or just /albums/myphotos its visible.

I don't know if it's a problem or I'm doing something wrong?

Preview not working

October CMS v1.x

I've uploaded photos to an album, but photo previews aren't showing up in the album.
2022-06-19 103939

No images were created at preview /storage/app/media/.

Accessing via HTML or PHP

How does one access components like slugs, albums, photos (under "Documentation") using HTML or PHP?

It doesn't seem like the syntax for markdown will work and not sure how to use SELF in this context?

EDIT: I basically want to be able to retrieve a list of the albums, open particular albums, and get lists of the photos in that album by url. Is that possible here?

Thanks!

Is there a way to output all the albums with all their respective images?

Hi Graker,

Wanted to know if there is a way to output all the albums with all the photos in it. Currently I can only output list of Albums and one complete album set at a time using its slug (I could add this component multiple times with individuals album slug but this wont scale once you have large number of albums).

Thanks

conflict with sql_mode only_full_group_by on MySQL 5.7

For MySQL 5.7 the plugin conflict with default on sql_mode only_full_group_by

SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column '*****.graker_photoalbums_photos.sort_order' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by (SQL: select album_id, count() as aggregate from graker_photoalbums_photos where graker_photoalbums_photos.album_id in (1) group by album_id order by sort_order asc)
`

Photos Controller in Album with new fields

Hi there,
I have extended your plugin by adding some custom fields to photo model. This works and I can successfully added my details to the fields however, these fields are not visible when I try to edit the photo from photo list present in the album.

can you guys help me how can I extend the view of the added fields in Albums too.

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.