View Full Version : Creating a module and accessing the value of a custom field

01-21-2010, 12:55 PM

I got a custom field: Address, which contains the address of the restaurant.

I figure that if I append the Address custom field value to: http://maps.google.com.au/maps?f=q&source=s_q&hl=en&geocode=&q= <address custom field>

I will be able to provide a hyperlink to google map for the restaurant location.

My problem is how can I do that.....

01-23-2010, 09:46 PM
You have to write a Plugin.

If you want do show the result in the postbit, use the hook "postbit_display_complete" (Position 1-5, just try)

Then enter a code like this:
(gars5 = Costum Field Nr. 5, you might change the number)



$showatgooglemaps = "http://maps.google.com.au/maps?f=q&source=s_q&hl=en&geocode=&q="
. $post[gars5];}


Now, all you have to do, is insert the variable $showatgooglemaps in the templat gars_pb at the position you want it to appear.

If you want to use it in the threadbit you have to use these values:

Costumfield = $thread[gars5]
Hook = threadbit_display
Template = gars_threabit

Good luck! :)

best regards,