Urgent Assistance on Plugin
Posted: 07 July 2008 10:17 AM   [ Ignore ]  
Summer Student
Total Posts:  13
Joined  01-08-2007

I have a function that I want to write that should be using some of the existing plugins. 
1. Where is the best place to create my own functions (almost like the helpers in CodeIgniter)
2. How to I use function from other plugins in my own function?

Develop@octoplus.co.za

Profile
 
 
Posted: 07 July 2008 10:49 AM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  21199
Joined  05-20-2002

Hm- going to shift to ‘Plugin’ support.  And- depends on what you’re doing- are you creating a plugin, module or extension?  In any case- I’d just require the relevant class- then use the function like normal.  Have never done that- but can’t see why it wouldn’t work.

I pulled this example from the weblog module:

if ( ! class_exists('Typography'))
        
{
            
require PATH_CORE.'core.typography'.EXT;
        
}
                
        $this
->TYPE = new Typography;   
        
$this->TYPE->convert_curly = FALSE;

 Signature 

AKA rob1

Help Request Tips * Pro Network

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 10:33 AM
Total Registered Members: 61026 Total Logged-in Users: 25
Total Topics: 73808 Total Anonymous Users: 16
Total Replies: 398143 Total Guests: 500
Total Posts: 471951    
Members ( View Memberlist )
Newest Members:  Klaxsonalexwindb-rodMAIDENtreatstruckaungAdrian LeonP.T.Aoochoi2k