V 
Search:  
  • Home
  • Help
  • Search
  • Login
  • Register
Welcome, Guest. Please login or register.
Did you miss your activation email?
March 10, 2010, 06:26:20 PM

Login with username, password and session length
collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
Did you miss your activation email?

* Who's Online
  • Dot Guests: 6
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* News from Joomla
  • post Joomla! 1.5.15 Released

  • The Joomla Project announces the immediate...
  • post Joomla! 1.5.14 Released

  • The Joomla Project announces the immediate...
  • post Joomla! 1.5.13 Security Release Now Available

  • The Joomla Project announces the immediate...

Welcome to Locutus web services forum!

Locutus Web Services > General Category > Joomla > JSMF bridge > JSMF FAQ
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: JSMF FAQ  (Read 1089 times)
locutus
Administrator
Hero Member
*****
Offline Offline

Posts: 88


The sky ain't the limit


WWW
JSMF FAQ
« on: August 15, 2008, 11:11:58 PM »

Q: Where can I download the latest JSMF component, modules and plugins?
A: You can find them listed together here: http://locutusweb.asw15.org/index.php/topic,10.new.html

Q: I have Joomla! 1.0.15 which version of JSMF do I need?
A: You need version JSMF 2.0.2.1 for the Joomla versions 1.0.13, 1.0.14 and 1.0.15. Also this bridge will only work with SMF version 1.1.x

Q: I have Joomla! 1.5.x which version of JSMF do I need?
A: JSMF is not compatible with Joomla 1.5.x. Development has stopped, so it won't be compatible in the future.

Q: I have SMF 2.0 (beta/RC) which version of JSMF do I need?
A: JSMF is not compatible with SMF 2.0 (beta/RC). Development has stopped, so it won't be compatible in the future.

Q: I have installed JSMF but it doesn't work.
A: First uninstall JSMF, next download the manual (for the download see above). Read the manual and make sure you understand every step. Then at last install JSMF step by step according to the manual. If you are still having problems, you are free to post in the forum.

Q: before I upgrade JSMF, I should back it up; how do I do that? (And howto restore)
A:

    * note your settings JSMF in the JSMF configuration panel
    * set Joomla off line in the configuration
    * set SMF off line in the SMF administration
    * BACK UP ALL YOUR FILES!
    * BACK UP YOUR DATABASE!
    * In the installation tab of JSMF unpatch Joomla
    * In the installation tab of JSMF unpatch SMF
    * Uninstall JSMF
    * Upgrade Joomla 1.0.x according to the instructions
    * Upgrade SMF 1.1.x according to the instructions
    * Verify Joomla and SMF are working fine stand alone
    * Install the latest JSMF
    * In the installation tab of JSMF patch Joomla
    * In the installation tab of JSMF patch SMF
    * Configure JSMF like it was
    * set Joomla on line in the configuration
    * set SMF on line in the SMF administration

(BTW did I mention to backup?   Tongue)

Q: I have upgraded Joomla! (to 1.0.15), now I can't log in anymore.
A: You need to upgrade to JSMF 2.0.2.1

Q: I can't see posts with more than one page or topics are not visible (blank page) for admins.
A: This problem is due to an error in PHP 5.2.5. First check your PHP version via: Administration > System > System info. If you have  PHP 5.2.5 then you have three options:

Option 1:
Lowering your PHP version by adding the next line to your .htaccess. (some hosts won't allow this)

Code:
AddHandler application/x-httpd-php51 .php

Option2:
Replace some code in smf.class.php in /components/com_smf.
Find this code:
Code:
$regex = array('/<!DOCTYPE.*<body>/smi', '/<\/body>/i', '/<\/html>/i');
$buffer = preg_replace($regex, array('', '', ''), $buffer);
unset($matches, $keywords, $css, $search, $replace, $headers, $regex);
and replace it with:

Code:
//Regex broken with PHP 5.2.5           
//$regex = array('/<!DOCTYPE.*<body>/smi', '/<\/body>/i', '/<\/html>/i');
//$buffer = preg_replace($regex, array('', '', ''), $buffer);
//unset($matches, $keywords, $css, $search, $replace, $headers, $regex);
$needle = '<body>';
$buffer = strstr($buffer, $needle);
$buffer = substr($buffer, strlen($needle));
$regex = array('/<\/body>/i', '/<\/html>/i');
$buffer = preg_replace($regex, array('', ''), $buffer);
unset($matches, $keywords, $css, $search, $replace, $headers, $regex, $needle);
Option3:
Patch some code in smf.class.php in /components/com_smf. At the end of the file add this function:

Code:
function t_get_content($src_for1, $src_for2, $src_in){
  $ret='';
  $pos1=stripos($src_in, $src_for1);
  $pos2=stripos($src_in, $src_for2);


  if ($pos1 and $pos2 and ($pos1 <= $pos2)){
    $pos1 = $pos1 + strlen($src_for1);
    $ret = substr($src_in, $pos1, $pos2-$pos1);
  }
  return $ret;
}

Comment and add this:

Code:
// -- start comment--
//                $regex = '/<head>.*<\/head>/smi';
//                preg_match($regex, $buffer, $matches);

//                 if (!empty($matches))
//                  {
//                   $headers = $matches[0];
//                  }
// -- end comment--

                $headers = t_get_content('<head>', '</head>', $buffer);


and a few lines bellow:

Code:
// -- start comment--
//            $regex = array('/<!DOCTYPE.*<body>/smi', '/<\/body>/i', '/<\/html>/i');

//            $buffer = preg_replace($regex, array('', '', ''), $buffer);
// -- end comment--

             $buffer = t_get_content('<body>','</body>',$buffer);


IMPORTANT: Caching must be disabled in JSMF bridge. If you have CSS problems after this fix ; please see next Q&A.

Q: I am having serious CSS trouble, what to do?
A: add this to SMF in the head section of index_template.php
Code:

Code:
if (!empty($_REQUEST['option'])){

echo '<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/smfstyle.css?fin11" />

<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/print.css?fin11" media="print" />';

} else { echo '

<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/style.css?fin11" />'; }


What that does is checks to see if SMF is wrapped or not. If it is it uses style.css if not it uses smfstyle.css
So what you need to do is create 2 css sheets.

One that has everything (smfstyle.css) and one that has been stripped of all a. elements. and main link styles (not the menu) and some more depending on Joomla.

Q: After SMF registration SMF login fails
A: This is due to the fact that because of the way SMF handles variables we can't synchronize immediately.  You must first login through a Joomla based login(JSMF login, CB login(with plugin), or default Joomla login) or login twice.  Why twice?  After the first failure we are able to trigger a synchronization event so the second login should succeed.

Q: Each time I start a post (PM, Topic, Message....) in the top of the page above the header appears "\n\t\t\n\t "
A: For the "\n\t\t\n\t " problem is a special patch created. You can download it here: http://h1.ripway.com/joomlahacks/com_smf_2_0_2_1a.zip

Q: I want to adapt my SMF theme to my existing Joomla template, how do I do that?
A: Over here is a very nice tutorial: http://www.simplemachines.org/community/index.php?topic=145838.0
« Last Edit: August 20, 2008, 11:32:43 PM by locutus » Logged

Conquer the skies with the Gelderse Soaring Club
Pages: [1] Go Up Print
« previous next »
Jump to:  


* Recent Topics
topic how to handle JSMF bridged forum when migrating to Joomla 1.5 ?
[JSMF bridge]
locutus
March 05, 2010, 06:00:27 PM
topic Blank page issue after transfer to new host
[JSMF bridge]
baijianpeng
March 02, 2010, 10:15:32 PM
topic How to stop those spambots on my JSMF forum?
[JSMF bridge]
locutus
February 20, 2010, 05:35:14 PM
topic RSGallery2
[Joomla]
locutus
February 20, 2010, 05:32:17 PM
topic Tip: Hardening your Joomla site by .htaccess Version 2.4 and 2.6
[Joomla]
Neeraj123
February 11, 2010, 02:46:40 PM

* News from SMF
  • post SMF 2.0 Release Candidate 3 is out!
  • Hello all,

    We are pleased to announce ...
  • post Recent Travails of SMF Team and Friends
  • We are pleased to announce that negotiations have...
  • post Simple Machines Restructuring
  • Dear Community Members,

    Over the last ...

* Top Poster
locutus locutus
88 Posts
baijianpeng baijianpeng
23 Posts
GJSchaller GJSchaller
6 Posts
Neeraj123
5 Posts
katamar
4 Posts

Powered by SMF 1.1.11 | SMF © 2006-2008, Simple Machines LLC
SimplePortal 2.3.1 © 2008-2009, SimplePortal

Scribbles2 design by Bloc | XHTML | CSS
Page created in 2.372 seconds with 24 queries.
Loading...