Mambo Open Source

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

Previous topic - Next topic

Kris

Quote from: Slack on September 25, 2004, 06:53:20 PM
Kris, can we see you Development site?

Thanks,

I hope to get it online next week.

Orstio

The component that i uploaded here is for 4.5.0, but I believe the changes that [Unknown] was talking about apply to 4.5.1.  I don't know if they would also apply to 4.5.0.

Slack

OK, thanks guys - enough to get me looking at Mambo.

Cheers,

[Unknown]

Orstio, I don't mind at all if it's under there... my point was only that it would hurt nothing (and yes, it would hurt nothing) to implement my suggestion, and only be to the benefit of Mambo....

The changes I suggested are the same in 4.5.0 and 4.5.1, and are very simple.

Doesn't look like my suggestion is getting much attention, though.  Here, I'll describe it with code:

index.php, find:
$_MOS_OPTION['buffer'] = ob_get_contents();
ob_end_clean();

initGzip();

header( "Expires: Mon, 26 Jul 1997 05:00:00 GMT" );
header( "Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT" );
header( "Cache-Control: no-store, no-cache, must-revalidate" );
header( "Cache-Control: post-check=0, pre-check=0", false );
header( "Pragma: no-cache" );

if (!file_exists("templates/$cur_template/index.php")){
echo _TEMPLATE_WARN;
} else {
require_once( "templates/$cur_template/index.php" );
echo "<!-- ".time()." -->";
}
if ($mosConfig_debug) {
echo $database->_ticker . ' queries executed';
echo '<pre>';
foreach ($database->_log as $k=>$sql) {
    echo $k+1 . "\n" . $sql . '<hr />';
}
}
doGzip();


Replace:
mos_terminate();

function mos_terminate()
{
foreach ($GLOBALS as $name => $value)
$$name = &$GLOBALS[$name];
   
$_MOS_OPTION['buffer'] = ob_get_contents();
ob_end_clean();

initGzip();

header( "Expires: Mon, 26 Jul 1997 05:00:00 GMT" );
header( "Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT" );
header( "Cache-Control: no-store, no-cache, must-revalidate" );
header( "Cache-Control: post-check=0, pre-check=0", false );
header( "Pragma: no-cache" );

if (!file_exists("templates/$cur_template/index.php")){
echo _TEMPLATE_WARN;
} else {
require_once( "templates/$cur_template/index.php" );
echo "<!-- ".time()." -->";
}
if ($mosConfig_debug) {
echo $database->_ticker . ' queries executed';
echo '<pre>';
foreach ($database->_log as $k=>$sql) {
    echo $k+1 . "\n" . $sql . '<hr />';
}
}
doGzip();

}


There, changes nothing for most everyone, and everything still works fine.

-[Unknown]

roboter88

*wow*
Just installed Mambo and i must say it looks very neat so far.

When i researched and read about mambo i found this news:
Furthermore plans to warn mambo user?
Eventually did some1 know something about this?
Furthermore said mambo stole code.
Mambo codet something but says he changed it and made it dynamicly.

Also mybe HERE is a good point to start with more changes for syndicating purpose and for tweaking meassure - like announced on their boarding :p

Also why they use vB makes no sense also here is another point for team work.

I will later try to bridge this

cheers

Orstio

QuoteOrstio, I don't mind at all if it's under there... my point was only that it would hurt nothing (and yes, it would hurt nothing) to implement my suggestion, and only be to the benefit of Mambo....

Cool, I'll put it in the project.  That way, at least, it will get attention among people who use Mambo with SMF, and might work its way into a future core release that way.  As you said, it can only help with infrastructure in future components.

QuoteDoesn't look like my suggestion is getting much attention, though.

After searching through the forum there a few times, I discovered that not a whole lot of development takes place, or is discussed openly there.  Most of that takes place within the projects themselves.

QuoteFurthermore plans to warn mambo user?
Eventually did some1 know something about this?
Furthermore said mambo stole code.
Mambo codet something but says he changed it and made it dynamicly.

I'm wondering if that didn't have something to do with the release of 4.5.1.  The piece of code that Furthermore is threatening about is completely gone in 4.5.1.  At any rate, he can't do anything to the end user.  If he feels his copyright to the code was violated, it is the people who distribute that code that he needs to go after, not the end users.

Orstio

#146
Strange, that is not the code I have at the end of index.php in 4.5.0.

Here's what mine looks like:


$do_gzip_compress = FALSE;
if ($mosConfig_gzip==1) {
$phpver = phpversion();
$useragent = (isset($_SERVER["HTTP_USER_AGENT"]) ) ? $_SERVER["HTTP_USER_AGENT"] : $HTTP_USER_AGENT;

if ( $phpver >= '4.0.4pl1' && ( strstr($useragent,'compatible') || strstr($useragent,'Gecko') ) )
{
if ( extension_loaded('zlib') )
{
ob_start('ob_gzhandler');
}
}
else if ( $phpver > '4.0' )
{
if ( strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip') )
{
if ( extension_loaded('zlib') )
{
$do_gzip_compress = TRUE;
ob_start();
ob_implicit_flush(0);

header('Content-Encoding: gzip');
}
}
}
} else {
ob_start();
}
header( "Expires: Mon, 26 Jul 1997 05:00:00 GMT" ); // Date in the past
header( "Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT" ); // always modified
header( "Cache-Control: no-store, no-cache, must-revalidate" );
header( "Cache-Control: post-check=0, pre-check=0", false );
header( "Pragma: no-cache" );

if (!file_exists("templates/$cur_template/index.php")){
echo "Template File Not Found!";
} else {
require_once( "templates/$cur_template/index.php" );
}

if ( $do_gzip_compress )
{
//
// Borrowed from php.net!
//
$gzip_contents = ob_get_contents();
ob_end_clean();

$gzip_size = strlen($gzip_contents);
$gzip_crc = crc32($gzip_contents);

$gzip_contents = gzcompress($gzip_contents, 9);
$gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4);

echo "\x1f\x8b\x08\x00\x00\x00\x00\x00";
echo $gzip_contents;
echo pack('V', $gzip_crc);
echo pack('V', $gzip_size);
} else {
ob_end_flush();
}

[Unknown]

I didn't say it was exactly the same, I'd said it was basically the same.

Just wrap that in a function, make sure the function is called, and extract the globals (as REFERENCES!!)

-[Unknown]

packman

Quote from: Orstio on September 25, 2004, 10:49:05 PM
Cool, I'll put it in the project.  That way, at least, it will get attention among people who use Mambo with SMF, and might work its way into a future core release that way.  As you said, it can only help with infrastructure in future components.

I think you'll find that the mods that [Unknown] is suggesting should go into the core Mambo project, not into a component project. I don't think components or modules are supposed to change core Mambo code. I'm not sure how a SMF-Mambo bridge component would help future components, other than them perhaps using the same code. Even then if you modify core code, you're liable to get problems because one component slightly tweaks the code to support what it wants and that breaks another component. Components and/or Mambo are also likely to break if the Mambo dev team produce a patch to the modified core code.

I'd much rather see this code change implemented in the Mambo core, so we need to start lobbying the Mambo dev team...in a nice way. I've already added comments to support [Unknown]'s message.
Chris

packman

And whilst I was typing my last reply Stingrey (a member of the Mambo Dev team) has just said..."Just so you know I'll keep this issue in mind when working on 4.5.2"

They have said that 4.5.2 won't take as long to arrive as 4.5.1 did after 4.5.0, so maybe we won't have to wait long.

Yippee  :D
Chris

Abedie

Hi,

Quote from: roboter88 on September 25, 2004, 10:33:25 PM
..........(zap) Also why they use vB makes no sense (zap).....

This is happening to other scripts too, like OCportal. Does they realy think people would trust the use of the sometimes included forums if they don't use it themselves?

Just my two cents,
Abedie.

The list about Galery/CMS/Portal using SMF



A dark spot in the light is nearly seen, but a light in the darkness is seen miles away.
Try to be that light for others.

mmx

I believe that Stingrey is referring to the use of XML-RPC in RAMBO to allow cross-site authentication on a single server and acrosss remote servers. If you check the hxxp:mamforge.net [nonactive] CVS, you will note that renewed experimentation on RAMBO is underway. The RAMBO concept is much more than just authentication or webservices and probably won't be fully exploited until 4.6 and 5.0 when individual Mambo components become XML-RPC servers. However, the webservices portion of the concept is being introduced across 4.5.2 and 4.5.3 using what appears to be a component with associated plugins (mambots). In 4.5.1, a secret key parameter was introduced and this is the precursor to cross-site communications using XML-RPC.

Thus, I think Stingrey is thinking along the lines of broadening the original authentication concept to include third-party applications.

yardbird

The developers really do pay attention to those boards. Obviously they can't respond to everything but I know from experience that they often watch a topic develop, see where it's going and how it plays out, and then suddenly a new feature appears.  As an example please read this thread...
http://forum.mamboserver.com/showthread.php?t=15908&page=1&pp=10&highlight=dream+sequence

I am reikimaster on that board. The thread shows what can happen if an idea is presented to a dev that they can sink their teeth into. I use Mambo. I like it. I upgraded immediately to 4.5.1 because the new features are worth it.  I jumped in here to comment because if I'm reading you correctly, the core code change you're talking about would be a benefit to anyone developing for Mambo. I have my SMF forums as a separate entity at the moment. My web site doesn't require login but obviously the message boards do. So I "wrapped" SMF in my Mambo template quite easily while waiting for a true integration to come along.

Please continue to explain to the devs why your code change ideas are worthwhile. They do listen.
And if your core code change to Mambo would be rather easily implemented, Why not do a Mambo 4.5.1 install, modify the code, show them the site with modified code and how developers can now use that for new components and modules.  I only suggest this if it's not a big time sink as I know you have other development on SMF being worked on. But if you could show them an example.....


roboter88

Quote from: Abedie on September 26, 2004, 08:29:34 AM
Hi,

Quote from: roboter88 on September 25, 2004, 10:33:25 PM
..........(zap) Also why they use vB makes no sense (zap).....

This is happening to other scripts too, like OCportal. Does they realy think people would trust the use of the sometimes included forums if they don't use it themselves?

Just my two cents,
Abedie.
Well i just think it is a bigger adventure to use a open source project instead of a commercial also for integration in later releases cause whtever they say a forum is a CMS standard feature nowadys :p

And the argument its not stable/not enough tested - well i just guess they dont had the time yet to check everything.
Also its always not easy to change a desission :p

cheers

Puc conDoin

Is this the site to look at? http://mos-smf.mamboforge.net/

It's pretty empty!

I'm looking for integration of SMF into Mambo. We plan to use a CMS (Mambo?) with SMF on our site http://www.4gm.nl

Slack

Quote from: Orstio on September 25, 2004, 06:57:23 PM
The component that i uploaded here is for 4.5.0, but I believe the changes that [Unknown] was talking about apply to 4.5.1. I don't know if they would also apply to 4.5.0.

Orstio,

Does your compnent also work with 4.5.1?  or are you working on a component for 4.5.1?

Thanks.

[Unknown]

I'm afraid I made a very crucial typo in my code, although it's not that big a deal, it does make a big difference:

index.php, find:
$_MOS_OPTION['buffer'] = ob_get_contents();
ob_end_clean();

initGzip();

header( "Expires: Mon, 26 Jul 1997 05:00:00 GMT" );
header( "Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT" );
header( "Cache-Control: no-store, no-cache, must-revalidate" );
header( "Cache-Control: post-check=0, pre-check=0", false );
header( "Pragma: no-cache" );

if (!file_exists("templates/$cur_template/index.php")){
echo _TEMPLATE_WARN;
} else {
require_once( "templates/$cur_template/index.php" );
echo "<!-- ".time()." -->";
}
if ($mosConfig_debug) {
echo $database->_ticker . ' queries executed';
echo '<pre>';
foreach ($database->_log as $k=>$sql) {
    echo $k+1 . "\n" . $sql . '<hr />';
}
}
doGzip();


Replace:
mos_terminate();

function mos_terminate()
{
foreach ($GLOBALS as $name => $value)
$$name = &$GLOBALS[$name];
   
$_MOS_OPTION['buffer'] = ob_get_contents();
ob_end_clean();

initGzip();

header( "Expires: Mon, 26 Jul 1997 05:00:00 GMT" );
header( "Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT" );
header( "Cache-Control: no-store, no-cache, must-revalidate" );
header( "Cache-Control: post-check=0, pre-check=0", false );
header( "Pragma: no-cache" );

if (!file_exists("templates/$cur_template/index.php")){
echo _TEMPLATE_WARN;
} else {
require_once( "templates/$cur_template/index.php" );
echo "<!-- ".time()." -->";
}
if ($mosConfig_debug) {
echo $database->_ticker . ' queries executed';
echo '<pre>';
foreach ($database->_log as $k=>$sql) {
    echo $k+1 . "\n" . $sql . '<hr />';
}
}
doGzip();

exit;
}


The only difference you'll notice is that the exit function should use exit; if at all possible to simplify things.

-[Unknown]

Orstio

QuoteIs this the site to look at? http://mos-smf.mamboforge.net/

It's pretty empty!

Yes, that is it, and it is empty.  I need to put some files in there.

QuoteOrstio,

Does your compnent also work with 4.5.1?  or are you working on a component for 4.5.1?

Thanks.

I have since upgraded my site to 4.5.1, and the component works fine.  The registration file is a little different, though.  What I want to do with this is make an alternative login component, so that the registration that I have made doesn't replace Mambo's, it acts as an alternative by letting the administrator unpublish the core login and publish the SMF-bridge login.  That way no core Mambo components are touched.

Kris

But when you register mambo ypu are automatically regostered in SMF and the way around, or... ???

Orstio

QuoteBut when you register mambo ypu are automatically regostered in SMF and the way around, or...

Are you asking if the SMF Bridge includes the registration across both databases?  The answer to that is no.  Registration in Mambo is handled by Mambo's registration component.  That component either has to be modified to include SMF registration, or an alternative component installed that will do the job (and then the login module needs to be replaced also so that new registrations are routed to the alternative component).

The registration zip that is uploaded here (look back a few pages) will do that for Mambo 4.5, but not for 4.5.1.  I'm going to put that together as an easy-to-install component as well, one that does not overwrite the Mambo core files, but instead acts as an alternative by allowing the administrator to unpublish the core login and publish the modified login.

Maybe this is more clear:  The part of Mambo that displays SMF is not the same as the part that handles registration.

Advertisement: