Plugin Directory

Changeset 3196002


Ignore:
Timestamp:
11/24/2024 08:47:17 PM (16 months ago)
Author:
laith3
Message:

Release version 1.0.6: Added screenshots, updated plugin files and documentation, removed outdated tag 1.0.4.

Location:
tradejournal
Files:
6 added
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • tradejournal/trunk/assets/css/style.css

    r3185259 r3196002  
    7575/* Responsive styling for mobile devices */
    7676@media (max-width: 768px) {
    77   .trade-averages-table,
    78   .trade-averages-table thead,
    79   .trade-averages-table tbody,
    80   .trade-averages-table th,
    81   .trade-averages-table td,
     77
     78  .trade-averages-table,
     79  .trade-averages-table thead,
     80  .trade-averages-table tbody,
     81  .trade-averages-table th,
     82  .trade-averages-table td,
    8283  .trade-averages-table tr {
    83       display: block;
    84       width: 100%;
     84    display: block;
     85    width: 100%;
    8586  }
    8687
    8788  .trade-averages-table thead tr {
    88       display: none; /* Hide the table header */
     89    display: none;
     90    /* Hide the table header */
    8991  }
    9092
    9193  .trade-averages-table tbody tr {
    92       margin-bottom: 15px;
    93       border: 1px solid #ddd;
    94       padding: 10px;
    95       background-color: #fff;
    96       box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
     94    margin-bottom: 15px;
     95    border: 1px solid #ddd;
     96    padding: 10px;
     97    background-color: #fff;
     98    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    9799  }
    98100
    99101  .trade-averages-table td {
    100       display: flex;
    101       justify-content: space-between;
    102       padding: 8px 10px;
    103       text-align: left;
    104       border: none;
    105       border-bottom: 1px solid #eee;
     102    display: flex;
     103    justify-content: space-between;
     104    padding: 8px 10px;
     105    text-align: left;
     106    border: none;
     107    border-bottom: 1px solid #eee;
    106108  }
    107109
    108110  .trade-averages-table td:before {
    109       content: attr(data-label);
    110       font-weight: bold;
    111       flex: 1;
    112       color: #333;
     111    content: attr(data-label);
     112    font-weight: bold;
     113    flex: 1;
     114    color: #333;
    113115  }
    114116
    115117  .trade-averages-table td:last-child {
    116       border-bottom: none;
     118    border-bottom: none;
    117119  }
    118120}
     
    124126
    125127@media (max-width: 768px) {
     128
    126129  .tradejournal-table th,
    127130  .tradejournal-table td {
    128     display: block; /* Stack columns on smaller screens */
     131    display: block;
     132    /* Stack columns on smaller screens */
    129133    width: 100%;
    130134  }
    131135
    132136  .tradejournal-table th {
    133     display: none; /* Hide table headers on small screens */
     137    display: none;
     138    /* Hide table headers on small screens */
    134139  }
    135140
    136141  .tradejournal-table td:before {
    137     content: attr(
    138       data-label
    139     ); /* Show the table header as a label before the content */
     142    content: attr(data-label);
     143    /* Show the table header as a label before the content */
    140144    font-weight: bold;
    141145    display: block;
     
    145149
    146150.tradejournal-thumbnail {
    147   width: 100px; /* Set a fixed width */
     151  width: 100px;
     152  /* Set a fixed width */
    148153  height: auto;
    149   border-radius: 5px; /* Optional: rounded corners */
     154  border-radius: 5px;
     155  /* Optional: rounded corners */
    150156}
    151157
     
    154160  width: 100%;
    155161  margin: 0 auto;
     162  container-type: inline-size;
     163  /* Enable container query support */
    156164}
    157165
     
    165173  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    166174  transition: box-shadow 0.3s ease;
    167   margin-bottom: 20px; /* Vertical space between items */
     175  margin-bottom: 20px;
     176  /* Vertical space between items */
    168177}
    169178
     
    181190
    182191/* For larger screens (3 columns) */
    183 @media (min-width: 900px) {
     192@container (min-width: 900px) {
    184193  .tradejournal-post {
    185     width: calc(33.33% - 20px); /* 3 columns with space for gutter */
     194    width: calc(33.33% - 20px);
     195    /* 3 columns with space for gutter */
    186196  }
    187197}
    188198
    189199/* For medium screens (2 columns) */
    190 @media (min-width: 600px) and (max-width: 899px) {
     200@container (min-width: 600px) and (max-width: 899px) {
    191201  .tradejournal-post {
    192     width: calc(50% - 15px); /* 2 columns with space for gutter */
     202    width: calc(50% - 15px);
     203    /* 2 columns with space for gutter */
    193204  }
    194205}
    195206
    196207/* For smaller screens (1 column) */
    197 @media (max-width: 599px) {
     208@container (max-width: 599px) {
    198209  .tradejournal-post {
    199210    width: 100%;
     
    202213
    203214.tradejournal-post {
    204   cursor: pointer; /* Changes the cursor to a hand */
     215  cursor: pointer;
     216  /* Changes the cursor to a hand */
    205217}
    206218
     
    212224  padding: 10px;
    213225  border-radius: 5px;
    214   font-weight: bold;
    215226  color: #fff;
    216227  text-align: center;
    217228  margin-top: 10px;
    218   margin: 10px auto; /* Center horizontally */
    219   max-width: 200px; /* Set the max width */
     229  margin: 10px auto;
     230  /* Center horizontally */
     231  max-width: 200px;
     232  /* Set the max width */
    220233}
    221234
    222235.positive-profit {
    223   background-color: #4caf50; /* Green for positive profit */
     236  background-color: #4caf50;
     237  /* Green for positive profit */
    224238}
    225239
    226240.negative-profit {
    227   background-color: #f44336; /* Red for negative profit */
     241  background-color: #f44336;
     242  /* Red for negative profit */
    228243}
    229244
    230245.zero-profit {
    231   background-color: #ff9800; /* Orange for zero profit */
     246  background-color: #ff9800;
     247  /* Orange for zero profit */
    232248}
    233249
    234250.profit-container strong {
    235   margin-right: 5px; /* Adjust the space between PROFIT: and the value */
     251  margin-right: 5px;
     252  /* Adjust the space between PROFIT: and the value */
    236253}
    237254
    238255/* Make FooTable always take up 100% width */
    239 .footable, .footable table {
     256.footable,
     257.footable table {
    240258  width: 100% !important;
    241259  max-width: 100% !important;
    242   margin: 0 auto; /* Center table if needed */
    243 }
     260  margin: 0 auto;
     261  /* Center table if needed */
     262}
  • tradejournal/trunk/includes/post-types.php

    r3185259 r3196002  
    1212        'show_in_menu' => true,
    1313        'menu_icon' => 'dashicons-chart-bar', // Set the icon to dashicons-chart-bar
     14        'rewrite' => ['slug' => 'tradejournal'],
    1415    );
    1516    register_post_type('tradejournal', $args);
     
    4344    );
    4445
    45     register_post_type('tradejournal_wp', $args);
     46    register_post_type('tradejournal', $args);
    4647}
  • tradejournal/trunk/includes/shortcodes.php

    r3185259 r3196002  
    6868
    6969            $output .= '<div class="profit-container ' . $profit_class . '">';
    70             $output .= '<strong>PROFIT: </strong> $' . $total_profit; // Total Profit
     70            $output .= 'PROFIT: $' . $total_profit; // Total Profit
    7171            $output .= '</div>';
    7272
  • tradejournal/trunk/includes/template-functions.php

    r3185259 r3196002  
    3434                $entry_time = esc_html($trade['Entry Time']);
    3535                $qty = esc_html($trade['Qty']);
    36                 $pnl = esc_html($trade['P&L']);
     36                // $pnl = (float)esc_html($trade['P&L']);
     37
     38                if (isset($trade['P&L']) && is_numeric($trade['P&L'])) {
     39                    $pnl = (float)esc_html($trade['P&L']);
     40                } else {
     41                    $pnl = 0;
     42                }
     43
    3744                $side = esc_html($trade['Side']);
    3845                $comment = isset($trade['Comment']) ? esc_html($trade['Comment']) : '';
  • tradejournal/trunk/readme.txt

    r3187905 r3196002  
    44Requires at least: 5.0
    55Tested up to: 6.7
    6 Stable tag: 1.0.5
     6Stable tag: 1.0.6
    77Requires PHP: 7.0
    88License: GPLv2 or later
     
    1515**TradeJournal WP** is a trade journal plugin designed to help traders keep track of their trading performance by importing trades from NinjaTrader CSV files. Currently, it supports only **NinjaTrader**, with plans to support additional platforms in the future.
    1616
    17 With TradeJournal WP, you can upload a CSV file containing your trades for a particular day, and the plugin will automatically create a post that logs all trades for that day. NinjaTrader allows you to export trades for a specific day or multiple days in one CSV file, which can then be imported into TradeJournal WP to create detailed trade journal posts.
     17With TradeJournal WP, you can upload a CSV file containing your trades for a particular day, and the plugin will automatically create a post that logs all trades for that day. You can also enhance your journal entries by uploading trade screenshots, which are displayed in a beautiful lightbox for easy viewing. NinjaTrader allows you to export trades for a specific day or multiple days in one CSV file, which can then be imported into TradeJournal WP to create detailed trade journal posts.
    1818
    19 Key Features:
     19**Key Features:**
    2020- Import trades from **NinjaTrader CSV** files.
    2121- Create custom posts for each trading day with detailed trade information.
    2222- Supports trade data, including instrument, entry/exit times, account, and P&L calculations.
     23- Upload and display **trade screenshots** in posts, with a built-in lightbox for viewing detailed trade images.
    2324- Display a **monthly trade performance summary** with the `[trade_averages]` shortcode, showing metrics like average profit, win/loss percentage, and total trades.
    2425- Block-based theme compatibility.
     
    6667
    6768== Screenshots ==
    68 
    69 1. Screenshot of the CSV import screen (coming soon).
    70 2. Screenshot of the trade journal post after importing (coming soon).
     691. **Options Page** - Configure options like merging accounts and setting up trade configurations.
     702. **CSV Import** - Import trades directly from NinjaTrader CSV files.
     713. **Edit Trades** - Modify individual trade properties, add screenshots, and configure trade setups.
     724. **User Guide** - Access the plugin's built-in guide to learn its features and how to use them effectively.
     735. **Frontend Trade Posts** - View trade journal posts displayed on the frontend.
     746. **Detailed Post View** - Display individual trade metadata and screenshots in an intuitive layout.
    7175
    7276== Changelog ==
     77
     78= 1.0.6 =
     79* Enhancement: Added detailed plugin description and improved documentation.
     80* Enhancement: Added plugin screenshots for better understanding of features and functionality.
     81* Enhancement: Updated the readme file to reflect the latest features and usage instructions.
    7382
    7483= 1.0.5 =
     
    120129== Upgrade Notice ==
    121130
     131= 1.0.6 =
     132* Enhancement: Added detailed plugin description and improved documentation.
     133* Enhancement: Added plugin screenshots for better understanding of features and functionality.
     134* Enhancement: Updated the readme file to reflect the latest features and usage instructions.
     135
    122136= 1.0.5 =
    123137- Compatibility update for WordPress 6.7. Recommended for all users to ensure plugin stability with the latest WordPress version.
  • tradejournal/trunk/tradejournal.php

    r3187905 r3196002  
    33Plugin Name: TradeJournal WP
    44Description: TradeJournal WP imports trades from NinjaTrader CSV files, creating detailed journal entries for each trading day. Includes trade management, P&L calculation, responsive tables, lightbox for screenshots, and compatibility with custom post types and block-based themes. Track performance, analyze setups, and organize screenshots easily within WordPress.
    5 Version: 1.0.5
     5Version: 1.0.6
    66Author: Laith Sinawi
    77Author URI: https://sinawiwebdesign.com
Note: See TracChangeset for help on using the changeset viewer.