[wordpress插件] BetterPress更好的新闻

wordpress 插件 文章 2020-03-04 02:10 541 0 全屏看文

AI助手支持GPT4.0

评分
20
描述

This is a Plugin for integrationing a charity project of the platform betterplace.org to a WordPress site.

这是一个用于将平台 betterplace.org 的慈善项目集成到WordPress网站的插件。

The plugin includes a Widget for displaying different project data.

该插件包括一个用于显示不同项目数据的小部件。

You can choose the static mode to display one betterplace.org project on every page that displays the choosen widget area.

您可以选择静态模式,以在显示所选小部件区域的每一页上显示一个Betterplace.org项目。

Also the widget comes along with a dynamic mode in order to display different projects on different pages in the same widget area.

小部件还带有动态模式,以便在同一小部件​​区域的不同页面上显示不同的项目。

There are sereval display options.

有多个显示选项。

It is posible to display just the project and a link to the donation screen or you can display a list of all or a number of needs that belong to the project.

可以只显示项目和捐赠屏幕的链接,也可以显示属于项目的全部或许多需求的列表。

Feature List

功能列表

    • Display project and project need details of betterplace.org projects
    • 显示项目和项目需要Betterplace.org项目的详细信息

    • Output project and project need progress in sereval ways
    • 输出项目和项目需要以同步的方式进行

    • Add direct links to the donate screen of the project on betterplace.org
    • 在Betterplace.org上将直接链接添加到项目的捐赠屏幕

    • Easy to use widget
    • 易于使用的小部件

    • Use one widget to display different projects on different pages
    • 使用一个小部件在不同的页面上显示不同的项目

    • Progress display (per cent & progress bar)
    • 进度显示(百分比和进度条)

    Upcoming Features

    即将推出的功能

      • Shortcode support
      • 短代码支持

      • Picture display of betterplace.org pictures
      • betterplace.org图片的图片显示

      • Multi language support
      • 多语言支持

      Arbitrary section

      任意部分

      Better Press API Documentation

      Better Press API文档

      am_bpProjectController

      am_bpProjectController

      The am_bpProjectController is the main Object for displaying betterplace.org data.

      am_bpProjectController 是用于显示Betterplace.org数据的主要对象。

      To use it in custom template files just create a new instance, add a betterplace.org ID and use the get methods.

      要在自定义模板文件中使用它,只需创建一个新实例,添加一个Betterplace.org ID并使用get方法。

      Example:
          

      示例:
          

      $bp_projectObject = new am_bpProjectController();
          

      $ bp_projectObject = new am_bpProjectController();
          

      $bp_projectObject->addProject(7910);
          

      $ bp_projectObject-> addProject(7910);
          

      echo $bp_projectObject->getProjectTitle();

      echo $ bp_projectObject-> getProjectTitle();

      This will display the Title of the project that has the ID 7910.

      这将显示ID为7910的项目的标题。

      You are able to display project needs in the same way.

      您可以用相同的方式显示项目需求。

      Example:
          

      示例:
          

      $bp_projectObject = new am_bpProjectController();
          

      $ bp_projectObject = new am_bpProjectController();
          

      $bp_projectObject->addProject(7910);
          

      $ bp_projectObject-> addProject(7910);
          

      echo $bp_projectObject->getNeedTitle();

      echo $ bp_projectObject-> getNeedTitle();

      This will display the title of the first need of the project that have the ID 7910.

      这将显示ID为7910的项目的第一个需求的标题。

      In order to display more than one need you can use the nextProject() method to switch needs.

      要显示多个需求,可以使用 nextProject()方法切换需求。

      It returns false when no more needs are left:

      当没有更多需求时,它将返回 false

      Example:
          

      示例:
          

      $bp_projectObject = new am_bpProjectController();
          

      $ bp_projectObject = new am_bpProjectController();
          

      $bp_projectObject->addProject(7910);
          

      $ bp_projectObject-> addProject(7910);
          

      echo ‘

      回显

      ‘.$bp_projectObject->getNeedTitle().’

      ‘。$ bp_projectObject-> getNeedTitle()。’

      ‘;
          

      ’;
          

      do{
          

      做{
          

      echo ‘

      回显

      ‘.$bp_projectObject->getNeedTitle().’

      ‘。$ bp_projectObject-> getNeedTitle()。’

      ‘;
          

      ’;
          

      }while($bp_projectObject->nextProject());

      } while($ bp_projectObject-> nextProject());

      This will display all titles of needs of the project that have the ID 7910.

      这将显示ID为7910的项目需求的所有标题。

      In order to display more than one project use the method nextProject() in the same way.

      要显示多个项目,请以相同的方式使用方法 nextProject()

      First you have to add all projects and after that you are able to switch projects:

      首先,您必须添加所有项目,然后才能切换项目:

      Example:
          

      示例:
          

      $bp_projectObject = new am_bpProjectController();
          

      $ bp_projectObject = new am_bpProjectController();
          

      $bp_projectObject->addProject(7910);
          

      $ bp_projectObject-> addProject(7910);
          

      $bp_projectObject->addProject(932);
          

      $ bp_projectObject-> addProject(932);
          

      $bp_projectObject->addProject(1032);
          

      $ bp_projectObject-> addProject(1032);
          

      do{
          

      做{
          

      echo ‘

      回显

      <

      << / p>

      h3>’.$bp_projectObject->getProjectTitle().’

      h3>”。$ bp_projectObject-> getProjectTitle()。

      <

      << / p>

      h3>’;
          

      h3>”;
          

      }while($bp_projectObject->nextProject());

      } while($ bp_projectObject-> nextProject());

      This will display the titles of the Projects that got the ID 768, 932, 1032.

      这将显示ID为768、932、1032的项目的标题。

      All methods of am_bpProjectController

      am_bpProjectController的所有方法

      addProject($id)

      addProject($ id)

      Add a betterplace.org project to the stack.

      将一个Betterplace.org项目添加到堆栈中。

      nextProject()

      nextProject()

      Moves the project pointer to the next project.

      将项目指针移动到下一个项目。

      Returns false if no more projects are on stack.

      如果堆栈上没有更多项目,则返回 false

      nextNeed()

      nextNeed()

      Moves the need pointer of the pointed project to the next need.

      将指向项目的需求指针移动到下一个需求。

      Returns false if no more projects are on stack.

      如果堆栈上没有更多项目,则返回 false

      firstProject()

      firstProject()

      Moves the pointer to the first project on the stack.

      将指针移到堆栈上的第一个项目。

      getProjectID()

      getProjectID()

      Returns the betterplace.org ID of the project that is pointed.

      返回所指向项目的Betterplace.org ID。

      getProjectTitle()

      getProjectTitle()

      Returns the title of the pointed project.

      返回所指向项目的标题。

      getProjectDescription($maxnumber, $option)

      getProjectDescription($ maxnumber,$ option)

      Returns the description of the project that is pointed.

      返回所指向项目的描述。

      It acepts two arguments to limitade the description.

      它接受两个论点来限制描述。

      $option = 0 will limit count of letters that is specified in $maxnumber, $option = 1 limits $maxnumber

      $ option = 0 将限制在 $ maxnumber 中指定的字母数, $ option = 1 限制 $ maxnumber

      > words.

      >单词。

      getProjectAmount($option, $format)

      getProjectAmount($ option,$ format)

      Returns money amounts of the project.

      返回项目的金额。

      If $option = 0 it returns the amount of money that is still needed to fulfil the project.

      如果 $ option = 0 ,它将返回完成项目所需的金额。

      $option = 1 returns the monay that is already donated and $option = 2 is the complete amount that has been requested.

      $ option = 1 返回已经捐赠的货币,而 $ option = 2 是已请求的完整金额。

      The argument $format specified the display of the amount.

      参数 $ format 指定了金额的显示。

      $format = 1 returns the amount in Euro formated as usual in Europe.

      $ format = 1 返回欧洲惯用的欧元格式金额。

      If $format = 0 the method returns the complete amount unformated in Cents.

      如果 $ format = 0 ,该方法将返回未格式化的全部金额(以美分计)。

      $format = 2 returns only the amount of Euros without cent amounts.

      $ format = 2 仅返回欧元金额,不含分金额。

      $format = 3 returns only the amount of Cents like if you would cut the full Euro amounts away.

      $ format = 3 仅返回美分金额,就像您要减少全部欧元金额一样。

      getProjectProgress()

      getProjectProgress()

      Returns the progress of the project in per cent.

      以百分比形式返回项目进度。

      getProjectLink($option)

      getProjectLink($ option)

      Returns links belonging to the project that is pointed.

      返回属于所指向项目的链接。

      $option = 0 will return the link to the project page.

      $ option = 0 将链接返回到项目页面。

      $option = 1 will the link that leds directly to the donation page of the project.

      $ option = 1 将直接链接到项目的捐赠页面。

      getProjectOpinions($option)

      getProjectOpinions($ option)

      Returns the number of opinions about the project on betterplace.org.

      在Betterplace.org上返回有关该项目的意见数量。

      If the argument is set to $option = 0 you will get the total number of opinions.

      如果参数设置为 $ option = 0 ,您将获得意见总数。

      If $option is set to 1 you'll get the number of positive opions, if it is set to 2 you'll get the count

      如果将 $ option 设置为 1 ,您将获得阳性鸦片的数量;如果将其设置为 2 ,您将获得计数

      of negative opinions.

      负面意见。

      getProjectDonors()

      getProjectDonors()

      Returns the total number of donors which have already donated the pointed project.

      返回已经捐赠了指定项目的捐赠者总数。

      getProjectNeedCount()

      getProjectNeedCount()

      Returns the number of needs of the project that is pointed.

      返回所指向项目的需求数量。

      getNeedID()

      getNeedID()

      Returns the ID of the need that is pointed.

      返回所指出的需求的ID。

      getNeedDate($option)

      getNeedDate($ option)

      If $option = 0 this method will return the date of creation of the need.

      如果 $ option = 0 ,此方法将返回需要的创建日期。

      If $option = 1 it will return the date of the last update of the need.

      如果 $ option = 1 ,它将返回需求的最后更新日期。

      getNeedTitle()

      getNeedTitle()

      This method returns the title of the pointed need.

      此方法返回所需需求的标题。

      getNeedDescription($maxnumber, $option)

      getNeedDescription($ maxnumber,$ option)

      Returns the description of the need that is pointed.

      返回所指出的需求的描述。

      It acepts two arguments to limitade the description.

      它接受两个论点来限制描述。

      $option = 0 will limit count of letters that is specified in $maxnumber, $option = 1 limits $maxnumber

      $ option = 0 将限制在 $ maxnumber 中指定的字母数, $ option = 1 限制 $ maxnumber

      > words of the need.

      >需要的话。

      getNeedProgress()

      getNeedProgress()

      Returns the progress of the pointed need in per cent.

      以百分比返回有针对性的需求的进度。

      getNeedAmount($option, $format)

      getNeedAmount($ option,$ format)

      Returns money amounts of the need.

      返回需要的金额。

      If $option = 0 it returns the amount of money that is still needed to fulfil the need.

      如果 $ option = 0 ,它将返回满足需求所需的金额。

      $option = 1 returns the monay that is already donated and $option = 2 is the complete amount that has been requested.

      $ option = 1 返回已经捐赠的货币,而 $ option = 2 是已请求的完整金额。

      The argument $format specified the display of the amount.

      参数 $ format 指定了金额的显示。

      $format = 1 returns the amount in Euro formated as usual in Europe.

      $ format = 1 返回欧洲惯用的欧元格式金额。

      If $format = 0 the method returns the complete amount unformated in Cents.

      如果 $ format = 0 ,该方法将返回未格式化的全部金额(以美分计)。

      $format = 2 returns only the amount of Euros without cent amounts.

      $ format = 2 仅返回欧元金额,不含分金额。

      $format = 3 returns only the amount of Cents like if you would cut the full Euro amounts away.

      $ format = 3 仅返回美分金额,就像您要减少全部欧元金额一样。

      iscompletedNeed()

      iscompletedNeed()

      This method returns true, if the need is already completed.

      如果需要已经完成,此方法将返回true。

安装步骤

    1. Upload all files to the /wp-content/plugins/ directory
    2. 将所有文件上传到 / wp-content / plugins / 目录

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

    5. Place the Widget to a widget area and choose your options, or use the project object in your template files in order to display betterplace.org data.
    6. 将窗口小部件放置到窗口小部件区域并选择您的选项,或使用模板文件中的项目对象以显示Betterplace.org数据。

下载地址
https://downloads.wordpress.org/plugin/better-press.0.95.2.zip
-EOF-

AI助手支持GPT4.0