Home arrow Forum integrated search
  Welcome, Guest. Please login or register.
Did you miss your activation email?
October 10, 2008, 08:07:51 PM
Home New Posts Search Calendar


Login with username, password and session length
+  Joomla Forum
|-+  Joomla Hacks
| |-+  Joomla-SMF Forum Support
| | |-+  Mambo-SMF 1.3.x
| | | |-+  integrated search
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: integrated search  (Read 2980 times)
Geoffrey Makstutis
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 3


View Profile
integrated search
« on: August 08, 2005, 09:11:03 AM »

Hi,

I'm wondering if anyone has (or knows of) a mambot that will allow you to search SMF forums from within the main Mambo search function? I noted that the SMF-Bridge project has just released a mambo to do this. I've had a look at it, but (not being a very advanced PHP/Mambo coder) I couldn't see what would be needed to make it work for Mambo-SMF.

Anyone willing to take up the gauntlet?
Logged
Editor (cowboy)
Administrator
Joomla Guru
*****

Karma: +86/-23
Offline Offline

Posts: 1144



View Profile WWW
Re: integrated search
« Reply #1 on: August 09, 2005, 12:58:54 PM »

Geoffrey,

There's probably some restrictions on the code, because I don't see why it wouldn't work. I can check that when I get a chance. It should be fairly easy.
Logged
d3vlabs
Joomla Newbie
*

Karma: +2/-0
Offline Offline

Posts: 16


View Profile
Re: integrated search
« Reply #2 on: August 09, 2005, 01:18:26 PM »

Here's the file's URL: http://mamboforge.net/frs/download.php/6942/smf.search.zip

This is the readme that comes with the file

Code:
IMPORTANT! THE INDEX.PHP FOR YOUR MAMBO TEMPLATE MUST BE MODIFIED!

The SMF bridge instructions tell you to add this code immediately above </head>:

global $sc, $context;

if (!defined('SMF')){
  require ("administrator/components/com_smf/config.smf.php");
  require_once ($smf_path."/SSI.php");
}

$sc = &$context['session_id'];

You need to change this code to the following:

global $sc, $context;

if (!defined('SMF')){
  require ("administrator/components/com_smf/config.smf.php");
    require ($smf_path . "/Settings.php");
  require_once ($smf_path."/SSI.php");
}

$sc = &$context['session_id'];

Simply add the missing line between the require statements.

If you don't do this, your site will not function!

I attempted this with Latest MamboHacks bridge and Latest Mambo. The bot DID NOT WORK. cowboy, post your thoughts or maybe post your working version  Grin please. This is a heavily anticipated feature...at least by me
Logged
d3vlabs
Joomla Newbie
*

Karma: +2/-0
Offline Offline

Posts: 16


View Profile
Re: integrated search
« Reply #3 on: August 14, 2005, 06:21:38 AM »

err I didnt realized that MamboHacks SMF bridge modifieds mambo/index.php and not mambo/templates/templatename/index.php. This is better actually since it will work on any template you have. To make smf searchbot work on your site using Mambohacks.com bridge add this code to your mambo/index.php:

Code:
if (file_exists($smf_path."/Settings.php"))
require ($smf_path . "/Settings.php");

right after

Code:
if (file_exists($smf_path."/SSI.php"))
require_once ($smf_path."/SSI.php");[

This should be around line 28 under //MAMBOHACKS.COM category. Make sure you do this after you patch your index.php file via bridge's backend component.
This is tested on Mambo 4.5.2.3 with the latest bridge. Take care.
Logged
Editor (cowboy)
Administrator
Joomla Guru
*****

Karma: +86/-23
Offline Offline

Posts: 1144



View Profile WWW
Re: integrated search
« Reply #4 on: August 15, 2005, 11:28:20 AM »

d3vlabs,

Nice job, it worked.

It just return to many result, like 1000+ for me. It still needs to implement result paging.
Logged
Milos
Joomla Newbie
*

Karma: +1/-0
Offline Offline

Posts: 6


View Profile
Re: integrated search
« Reply #5 on: March 01, 2006, 02:29:19 PM »

Is there any possibility to make this bot to work without bridge?

Logged
trade
Joomla Newbie
*

Karma: +1/-0
Offline Offline

Posts: 3


View Profile
Re: integrated search
« Reply #6 on: May 26, 2006, 02:34:27 AM »


  I can not find the code you said....What I added is below

 
Code:
<?php 
global $sc$context$settings;

if (!
defined('SMF')){
// Get the configuration. This will tell Mambo where SMF is, and some integration settings
$database->setQuery("
SELECT `variable`, `value1`
FROM #__smf_config
"
);
$variables $database->loadAssocList();

foreach (
$variables as $variable){
$variable_name $variable['variable'];
$
$variable_name $variable['value1'];
}
require (
$smf_path."/SSI.php");
}

$sc = &$context['session_id'];
$_SESSION['USER_AGENT'] = $_SERVER['HTTP_USER_AGENT'];

mysql_select_db($mosConfig_db);

echo 
'
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/script.js?beta4"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "'
$settings['theme_url'], '";
var smf_images_url = "'
$settings['images_url'], '";
var smf_scripturl = "'
$scripturl'";
var smf_session_id = "'
$context['session_id'], '";
// ]]></script>'
;

echo 
'
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/style.css?rc1" />
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/print.css?beta4" media="print" />
<link rel="help" href="'
$scripturl'?action=help" target="_blank" />
<link rel="search" href="' 
$scripturl '?action=search" />
<link rel="contents" href="'
$scripturl'" />';
?>





 So I don't know where to change. If possilbe, could you tell me ?
 I think the version of bridge is different. Mine is 1.1.4

 Thanks !
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  



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
Search Contact About Advertise Blogs Topsites Submit News Register Login