0

i am trying to modify the com_phocamaps to add the "Copy marker" action. I have created the button modifying function addToolbar with this line JToolBarHelper::customX( 'phocamapsmarker.copy', 'copy.png', 'copy_f2.png', 'Copy Marker' ); in the com_phocamaps/views/phocamapsmarkers/view.html.php but i don´t know where i have to set the action to execute de COPY task. When I click this new button, Joomla throws a 500 Error.

I want to implement a litle function to copy the marker and set Publish = 0 to change the map.

Thanks

Erusso87
  • 667
  • 1
  • 7
  • 19

1 Answers1

0

you need to write that function in controller

go to administrator\components\com_phocamaps\controllers\phocamapsmarker.php

and write this function

function copy(){
    // your code here 
}
Anand
  • 1,670
  • 1
  • 15
  • 23
  • this is msg if i click on the new button Joomla! 500 - Ha ocurrido un error. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 6 SQL=SELECT a.*,l.title AS language_title,uc.name AS editor,c.title AS map_title, c.id AS map_id FROM `ufx0g_phocamaps_marker` AS a LEFT JOIN `ufx0g_languages` AS l ON l.lang_code = a.language LEFT JOIN ufx0g_users AS uc ON uc.id=a.checked_out LEFT JOIN ufx0g_phocamaps_map AS c ON c.id = a.catid ORDER BY – Erusso87 Aug 09 '12 at 20:00
  • have you added the code in the controller file specified above ? – Anand Aug 10 '12 at 03:00