News:

Wondering if this will always be free?  See why free is better.

Main Menu

Mambo Open Source

Started by Sreya, February 24, 2004, 01:40:26 AM

Previous topic - Next topic

Eibwen

Quote from: Orstio on November 13, 2004, 02:39:33 PM
About the first half of this thread has nothing at all to do with the bridge component.

I agree... Would it be silly idea to start a new thread, concerning ONLY the SMF-MOS bridge?

Just my .02 :)
http://www.chatwired.com/ [nofollow] ~ IRC Webchat

http://www.2039.org/ [nofollow] ~ The Future Site

[Unknown]

I strongly suggest using require_once instead of require...

-[Unknown]

Oldiesmann

I'm having a blast with this... How do I keep Mambo's stylesheet and SMF's stylesheet from interfering with one another? If a template uses a different font than SMF, how do I keep SMF from using that template's font? It's nice to be able to integrate SMF, but I'd like to keep the stylesheets from conflicting.

Vedm

At the moment we are making 'small' and 'normal' fonts In Mambo template to be the same to SMF.
If someone finds a solution not to inerfere them at all - it would be a great feature.

Also, there's a font resizement bug existing in the bridge, if and when you use IE - wrapped SMF component results in enlarged fonts, and if you turn off xhtml type of document for SMF index.template - it becomes normal but unwrapped forum fonts will become smaller.
My Forum runs under SMF 1.0 RC1

Oldiesmann

#384
It's not just the fonts that are interfering. I've got this nice blue template set as default that I found on mambohut.com, and the links are normally a white color with no underlines and there's a dark blue backround. However, when I view the SMF component, all the links are black with underlines and the background is white. I'm still mostly just playing around with this and waiting to see what develops with this, another Mambo/SMF integration project I was following and at Lunabyte.com...

repete

I just changed all the corresponding colours in the SMF stylesheet to match my Mambo template.  The only thing that looks ugly is the Login Form, which I assume is a result of conflicting stylesheets from Mambo and SMF.

This is how the integrated Login Form looks like in the main pages:


I would like to get the Login Form back to its original look:


I don't know how to change the look of the Login Form, I assume its in the stylesheet but I don't know where.

Kindred

Actually, the background of the login form is defined in the file mod_smf_login.php

I changed the following line:


echo '<div class="headerbodies" style="position: relative; margin-right: 5px; background-image: url(', $settings['images_url'], '/box_bg.gif);">
<table width="99%" cellpadding="0" cellspacing="5" border="0"><tr>';


to read:


echo '<div style="position: relative; margin-right: 5px;">
<table width="99%" cellpadding="0" cellspacing="5" border="0"><tr>';


this keeps the module looking like the rest of my mambo modules...   you can play with the background image rather than just removing it...   you can change the class of the DIV function, which will set the colour based on your CSS file(s)...

Сл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."

Vedm

#387
No, Repete, it isn't there. It's the background from description of mod_smf_login module window. Just wipe it out - it will use Mambo specified background after that.

Edit: Oops, looks like Kindred made it first and perfect. :)

2 Oldiesmann: Yes, I saw that glich with a:link too. Well, the most obvious solution is to make special Mambo template for SMF default theme - but nobody made it yet. :P
My Forum runs under SMF 1.0 RC1

repete

This really is a helpful forum, two posts helping me out at the same time.:)

I might suggest making the change that Kindred made in mod_smf_login.php in future releases of the bridge.


Vedm

#389
Repete, here's my 'mod_smf_login.php' file - I have also changed input types in text boxes for the whole module to become Mambo-styled. You can use the file-comparsion tool to see where changes were applied.

Edit: Orstio, may I offer you to use these improvements for future bridge releases? ;)

<?php
global $context, $txt, $scripturl, $settings;
$sql = "SELECT id FROM mos_menu WHERE link='index.php?option=com_smf'";
$result = mysql_query ($sql);
$row = mysql_fetch_array($result);
$myurl = $mosConfig_live_site ."/". basename($PHP_SELF)."?option=com_smf&Itemid=" . $row[0]."&";
$scripturl = $myurl;
echo
'<table width="99%" cellpadding="0" cellspacing="5" border="0"><tr>';
if (!empty($context['user']['avatar']))
echo '<td valign="top">', $context['user']['avatar']['image'], '</td></tr>';
echo '<td width="100%" valign="top" class="smalltext" style="font-family: verdana, arial, sans-serif;">';

// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
'
, $txt[247], ' <b>', $context['user']['name'], '</b>';

// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo ', ', $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a>', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'];
echo '.';

// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '<br />
<b>'
, $txt[616], '</b>';

// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '<br />
'
, $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=regcenter">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'];

// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']))
{
echo '
<br />'
, $txt['totalTimeLogged1'];

// If days is just zero, don't bother to show it.
if ($context['user']['total_time_logged_in']['days'] > 0)
echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];

// Same with hours - only show it if it's above zero.
if ($context['user']['total_time_logged_in']['hours'] > 0)
echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];

// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'];
}

echo '<br />
<a href="'
, $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a><br />
<a href="'
, $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />
'
, $context['current_time'], '<br /> <a href="', $scripturl, '?action=mambo_logout;sesc=', $context['session_id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/logout.gif" alt="' . $txt[108] . '" style="margin: 2px 0;" border="0" />' : $txt[108]), '</a>';
}
// Otherwise they're a guest - so politely ask them to register or login.
else
{
echo '
'
, $txt['welcome_guest'], '<br />
'
, $context['current_time'], '<br />
<form action="'
, $scripturl, '?action=mambo_login" method="post" style="margin: 3px 1ex 1px 0; text-align:right;">
<input type="text" class="inputbox" name="user" size="10" /> <input type="password" class="inputbox" name="passwrd" size="10" />
<select name="cookielength" class="inputbox">
<option value="60">'
, $txt['smf53'], '</option>
<option value="1440">'
, $txt['smf47'], '</option>
<option value="10080">'
, $txt['smf48'], '</option>
<option value="302400">'
, $txt['smf49'], '</option>
<option value="-1" selected="selected">'
, $txt['smf50'], '</option>
</select>
<input type="submit" class="button" value="'
, $txt[34], '" /><br />
'
, $txt['smf52'], '
<input type="hidden" name="op2" value="login" />
<input type="hidden" name="lang" value="'
,$mosConfig_lang,'" />
<input type="hidden" name="return" value="'
,sefRelToAbs( $login ),'" />
<input type="hidden" name="message" value="'
,$message_login,'" />
</form>'
;
}
echo '
</td></tr></table>
</div>'

?>
My Forum runs under SMF 1.0 RC1

[Unknown]

To fix the font issues, as I've said a dozen times, you can set "html" as your doctype in your init template.  This will cause SMF to load fonts-compat.css, which resolves the font size problems.

-[Unknown]

B

*collapses in exhaustion* ::)

I've just read all 27 pages of this thread. I've decided I'm going to continue watching how this whole thing develops. I'm just not ready to jump in, yet. :) I think it's an awesome idea, though...and I can't wait to get it working on my site.

B


Conquer Club - Free Global Domination Game
Think the board game Risk on steroids!

Ket

Ok found the master thread I'll stop makeing new ones now.

Obviously by now we have seen that on load of the SMF content the CSS file seems to be overwritten causing an immediate change to the Mambo template. I assume this has to do with CSS file conflicts. Is there any work around to this. Short of writing a Mambo template to match the SMF CSS file's.


Kindred

NO, the CSS files are not overwritten by anything to do with the bridge.

However, as you were warned in the documentation for the bridge, there are several entries duplicated between SMF and Mambo. When you load SMF within Mambo, it applies the last read file (the forum CSS) to everything, including the mambo template.

There are two things to do for this.
1) change the XHTML line to read HTML, adn [unknown] has posted a couple of times.
2) add the SMF unique entries to the Mambo CSS file.
3) change both your templates around to merge as you would want.
(the mambo template is probably easier, since there are fewer files to muck with.)

the only issue I still have is that when SMF is loaded, the mambo topmenu is extra large text...   that can be fixed (and will eventually) by changing the call for the text in the mambo topmenu to a different style, unique from SMF style calls.
Сл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."

Ket

Kindred, DOH!
I think I need to start getting more sleep. I was under the misguided assumption that this fix
1) change the XHTML line to read HTML, adn [unknown] has posted a couple of times.
was for the large/small text fix.

Ket

B.T.W. Setting the DocType to HTML from XHTML does not seem to correct the top banner mambo issue.

(Large Font Issue)

Kindred

Well, it helped, but did not correct it, as you noticed.
(they are smaller, but still not normal size)

the issue here is the fact that there are two calls for what the header fonts are identified as: one in Mambo CSS and one in SMF CSS.  To fix this, you should go into your mambo theme and change the font or div type of the headers, and then make a new entry in your mambo CSS file.
Сл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."

Jubei

I looked around and found SMF to be one of the better if not the best open source forum available - I made the same conclusion about Mambo when it came to an all inclusive management system.  I have to say, after working with the two - MAMBO is in many ways very poorly organized, and in other ways purely genius - well anyway.

Here's a version of SMF that was ported over to the Mambo system - it hasn't been up for long so there may be some problems I haven't discovered, but overall it's working.

hxxp:www.agencycafe.com/component/option,com_smf/Itemid,53/ [nonactive]

SMF Sessions were disabled, and Mambo Security was used to over-ride the session securities of the SMF system.

New Users to the Mambo Backend are automatically added to the SMF system (ie: User Data is seamlessly shared)

There were a few things I had to change on the Mambo side to make everything work smoothly, mostly with the passing of User Credentials and Session Key information.  There was a problem with SMF's use of the ob_start command overriding sessions used in Mambo, but that was a simple change in the Mambo Index file.

Anyway - if any of you would like a copy of the source code, feel free to email me a request [ smf (AT) hxxp:byrgius.com [nonactive] ]

Godspeed

DAB Empire

Helllllo everyone.  Saw a few replies about people looking for testers.  I have the integration installed on one beta site (www.vipnights.com), one semi-live site (www.radiogrind.com) and one fully-live site (www.eliterides.com).  So far the component is great for the most part.  I have only run into a few problems:

1.  When you logout it only logs you out of SMF.  Mambo still shows you logged into Mambo.

2.  Thread Views are counted incorrectly.  They count in increments of three.  I am assuming this is because of how it loads the forums wrapped.

3.  The options to redirect a user upon login/logout in the Module settings do not work
4.  A lot of my users access the forums directly and will not be getting to the forums through the bridged component.  With the component installed, if a user accesses the forums directly the logon form at the top does not work.  Example. Go to http://www.eliterides.com and logon through the right module using user: "test" and pass "test". Works great. Now try and go to http://www.eliterides.com/forums and login through the form at the top of the forums. It doesn't work. I updated the index template file login links. Did I miss one?

I'd be more than happy to test on my beta or live sites.

Kindred

Take these in reverse order:

Are you running v2.04 of the bridge?
because 2.04 solved #4 for certain...  (except in Firefox)

Not sure what you mean by that...  redirect to where?   It usually just reloads whatever page you were on before logging in/out. Are you trying to do something different?

Thread counts are correct on my system...

Mambo shows you logged in for about 5-10 minutes...    BUT, you are not actually... you are deifnitely logged out of Mambo. (because when I log out, although it shows me as being present, I can not access any of the reg-user-only menus)
Сл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."

Advertisement: