dashed-slug.net › Forums › Exchange extension support › Bulding Table / execute shortcode in PHP
- This topic has 4 replies, 2 voices, and was last updated 3 years, 7 months ago by
alexg.
-
AuthorPosts
-
January 13, 2021 at 12:13 pm #9752
LeinAd
Participanti got 403.. i want to ask something about execute shortcode after onclick
Attachments:
You must be logged in to view attached files.January 14, 2021 at 8:18 am #9755alexg
KeymasterHello,
If you are trying to modify the UIs, please see the
5.0.0
release notes on how to override the templates.I did not understand:
1. Where did you get a 403? This HTTP error is usually associated with not being logged in or lacking the appropriate permissions.
2. What do you mean by “execute shortcode”? What are you trying to do?
Please clarify so I can help.
thank you
with regards
January 14, 2021 at 9:06 am #9756LeinAd
ParticipantWhere did you get a 403
i got it here when i write what i want. i want the address line in the picture above as link to a popup where the coin and qr code is shown (static)
January 14, 2021 at 9:30 am #9757LeinAd
Participantmaybe yesterday was something wrong in my network so i got the 403 while posting here. i try again.
i have the table (shown in the screen) and want to add the rows: deposit, withdraw, move funts, transaktions. and i want to show them as pop up with the [wallets_deposit template=”static” symbol=”BTC” qrsize=”250″] (depostit is an example, but when i find a way to solve this i can use for the other popups too).
sorry cause double posting
January 15, 2021 at 7:46 am #9763alexg
Keymaster@LeinAd I understand now, thank you.
You would like to add a button to the
deposit-list
template, that displays deposit QR codes on a popup. What you are describing would require development, especially the part about popups.If you are serious about this, start by copying over
templates/deposit-list.php
into your theme as described here. Then, you’d need to:
1. add a now column with the button
2. capture the button click event
3. create a popup somehow
4. in that popup, render the qr codeIf you want to study the code that renders qr codes, it’s here: https://github.com/dashed-slug/wallets/blob/5.0.12/assets/scripts/wallets-ko.js#L286-L322
Essentially you want to render the
qrcode_uri
of each coin into your popup element. So, very roughly, something like:$('.button','.dashed-slug-wallets.deposit-list' ).click( function() { var coin = self.selectedCryptoCoin(); if ( 'object' == typeof( coins[ coin ] ) ) { // choose to render qrcode_uri if specified, or deposit address string otherwise var qrcode_uri = false; if ( 'string' == typeof( coins[ coin ].deposit_address_qrcode_uri ) ) { qrcode_uri = coins[ coin ].deposit_address_qrcode_uri; } else if ( 'string' == typeof( coins[ coin ].deposit_address ) ) { qrcode_uri = coins[ coin ].deposit_address; } // TODO create/display a popup somehow var $popup = $('#popup'); $popup.qrcode( { width: $popup.width(), height: $popup.height(), text: qrcode_uri } ); } } );
I haven’t tested this, but hopefully you get the general idea. If you want to see the API docs for the qr code library, it’s here:
https://github.com/jeromeetienne/jquery-qrcode/
Hope this helps.
with regards
-
AuthorPosts
- You must be logged in to reply to this topic.