Question using info from a Field - eSyndiCat User Forums
eSyndiCat User Forums esyndicat directory software esyndicat support

Go Back   eSyndiCat User Forums > eSyndiCat Directory Software [FREE] > User interface

User interface Discuss eSyndiCat templates here. All the questions regarding eSyndiCat [FREE] Front end

Reply
 
Thread Tools Display Modes
Old 06-11-2006   #1
Loren
 
Loren's Avatar
 
Join Date: Apr 2006
Location: UK
Posts: 1,095
Loren is an unknown quantity at this point
Default Question using info from a Field

Just trying something out, I have created a field called Postcode (zipcode) I want to be able to get the information the user puts in and display it in Mapquest.

I.E. On the View link page i want to put a hyperlink using this code

<a href="http://www.mapquest.co.uk/mq/maps/linkToMap.do?Postcode=SE3&country=GB&cid=lfmaplink">Map This Location</a>

How would i be able to put in the {$link.postcode} shown in red, within the html code like this so when you clicked on the link it would input that info in rather than {$link.postcode} which is what i got.
__________________
Light and Peace
Spirit Mind Body UK ~ Holistic Directory

Loren is offline   Reply With Quote
Old 06-11-2006   #2
Sergey Ten
eSyndiCat Lead Developer
 
Sergey Ten's Avatar
 
Join Date: Apr 2006
Location: Kyrgyzstan, Bishkek
Posts: 6,596
Sergey Ten is a jewel in the roughSergey Ten is a jewel in the roughSergey Ten is a jewel in the roughSergey Ten is a jewel in the rough
Default

Hello Loren,

Please email me the letter with exact information.

sten at esyndicat dot com

Last edited by Sergey Ten; 08-01-2007 at 09:54 AM.
Sergey Ten is offline   Reply With Quote
Old 06-11-2006   #3
Loren
 
Loren's Avatar
 
Join Date: Apr 2006
Location: UK
Posts: 1,095
Loren is an unknown quantity at this point
Default

Hello Sergey

Well here is the link if that's what you mean

http://www.mapquest.co.uk/mq/static/...est_maps_en.do
__________________
Light and Peace
Spirit Mind Body UK ~ Holistic Directory

Loren is offline   Reply With Quote
Old 06-11-2006   #4
Sergey Ten
eSyndiCat Lead Developer
 
Sergey Ten's Avatar
 
Join Date: Apr 2006
Location: Kyrgyzstan, Bishkek
Posts: 6,596
Sergey Ten is a jewel in the roughSergey Ten is a jewel in the roughSergey Ten is a jewel in the roughSergey Ten is a jewel in the rough
Default

Ok Loren,

Please follow directives:

*** Open your view-link.tpl ***
*** Find this code ***

Code:
<tr>
      <td><strong>{$lang.link_added}:</strong></td>
      <td>{$link.date}</td>
</tr>
*** After add this code ***

Code:
<tr>
     <td><A HREF="http://www.mapquest.co.uk/mq/maps/linkToMap.do?address=100+Broad+Walk&city=London&Postcode={$link.postcode}&country=GB&cid=lfmaplink" target="_blank">Map This Location</A>
     </td>
</tr>
*** Save change ***
Sergey Ten is offline   Reply With Quote
Old 06-12-2006   #5
Loren
 
Loren's Avatar
 
Join Date: Apr 2006
Location: UK
Posts: 1,095
Loren is an unknown quantity at this point
Default

Thank You Sergey for this..and heres the but, that is exactly what i did. It doesnt work, it's the most logical thing to do.

Why, firstly this link does not show at all in the view-link.tpl page when called. Have no idea why.

If i preview the link while editing, and click on link what happens is MapQuest's link page pops up, the Mapquest form displays the Postcode field, with {$link.postcode} rather than the actual information, and there is an error of course saying can't find it.

Oh well am looking into how you could use PHP with this blasted thing.. I hate smarty some times
__________________
Light and Peace
Spirit Mind Body UK ~ Holistic Directory

Loren is offline   Reply With Quote
Old 06-12-2006   #6
Loren
 
Loren's Avatar
 
Join Date: Apr 2006
Location: UK
Posts: 1,095
Loren is an unknown quantity at this point
Default

Okay this is what i have managed and if anyone is interested in putting a link to a map using info created in a field called postcode/zipcode, it will display that info in this form, which i have personally cut down to just the postcode and the button for my own purposes, but if you want the whole one here it is.

HTML Code:
                                     <!-- MapQuest Start -->
                                     </FORM>
           <form action="http://www.mapquest.co.uk/mq/maps/linkToMap.do" method="post">
<input type="hidden" name="CID" value="lfmapwid">
</form></TD>
          <TD width="50%">
            <FORM action="http://www.mapquest.co.uk/mq/maps/linkToMap.do" method=post name=linktomap>
            <DIV align=center>
            <TABLE style="FONT: 11px Arial,Helvetica" cellSpacing=0
            cellPadding=3 border=0>
              <TBODY>
              <TR>

                <TD colSpan=2>
                  <DIV align=center><a href="http://www.mapquest.co.uk/mq/home.do">
                    <img border="0" src="http://cdn.mapquest.com/mqstyleguide/ws_wt_sm" alt="MapQuest"></A></DIV></TD></TR>
              <TR>
                <TD colSpan=2>Address/Junction:</TD></TR>
              <TR>
                <TD colSpan=2><INPUT maxLength=80 name=address> </TD></TR>
              <TR>
                <TD colSpan=2>Location:</TD></TR>

              <TR>
                <TD colSpan=2>
                <INPUT type="text" maxLength=80 name=city value="{$link.location}" size="20"> </TD></TR>
              <TR>

                <TD>Post Code:</TD></TR>
              <TR>

                <TD>
                <input type="text" maxLength=12 size=10 name=Postcode value="{$link.postcode}"> </TD></TR>

                <TR>
                <TD colSpan=2>Country:</TD></TR>
              <TR>
                <TD colSpan=2><SELECT name=country>
                 <option value=AT > Austria </option>

                  <option value=BE > Belgium </option>

                  <option value=DK > Denmark </option>

                  <option value=FR > France </option>

                  <option value=DE > Germany </option>

                  <option value=IT > Italy </option>

                  <option value=LU > Luxembourg </option>

                  <option value=NL > Netherlands </option>

                  <option value=ES > Spain </option>

                  <option value=SE > Sweden </option>

                  <option value=CH > Switzerland </option>

<option value="GB" selected>United Kingdom</option>

                  </SELECT> </TD>
               </TR>
              <TR>

                <TD style="TEXT-ALIGN: center" colSpan=2><INPUT type=submit value="Get Map">
            </TD></TR></TBODY></TABLE></DIV></FORM><!-- MapQuest End -->
Of course the above is for UK and Europe Only. For US (other parts of world maybe available you will have to look) use this one here http://www.mapquest.com/features/mai...page=lf_findit and you maybe able to change the option codes to make a drop down of your choice. But that might be fiddly.

Lastly if you want to change the country which is displayed first in my case UK. Which is like this:

<option value="GB" selected> United Kingdom</option>

If i wanted France to be highlighted first i would change:

<option value=FR >France</option> to:

<option value="FR" selected>France</option>

One last tip..i couldn't get the code on the MapQuest Site to work straight off, in fact all it displayed was the country. The Above is the result of fiddling with their source code of their demo and their code to put in your page, so bare that in mind if you don't get it to work for the US one.
__________________
Light and Peace
Spirit Mind Body UK ~ Holistic Directory

Loren is offline   Reply With Quote
Old 06-12-2006   #7
Cris Santos
 
Join Date: May 2006
Posts: 172
Cris Santos is an unknown quantity at this point
Default

Loren - this is pure gold.
I am going to give this a right fiddle this weekend and if i get this to work, i'll start by jumping up and down on the same spot for a few moments. Then i'll send you a love letter, and then i'll do some more jumping...!

Love
Cris!
Cris Santos is offline   Reply With Quote
Old 06-12-2006   #8
Loren
 
Loren's Avatar
 
Join Date: Apr 2006
Location: UK
Posts: 1,095
Loren is an unknown quantity at this point
Default

Gosh!
I hope you will be able to always nice to go a little barmy when something works
__________________
Light and Peace
Spirit Mind Body UK ~ Holistic Directory

Loren is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 04:24 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Testimonials | Articles | Support | Documentation | Privacy Policy | License | Affiliates | Contact Us | SEO Resources