Forum Replies Created

Viewing 15 replies - 1 through 15 (of 15 total)
  • Aw….so sad…

    My final result (it works!)

    <?php
    /**
     * Shows filetype, title, filesize and date.
     */
    
    if ( ! defined( 'ABSPATH' ) ) {
    	exit;
    } // Exit if accessed directly
    
    /** @var DLM_Download $dlm_download */
    ?>
    
    <a class="download-link filetype-icon <?php echo 'filetype-' . $dlm_download->get_version()->get_filetype(); ?>"
    title="<?php $dlm_download->the_title(); ?>" href="<?php $dlm_download->the_download_link(); ?>" rel="nofollow">
    	<?php $dlm_download->the_title(); ?></a> <text style="font-size : 70%;"><?php echo '[' ?><?php echo $dlm_download->get_version()->get_filetype(); ?><?php echo ', ' ?><?php echo $dlm_download->get_version()->get_filesize_formatted(); ?><?php echo ', ' ?><?php echo date_i18n( get_option( 'date_format' ), $dlm_download->get_version()->get_date()->getTimestamp() ); ?><?php echo ' в ' ?><?php echo date_i18n( get_option( 'time_format' ), $dlm_download->get_version()->get_date()->getTimestamp() ); ?><?php echo ']' ?> </text><br>

    I made some improvements

    <?php
    /**
     * Shows filetype, title, filesize and date.
     */
    
    if ( ! defined( 'ABSPATH' ) ) {
    	exit;
    } // Exit if accessed directly
    
    /** @var DLM_Download $dlm_download */
    ?>
    
    <a class="download-link filetype-icon <?php echo 'filetype-' . $dlm_download->get_version()->get_filetype(); ?>"
    title="<?php $dlm_download->the_title(); ?>" href="<?php $dlm_download->the_download_link(); ?>" rel="nofollow">
    	<?php $dlm_download->the_title(); ?></a> <text style="font-size : 70%;"><?php echo '[' ?><?php echo $dlm_download->get_version()->get_filesize_formatted(); ?><?php echo ',' ?> <?php echo $dlm_download->get_version()->get_filetype(); ?><?php echo ',' ?> <?php get_option( 'date_format' ); echo $dlm_download->get_version()->get_date()->getTimestamp(); ?><?php echo ']' ?> </text><br>

    result – https://screenshots.firefox.com/wAY03mI6lJ9Z4No3/np-oros.ru
    and now its time to fix date format I think…

    Sorry for my mistake.
    I forget about echo
    I made some improvements, so now my template looks like

    <?php
    /**
     * Shows filetype, title, filesize and date.
     */
    
    if ( ! defined( 'ABSPATH' ) ) {
    	exit;
    } // Exit if accessed directly
    
    /** @var DLM_Download $dlm_download */
    ?>
    
    <a class="download-link filetype-icon <?php echo 'filetype-' . $dlm_download->get_version()->get_filetype(); ?>"
    title="<?php $dlm_download->the_title(); ?>" href="<?php $dlm_download->the_download_link(); ?>" rel="nofollow">
    	<?php $dlm_download->the_title(); ?></a> <text style="font-size : 70%;"><?php echo '[' ?><?php echo $dlm_download->get_version()->get_filesize_formatted(); ?><?php echo ',' ?> <?php echo $dlm_download->get_version()->get_filetype(); ?><?php echo ',' ?> <?php get_option( 'date_format' ); echo $dlm_download->get_version()->get_date()->getTimestamp(); ?><?php echo ']' ?> </text><br>

    result – https://screenshots.firefox.com/wAY03mI6lJ9Z4No3/np-oros.ru
    and now its time to fix date format I think…

    • This reply was modified 1 year, 10 months ago by Roman Neverov.

    I want to get
    Download title [size, format, timestamp]

    Here is my template

    <?php
    /**
     * Shows filetype, title, filesize and date.
     */
    
    if ( ! defined( 'ABSPATH' ) ) {
    	exit;
    } // Exit if accessed directly
    
    /** @var DLM_Download $dlm_download */
    ?>
    <a class="download-link filetype-icon <?php echo 'filetype-' . $dlm_download->get_version()->get_filetype(); ?>"
    title="<?php $dlm_download->the_title(); ?>" href="<?php $dlm_download->the_download_link(); ?>" rel="nofollow">
    	<?php $dlm_download->the_title(); ?></a> <text style="font-size : 70%;"><?php echo '[' ?><?php $dlm_download->get_version()->get_filesize_formatted(); ?><?php echo ',' ?> <?php $dlm_download->get_version()->get_filetype(); ?><?php echo ',' ?> <?php $dlm_download->get_version()->get_date(); ?><?php echo ']' ?> </text><br>

    As result I got empty fields (except title).
    Please, help me to fix code.

    • This reply was modified 1 year, 10 months ago by Roman Neverov.
    Forum: Plugins
    In reply to: [TablePress] Filter issue

    Dear Tobias! Thanks for advise! It filters great with ""!
    Hug you 🙂

    Hi there!
    After activation I try to access plugin settings i get:
    Fatal error: Uncaught Error: Call to undefined function set_magic_quotes_runtime() in /home/****/www/****/wp-content/plugins/askapache-password-protect/askapache-password-protect.php(2847) : runtime-created function:3 Stack trace: #0 /home/****/www/****/wp-includes/class-wp-hook.php(286): __lambda_func('') #1 /home/****/www/****/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array) #2 /home/****/www/****/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #3 /home/****/www/****/wp-admin/admin.php(214): do_action('load-settings_p...') #4 /home/****/www/****/wp-admin/options-general.php(10): require_once('/home/****/ww...') #5 {main} thrown in /home/****/www/****/wp-content/plugins/askapache-password-protect/askapache-password-protect.php(2847) : runtime-created function on line 3

    Any ideas?
    WP 4.9
    PHP 7

    • This reply was modified 2 years, 2 months ago by Roman Neverov.

    Oh sorry, it works great!

    Roman Neverov

    (@roman_neverov)

    You know…there is a small problem with Cyrillic encoding…
    When I paste

    [table id=1 datatables_auto_filter=”Исключен” /]

    the result is whole table 🙁

    Roman Neverov

    (@roman_neverov)

    First method is perfect!
    You are the best!
    Best regards!

    TablePress works perfect! Thanx for it!
    Its just an advice for those pple who want to share html table 🙂

    When u open uploaded table.html via link on your site browser cache it.
    And if table changes often u may need users to avoid caching and they will download always fresh html table 🙂

    Ok, then I`ll recommend some script to avoid caching HTML table.
    Create link as:

    <script language='javascript'>
       document.write ("<a href='http://yoursite.com/table.html?rnd=" + Math.random() +"'>");
    </script>Download table</a>

    А можно добавить функцию автоудаления постов? Как в плагине auto-delete-posts

Viewing 15 replies - 1 through 15 (of 15 total)