Help - Search - Members - Calendar
Full Version: Adding Functionality
User Forums > Ultimate Locator v3 Support > General Support
joshua_white79
Hello All,

I'll start by saying that I'm pretty new to much of this, so some of what I ask may be simple. Please forgive me ahead of time!

I would like to add a tiny bit of functionality to my locator, and I'm thinking that if I had any amount of skill in PHP this would be easy, but alas that's not the case.

I have purchased a separate script which is also based in PHP. I would like to add the capability such that when someone types in their zip code, in addition to the information that I have chosen to return (name, add, city, state, and zip) another field returns for each one. That additional field needs to be dynamic itself. It needs to be from the separate script I have purchased. I need the locator to attach to each location the ability to run this additional script which will access an additional database and return additional dynamic content.

Does anyone have any idea where in the locator files I would add the code from the other script to do this???

Thanks so much in advance. I appreciate any help that can be given!

Josh smile.gif
Brian
Joshua,

This is exactly the reason why we have moved to the smarty template engine. It is now a little easier to modify and execute routines right inside your template. No need to even get into the PHP code.

You can use IF statements right inside your templates. and you can do many other tests as well to determine values of fields, etc...

Another thing you can do is put in links that will link a location to another script and have it pass along the ID field as to keep track of which record is in question.

An example of doing something like this would be:

In your results_list_format.tpl template, add some code like this to print up a link for your users.

CODE

<a href="http://mydomain.com/path/to/script.php?myID={$location.id}">Click Here</a>


Putting in the above code will create a link and when clicked it will take the user to your own custom script and also pass along the records ID so it can process it within that system.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.