With this parser script, you can use an RSS or BSN Live Text feed to remotely modify User Variables based on player serial numbers. You can use a single feed to provide different variable values to players running the same presentation. The parser uses the example of retrieving zip codes for players by serial number, but you can adapt this function for any signage setup that requires localizing the variable values.
Before configuring the presentation, you will need to create the RSS or Live Text feed that assigns User Variable values according to each serial number. If you do not have a BrightSign Network account, you will need to create an RSS feed.
####Live Text Feed (BSN)- Log in to your BrightSign Network account.
- Go to Create > Live Text Feeds.
- Click Add New Feed and enter “zip” into the Name field. Note that, if you’d like to give the Live Text feed a different name, you will need to edit the parser script (see below).
- Enter the serial number of each player in a separate Title field. You can find serial numbers listed on the bottom of each player.
- Insert the desired User Variable value for each player in the corresponding Value fields.
- Click the Save button once you are finished.
You will need to create a “zip.xml” document and make it publicly available on the Internet so your networked players can freely retrieve the variable data. If you don’t have your own servers to host the XML document, you can also use a free Dropbox account: Please see this FAQ to learn more about publicly hosting files with Dropbox.
- Open the example “zip.xml” file using a text editor program (Notepad, TextMate, etc.).
- Add new
<item>
</item>
tags for each of your players. - Add
<title>
and<description>
tags between each set of<item>
tags (as shown in the example entry). - Specify a player serial number within each set of
<title>
tags. You can find serial numbers listed on the bottom of each player. - Specify a zip code (or other local variable value) within each corresponding set of
<description>
tags. - Save and close the “zip.xml” file when you are finished. Note: The channel
<title>
and <description>
tags are named “zip” by default. You can change these if desired. However, if you’d like to change the “zip.xml” file name, you will need to edit the parser script (see below).
You will need to add the parser script to the presentation and create two User Variables: “zipcode” and “ziplistlocation”.
####Adding the Parser Script- Go to File > Presentation Properties > Data Feeds. Click Add Data Feed.
- Enter a Feed name for the Data Feed.
- Enter the following URL in the Feed Specification field: file:///autoplugins.brs Note: Since we’re only interested in adding a parser script to the presentation, having a working Data Feed is not necessary. Therefore, the goal here is simply to have URL that will always be valid, rather than having an actual Data Feed to use or display in the presentation.
- Choose an Update Interval.
- Use the Browse button to locate and select the parser script.
- Enter “urlchange” in the Parser Function Name field.
- Click OK.
- While in the Presentation properties window, navigate to the Variables tab.
- Use the Add Variable button to add two variables.
- Specify the Name of the first variable as “zipcode”. Set the Default value to a value you wish the presentation to use if it cannot connect to the RSS or Live Text feed.
- Specify the Name of the second variable as “ziplistlocation”. Set the Default value to the URL of the RSS or Live Text feed you created in the previous section. Note: If you created the feed using the BrightSign Network, you can retrieve the URL by signing into the WebUI and navigating to Create > Live Text Feeds. Click Properties beneath the feed you created and copy/paste the displayed URL.
To edit the “urlchange.bpf” parser script, open it with a text editor program (Notepad, TextMate, etc.).
####Changing the name of “zip” RSS feed or Data FeedLocate the line that states the following: <ziplist$="zip.xml">
. Change the name of the “zip.xml” file (while leaving the quotes intact) to match the desired name of the RSS .xml file or the BSN Live Text feed name.
Locate the line that states the following: <if userVariables.DoesExist(“zipcode”) then>
. Change “zipcode” on this line and the following line to the desired value. Make sure it matches the name of the User Variable in the presentation.
Locate the line that states the following: <if userVariables.DoesExist(“ziplistlocation”) then>
. Change “ziplistlocation” on this line and the following line to the desired value. Make sure it matches the name of the User Variable in the presentation.