A question for downloading files

6 years 9 months ago #296015 by Andromeda57
A question for downloading files was created by Andromeda57
Hey guys,

we just have a question and don't know if we can realize it best with a product of joomlapolis (cb gallery, cb subs or whatever).

There are some pdf files on our websites that users can download. Is it possible to do the following:

1. When a user clicks on the file to download it, the user gets the file, but in new window another website opens (for example our facebook fanpage)

or

2. The user has to click on a link, for example our facebook fanpage, and after he clicks it, the download button appears or the file is loading automatically...


Thanks.

Please Log in to join the conversation.

6 years 9 months ago #296020 by krileon
Replied by krileon on topic A question for downloading files
Too specific of a uecase so it's not covered by any of our plugins. You'd need a means of verifying they've visited your Facebook page using Facebook API or you'd need to implement click tracking to see if they clicked the link. In both cases a stored database value is needed for persistence so when they come back they can freely download still.

If you update a field value after clicking the link you maybe able to do this by conditioning a gallery to show/hide based off the field value using CB Conditional. You maybe able to accomplish this with CB Auto Actions, but you'll need 3 auto actions as follows.

Action 1
Global
Triggers: None
Type: Field
User: User
Access: All Registered Users
Action
Field: cb_lookedatfacebook (this is a checkbox field for this test)
Operator: Set
Value: 1

Action 2
Global
Triggers: None
Type: Redirect
User: User
Access: All Registered Users
Action
URL: FACEBOOK_URL_HERE

Action 3
Global
Triggers: None
Type: Action
User: User
Access: All Registered Users
Action
Actions: Action 1 and Action 2

Note it is vital that Action 1 be ordered before Action 2 as it needs to execute first before the redirect. Now under the Global tab of Action 3 is a URL to directly execute it. This is what you'd send people to IF your cb_lookedatfacebook is not equal to 1, which could be used in CB Conditional or a Custom HTML field maybe. Example as follows.

[cb:if cb_lookedatfacebook="1"]DOWNLOAD_BUTTON[cb:else]LINK_TO_ACTION[/cb:else][/cb:if]


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.179 seconds

Facebook Twitter LinkedIn