From a1dba8bea7b4651311ae065dcced3e9f61b3ac73 Mon Sep 17 00:00:00 2001 From: Lem Smyth Date: Sun, 20 Feb 2022 21:09:40 -0600 Subject: [PATCH] mv channel table to channels-page --- classes/LBRY_Admin.php | 56 +-------------------------------- templates/channels-page.php | 63 +++++++++++++++++++++++++++++++++++-- 2 files changed, 61 insertions(+), 58 deletions(-) diff --git a/classes/LBRY_Admin.php b/classes/LBRY_Admin.php index af17e67..a62fbba 100644 --- a/classes/LBRY_Admin.php +++ b/classes/LBRY_Admin.php @@ -267,61 +267,7 @@ class LBRY_Admin */ public function available_channels_callback() { - $channel_list = LBRY()->daemon->channel_list(); - if ( $channel_list ) { ?> - - - - - - - - - - - - - claim_id; - $results = LBRY()->daemon->claim_search( $claim_id ); - $lbry_url = $results->items[0]->canonical_url; - if ( $lbry_url ) { - $open_url = str_replace( 'lbry://', 'open.lbry.com/', $lbry_url ); - } - $timestamp = $results->items[0]->meta->creation_timestamp; - $created_date = date( 'm-d-y', $timestamp ); - $support_amount = $results->items[0]->meta->support_amount; - $claims_published = $results->items[0]->meta->claims_in_channel; - if ( ( $support_amount < 0.001 ) ) { - ( $support_amount = '0' ); - } elseif ( ( $support_amount < 0.01 ) && ( $support_amount >= 0.001 ) ) { - ( $support_amount = '<0.01' ); - } elseif ( ( $support_amount <= 0.099 ) && ( $support_amount >= 0.01) ) { - ( $support_amount = number_format( floatval( $support_amount ), 2, '.', '' ) ); - } elseif ( ( $support_amount <= 0.999 ) && ( $support_amount >= 0.1 ) ) { - ( $support_amount = number_format( floatval( $support_amount ), 1, '.', '' ) ); - } else { - ( $support_amount = number_format( intval( $support_amount ) ) ); - } - $init_bid = $results->items[0]->amount; ?> - - - - - - - - - - - - - - -
ChannelLBRY URLClaim ID~ Date CreatedPostsSupports
name, 'lbrypress' ); ?>Add
LBRYPress
- -

Looks like you haven't added any channels yet, feel free to do so below:

-

- admin->available_channels_callback(); ?> - admin->available_channels_callback(); ?> + daemon->channel_list(); + if ( $channel_list ) { ?> + + + + + + + + + + + + + claim_id; + $results = LBRY()->daemon->claim_search( $claim_id ); + $lbry_url = $results->items[0]->canonical_url; + if ( $lbry_url ) { + $open_url = str_replace( 'lbry://', 'open.lbry.com/', $lbry_url ); + } + $timestamp = $results->items[0]->meta->creation_timestamp; + $created_date = date( 'm-d-y', $timestamp ); + $support_amount = $results->items[0]->meta->support_amount; + $claims_published = $results->items[0]->meta->claims_in_channel; + if ( ( $support_amount < 0.001 ) ) { + ( $support_amount = '0' ); + } elseif ( ( $support_amount < 0.01 ) && ( $support_amount >= 0.001 ) ) { + ( $support_amount = '<0.01' ); + } elseif ( ( $support_amount <= 0.099 ) && ( $support_amount >= 0.01) ) { + ( $support_amount = number_format( floatval( $support_amount ), 2, '.', '' ) ); + } elseif ( ( $support_amount <= 0.999 ) && ( $support_amount >= 0.1 ) ) { + ( $support_amount = number_format( floatval( $support_amount ), 1, '.', '' ) ); + } else { + ( $support_amount = number_format( intval( $support_amount ) ) ); + } + $init_bid = $results->items[0]->amount; ?> + + + + + + + + + + + + + + +
ChannelLBRY URLClaim ID~ Date CreatedPostsSupports
name, 'lbrypress' ); ?>Add
LBRYPress
+ +

Looks like you haven't added any channels yet, feel free to do so below:

+
@@ -66,6 +123,6 @@ if ( current_user_can( 'manage_options' ) ) { -

plugin_name ) ?>

+