Skip to:
Content
Pages
Categories
Search
Top
Bottom

Bookmark Lectures

  • Avatar of Fee
    Fee
    Participant

    @wdfee

    Hello Stas,
    thanks for your work, by the way :-)
    I don’t understand the bookmark functionality, yet. Somebody can bookmark lectures, and if he did, he will find a link on the group dashboard to the very last bookmarked one. Is there anywhere a place, where he can fnd all bookmarks? And if there is such a place, is there a way to un-bookmark the one or another again?
    Thanks, Fee

Viewing 3 replies - 1 through 3 (of 3 total)
  • Avatar of Stas Sușcov
    Stas Su?cov
    Participant

    @sushkov

    Yes, you basically got that.
    In every group, you can have a bookmark for currently available lectures.

    You can write a custom plugin to pick you up all the bookmarks, by cycling through the available groups:
    `
    $bookmark = get_user_meta( get_current_user_id(), ‘bookmark_’ . $your_group_id, true );
    `

    Avatar of Fee
    Fee
    Participant

    @wdfee

    Thanks, Stas. I tried that, it shows all lectures of all groups, where at least one lecture is bookmarked, even if all the others are not bookmarked.
    For example:
    group1 has lecture 1a, lecture 1b and lecture 1c
    group2 has lecture 2a, lecture 2b and lecture 2c
    if I bookmark lecture 1b, it shows 1a and 1c, too, because they’re in the same group.
    A look into the database showed me, that this one key for the group is updating to the last lecture_id everytime I bookmark another lecture of this group.

    Avatar of Stas Sușcov
    Stas Su?cov
    Participant

    @sushkov

    Well that’s the idea of bookmark. You can’t have a bookmark bookmarking two or more pages.

    If you want all the bookmarked pages inside your group, cycle through all the users, and query the same meta key. To delete that, just delete the meta key.

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.