Jump to content

How can I create a button to donate tokens for videos if a user wishes to voluntarily?


jokish

Recommended Posts

  • Tech Support changed the title to How can I create a button to donate tokens for videos if a user wishes to voluntarily?

Here are steps that you can have these buttons on member's profile page. NOTE: this is only for KVS Default Theme.

theme_donation.thumb.png.22be75967459170f15cbaeda1c075593.png

Step 1. Please check your theme version in Website UI -> Theme settings. If it says KVS Default (8.4) or above, then skip this step. If its version less than 8.4, then update these 2 files on your server:

https://www.kvs-demo.com/static/js/main.js
https://www.kvs-demo.com/static/js/main.min.js

 

Step 2. Edit member profile template in Website UI -> Page components -> include_member_profile.tpl and add the following code at the very end:

{{if $data.user_id!=$smarty.session.user_id && $lang.donations}}
	<div style="margin-top: 10px">
		{{foreach item="donation" from=","|explode:$lang.donations}}
			{{assign var="donation" value=$donation|trim|intval}}
			{{if $donation>0}}
				<div style="display: inline-block; padding: 5px">
					<form data-form="ajax" data-success="message" data-message="{{$lang.memberzone.success_message_donate|count_format:"%tokens%":$donation|replace:"%display_name%":$data.display_name}}">
						<div class="generic-error hidden"></div>
						<input type="hidden" name="function" value="donate"/>
						<input type="hidden" name="tokens" value="{{$donation}}"/>
						<input type="submit" class="submit" value="{{$lang.memberzone.button_donate|count_format:"%tokens%":$donation}}"/>
					</form>
				</div>
			{{/if}}
		{{/foreach}}
	</div>
{{/if}}

 

Step 3. Go into Website UI -> Texts and add the following 4 texts:

  • donations = 1, 5, 100
  • validation.common.tokens_not_enough_tokens = You don't have enough tokens to donate.
  • memberzone.button_donate = Donate [count]%tokens% tokens || 1: 1 token[/count]
  • memberzone.success_message_donate = Thank you! Your donation of [count]%tokens% tokens || 1: 1 token[/count] was send to <b>%display_name%</b>.

The first one lists possible donations in tokens, adjust it to get more or less donation buttons with the needed amounts.

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

  • 1 year later...
On 8/6/2022 at 11:52 PM, Serghei said:

hi. thanks works very well, but For each donation my website take commission, where the commission tokens go? I cannot find them, there suppose to be a website or admin account where commission goes...

All commissions are burning, so they belong to your site. But I think your question is correct, there is no way to see how much you earned for donations. We should have a page in stats that summarizes all donations and highlights how much tokens your site earned from them. We have this info in Stats -> Content Purchases already.

  • Thanks 1
Link to comment
Share on other sites

16 hours ago, Tech Support said:

All commissions are burning, so they belong to your site. But I think your question is correct, there is no way to see how much you earned for donations

Its possible to make a way to see how much you earned for donations? and not to burn the tokens, or to have the commission tokens and all the fees tokens to go to a special user (admin or moderator)  or website main account. what's the point to charge tokens procentage if you burn them ,and even can't see the amount of tokens was burn,  from where was getting and for what. 

Link to comment
Share on other sites

On 5/10/2021 at 7:53 AM, Tech Support said:

memberzone.success_message_donate = Thank you! Your donation of [count]%tokens% tokens || 1: 1 token[/count] was send to <b>%display_name%</b>.

i have this text code, but when you donate the message "Thank you! Your donation of [count]%tokens% tokens || 1: 1 token[/count] was send to <b>%display_name%</b>." doesn't shows anything , but the tokens go 

Link to comment
Share on other sites

7 hours ago, Serghei said:

Its possible to make a way to see how much you earned for donations? and not to burn the tokens, or to have the commission tokens and all the fees tokens to go to a special user (admin or moderator)  or website main account. what's the point to charge tokens procentage if you burn them ,and even can't see the amount of tokens was burn,  from where was getting and for what. 

We agree that such info should be available. And we actually have it in database, but we don't have a list for it.

With regard to not-burning, this cannot be changed. This is the conceptual thing and it has been working already like this for years. Moreover, we think that assigning tokens earned by your site (by system) to some user is wrong idea. Tokens that are rendered on some user's account can be further used on your site. But in reality these tokens should be removed from the circulation, because they are tokens that your site is earning.

 

7 hours ago, Serghei said:

i have this text code, but when you donate the message "Thank you! Your donation of [count]%tokens% tokens || 1: 1 token[/count] was send to <b>%display_name%</b>." doesn't shows anything , but the tokens go 

Please create support request and we will take a look at this.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...