[wordpress插件] Dragons Print-Hint龙打印提示

wordpress 插件 文章 2020-04-22 03:00 0 240 全屏看文

There are several reasons to print some hints on your posts.


These hints will never been seen on the screen, but you want it to show on paper.




    • Definition of a hint text, only appearing on printouts.

    • 提示文本的定义,仅出现在打印输出上。

      You can use any html tag that can be placed within


      to format your hints.
    • 您可以使用可以放在

      ... 中的任何html标签来格式化提示。

    • Comfortable definition of hint text via admin settings panel.
    • 通过管理设置面板轻松定义提示文本。

    • Hiding user defined areas of posts / pages – see Example 3 in Arbitrary section
    • 隐藏用户定义的帖子/页面区域–请参阅“任意部分”中的示例3

    • ShortTag [PrintHint] for free definition of post-blocks show only on screen/print output
    • ShortTag [PrintHint],可自由定义后块,仅在屏幕/打印输出上显示

    • Definition of CSS classes (.classname) in a comma separated list.

    • 以逗号分隔的列表形式定义CSS类(.classname)。

      These classes don’t appear on printouts.

    • 这些课程不会出现在打印输出上。

    • Definition of CSS IDs (#idname) in a comma separated list.

    • 以逗号分隔的列表中CSS ID(#idname)的定义。

      These IDs don’t appear on printouts.

    • 这些ID不会显示在打印输出中。

    • Style definition for printout border frame
    • 打印输出边框的样式定义

    • Multilanguage Support: English, Deutsch, Russian already implemented
    • 多语言支持:已实现英语,德语,俄语

    The plugin hooks into the_content filter.

    该插件会插入 the_content 过滤器。

    The the_excerpt filter hook is used to remove the hint from displaying on search result page.

    the_excerpt 过滤器挂钩用于删除搜索结果页面上显示的提示。



    You want to show a text only online?


    [PrintHint show_on=”screen”] … appears only on screen … [/PrintHint]

    [PrintHint show_on =” screen”] ……仅出现在屏幕上…… [/ PrintHint]

    You want to show a text only on printout?


    [PrintHint show_on=”print”] … appears only on printouts … [/PrintHint]

    [PrintHint show_on =” print”] …仅出现在打印输出上...​​ [/ PrintHint]



    Beware of the closing tag [/PrintHint] as well as the parameter show_on, they are REQUIRED!

    请注意结束标签 [/ PrintHint] 和参数 show_on ,它们是必需的

    If you don’t apply the parameter or give them a wrong argument, the block content will not be displayed, anyway.


    Removing the whole border css style from config page will activate the default style defined in fdrag_phi_print.css


    Arbitrary section


    Example 1: Hint-Text


    Achtung - Urheberrechtshinweis!

    Achtung -Urheberrechtshinweis!

    Da dieses Blog unter einer Creative Commons Lizenz steht,

    知识共享创举Lizenz steht的博客大失所望,

    stellt das Ausdrucken für Sie kein Problem dar.


    Bei Webseiten die nicht unter einer solchen oder ähnlichen Lizenz stehen,

    贝恩·韦塞滕(Bei Webseiten die nicht unter einer solchen oderähnlichen)

    kann das Ausdrucken zu einer Urheberrechtsverletzung führen.

    kann das Ausdrucken zu einer Urheberrechtsverletzungführen。

    Example 2: CSS Class/ID hiding

    示例2:隐藏CSS类/ ID

    #header, #top, #footer, #bottom, #sidebar,


    .commentheader, #commentform


    Example 3: Hide some portion of a post / page while printing


    Within the post define an area with a userdefined and no more referenced ID.


    This ID don’t have to be defined within any CSS stylesheet.


    It’s just for Dragons Print-Hint.

    仅用于Dragons Print-Hint。

    .. some content of your post


    ... here is some content of the post ...


    .. some more content of your post


    If you define this ID (#RemoveOnPrint) in the “hide css blocks” list (remember: comma separate more then one value)


    you can see the post with all content but while printing the div tag with id=”RemoveOnPrint” ist hidden.

    您可以看到包含所有内容的帖子,但是在打印带有id =“ RemoveOnPrint” ist隐藏的div标签时。

    Example 4: Using shortcodes


    If there are areas within your post to explicitly hide/show on screen/print output,


    you can use the shortcode


    [PrintHint show_on="screen|print"] .... [/PrintHint].

    [PrintHint show_on =“ screen | print”] .... [/ PrintHint]

    Show graphical link only online, on printouts show the URL instead.


    Here is my post text


    [PrintHint show_on="screen"][/PrintHint]

    [PrintHint show_on =“ screen”] [/ PrintHint]

    [PrintHint show_on="print"]http://myUrl[/PrintHint]


    [PrintHint show_on =“ print”] http:// myUrl [/ PrintHint]


    and here is the rest of the text.


    The Parameter show_on can be used to define the apperance of the content between the shortcode tags.

    参数 show_on 可用于定义短代码标签之间内容的外观。

    If you define show_on=”screen” the content part will only be shown an screen outputs.

    如果定义 show_on =“ screen” ,则仅显示屏幕输出内容部分。

    Otherwise, the show_on=”print” parameter will show the hint only on printouts.

    否则, show_on =“ print” 参数将仅在打印输出上显示提示。

    Remark: If you dont’t use the ‘show_on’ parameter or forget to close the shortcode tag, there will be no output!


    = Example 5: Using your own border style for print-hint


    Just enter the border attributes (see http://www.w3schools.com/css/pr_border.asp for usage example)


    without the semicolon.




    5px solid red



    1. Unzip DragonsPrintHint.zip to the /wp-content/plugins/ directory
    2. DragonsPrintHint.zip 解压缩到 / wp-content / plugins / 目录

    3. Activate the plugin through the ‘Plugins’ menu in WordPress
    4. 通过WordPress中的“插件”菜单激活插件

    5. Customize the hint text in admin panel settings menu
    6. 在管理面板设置菜单中自定义提示文字

    7. Verify your text within the print preview of your browser
    8. 在浏览器的打印预览中验证文本