Blind

Transfer in Posts

Recommended Posts

Hi,

I recently purchased your application for IPB and am loving it so far. I noticed that there is no 'transfer' funds in the posts view though, I also so there was a request already made for it.

I went ahead and gave it a shot and came up with the following though, there is still 1 minor bug.

I went to:  Admin CP -> Customization -> Themes -> Edit -> points/fronts/components/currencyUserbit and replaced the contents in there with:

<a _title="{$currency->_title}" data-ipsTooltip class="ipsSpacer_top ipsSpacer_half ipsBadge ipsBadge_small ipsBadge_{{if $worth < 0}}style5{{else}}style4{{endif}}">
  {$currency->display( $worth )} {$currency->pluralized( $worth )}
</a>
</li>
<li class="ipsResponsive_hidePhone ipsType_break">
  <a class="ipsBadge ipsBadge_small ipsButton_important" data-ipsDialog data-ipsDialog-title="{lang="points_send_to_member"}" href="{url="app=points&module=points&controller=dashboard&do=send&curr={$currency->id}&bank=0&tname={$member->name}"}" title="{lang="points_dash_send"}"><i class="fa fa-user"></i>
    &nbsp;&nbsp; <span>Transfer Funds</span>
  </a>
</li>

 

I then went to  applications/points/modules/front/points/dashboard.php and found the following at line 235

$form->add( new \IPS\Helpers\Form\Member( 'points_dash_transfer_member', NULL, TRUE ) );

I changed it to

$form->add( new \IPS\Helpers\Form\Member( 'points_dash_transfer_member', \IPS\Request::i()->tname, TRUE ) );

 

The issue with all this is say I load a topic and click on User A. The popup modal shows up and User A's name is there. If I exit out of that and click on User B, the name is blank.

Any advise on how to fix this or an update on this type of feature would be amazing.

 

Thanks!

Edited by Blind

Share this post


Link to post
Share on other sites

Nice. You could probably roll that into a small plugin and put that in the marketplace if you wanted.

On 11/10/2016 at 0:46 PM, Blind said:

The issue with all this is say I load a topic and click on User A. The popup modal shows up and User A's name is there. If I exit out of that and click on User B, the name is blank.

That may just be a limitation of the modal dialog. I've noticed that kind of behavior before when loading modal dialogs myself. One way to be sure would be to look at the network request that is made when you click the link to the second modal dialog in your browsers inspection tool (or any other means you have available), and see if the response from that request includes the transfer form with the member name filled in as expected.

If you post a link to a page on your site with this feature ( and PM me with any credentials I may need to login and access it ), then I can do a quick inspection to see if anything is obvious to me.

Share this post


Link to post
Share on other sites

Your content will need to be approved by a moderator

Guest
You are commenting as a guest. If you have an account, please sign in.
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.