# Shortcodes Shortcodes - What are they? Shortcodes are small bits of code that allow you to do various things with little effort. They allow you to implement functionality that would normally require complicated code to use. Shortcodes are tied to predefined elements and can be used throughout the system with minimal effort. Articles detailing different shortcodes available for use are located here. # System_code Shortcode ## Special System\_Code Shortcode The system\_code is the most common short code used on the OPS-COM system. It will provide and display the system information related to that page. For example, if you were to add the system\_code shortcode to the end of the **Permits** page you will see system information related to permits such as available permits and lots. If the page is a system page, like /login, and it doesn't have the shortcode anywhere, it will append it to the bottom of the content page at least once. ## Example Uses ### Vehicles Page Using the system\_code tag on the **Vehicles** page will show you all of the vehicles you have registered to that user. [](https://opscom.wiki/uploads/images/gallery/2024-06/B0wimage.png) ### Permits Page Using the system\_code tag on the **Permits** page will provide information related to all the permits and lots your users have available to them. [](https://opscom.wiki/uploads/images/gallery/2024-06/cw3image.png) As an option, on the permits page, you can display the current permits the user has. Using the shortcode \[permit\_card\] on the permits page will display the list of the user's current permits. In fact, using this code on whatever page you wish it to be on, will show the permit\_card which is the list of current permits. [](https://opscom.wiki/uploads/images/gallery/2024-06/Nlzimage.png) Here is the resulting page content. [](https://opscom.wiki/uploads/images/gallery/2024-06/8q4image.png) ### Appeals Page Using the system\_code tag on the **Appeals** page will provide a convenient search window to search for plates or tickets. [](https://opscom.wiki/uploads/images/gallery/2024-06/gPsimage.png) # User Information Shortcodes ## Shortcodes Shortcodes used to display user information. Keep in mind that the shortcode descriptions are also on the email template page for lost passwords.
**Shortcode** | **Description** |
\[user show="firstname"\] | The first name of the user account receiving the email or messaging. |
\[user show="lastname"\] | The last name of the user account receiving the email or messaging. |
\[user show="email"\] | The email address of the user account receiving the email or messaging. |
\[user show="username"\] | The username of the user account receiving the email or messaging. |
\[user show="salutation"\] | The salutation of the user account receiving the email or messaging. |
**Option** | **Type** | **Default** | **Purpose** |
price | boolean | true | Shows the price. Set to false/off/0 etc. to turn off |
sold\_out | boolean | false | If true, it will include the lots that are sold out. They will have the warning background to highlight they are sold out |
remaining | boolean | false | If true, it will show a column for how many remaining permits are in this lot |
type | string | If a value is set, it will filter the list to only show this lot type. Blank, or not set, will show all |
`[permitlots remaining=true sold_out=true price=true]` |
**Example Shortcode** | **Description** |
\[values show=violation.Ticket\] | Returns the violation ticket number. |
\[values show=violation.user\_info.username\] | Returns the username of the user the violation belongs to. |
\[values show=violation.writer.DisplayName\] | Returns the display name of the admin who assigned the violation to the user. |
\[values show=violation.vehicle.Plate\] | Returns the plate of the vehicle the violation was assigned to, if applicable. |
\[values show=violation.vehicle.province.ProvName\] | Returns the province or state of the vehicle plate. |
\[values show=violation.vehicle.colour.ColourName\] | Returns the colour of the vehicle. |
\[values show=violation.vehicle.plate\_type.TypeName\] | Returns the plate type of the vehicle. |
\[values show=violation.vehicle.vehicle\_type.TypeName\] | Returns the type of the vehicle. |
\[values show=violation.vehicle.make.MakeName\] | Returns the make of the vehicle. |
\[values show=violation.location.LocationName\] | Returns the name of the location the infraction happened. |
\[values show=violation.details.0.Ticket\] | Returns the violation ticket number. Alternate value location. |
\[values show=violation.details.0.type.ViolationDescr\] | Returns the violation type description. |