Gossamer Forum
Home : Products : Others : Gossamer Community :

Sharing data between different applications

Quote Reply
Sharing data between different applications
Is there any way to share data between different applications plugged into Gossamer Community?

For instance, if I want a consolidated profile page in Links, is there some way that I can display both the Gossamer Forum user data as well as the Gossamer Community user data?

Perhaps this is achievable by calling the plugins or through some special code?

I appreciate that it is possible to get it via mysql, but this seems very impractical. I'm after a Gossamer native way of doing this.

Thanks,
smsltd.
Quote Reply
Re: [smsltd] Sharing data between different applications In reply to
Hi. I guess so. You would probably need a custom script/global to do this though, as it would have to do several checks;

1) From the user_id, grab details with GT::SQL (will have to be a custom connection, as the prefixes will be different).
2) Return the tags into the HTML templates, to that they can be referenced.

Sorry I can't be more specific ... but I had to break into my own car last night... so I've gotta try and fix it up today :(

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Sharing data between different applications In reply to
Nice one Andy,

Did you have a coat hanger with you or did it get nasty Wink

It's a good job there weren't any bobbies around otherwise we'd all be putting together to bail you out of jail (and not the Monopoly one).

Hope you get it sorted out...

John
Significant Media
Quote Reply
Re: [Jag] Sharing data between different applications In reply to
Quote:
Did you have a coat hanger with you or did it get nasty

Had to rip the door lock out :(

Quote:
It's a good job there weren't any bobbies around otherwise we'd all be putting together to bail you out of jail (and not the Monopoly one).

It would have been ironic if the police had turned up. I've had to break into my own car a few times before, and once the police helped me get in, to proove it was my car =)

Anyway, I'm off to bed :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [smsltd] Sharing data between different applications In reply to
 
1)
If you just want to display different data on profile page, you can just write a global.
It could a simpler code like the one used in Community::Web::SSI::ssi_profile_form.

The ssi_profile_form call looks like this in the template:

Code:
<%Community::Web::SSI::ssi_profile_form(
td_l => 'class="body" width="40%" align="right"',
td_r => 'class="body" align="left"',
required => '*'
)%>

Similarly you could place a global call into the profile template:
Code:
<%ssi_profile_mydata()%>
This is the simplest way, which is only usable if you just display data.


2)
But if you also want to allow modification of the wanted external app profile data, then you would need a plugin, place a hook to Community::Web::User::user_profile subroutine and replace the code with the modified one.


3)
Another way to share data between different GT apps, would be store shared data into the session data, which can be read by other GT apps globals or plugins.


The needed solution really depends on the task you want to do. In your case 1) or 2) may be valid.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Sharing data between different applications In reply to
Hey Webmaster33,

Community::Web::SSI.pm was exactly was I was looking for.

Thanks for your help!
Quote Reply
Re: [smsltd] Sharing data between different applications In reply to
Furthermore, as I see in the core code, the Community::Web::SSI::ssi_apps_form is also your friend.
Its task is exactly to display application specific forms.

I haven't used it tought.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...