PDA

View Full Version : Possible to create Googlemaps Link from table fields?


davedabrave
11-23-2008, 11:58 AM
I need to create a dynamic field for a Link to Googlemaps directions page from fields in my table. Lets say i have the fields {street}, {number}, {ZIP} and {City} in my table, how can i create a dynamic field for a Link "directions" in my table like:

<a href="http://maps.google.com/maps?f=d&amp;hl=de&amp;geocode=&amp;saddr=Street_Start Number_start, ZIP_start City_start&amp;daddr={street} {number},{ZIP} {City}&amp;t=h&amp;z=13" target="_blank">Directions</a>

(Street_Start, Number_start, ZIP_start, City_start -> not dynamic! Always static...)

And another question: Since i installed fabric in joomla (1.5.7) it slowed down the performance of the whole system extremly. How can i speed up the performance (is it the Ajax stuff?). The Slow-Down is both when loading the backend and frontend, but i just have one table from fabrik for registred users (manager)?

cheesegrits
11-23-2008, 04:18 PM
Use a detailed view link on one of your elements, or for the table itself. Use the {placeholder} technique to specify elements from the current row to build the link. So it would pretty much be the way you had it above, minus the a/href tag bit:

http://maps.google.com/maps?daddr={table_name___street},{table_name___num ber},{table_name___zip},{table_name___city}&...


In other words, use the usual full table_name___element_name ID syntax. If in doubt about an elements full ID, check the source of your form.

I've not come across an issue with Fabrik slowing down everything. Nothing Fabrik related should happen unless you have are doing "fabrik stuff", either Fabrik admin on the backend, or are on a page with a table/form on it on the front end. Can you point me at an affected page?

-- hugh

terp
11-23-2008, 04:51 PM
Truth be told, I also posted about a 'lag' when manipulating Fabrik in the backend since the major overhaul...will make a change, click apply/save, and it takes about 4-5 seconds to hear the 'click' and fire the save message.

HOWEVER, I noticed it go away when I moved a test setup live to a hosting environment, so I wrote this off to Mr. Gates' glorious Vista 64-bit and WAMP. :)

I just tested it again, taking my online site and moving it to a local install...hosted site is snappy in the backend, localhost is lagging when you try to make a change.

cheesegrits
11-23-2008, 05:04 PM
Sure, when doing Fabrik back end work, things can get a little sluggish. Anyone who has looked under the hood of Fabrik understands that we are a doing a LOT of stuff, both on the server side, and with JS on the client side. Our backend server side is MySQL heavy, and the backend admin pages can be AJAX heavy (depending what you are working on).

What concerns me is Dave saying that the whole site has slowed down, not just when doing Fabrik "stuff". Which absolutely shouldn't happen - can't think of anything involving Fabrik which would happen on a non-Fabrik page.

-- hugh

davedabrave
11-23-2008, 05:36 PM
Thanks for the quick answer...worked perfectly...i think the speedproblem is a hosting problem...

terp
11-23-2008, 05:53 PM
I am using Rochen for one of my sites using Fabrik and its purty damn snappy, so I suspect you are right about your hosting environment, Dave...don't notice any slowdowns on pages calling all the Fabrik toys. :)

davedabrave
11-24-2008, 11:15 AM
Yes, known problem with the hoster 1und1 in Germany...poor database performance.
Another question: Is it possible to open the Link in a blank window? And i need to reset my fabrik_internal_id because i deleted some records.

cheesegrits
11-24-2008, 04:09 PM
We'd have to add 'detail link target' as an option for the view link. Post it in Feature Requests.

-- hugh