google maps plugin with many flexicontent fields

More
11 years 10 months ago #32993 by ggppdk
This is a lot faster than using Nonumber replacer that acts on all the page, and much easier than changing the template file to trigger the desired content plugin manually.


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
11 years 10 months ago #32995 by brandonking
Nonumber extensions are just temporary solutions.
Definitely, much better to have function like this as core.
You win :D

Please Log in or Create an account to join the conversation.

More
11 years 10 months ago #32996 by ggppdk
yes, Nonumber is extension is very good,

just difference with built-in replacement is that it gives you
- easier and
- and more replacement options (in regards with fields values only)
- with a little better performance, because it is done on a small text and not full page HTML


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
11 years 9 months ago #33007 by yopyop001
Hi,

@kenmcd :

Not sure it's the best way but you can edit the file
plugins/flexicontent_fields/flexigmaps.php

to add
Code:
$autoloc_field_1 = "loc_field1"; $autoloc_field_2 = "loc_field2"; $autoloc_field_3 = "loc_field3"; $js_autoloc = " jQuery(document).ready( function() { jQuery('#".$autoloc_field_1."').change(function() { address_value = jQuery('#".$autoloc_field_1." option:selected').text(); address_value += ', ' + jQuery('#".$autoloc_field_2."').val(); jQuery('#address').val(address_value); jQuery('#btn_codeAddr').click(); }); }); "; $document->addScriptDeclaration($js_autoloc);

in function onDisplayField(&$field, $item) juste after
Code:
$document->addScriptDeclaration($js);

(You have to replace loc_field# by your fields name)
Note : use
Code:
jQuery('#".$autoloc_field_1." option:selected').text();
if your filed is a select,
and use
Code:
jQuery('#".$autoloc_field_2."').val()
if your field is a text field

Regards

Please Log in or Create an account to join the conversation.

More
11 years 9 months ago #33034 by micker

ggppdk wrote: -- e.g for single property fields (text,date, etc):
{{field19##0}}

-- e.g. for multi-property fields (weblink,email, etc):
{{field19##0##link}} and {{field19##0##addr}}

i resume
1 create a text field with prefix and suffix and actived plugin
2 put {{field19##0}}{{field20##0}}{{field21##0}}
3 in template put field19 field20 field21 in render position
that's all ?? :shock:

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
11 years 9 months ago #33109 by micker
sorry mistake
2 put {{field19##0}}{{field20##0}}{{field21##0}}
3 prefix {mosmap adress='
4 suffix ,YOURCOUNTRY}
that all ?

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.459 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline