Àpèjúwe
The DVLA Search Plugin provides subscribers to the DVLA Search API a widget, customisable results page, and shortcodes for use on custom pages.
Ìgbéwọlẹ̀
- Upload the plugin files to the
/wp-content/plugins/dvla-searchdirectory, or install the plugin through the WordPress plugins screen directly. - Activate the plugin through the ‘Plugins’ screen in WordPress
- Use the Settings->DVLA Search screen to configure the plugin with your API Key
1.1 If you want to test the Plugin you can use the example API Key “DvlaSearchDemoAccount” and test with a registration number beginning MT09 or FH51 such as MT09NKS.
Once youÌtumọ̀ Yorùbá: ’ve added your API Key you can customize the fields shown on the simple results page from the Settings->DVLA Search->Results Fields screen.
Add The Widget To Your Site
- Go to Appearance->Widgets
- Drag the “DVLA Search Widget” to the sidebar or other widget area of your choice.
- By default the widget will point at the simple results page and the widget will have no title.
Create a Custom Results Page
To display the results on your own page, you can use the provided shortcodes as follows:
- Create a new page from Pages->Add New
- Use the
[dvla_search_success][/dvla_search_success]block to wrap the content to show if the search returned valid results. - Use the
[dvla_search_error][/dvla_search_error]block to wrap a message to display if there was an error. - You can display the results data with the
[dvla_search_result]shortcode by specifying one or more field to output.
1.1 For example, to display the vin use[dvla_search_result vin]
1.1 Or to display the colour and model use[dvla_search_result colour model]
1.1 For a full list of fields available see the help page at DVLA Search->Shortcode Help or in the readme. - Save your page and take note of the slug.
- Update the widget “Results Page” option with the slug of your custom results page.
For example, your custom results page might contain the following shortcodes:
[dvla_search_success]
Your car [dvla_search_result registration] is a [dvla_search_result colour model] and the VIN is [dvla_search_result vin]
[/dvla_search_success]
[dvla_search_error]
There was an error searching for [dvla_search_result registration]
[/dvla_search_error]
FAQ
- Can I test the DVLA Search Plugin without an account?
-
Yes, you can use the example API Key “DvlaSearchDemoAccount” and test with a registration number beginning MT09 or FH51 such as MT09NKS.
- How do I signup for an account with DVLASearch.co.uk?
-
You can sign up for an account at https://dvlasearch.co.uk/dvla-api-obtaining-access/
- How many credits does each search use?
-
Each time someone searches for a vehicle registration, it uses one credit.
- Available Fields
-
The following API fields are available:
- vin Ìtumọ̀ Yorùbá: – A vehicle identification number, commonly abbreviated to VIN, or chassis number, is a unique code including a serial number, used by the automotive industry to identify individual motor vehicles, towed vehicles, motorcycles, scooters and mopeds as defined in ISO 3833. VINs were first used in 1954. eg WVGZZZ5NZAW007903
- make Ìtumọ̀ Yorùbá: – The vehicle manufacturer. eg Vauxhall
- model Ìtumọ̀ Yorùbá: – The vehicle model. eg Vectra
- cylinderCapacity Ìtumọ̀ Yorùbá: – The vehicle cylinder capacity (cc). eg 1968cc
- numberOfDoors Ìtumọ̀ Yorùbá: – The number of doors on the vehicle. eg 5
- sixMonthRate Ìtumọ̀ Yorùbá: – The cost of vehicle tax for 6 months. eg 112.75
- twelveMonthRate Ìtumọ̀ Yorùbá: – The cost of vehicle tax for 12 months. eg 205.00
- dateOfFirstRegistration Ìtumọ̀ Yorùbá: – The date on which the vehicle was registered. eg 23 July 2009
- yearOfManufacture Ìtumọ̀ Yorùbá: – They year the vehicle was manufactured. eg 2009
- co2Emissions Ìtumọ̀ Yorùbá: – The vehicle emissions. eg 167 g/km
- fuelType Ìtumọ̀ Yorùbá: – The vehicle fuel type. eg Diesel (other values: Petrol, Electric)
- taxStatus Ìtumọ̀ Yorùbá: – Current tax status. eg Not taxed
- transmission Ìtumọ̀ Yorùbá: – The vehicle transmission. eg Manual (other values: automatic, cvt)
- colour Ìtumọ̀ Yorùbá: – The vehicle colour. eg Silver
- typeApproval Ìtumọ̀ Yorùbá: – The vehicle category classification. eg M1
- wheelPlan Ìtumọ̀ Yorùbá: – The vehicle wheel plan. eg 2 AXLE RIGID BODY
- revenueWeight Ìtumọ̀ Yorùbá: – The vehicle’s confirmed maximum gross weight. eg 3850kg
- taxDetails Ìtumọ̀ Yorùbá: – Vehicle tax information. eg Tax due: 06 February 2015
- motDetails Ìtumọ̀ Yorùbá: – MOT expiry day. eg Expires: 23 July 2015
- taxed Ìtumọ̀ Yorùbá: – States if the tax is valid. eg false
-
mot Ìtumọ̀ Yorùbá: – States if the mot is valid. eg true
For full details, see the “Shortcode Help” section of the DVLA Search Admin Menu, or the DVLA Search API Documentation
- Advanced Customization
-
If you are comfortable writing or modifying WordPress Plugins you can take advantage of the search functionality and access the results in your own code.
- Any page with the
?dvla_search_registration=<REG>query param will hit the API using your registered API Key and add the results to a global variable$dvla_search_result_data - The results in
$dvla_search_result_dataare an array keyed by the fields described in “Available Fields” section of the readme. - For more insight into how the DVLA Search shortcodes access the results, see the code in the plugin directory.
- You could for example use this data in a your own shortcode to display on a custom results page.
For example:
<?php function dvla_search_custom_shortcode() { global $dvla_search_result_data; global $dvla_search_registration; if( $dvla_search_result_data['mot'] ) { return "$dvla_search_registration has a valid MOT"; } else { return "$dvla_search_registration does not have a valid MOT"; } } add_shortcode('dvla_search_custom_shortcode', 'dvla_search_custom_shortcode'); - Any page with the
Àwọn àgbéyẹ̀wò
Kò sí àwọn àgbéyẹ̀wò fún plugin yìí.
Àwọn Olùkópa & Olùgbéejáde
“DVLA Search” jẹ́ ètò ìṣàmúlò orísun ṣíṣí sílẹ̀. Àwọn ènìyàn wọ̀nyí ti ṣe ìkópa sí plugin yìí.
Àwọn OlùkópaTúmọ̀ “DVLA Search” sí èdè rẹ.
Ṣe o nífẹ̀ẹ́ sí ìdàgbàsókè?
Ṣàwárí koodu, ṣàyẹ̀wò ibi ìpamọ́ SVN, tàbí ṣe àgbékalẹ̀ sí àkọsílẹ̀ ìdàgbàsókè nípasẹ̀ RSS.
Àkọsílẹ̀ àwọn àyípadà
1.1.3
- Increase timeout of curl requests for slow connections
1.1.2
- Fixed an issue where widget options would not display in admin menu.
1.1.1
- Fixed the widget input height issue on some themes including Avada.
1.1.0
- Improved the widget CSS for compatibility with more themes.
- Fixed a CSS issue that could impact the sites theme font.
- Fixed a bug where on some themes the results page layout would break.
1.0.1
- Updated readme.txt formatting.
1.0.0
- Initial Release.