Developing Extensions - How can i call a function in the php file of the extension
Posted: 21 November 2008 11:36 AM   [ Ignore ]  
Grad Student
Avatar
Rank
Total Posts:  74
Joined  05-30-2008

I’m developing an extension wich revamps the publish form, adding a custom field wich allows to select an image from a gallery(using the gallery module). I want to implement the selection of the especific picture with AJAX… Is there a way to call with an URL a function in the php file of the extension? or something like that? (I want to implement all the backend in the same file)

Thanks (If I manage to finish this extension I will share it wink )

Profile
 
 
Posted: 21 November 2008 12:29 PM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRankRank
Total Posts:  2551
Joined  05-07-2007

Depending on what you’re doing, I think you will probably need to include it like you would the typography class.

if ( ! class_exists('Typography'))
{
    
require PATH_CORE.'core.typography'.EXT;
}

$TYPE
= new Typography;

I’m going to shift this down to the extensions forums, as it’s a better fit.

I hope I’m understanding your question correctly and that is what you’re looking for.

-greg

 Signature 
Profile
MSG
 
 
Posted: 21 November 2008 02:05 PM   [ Ignore ]   [ # 2 ]  
Grad Student
Avatar
Rank
Total Posts:  74
Joined  05-30-2008

mmmm, I want to do this :

I have an extension

Class extension
{

constructor
.
.
.

function
do_something($params)
{
   
//this function is called by a hook etc...
}

function do_something_outside_the_extension()
{
   
//do something with $_GET params
}

}

and i want to somehow externally call function do_something_outside_the_extension

Profile
 
 
Posted: 21 November 2008 02:07 PM   [ Ignore ]   [ # 3 ]  
Grad Student
Avatar
Rank
Total Posts:  74
Joined  05-30-2008

by externally I mean ... accesing the logic in do_something_outside_the_extension function by the means of an URL or something

like www.eeserver.com/index.php?do_something_outside_the_extension_function_execution_parameter

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 66391 Total Logged-in Users: 44
Total Topics: 84715 Total Anonymous Users: 23
Total Replies: 454696 Total Guests: 196
Total Posts: 539411    
Members ( View Memberlist )