Please Log in to join the conversation.
Yup, create a new tab then add a Gallery field to it.Can I have two gallery tabs with two different configurations ?
Uploads to CB Activity right now have a very specific and unchangeable asset that's hardcoded into the integration. So those will always upload to profile.USER_ID.uploads, but in CB Activity 6.0.0 you'll be able to set the asset of that streams gallery to whatever you like.One allowing users to upload and manage public files/urls which would appear in CB Activity
By default only profile gallery uploads create activity so yes you could do this by just using a non-profile based asset for your second gallery.The second one allowing selected groups of users to upload and manage files/urls that would not appear in CB activity and have specific privacy settings ?
You'd just be conditioning against the media entries asset, but yes that's doable just not by tab id.In my autoaction using gallery_onAfterCreateItem and gallery_onAfterEditItem, can I condition it against the second tab ?
Please Log in to join the conversation.
Please Log in to join the conversation.
Yes, just set the create limit for media for that gallery to be a field then use CBSubs Fields to change the value of that field when they make a purchase.Can I also condition the number of files and their sizes against BCsubs plans ? And how ?
Only create limit can be changed per-user. File size limit cannot be changed per-user at this time.Say 10 files of 10mb max for plan A and up to 50 files of 20mb max for plan B for instance
Please Log in to join the conversation.
Please Log in to join the conversation.
global $_CB_database;
// Delete all folders
$query = 'SELECT *'
. "\n FROM " . $_CB_database->NameQuote( '#__comprofiler_plugin_gallery_folders' )
. "\n WHERE " . $_CB_database->NameQuote( 'asset' ) . " = " . $_CB_database->Quote( 'ASSET_HERE' );
$_CB_database->setQuery( $query );
$folders = $_CB_database->loadObjectList( null, '\CB\Plugin\Gallery\Table\FolderTable', array( $_CB_database ) );
/** @var FolderTable[] $folders */
foreach ( $folders as $folder ) {
$folder->delete();
}
// Delete all items
$query = 'SELECT *'
. "\n FROM " . $_CB_database->NameQuote( '#__comprofiler_plugin_gallery_items' )
. "\n WHERE " . $_CB_database->NameQuote( 'asset' ) . " = " . $_CB_database->Quote( 'ASSET_HERE' );
$_CB_database->setQuery( $query );
$items = $_CB_database->loadObjectList( null, '\CB\Plugin\Gallery\Table\ItemTable', array( $_CB_database ) );
/** @var ItemTable[] $items */
foreach ( $items as $item ) {
$item->delete();
}
Please Log in to join the conversation.