October 07, 2008, 19:26:40 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Add your links to our directory. Click here to add your links.
 
  Home   Forum   Help Search Directory Calendar Login Register    RSS 2.0 feedAtom feed


News
Add your links to our directory. Click here to add your links.
Pages: 1 [2]
  Print  
Author Topic:

Joomla installation Guide (AdvancedSef version)

 (Read 6361 times)
0 Members and 1 Guest are viewing this topic.
g-c
Full Member
***

Points: 1
Offline Offline

Posts: 239



WWW
« Reply #15 on: May 16, 2007, 13:18:09 »

To avoid google spiders your unwrapped Forum as the root, put the following code at the end of your index.php from SMF-root:
Code:
// Redirect users who try to access /forum directly
if (strpos($_SERVER['QUERY_STRING'], 'dlattach') === false && strpos($_SERVER['QUERY_STRING'], 'verificationcode') === false)
{
        if(!defined('_VALID_MOS')){ header("Location: http://www.it-info.org/forum/overview.html".$_SERVER['QUERY_STRING']);}}
http://www.it-info.org/forum/overview.html is the adress of your Forums-root (bridged and wrapped!!!)

To have dynamic Meta-tags like Description and Keywords in a bridged and wrapped Forum, put this in your smf.php (from Simplemachines.org-bridge 1.17):
Code:
$mainframe->addMetaTag('description',create_description());
$mainframe->addMetaTag('keywords',create_keywords());

Put it in the function
Code:
function mambo_smf_exit($with_output)"
direct, one line after
Code:
"$buffer = ob_get_contents();"!
:

Now you should have META-Tags like specified in SMF-Seo4SMF-Admin area.

Now lets have some dynamic page-titles for your bridged and wrapped Forum:
In your currently used Joomla-Template direct after <head> and in a line together with "mosShowHead()" put the follwing:
Code:
<?php if(!empty($context['page_title']))
     
$mainframe->setPageTitle($context['page_title']);
So for example, the whole line can look like this:
Code:
<?php if(!empty($context['page_title']))
     
$mainframe->setPageTitle($context['page_title']); mosShowHead(); ?>

For all Joomla-users I also STRONGLY suggest of using the SEF-PATCH for Joomla.
This provides some really good changes in META and page-title behavior of Joomla and works really good together with Sef-Advance or Open-Sef.
But please, with this SEF-patch DO NOT make any changes in "Meta-stuff" for your Menu-link which points to the bridge-component - this would override all SMF and of course all Seo4SMF METAs in a bridged and wrapped enviroment

Regards, Christian


« Last Edit: May 16, 2007, 13:36:00 by g-c » Logged


TheGodFather
Administrator
Hero Member
*****

Points: 202
Offline Offline

Posts: 2570



WWW
« Reply #16 on: May 16, 2007, 16:56:50 »

Thanks Christian !
Logged

ericblackwell
Newbie
*

Points: 0
Offline Offline

Posts: 1


« Reply #17 on: June 14, 2007, 07:00:38 »

Guys;

First of all thanks for SEF4SMF. Really a much needed mod! We are putting together a forum www.homeinvestorforum.com and when we install the mod, (edited the htaccess already). The following wierdness happens:

1) Breadcrum order is messed up, which shifts the forum to the right

2) SEF Advanced isn't working on the main menu (joomla) when browsing the forums...

Can anyone help us out with a quick look and some advice. We'd be grateful for any help...

Thanks

Eric Blackwell
Logged
TheGodFather
Administrator
Hero Member
*****

Points: 202
Offline Offline

Posts: 2570



WWW
« Reply #18 on: June 14, 2007, 17:19:16 »

Joomla support is in early stage and I can offer support fir it, but read the forum and is possible to find some solutions !

Regards
Logged

Menpower
Jr. Member
**

Points: 0
Offline Offline

Posts: 17


« Reply #19 on: July 27, 2007, 05:15:26 »

Hello
i'm using now joomla 1.0.13 sef advanced without community builder and smf 1.1.3

i am confused modification in the smf.php
but i can't understand what is the meaning "in function mambo_smf_exit" in
Quote
4. Modify smf.php (from com_smf). Search after
Code:
$buffer = ob_get_contents();

in function mambo_smf_exit and add after
Code:
$mainframe->addMetaTag('description',create_description());
$mainframe->addMetaTag('keywords',create_keywords());
$buffer = rewrite_comsmf2($buffer);

can you give me a detailed code example
sorry for my poor english

regards
Logged

with all my Respects
g-c
Full Member
***

Points: 1
Offline Offline

Posts: 239



WWW
« Reply #20 on: July 29, 2007, 19:15:01 »

No, why?
Its like i written it!
direct in next line after "$buffer = ob_get_contents();"
which is inside of the function "mambo_smf_exit".

Regards, Christian

Logged
Menpower
Jr. Member
**

Points: 0
Offline Offline

Posts: 17


« Reply #21 on: August 02, 2007, 05:09:29 »

After the
Code:
$buffer = ob_get_contents();
, the next line is
Code:
ob_end_clean();
. They are staying in the line 124 and line 125. But
Code:
function mambo_smf_exit($with_output)
staying in the 259. line. I don't get it where can i must place this code and how?

did you mean like this?
Code:
require($smf_path . '/index.php');
$buffer = ob_get_contents();
function mambo_smf_exit ($mainframe->addMetaTag('description',create_description());
$mainframe->addMetaTag('keywords',create_keywords());
$buffer = rewrite_comsmf2($buffer);)
ob_end_clean();
ob_start();

or like this?(259. line)
Code:
function mambo_smf_exit($with_output)
$mainframe->addMetaTag('description',create_description());
$mainframe->addMetaTag('keywords',create_keywords());
$buffer = rewrite_comsmf2($buffer);

{
global $wrapped, $mosConfig_db, $mosConfig_dbprefix, $database, $cur_template, $mainframe, $boardurl, $smf_css, $mosConfig_sef, $mosConfig_debug, $db_name;

$buffer = ob_get_contents();
ob_end_clean();

Update : Oh.. I figured out at last Smiley
my modification like this and it worked
Code:
function mambo_smf_exit($with_output)
{
global $wrapped, $mosConfig_db, $mosConfig_dbprefix, $database, $cur_template, $mainframe, $boardurl, $smf_css, $mosConfig_sef, $mosConfig_debug, $db_name;

$buffer = ob_get_contents();
$mainframe->addMetaTag('description',create_description());
$mainframe->addMetaTag('keywords',create_keywords());
$buffer = rewrite_comsmf2($buffer);
ob_end_clean();

I'll post a messages what is my site status and which is working wrong or which is working good
Thanks a lot
Regards
« Last Edit: August 02, 2007, 05:36:57 by Menpower » Logged

with all my Respects
Menpower
Jr. Member
**

Points: 0
Offline Offline

Posts: 17


« Reply #22 on: September 19, 2007, 09:27:42 »

My joomla+cb+smf working well without problem.
But i need to do some modification in smf_recent_topics.php because my site charset is non-utf8, my smf charset is utf8.
i am exactly trying to character replace with str_replace command and I actually trying to develop
Code:
function utf_win($q) {
    $search    = array('ı','ç','ÅŸ','ÄŸ','ü','ö','İ','Ç','Å?','Ä?','Ü','Ã','%C5%9E','%C3%96');
    $write    = array('ı','ç','ş','ğ','ü','ö','İ','Ç','Ş','Ğ','Ü','Ö','Ş','Ö');
    $end    = @str_replace($search,$write,$q);
    return($end);
}

with this code i can replace utf-8 chars with non-utf8 chars
my smf_recent_topics module looks like this on front page


did you see the corrupted chars? so I wanna replace these chars with right ones.
line starting with 'Eylül....' is date
line starting with 'Gönderen...' is poster
line starting with 'Çal??malar?m...' is topic

my smf_recent_topics.php module code ;
Quote
<?php
/** ensure this file is being included by a parent file */
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

// 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'];
   }
   
if (!defined('SMF'))
{   
   require_once($smf_path . '/SSI.php');   
}

global $context, $txt, $scripturl, $mosConfig_dbprefix, $mosConfig_db, $db_name;

mysql_select_db($mosConfig_db);
$sql = "SELECT id FROM ".$mosConfig_dbprefix."menu WHERE link='index.php?option=com_smf'";

$result = mysql_query ($sql);

$row = mysql_fetch_array($result);

$myurl = $_SERVER['PHP_SELF'] . "?option=com_smf&Itemid=" . $row[0]."&";

$scripturl = $myurl;

$smf_rt_moduleclass_sfx = $params->get( 'smf_rt_moduleclass_sfx' );
$smf_rt_display = $params->get( 'smf_rt_display' );
$smf_rt_showboard = $params->get( 'smf_rt_showboard' );
$smf_rt_numtopics = $params->get( 'smf_rt_numtopics' );
$smf_rt_showposter = $params->get( 'smf_rt_showposter' );
$smf_rt_postline = $params->get( 'smf_rt_postline' );
$smf_rt_showdate = $params->get( 'smf_rt_showdate' );
$smf_rt_sublength = $params->get( 'smf_rt_sublength' );
$smf_rt_exclude_boards = $params->get( 'smf_rt_skip_boards' );
if ($exclude=="") $exclude="0";

//$smf_recenttopic['include_boards'] = $params->get( 'smf_include_boards' );

// Recent topic list:   [board] Subject by Poster   Date
   global $settings, $scripturl, $db_prefix, $ID_MEMBER;
   global $user_info, $modSettings, $func;

   if ($smf_rt_exclude_boards === null && !empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0)
      $smf_rt_exclude_boards = array($modSettings['recycle_board']);
   else
      $smf_rt_exclude_boards = empty($smf_rt_exclude_boards) ? array() : explode(',', $smf_rt_exclude_boards);

   //The following code is used by permission of Simple Machines LLC.
   // Begin

   $stable_icons = array('xx', 'thumbup', 'thumbdown', 'exclamation', 'question', 'lamp', 'smiley', 'angry', 'cheesy', 'grin', 'sad', 'wink', 'moved', 'recycled', 'wireless');
   $icon_sources = array();
   foreach ($stable_icons as $icon)
      $icon_sources[$icon] = 'images_url';

   // Find all the posts in distinct topics.  Newer ones will have higher IDs.
   mysql_select_db($db_name);
   $request = db_query("
      SELECT
         m.posterTime, ms.subject, m.ID_TOPIC, m.ID_MEMBER, m.ID_MSG, b.ID_BOARD, b.name AS bName,
         IFNULL(mem.realName, m.posterName) AS posterName, " . ($user_info['is_guest'] ? '1 AS isRead, 0 AS new_from' : '
         IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, 0)) >= m.ID_MSG_MODIFIED AS isRead,
         IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, -1)) + 1 AS new_from') . ", LEFT(m.body, 384) AS body, m.smileysEnabled, m.icon
      FROM ({$db_prefix}messages AS m, {$db_prefix}topics AS t, {$db_prefix}boards AS b, {$db_prefix}messages AS ms)
         LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)" . (!$user_info['is_guest'] ? "
         LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = t.ID_TOPIC AND lt.ID_MEMBER = $ID_MEMBER)
         LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD = b.ID_BOARD AND lmr.ID_MEMBER = $ID_MEMBER)" : '') . "
      WHERE t.ID_LAST_MSG >= " . ($modSettings['maxMsgID'] - 35 * min($smf_rt_numtopics, 5)) . "
         AND t.ID_LAST_MSG = m.ID_MSG
         AND b.ID_BOARD = t.ID_BOARD" . (empty($smf_rt_exclude_boards) ? '' : "
         AND b.ID_BOARD NOT IN (" . implode(', ', $smf_rt_exclude_boards) . ")") . "
         AND $user_info[query_see_board]
         AND ms.ID_MSG = t.ID_FIRST_MSG
      ORDER BY t.ID_LAST_MSG DESC
      LIMIT $smf_rt_numtopics", __FILE__, __LINE__);
   $posts = array();
   while ($row = mysql_fetch_assoc($request))
   {
      $row['body'] = strip_tags(strtr(parse_bbc($row['body'], $row['smileysEnabled'], $row['ID_MSG']), array('<br />' => '&#10;')));
      if ($func['strlen']($row['body']) > 128)
         $row['body'] = $func['substr']($row['body'], 0, 128) . '...';

      // Censor the subject.
      censorText($row['subject']);
      if($modSettings['seo4smf_enable']=='on')
                {
                 $root='/forum/';
                 $seo4smf_thref=$root.str_replace(" ",$modSettings['seo4smf_split_char'],remove_signs($row['bName'])).'/'.str_replace(" ",$modSettings['seo4smf_split_char'],remove_signs($row['subject'])).'-t'.$row['ID_TOPIC'].'.0.html'.($row['numReplies'] == 0?'':';msg'.$row['ID_LAST_MSG']).';#new';
                 $seo4smf_bhref=$root.str_replace(" ",$modSettings['seo4smf_split_char'],remove_signs($row['bName'])).'-b'.$row['ID_BOARD'].'/';
                }
      censorText($row['body']);

      if (empty($modSettings['messageIconChecks_disable']) && !isset($icon_sources[$row['icon']]))
         $icon_sources[$row['icon']] = file_exists($settings['theme_dir'] . '/images/post/' . $row['icon'] . '.gif') ? 'images_url' : 'default_images_url';

      // Build the array.
      $posts[] = array(
         'board' => array(
            'id' => $row['ID_BOARD'],
            'name' => $row['bName'],
            'href'      => $modSettings['seo4smf_enable']!='on'?sefRelToAbs($str_jsmf_url . '?board=' . $row['ID_BOARD'] . '.0'):$seo4smf_bhref,
            'link' => '<a href="' . $scripturl . '?board=' . $row['ID_BOARD'] . '.0">' . $row['bName'] . '</a>'
         ),
         'topic' => $row['ID_TOPIC'],
         'poster' => array(
            'id' => $row['ID_MEMBER'],
            'name' => $row['posterName'],
            'href' => empty($row['ID_MEMBER']) ? '' : $scripturl . '&amp;action=profile;u=' . $row['ID_MEMBER'],
            'link' => empty($row['ID_MEMBER']) ? $row['posterName'] : '<a href="' . $scripturl . '&amp;action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['posterName'] . '</a>'
         ),
         'subject' => $row['subject'],
         'short_subject' => shorten_subject($row['subject'], 25),
         'preview' => $row['body'],
         'time' => timeformat($row['posterTime']),
         'timestamp' => forum_time(true, $row['posterTime']),
         'href'          => $modSettings['seo4smf_enable']!='on'?sefRelToAbs($str_jsmf_url . 'topic=' . $row['ID_TOPIC'] .($row['numReplies'] == 0 ? '.0' : '.msg' . $row['ID_LAST_MSG']) . '#new'):$seo4smf_thref,
         'link' => '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . '#new">' . $row['subject'] . '</a>',
         'new' => !empty($row['isRead']),
         'new_from' => $row['new_from'],
         'icon' => '<img src="' . $settings[$icon_sources[$row['icon']]] . '/post/' . $row['icon'] . '.gif" align="middle" alt="' . $row['icon'] . '" border="0" />',
      );
   }
   mysql_free_result($request);

   // Just return it.
   if (empty($posts))
      return $posts;

   // End

   switch ($smf_rt_display)
   {
      case 0:
     echo '<table border="0" class="', $smf_rt_moduleclass_sfx, '">';
     foreach ($posts as $post) {
        $post['subject'] = strlen(un_htmlspecialchars($post['subject'])) > ($sublength+3) ? htmlspecialchars(substr(un_htmlspecialchars($post['subject']), 0, $smf_rt_sublength) . '...') : $post['subject'];
        echo '<tr>';
        if ($smf_rt_showboard==1) echo '<td align="right" valign="top" nowrap="nowrap">[', $post['board']['link'], ']</td>';
        echo '<td valign="top"><a href="', $post['href'], '">', $post['subject'], '</a> ';
         if ($smf_rt_showposter==1) {
          if ($smf_rt_postline==1) echo '<br />';
          echo  $txt[525], ' ', $post['poster']['link'], ' ', $post['new'] ? ' ' : '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.msg' . $post['new_from'] . ';topicseen#new"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" alt="' . $txt[302] . '" border="0" /></a>', '</td>';
         }
        if ($smf_rt_showdate==1) echo '<td align="right" valign="top" nowrap="nowrap">', $post['time'], '</td>';
        echo'</tr>';
     }
     echo '</table>';
      break;
      
      case 1:
     echo '<table border="0" class="', $smf_rt_moduleclass_sfx, '">';
     foreach ($posts as $post) {
        if ($smf_rt_showboard==1) echo '<tr><td align="right" valign="top" nowrap="nowrap">[', $post['board']['link'], ']</td></tr>';
        echo '<tr><td valign="top"><a href="', $post['href'], '">', $post['subject'], '</a> ';
         if ($smf_rt_showposter==1) {
          if ($smf_rt_postline==1) echo '</td></tr><tr><td>';
          echo $txt[525], ' ', $post['poster']['link'], ' ', $post['new'] ? ' ' : '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.msg' . $post['new_from'] . ';topicseen#new"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" alt="' . $txt[302] . '" border="0" /></a>', '</td></tr>';
         }
        if ($smf_rt_showdate==1) echo '<tr><td align="right" nowrap="nowrap">', $post['time'], '</td></tr>';
     }
     echo '</table>';
     break;
     
     case 2:
     echo '<ul class="', $smf_rt_moduleclass_sfx, '">';
     foreach ($posts as $post) {
        if ($smf_rt_showboard==1) echo '<li>[', $post['board']['link'], ']';
        echo '<li><a href="', $post['href'], '">', $post['subject'], '</a> ';
         if ($smf_rt_showposter==1) {
           if ($smf_rt_postline==1) echo '<li> ';
           echo $txt[525], ' ', $post['poster']['link'], ' ', $post['new'] ? ' ' : '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.msg' . $post['new_from'] . ';topicseen#new"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" alt="' . $txt[302] . '" border="0" /></a>';
        }
        if ($smf_rt_showdate==1) echo '<li>', $post['time'];
     }
     echo '</ul>';
     break;
   }

mysql_select_db($mosConfig_db);
?>

how can successfully inject function utf_win in smf_recent_topics.php and get it working ?

Best regards, Servet
Logged

with all my Respects
Pages: 1 [2]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.4 | SMF © 2006, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks

TinyPortal v0.9.7 © Bloc
Valid XHTML 1.0! Valid CSS!