Joomla integration ...... i.e NOT bridging

Started by laser, August 17, 2007, 06:49:38 AM

Previous topic - Next topic

laser

OK, I'm over the whole bridging issue.  I will continue to use Joomla and SMF on sites that I develop, because I think that they are both the best of breed, but there's one thing I can't get right in my mind (maybe I just haven't read enough) ...

How do I integrate SMF & Joomla ?  I don't want to wrap it because I hate the whole "SMF in an IFRAME" situation, but I do want SMF unwrapped but within the Joomla template ... basically so SMF & Joomla look the same and both share the one lot of CSS files.

Is this possible ?

and if so, how ?

青山 素子

You can always work on editing the SMF template to look like your site. The important template is index.template.php, which defines the overall style. Check the other boards and our documentation for info on theming.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


laser

I could do that (that's basically whatn they've done on the Joomla site), but I need something tighter.  The site I'm planning will have menu changes a lot (getting turned on & off depending on different things happening), and I really want to make the change once instead of : "let's turn this menu item on in Joomla, now let's turn the same menu item on in SMF"

Or is there a way for the SMF template to call the Joomla menu ?

elfishtroll

Quote from: laser on August 17, 2007, 07:09:21 PM
I could do that (that's basically whatn they've done on the Joomla site), but I need something tighter.  The site I'm planning will have menu changes a lot (getting turned on & off depending on different things happening), and I really want to make the change once instead of : "let's turn this menu item on in Joomla, now let's turn the same menu item on in SMF"

Or is there a way for the SMF template to call the Joomla menu ?

What exactly do you mean by "turned on & off a lot?" ( I take it you are not describing my girlfiend, Aimy! :P)

Well, it depends... what are the menu items that you are talking about? Are they changing based on user state/privilege level? Then u have to realize that the user system is different (tho analogously mapped by the bridge) between J and SMF.

Since the Joomla menu is actually items on a database, it should be easy to do.

What would take place is, you read the table(s) and loop through, outputting the <li> tags or whatever to format the menu.
You would also determine what to display/not display based on the user access level. As you can see, it starts to get to a bit of work!

now, if the menu dynamics is based on the 'current page'/action, then logically it wouldnt matter if they are in one or the other and you can then display the menu in both environments


Kindred

Look at some of the older mambo templates by AKO... (i.e. akodark, etc)

He has a script in there that actually reads the database for the menu items...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

laser

Quote from: elfishtroll on August 20, 2007, 10:03:28 AM

What exactly do you mean by "turned on & off a lot?" ( I take it you are not describing my girlfiend, Aimy! :P)
Basically, I'm building the site for a client and I know what they will do ... they love moving, changing, reordering menu items all the time.  It gives me the heebies but they think it's really good.
Quote from: elfishtroll on August 20, 2007, 10:03:28 AM
Well, it depends... what are the menu items that you are talking about? Are they changing based on user state/privilege level? Then u have to realize that the user system is different (tho analogously mapped by the bridge) between J and SMF.
No, not based on user priv's at all ... purely based on the client's whims at the time.  Some of these whims are well-founded though.  A menu item could be "Event News" which you only want on for a few weeks before the event and then turn it off after the event.
Quote from: elfishtroll on August 20, 2007, 10:03:28 AM
Since the Joomla menu is actually items on a database, it should be easy to do.

What would take place is, you read the table(s) and loop through, outputting the <li> tags or whatever to format the menu.
You would also determine what to display/not display based on the user access level. As you can see, it starts to get to a bit of work!

now, if the menu dynamics is based on the 'current page'/action, then logically it wouldnt matter if they are in one or the other and you can then display the menu in both environments


Sounds a bit like Kindred's post about the AKO templates, I'll have a look at that :)

shinbushi

For me personally I never needed the shared user base.  I just needed the recent topics, login and discuss this link.  I realize that without a bridge that the discuss this link is impossible but how would you do the other 2?

Kindred

use SSI to make yourself a module... or try to modify the existing modules to work without the bridge.

the existing modules depend on the bridge for SMF configuration data
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Kindred

note: see the other post on this topic for an explanation on how to "unbridge" the recent posts module.

the same instructions should work for most of the other modules.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

shinbushi

Would that include the discussbot?  ???
(don't think it would but here is to hoping)

Kindred

probably not. The discussbot does much more than just read SSI...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

shinbushi

Is there anyway to test it without unbridging (I have jooml_Smf upgrade) but not the full script so I don't want to unbridge until I know it works.  i did the recommended modding and deleting of code per other thread on recent topics.

Also Can I do the same modding to the mod_smf_login?

Kindred

I really have no idea about the discussbot.  Chadness handles that item...

As for mod_smf_login. No.
mod_smf_login, unlike the other modules is more than an SSI function called in a joomla module. Without the bridge component (or even with Joomla 1.0.13) mod_smf_login will not work.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

shinbushi

Sorry I should have been more clear.  Is is possible to test the  Recent Topics without unbridging.  My current module is with the altered php file and works.

shinbushi

I tried to make a log in module from this post

<?php
$current_url 
'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];
?>


<?php require("/home/taijutsu/public_html/forumSSI.php"); ?>

<?php
if ($context['user']['is_logged'])
{
echo $txt['hello_member'], ' <b>'$context['user']['name'], '</b>';
echo '.<br /><a href="http://www.taijutsu.com/forum/index.php?action=profile">Profile</a> | ';
ssi_logout($current_url);
}
else
{
ssi_login_home($current_url);
}
?>



but it does not work any ideas

cferd

It looks like you're missing a slash here: forumSSI.php. Should be forum/SSI.php

shinbushi

Ok fixed but I got this error
Fatal error: Call to undefined function: ssi_login_home() in /home/taijutsu/public_html/content/modules/mod_forum_login.php on line 16
Database Error: Table 'taijutsu_joom1.smf_sessions' doesn't exist
File: /home/taijutsu/public_html/forum/Sources/Load.php
Line: 2006

Orstio

QuoteFatal error: Call to undefined function: ssi_login_home()

That would indicate that there is no function named ssi_login_home().

shinbushi

Is that normally part of smf? or can I delete that part of the code?

Kindred

no, there is no standard function by that name.  I believe the standard function is ssi_login()

and, since it seems that you have smf and joomla in different databases, you'll have to iinclude a database switch back and forth in your code.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

shinbushi


Kursk

Quote from: shinbushi on August 29, 2007, 05:52:51 PM
Is is possible to test the  Recent Topics without unbridging.  My current module is with the altered php file and works.
It works in unbridged set up, but show an error, see this post. I just commented out the lines in SSI.php that call the error.

Kindred

shinbushi,

look in some of the existing modules, those include DB switches.  Or switch your installations into the same database.

Kursk,

As replied in the other thread, removing session checks is a good way to open you site (potentially) to hackers.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

laser

My brain still can't get around doing this sort of thing PROPERLY.  I've even looked at Fireboard, but I don't really like it (it feels clunky).

Is there a way to create a component that lets SMF exist within the Joomla framework but still without the user bridging ?

Kindred

of course there is a way. However, we will not be doing so, because that would still involve the GPL problems.

The way that joomla.org does it is there is NO overlap between SMF and joomla at all. It just LOOKS like there is.
Joomla has it's template and smf has its template, but neither one ever touches the other.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

laser

I understand how joomla.org works, but if I *don't* want a bridge just a component to get SMF inside Joomla, surely that doesn't involve GPL problems  ... and if it does, how ?

Kindred

It does involve the GPL, because to get a component inside the joomla format, you must use $mainframe. This interacts with joomla's code, which means you run into the GPL issues.

the bridge has two parts: 1- sync users/permissions and  2- to run within the joomla framework. NIETHER can be done  between SMF and joomla, under joomla's interpretation of the GPL.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

laser


Advertisement: