[wordpress插件] CongressLookup国会查询

wordpress 插件 文章 2020-03-30 10:40 437 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

CongressLookup is a free WordPress plugin giving your site visitor an easy way to find United States US senators and representatives.

CongressLookup是一个免费的WordPress插件,可让您的网站访问者轻松找到美国美国参议员和代表。

CongressLookup makes it easier to launch a grassroots campaign for your favorite cause and will keep your visitors on your site instead of sending them elsewhere to find their Congressional legislators.

CongressLookup可以更轻松地为您最喜欢的事业发起基层运动,并将您的访问者留在您的网站上,而不必将他们发送到其他地方来寻找其国会议员。

Where The Data Comes From

数据从何而来

CongressLookup uses data provided by Google Maps GeoCoding API and Google Civics API.

CongressLookup使用Google Maps GeoCoding API和Google Civics API提供的数据。

Google Maps GeoCoding API

Google Maps GeoCoding API

By using this plugin you are bound by the

使用此插件,您受

>Google Maps terms of use.

> Google Maps使用条款。

Google GeoCoding API limits use to 2,500 requests per IP address per day.

Google GeoCoding API限制每个IP地址每天使用2,500个请求。

We have added a cache feature (default setting is 30 minutes) you can set to reduce the number of requests made to the API.

我们添加了缓存功能(默认设置为30分钟),您可以设置该功能以减少对API的请求数量。

To obtain a Google Maps API key there is a link in: WP Admin > Settings > CongressLookup > Configuration, or do the following:

要获取Google Maps API密钥,请在以下位置链接:WP Admin>设置> CongressLookup>配置,或执行以下操作:

1.

1。

Go to the Google API Console<

转到 Google API控制台<

/a>.

/ a>。

2. Create or select a project.

2.创建或选择一个项目。

3. Click Continue to enable the API and any related services.

3.单击继续以启用API和任何相关服务。

4. On the Credentials page, get an API key.

4.在“凭据”页面上,获取API密钥。

5. IMPORTANT: Make sure you agree to their billing agreement or your key will not work.

5.重要提示:请确保您同意他们的计费协议,否则您的密钥将无法使用。

Google Civic Information API

Google公民信息API

To display the contact information for each Congress person we now use the Google Civic Information API which requires a separate API key.

为了显示每个国会议员的联系信息,我们现在使用Google Civic Information API,该API需要单独的API密钥。

To receive one:

收到一个:

1. Using your Google account, login to the Google API Console

1.使用您的Google帐户,登录到 Google API控制台

.

Here you create a project if you don’t already have one.

如果您还没有一个项目,请在这里创建一个项目。

2. Click “Create credentials”.

2.单击“创建凭据”。

3. Choose “API Keys” (do not restrict).

3.选择“ API密钥”(不限制)。

Copy and save this key to use in the CongressLookup settings.

复制并保存此密钥以在CongressLookup设置中使用。

Now you have to enable the Civic API:

现在,您必须启用Civic API:

4. Click the “Library” side menu tab.

4.单击“库”侧面菜单选项卡。

5. In the search field enter “Civic”.

5.在搜索字段中,输入“ Civic”。

6. Click on the “Google Civic Information API” link.

6.单击“ Google Civic Information API”链接。

7. Then click the word “Enable”.

7.然后单击单词“启用”。

8. On your website, go to: Settings > CongressLookup > Configuration.

8.在您的网站上,转到:设置> CongressLookup>配置。

Paste the Civic API key in the Google Civic API Key field.

将Civic API密钥粘贴到Google Civic API Key字段中。

9. Save CongressLookup settings.

9.保存CongressLookup设置。

PLEASE NOTE: YOU CAN NOT USE THE SAME API KEY FOR GOOGLE MAPS AND GOOGLE CIVICS.

请注意:您不能对GOOGLE MAPS和GOOGLE CIVICS使用相同的API密钥。

The following information can be displayed for each legislator.

可以为每个立法者显示以下信息。

You can turn any of these on/off in the Admin settings: Title, Picture, Office, Phone, Zip code, Party, State Name, Contact Form, Email, Website, Facebook, YouTube, Twitter, and Google Plus.

您可以在“管理员”设置中打开/关闭以下任意项:标题,图片,办公室,电话,邮政编码,聚会,州名,联系表,电子邮件,网站,Facebook,YouTube,Twitter和Google Plus。

NOTE: If one or more of these are not available for an individual Congress person, the information will not show in the results on the page, even if you have the box checked.

注意:如果单个国会议员无法使用其中的一个或多个,即使选中了该框,信息也不会显示在页面上的结果中。

Using CongressLookup Plugin

使用CongressLookup插件

The minimum information needed to get results is (1) a State name and (2) a 5-digit zip code.

获得结果所需的最少信息是(1)国家名称和(2)5位邮政编码。

However, some zip codes cover more than one congressional district so the more of the address is entered the more accurate the results will be.

但是,一些邮政编码覆盖多个国会区,因此输入的地址越多,结果的准确性就越高。

CongressLookup is implemented on your WordPress site with use of a shortcode.

CongressLookup是使用短代码在WordPress网站上实现的。

See the Installation and

请参见安装

FAQs for more information.

常见问题解答以获取更多信息。

Customizing The Look of the Plugin

自定义插件的外观

There are three theme options available: No Theme, Modern and Custom Theme.

共有三个主题选项:无主题,现代和自定义主题。

    • No Theme: Uses the core styling from your theme without adding any of it’s own.
    • 无主题:使用主题的核心样式,而不添加任何主题。

    • Custom Theme: Allow you to create your own look using CSS and comes with a demo area to preview your changes.
    • 自定义主题:允许您使用CSS创建自己的外观,并带有一个演示区域来预览您的更改。

    • Modern Theme:
    • 现代主题

    Support

    支持

    If you have any problems, please see our Trouble Shooting Guide before putting in a 故障排除指南,然后再放入

    wordpress.org/support/plugin/congresslookup">support request.

    wordpress.org/support/plugin/congresslookup“>支持请求。

    Please use the CongressLookup plugin support tab here on the WordPress.org website.

    请在WordPress.org网站上使用CongressLookup插件支持标签

    Keeping support questions and answers public helps everyone.

    公开支持问题和解答对所有人都有帮助。

    However, feel free to contact us here for any other help you may need.

    但是,请在此处与我们联系,以获取您可能需要的其他帮助。

    Official Website

    官方网站

    http://congresslookup.com

    http://congresslookup.com

    Troubleshooting

    问题排查

    If CongressLookup is not working properly, please try the following steps:

    如果CongressLookup无法正常工作,请尝试以下步骤:

    1.

    1。

    Make sure you have agreed to Google API billing agreement or your keys will not work.

    请确保您已同意Google API结算协议,否则您的密钥将无法使用。

    2.

    2。

    Make sure you are using the most recent version of the plugin.

    确保您使用的是最新版本的插件。

    3.

    3。

    Make sure your server is running at least PHP 5.4.

    确保您的服务器至少运行PHP 5.4。

    4.

    4。

    When creating your Google Maps API, set Key Restrictions to “None”.

    创建Google Maps API时,请将“密钥限制”设置为“无”。

    5.

    5。

    PLUGIN CONFLICT: Please try deactivating all plugins except CongressLookup.

    插件冲突:请尝试停用除CongressLookup之外的所有插件。

    If CongressLookup does then work, turn on one plugin at a time and test it again until you find the plugin it conflicts with.

    如果CongressLookup可以正常工作,请一次打开一个插件,然后再次进行测试,直到找到与之冲突的插件。

    Please let us know what plugin this is.

    请让我们知道这是什么插件。

    6.

    6。

    THEME CONFLICT: If there is still an issue after testing for a plugin conflict, and all other plugins are turned off, please try temporarily switching to another theme.

    主题冲突:如果测试插件冲突后仍然存在问题,并且所有其他插件均已关闭,请尝试暂时切换到另一个主题。

    We recommend trying one of the default WordPress themes.

    我们建议您尝试使用默认的WordPress主题之一。

    7.

    7。

    SERVER SETTINGS: If none of the above has helped, please tell your webmaster to enable allow-url-fopen in php.ini

    服务器设置:如果以上方法均无济于事,请告诉您的网站管理员在php.ini中启用allow-url-fopen

    http://www.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen

    http://www.php.net/manual/zh-CN/filesystem.configuration.php#ini.allow-url-fopen

    When doing this, disable the cache option for testing, then when allow-url-fopen is enabled and CongressLookup works only then enable the cache again.

    这样做时,请禁用用于测试的缓存选项,然后在启用allow-url-fopen并且CongressLookup正常工作之后,才再次启用缓存。

    8.

    8。

    If you are still having any issues, please put in a support request.

    如果仍有任何问题,请输入支持请求

安装步骤

    1. Unzip CongressLookup.zip and Upload folder to the /wp-content/plugins/ directory
    2. 解压缩 CongressLookup.zip 并将文件夹上传到 / wp-content / plugins / 目录

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

    5. Or in your Plugin page “Add Plugin” search: enter “CongressLookup” then install and activate.
    6. 或者在您的插件页面“添加插件”搜索中:输入“ CongressLookup”,然后安装并激活。

    7. Obtain a Google Maps API

    8. 获取Google Maps API

    PLEASE NOTE: YOU CAN NOT USE THE SAME API KEY FOR GOOGLE MAPS AND GOOGLE CIVICS.

    请注意:您不能对GOOGLE MAPS和GOOGLE CIVICS使用相同的API密钥。

      1. Use the following shortcodes in a page, post, widget, or/and sidebars:

      2. 在页面,帖子,小部件或/和侧栏中使用以下简码:

        Search for Senators and Representatives: [CongressLookup]

        搜索参议员和代表: [CongressLookup]

        Search for Senators only: [CongressLookup show="senator"]

        仅搜索参议员: [CongressLookup show =“ senator”]

        Search for Representatives only: [CongressLookup show="representative"]

      3. 仅搜索代表: [CongressLookup show =“ representative”]

      4. You can use the following codes in your template, placed outside the loop:

      5. 您可以在循环之外的模板中使用以下代码:

            

            

      6. You can create shortcodes with different configurations by going to: WP Admin > Settings > CongressLookup > Custom Shortcode.
      7. 您可以通过以下方法创建具有不同配置的简码:WP Admin>设置> CongressLookup>自定义简码。

      8. If you have any problems, please see our Trouble Shooting Guide before putting in a 问题排查指南,然后再添加

        ://wordpress.org/support/plugin/congresslookup">support request.

      9. ://wordpress.org/support/plugin/congresslookup“>支持请求。

下载地址
https://downloads.wordpress.org/plugin/congresslookup.zip
-EOF-

AI助手支持GPT4.0