Custom Plugin to Custom Plugin

More
14 years 9 months ago #3239 by orchid1
Anybody know how to pass a variable from one plug-in to another plug-in.


I'm creating a plug-in that makes a call to the database and passes the results as variables to numerous other field plug-ins if they exist. using a method like this I could display content into many fields without hitting the database repeatedly for each field

An example would be:
to have a plug-in make a call to the database and retrieves an image, a description, a tutorial, and author bio for one item.

After retrieving the information from the database the plugin sends the information to different fields for displaying in different zones of the template.

The benefit being that I only make one call to the database rather than 3 or 4 or 5.

The way of doing this now is to make individual calls to the database for each bit of information so If I have 6 pieces of information from one source I make 6 calls to that one source.

I've made my own field plug-ins for FLEXIcontent so I recognize that this is all custom but can anyone offer some input as to how to pass the variables from plug-in to plug-in?

“Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives.” William A. Foster - USMC

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

More
14 years 9 months ago #3241 by orchid1
Ok, so what I am gathering is that I have to create my own event and event listener. This is going to be fun. I have no idea how to create my own event within FLEXIcontent so this will be very cool. Anybody know or have any ideas?? Please post back. I'll post more as I know more.

“Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives.” William A. Foster - USMC

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

More
14 years 7 months ago #5415 by jdunagan
Have you figured this out? I am looking to do this too but I'm stuck - actually I have no idea what I'm doing.

So far I created a multiple select field with a sql query "SELECT id AS value, title AS text FROM tx_au_content WHERE catid = 1" This builds a nice list of every item that is a certain type (staff.) I want to be able to select names from this list and have them show all the fields related to that person.

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

More
14 years 7 months ago #5546 by gnomeontherun
I'm also interested in a way to do this, as I want to use a custom plugin that will automatically add a new item to another program. $this only returns the param information.

Any ideas would be greatly appreciated.

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.755 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