Home arrow Forum Latest posts of: Brat
  Welcome, Guest. Please login or register.
Did you miss your activation email?
January 08, 2009, 10:56:46 PM
Home New Posts Search Calendar


Login with username, password and session length
  Show Posts
Pages: 1 2 3 [4]
46  Joomla Hacks / Joomla-SMF 1.1.x / Re: avatar sync between smf and cb on: August 02, 2006, 06:50:05 PM
Brat, I'd be exetremely interested in what you have if you are willing to share it.  I am working on the next version of hte bridge which includes new features for the CB plugin, including avatar sync.  I'd love to compare notes if you are up for it.

Hello there. I'm not at my home machine, and won't be there until late tonight, but I'd be more than happy to share what I've done thus far; I can upload it then. You're a lot more skilled than I am, so I hope it contains something useful.

That said, I can share with you now the steps I used. Big thanks to the SMF team for pointing me in the right direction.

1) It seems that, for pretty much every file in the Sources directory, there is a corresponding template file. The Source file handles the actual "workhorse" code (i.e., database calls, variable assignments, etc.). The corresponding template file displays this information.

2) Profile.php and Profile.template.php are your friends.  Wink These are the two most important files in terms of extracting data from SMF. Basically, to write the SMF tab, I pulled data in matching pairs from the Profile.php and Profile.template.php files, and put them together properly in my CB plugin. So, in order to pull a member's most recent posts, I got the code that actually accessed and setup the data, then immediately after that dropped in the corresponding display code.

3) SMF Avatars are tricky beasts - so I totally avoided the SMF native routines, and instead did a straight database call to access the user's forum avatar. For various (good) reasons, all avatars for SMF must be in the avatar directory (unless of course someone hacks it). So, the "solution" would be to write the CB avatar to the SMF member table (which isn't hard, as this is simply a straightforward database write). Now, the trick is to determine what event will trigger this writeback without having to hack any core system code.

4) Some URL tweaking is needed to access things the right way - again, this is done using code already provided in SMF.

And that's about it.

I've used this approach to pull the member forum avatar, provide a link to the member's SMF profile (because you can't get to this when SMF is synched with CB), member topic subscription lists, and the most recent posts. I've done my best to make sure that any SMF security/privacy checks remain intact (so a private profile won't be displayed).

Right now, I allow the members to simply have two avatars - one for CB and one for SMF, and give them a way to access their native forum profile to make the edits, etc. Until a better solution comes along, of course.

Regards,
Brat.

UPDATE: I've finally worked out a way to sync the avatars in the latest version of my CB-SMF plugin.
47  Joomla Hacks / Joomla-SMF 1.1.x / Re: avatar sync between smf and cb on: August 02, 2006, 05:27:25 AM
I've been dealing with the whole avatar issue myself. My workaround involves absolutely no code hacking to either SMF, the bridge or CB.

Simply code up a CB tab that contains your forum information. I've coded up a plugin that does just that (for the latest version of CB). The plugin pulls the link to the user's Avatar, Profile, Subscription List and Most Recent  Posts. By clicking the Profile link, you end up in SMF's native Profile section, and you can make all your changes in there just like you would normally. Yeah, the plugin solution is not as "purdy" as having SMF and CB actually code-synch with each other, but hey, it works.  Wink

I'm still doing work on it, and am adding other SMF goodies (i.e., pulling a member's forum signature and what not). If anyone wants a copy of the plugin as it currently stands, let me know and I'll upload it.

Regards,
Brat.
48  Joomla Hacks / Mambo-SMF 1.3.x / Re: Session Timeout Problem on: June 21, 2005, 04:32:14 PM
Spoke too soon. The problem is back again.  Undecided

This ONLY occurs when copying and pasting into SMF. Everything else (including attachments) works just fine.

What could this be?  Sad

EDIT: I have installed the latest version of Mambo-SMF. The "session timeout" error has disappeared. But now, I get a "board doesn't exist" error message. Once again, this only happens when I copy and paste from an external application (i.e., email, word processor, etc.) into the body of a response.

Here is the REALLY strange part - I can copy and paste if I do it one paragraph at a time. Regardless of the length of the paragraphs, I can only post one at a time.

I'v never seen this particular quirk before.  Undecided

THIS JUST IN! I now KNOW this has to be an issue with MY setup. I just tried the copy-and-paste routine here (I deleted it right away when finished). I had absolutely NO PROBLEM and everything went as it should.

How is this forum configured in terms of sessions, etc.? There is some kind of hiccup in my setup that I need to track down. At least this is a little more information than I had before. Thanks in advance for the help.  Wink
49  Joomla Hacks / Mambo-SMF 1.3.x / Re: Session Timeout Problem on: June 20, 2005, 03:42:11 PM
Sorry for the late reply.

I JUST tested.

I turned off "database driven sessions" and that seemed to do the trick.

I'll test a little more, but it seems the problem was cleared upon when I did that.

Thanks again!  Grin
50  Joomla Hacks / Mambo-SMF 1.3.x / Session Timeout Problem on: June 20, 2005, 02:26:34 PM
I'm using Mambo (latest version) with SMF 1.0.4 and this bridge.

A user just emailed me with the following problem:

Quote
Your session timed out while posting. Please try to re-submit your message.
No subject was filled in.
The message body was left empty.

Has anyone else experienced this?
51  Joomla Hacks / Mambo-SMF 1.3.x / Re: Cannot publish static content to front page after Mambo-SMF installation on: May 28, 2005, 01:29:54 PM
Okay, I've done some fiddling in Mambo's backend and have published the desired static content as a normal content item and marked it for Front Page.

ALMOST exactly what I need, except one problem...

I have my Frontpage settings such that NO titles are supposed to be showing (I only want the actual content to show). Unfortunately, with the index.php hack, the titles that are turned off in the backend are being published in the front end.

How do I alter the code so that the hacked index.php "honors" the settings I have in the backend?
52  Joomla Hacks / Mambo-SMF 1.3.x / Cannot publish static content to front page after Mambo-SMF installation on: May 27, 2005, 12:57:09 AM
Hello. I tried to do a search for this but couldn't find anything.

There seems to be a quirk that occurs when Mambo-SMF modifies Mambo's index.php file.

Basically, with the altered file, I cannot publish static content to the front page; I can do this with the normal index.php file in place.

I'm no coding expert, but I think the problem may lie in the following code:

Code:
ob_start();
if ($path = $mainframe->getPath( 'front' )) {
$task = mosGetParam( $_REQUEST, 'task', '' );
$ret = mosMenuCheck( $Itemid, $option, $task, $gid );
if ($ret) {
require_once( $path );
} else {
mosNotAuth();
}
} else {
echo _NOT_EXIST;
}
$_MOS_OPTION['buffer'] = ob_get_contents();
ob_end_clean();

Again, because I'm not an expert, I really can't swear this is it. I just know that, somewhere in the hacked Mambo index file, there is code that is interfering with the ability to publish static content to the front page. It's as if this file is forcing Mambo to default to its "regular" front page.

For now, I've had to backup the hacked index.php file and restore the original one.

Any suggestions?
Pages: 1 2 3 [4]


Login with username, password and session length

Powered by MySQL Powered by PHP Joomla Forum | Powered by SMF 1.1 RC1.
© 2001-2005, Lewis Media. All Rights Reserved.
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!

Joomla Hacks is a Joomla Components, Joomla Modules, Joomla Templates, & Joomla Mambots resource portal. None of the text or images in this public website may be copied without the expressed written consent of the authors. Copyright 2005 by JoomlaHacks.com. Powered by Joomla. All rights reserved.
Terms of Use
Joomla Hacks



Joomla Hacks
German Lang French Lang Italian Lang Spanish Lang Japanese Lang Chinese Lang
Joomla Comment
Search Contact About Advertise Blogs Topsites Submit News Register Login