Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Goosemoose on January 26, 2006, 08:41:07 PM

Title: Joomla Mambo Tag Cleanup
Post by: Goosemoose on January 26, 2006, 08:41:07 PM
Link to Mod (http://mods.simplemachines.org/index.php?mod=265)

Many Joomla/Mambo bridged sites have 2 or even 3 copies of keywords and html tags.

This mod inserts a switch into the Default,Classic & Babylon templates that prevents duplicate tags from appearing when the forum is being viewed with Joomla or Mambo.

Specifically it prevents meta tags duplicated in SMF and Joomla so only one copy will appear, it prevents duplicate <head> </head> , <body> </body> , and <html> </html> as well as duplicate javascript calls.

The mod also make sure the title is properly displayed on the top of the browser for search engines to find and it includes the code for the javascript functions used by the templates.
Title: Re: Joomla Mambo Tag Cleanup
Post by: Goosemoose on January 27, 2006, 01:06:33 PM
9 Downloads, no comments. Is it working okay for you guys?
Title: Re: Joomla Mambo Tag Cleanup
Post by: Aravot on January 27, 2006, 03:42:14 PM
Haven't installed yet, next week.
Title: Re: Joomla Mambo Tag Cleanup
Post by: iqapps on January 28, 2006, 03:06:17 AM
Quote from: Goosemoose on January 26, 2006, 08:41:07 PM
Link to Mod (http://mods.simplemachines.org/index.php?mod=265)
This mod inserts a switch into the Default,Classic & Babylon templates that prevents duplicate tags from appearing when the forum is being viewed with Joomla or Mambo.

Hi

Installed Joomla 1.0.7 with Bridge Mambo, Joomla SMF 1[1][1].1.2 and I use 7dana_smf_1.1_RC2 themes. Does this mode work with this theme.

Regards
IQAPPS
Title: Re: Joomla Mambo Tag Cleanup
Post by: vibez on January 28, 2006, 05:19:07 AM
very interesting. are there any advantages compared to this method?

http://www.technoadvice.com/advanced/developer/modify_an_smf_theme_for_joomla_and_mambo.html

I'm not running an default themes. Can I still use this mod?
Title: Re: Joomla Mambo Tag Cleanup
Post by: Goosemoose on January 28, 2006, 05:40:15 PM
Quote from: vibez on January 28, 2006, 05:19:07 AM
very interesting. are there any advantages compared to this method?

http://www.technoadvice.com/advanced/developer/modify_an_smf_theme_for_joomla_and_mambo.html

I'm not running an default themes. Can I still use this mod?

The advantage is that it takes care of most of that stuff for you. Everytime you upgrade your forum you just apply the mod rather than doing it all by hand.

For anyone not using the three default themes, open up the xml file and look at the changes made to the default template. Then find the code in the equivalent file in your theme. It should be almost identical. Then you can add the code to the xml and package the zip back up. There are only 3-4 things to do so it should only take a few minutes. Once you do this package it up and post it here so others can use it :)

Title: Re: Joomla Mambo Tag Cleanup
Post by: vibez on January 31, 2006, 04:41:08 AM
Ok I'm having a few problems. Firstly the component wouldn't install because it Could not find a Joomla! XML setup file in the package.

Secondly, the joomla index.php editing isn't very clear. Do we move all of this code to after the <head>>

<link href="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate(); ?>/css/template_css.css" rel="stylesheet" type="text/css" />


Where exactly does this code fit?

<?php
global $sc, $context, $settings, $modSettings;

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

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

mysql_select_db($mosConfig_db);
if(!empty(
$context['page_title'])){
   
$mainframe->setPageTitle($context['page_title']);
}
echo '
       
<script language="JavaScript" type="text/javascript" src="'
, $settings['default_theme_url'], '/script.js?rc2"></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>'
;

// The ?rc2 part of this link is just here to make sure browsers don't cache it wrongly.

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


/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
Standards compliance mode happens when you use xhtml... */
if ($context['browser']['needs_size_fix'])
echo '
<link rel="stylesheet" type="text/css" href="'
, $settings['default_theme_url'], '/fonts-compat.css" />';

// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="'
, $scripturl, '?action=help" target="_blank" />
<link rel="search" href="'
. $scripturl . '?action=search" />
<link rel="contents" href="'
, $scripturl, '" />';

// If RSS feeds are enabled, advertise the presence of one.
if (!empty($modSettings['xmlnews_enable']))
echo '
<link rel="alternate" type="application/rss+xml" title="'
, $context['forum_name'], ' - RSS" href="', $scripturl, '?type=rss;action=.xml" />';

// If we're viewing a topic, these should be the previous and next topics, respectively.
if (!empty($context['current_topic']))
echo '
<link rel="prev" href="'
, $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=prev" />
<link rel="next" href="'
, $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=next" />';

// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
echo '
<link rel="index" href="'
. $scripturl . '?board=' . $context['current_board'] . '.0" />';

// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
$options['collapse_header'] = !empty($_COOKIE['upshrink']);

// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '

<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header = '
, empty($options['collapse_header']) ? 'false' : 'true', ';
function shrinkHeader(mode)
{'
;

// Guests don't have theme options!!
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);'
;
else
echo '
smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "'
, $context['session_id'], '");';

echo '
document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");
document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";
document.getElementById("upshrinkHeader2").style.display = mode ? "none" : "";

current_header = mode;
}
// ]]></script>'
;

// the routine for the info center upshrink
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header_ic = '
, empty($options['collapse_header_ic']) ? 'false' : 'true', ';
function shrinkHeaderIC(mode)
{'
;

if ($context['user']['is_guest'])
echo '
document.cookie = "upshrinkIC=" + (mode ? 1 : 0);'
;
else
echo '
smf_setThemeOption("collapse_header_ic", mode ? 1 : 0, null, "'
, $context['session_id'], '");';

echo '
document.getElementById("upshrink_ic").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");
document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";
current_header_ic = mode;
}
// ]]></script>
'
;

?>


Do we remove any existing bridge code we already have in the index.php file?
Title: Re: Joomla Mambo Tag Cleanup
Post by: Goosemoose on January 31, 2006, 01:07:55 PM
Hi Vibez,
The mod should be installed through SMF's package manager, not through Joomla's. You are also not editing jooma's index.php, you are editing your template, through the admin panel of joomla. Yes, you would replace the existing bridge code with this updated code. Let me know if you have any more questions :)
Title: Re: Joomla Mambo Tag Cleanup
Post by: TwinsX2Dad on February 01, 2006, 01:45:55 AM
This may be a stupid question - if it is, feel free to whack me a few times. My question is......

Which bridge is this for?

I am running Orstio's bridge & Community Builder with Joomla 1.07 & SMF RC1.1
Title: Re: Joomla Mambo Tag Cleanup
Post by: Goosemoose on February 01, 2006, 01:50:34 PM
This is for Ortiso's , the only real bridge, and the one supported by SMF :)
Title: Re: Joomla Mambo Tag Cleanup
Post by: Goosemoose on February 01, 2006, 01:51:44 PM
Ok, this mod has been downloaded over 120 times now and so far Ortiso is the only one who has said it worked great. Can I assume everyone else has installed it fine? It should greatly reduce the number of xhtml errors too!
Title: Re: Joomla Mambo Tag Cleanup
Post by: Aravot on February 01, 2006, 01:54:32 PM
I installed it manally (not through package manager) and it works fine.
Title: Re: Joomla Mambo Tag Cleanup
Post by: TwinsX2Dad on February 01, 2006, 03:22:41 PM
Quote from: Goosemoose on February 01, 2006, 01:50:34 PM
This is for Ortiso's , the only real bridge, and the one supported by SMF :)

Thank you, GM. Now what if the default theme is not appearing for me to edit that bridge file? Can I do it manually?

Wait - time out. I reread what you said and I was on the wrong track. I'll try this again before asking more stupid questions.  :D
Title: Re: Joomla Mambo Tag Cleanup
Post by: TwinsX2Dad on February 01, 2006, 03:40:50 PM
Okay - now I have a problem.

I placed the css call directly after the <head> tag. I then took the above and pasted it in directly after that (all within Joomla). I then went to the SMF admin area and installed the package through that. This is where it got fun. I received a warning telling me this:

Quote!!Error in Package Installation

At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF.

Then, under 'Install Actions' the first three were Type: 'Execute Modification', Action: ./Themes/default/index.template.php and Description: Test failed.

This is killing me!  :D
Title: Re: Joomla Mambo Tag Cleanup
Post by: Goosemoose on February 01, 2006, 05:29:02 PM
You are getting closer :) What version of SMF are you running? I tested the mod on RC2. If you are getting errors it means that you files are different from the ones I tested on. Did you edit your default theme?
Title: Re: Joomla Mambo Tag Cleanup
Post by: TwinsX2Dad on February 01, 2006, 06:54:37 PM
Quote from: Goosemoose on February 01, 2006, 05:29:02 PM
You are getting closer :) What version of SMF are you running? I tested the mod on RC2. If you are getting errors it means that you files are different from the ones I tested on. Did you edit your default theme?


I am on SMF 1.1 RC2 with Joomla 1.0.7 (Stable), using the default theme for SMF.

Community Builder is also in there, but I've not yet taken the time to figure out what it does.  :D
Title: Re: Joomla Mambo Tag Cleanup
Post by: Goosemoose on February 01, 2006, 07:54:11 PM
Make sure that index.template.php has it's permissions set to 777 for at least the time while you update it. There should be no problem on a default theme with RC2.
Title: Re: Joomla Mambo Tag Cleanup
Post by: Praedator on February 02, 2006, 08:49:13 AM
Works great for me Goosemoose good work ;) was thinking the same thing because i thought it was annoying to have two times <head> etc.  ;D
Title: Re: Joomla Mambo Tag Cleanup
Post by: iqapps on February 03, 2006, 04:37:37 PM
Works OK. ;D

Installed it manally...
Little problem's with css but OK...
Using SMF 1.1 RC2 with Joomla 1.0.7 (Stable), using the 7dana theme for SMF.

Regards
IQAPPS
Title: Re: Joomla Mambo Tag Cleanup
Post by: Goosemoose on February 03, 2006, 08:28:32 PM
Quote from: iqapps on February 03, 2006, 04:37:37 PM
Works OK. ;D

Installed it manally...
Little problem's with css but OK...
Using SMF 1.1 RC2 with Joomla 1.0.7 (Stable), using the 7dana theme for SMF.

Regards
IQAPPS

The mod had a problem with CSS, or you still have a problem with CSS? The mod won't clean up conflicts with CSS, it focuses on conflicts with alot of the tags that make your site not xhtml valid.
Title: Re: Joomla Mambo Tag Cleanup
Post by: iqapps on February 04, 2006, 06:10:19 AM
Hi

QuoteThe mod had a problem with CSS, or you still have a problem with CSS? The mod won't clean up conflicts with CSS, it focuses on conflicts with alot of the tags that make your site not xhtml valid.

I know abouth this. Yes I still have problem with css. Working on that.
I fixed css intergtion between my Joolma css and SMF css before I install this mode but after I moved the Joomla template_css.css call and install your code I am back to begining.

P.S.

Your code can working on 7dana templates if you change third search and replace syntax
in default templates is
</body></html>';
in 7dana templates is
</body>
</html>';

Frist and second syntax is exact in both.

Regards
IQAPPS


Title: Re: Joomla Mambo Tag Cleanup
Post by: Goosemoose on February 04, 2006, 03:06:10 PM
you can move the call to the templates css is the joomla templaye file to above or below the code you added. that will change which css file takes precedence
Title: Re: Joomla Mambo Tag Cleanup
Post by: iqapps on February 08, 2006, 02:09:14 PM
Hi
I have error on my forum page in wrapped mode this error dont appear in "standalone" mode.
Changed this pice of code and error dont appears any more.
Error
QuoteLine:28 char:4 Object required
when I click to hide/show info on topmeny.
orginal code

// the routine for the info center upshrink
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header_ic = ', empty($options['collapse_header_ic']) ? 'false' : 'true', ';
function shrinkHeaderIC(mode)
{';

if ($context['user']['is_guest'])
echo '
document.cookie = "upshrinkIC=" + (mode ? 1 : 0);';
else
echo '
smf_setThemeOption("collapse_header_ic", mode ? 1 : 0, null, "', $context['session_id'], '");';

echo '
document.getElementById("upshrink_ic").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");
document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";
current_header_ic = mode;
}
// ]]></script>
';



to
changed code I deleted "IC" entriers.

// the routine for the info center upshrink
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header = ', empty($options['collapse_header']) ? 'false' : 'true', ';
function shrinkHeader(mode)
{';

if ($context['user']['is_guest'])
echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);';
else
echo '
smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "', $context['session_id'], '");';

echo '
document.getElementById("upshrink").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");
document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";
current_header = mode;
}
// ]]></script>
';



Comments please....!?

Regards
IQAPPS
Title: Re: Joomla Mambo Tag Cleanup
Post by: Goosemoose on February 08, 2006, 06:55:10 PM
As far as I can tell, this has nothing to do with this mod. The only thing I can think of is that your theme changed the upshrink code from the default. If that's the case then you would need to reflect that change in the Joomla template.
Title: Re: Joomla Mambo Tag Cleanup
Post by: iqapps on February 09, 2006, 09:31:03 AM
Hi

Tank you for comments.

Regards
IQAPPS
Title: Re: Joomla Mambo Tag Cleanup
Post by: Benson on March 23, 2006, 08:58:04 AM
I tried to make the changes to the SAFblue-Theme, using SMF1.1rc2:

Parse error: parse error, unexpected $ in /var/www/www.dachboden-wg.de/content/portal/smf/Themes/safblue/index.template.php on line 418

Double-Checked it for errors, made the changes again but still same error...
Title: Re: Joomla Mambo Tag Cleanup
Post by: Goosemoose on March 23, 2006, 08:18:33 PM
Can you post the code that is around line 418? Maybe a few lines above it and below it? Thanks
Title: Re: Joomla Mambo Tag Cleanup
Post by: Benson on March 24, 2006, 09:51:19 AM
Line 418 is at the bottom of the file index.template.php...

function template_button_strip($button_strip, $direction = 'top')
{
global $settings, $buttons, $context, $txt, $scripturl;

if (empty($button_strip))
return '';

// Create the buttons...
foreach ($button_strip as $key => $value)
{
if (isset($value['test']) && empty($context[$value['test']]))
{
unset($button_strip[$key]);
continue;
}
elseif (!isset($buttons[$key]))
$buttons[$key] = '<a href="' . $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . ($value['lang'] ? $context['user']['language'] . '/' : '') . $value['image'] . '" alt="' . $txt[$value['text']] . '" border="0" />' : $txt[$value['text']]) . '</a>';

$button_strip[$key] = $buttons[$key];
}

echo '
<td>', implode($context['menu_separator'], $button_strip) , '</td>';
}
?>
Title: Re: Joomla Mambo Tag Cleanup
Post by: HoTmetal on March 26, 2006, 12:56:10 PM
Ok, now that a few peeps have used this mod, I'm curious how this has helped you with the search engines...

Can  you guys/gals post your results? thanks again~ great mod Goosemoose
Title: Re: Joomla Mambo Tag Cleanup
Post by: Goosemoose on March 26, 2006, 03:55:14 PM
Benson,
   The error must be somewhere else then. It sounds like the theme you are using has quite a few differences. You'll have to compare it to the default theme and find the differences.

rickC,
  The biggest difference for me is that all my search engine results now have the page name included, rather than all showing the default Joomla name.
Title: Re: Joomla Mambo Tag Cleanup
Post by: HoTmetal on March 26, 2006, 04:25:50 PM
Quote from: Goosemoose on March 26, 2006, 03:55:14 PM
Benson,
   The error must be somewhere else then. It sounds like the theme you are using has quite a few differences. You'll have to compare it to the default theme and find the differences.

rickC,
  The biggest difference for me is that all my search engine results now have the page name included, rather than all showing the default Joomla name.

Yeah, I should try this. My page ranks with google has gone down hill since my joomla add. (From 4 to a big fat zero )

Title: Re: Joomla Mambo Tag Cleanup
Post by: Goosemoose on March 27, 2006, 09:36:02 PM
I went from a 4 to a 0 after chaning to SEF urls. It's taken 2 months to get a few of my pages back to 4's, but most of them are still 0's. I've totally dropped off the rankings in some of the keywords I was number 1 or 2 in :(
Title: Re: Joomla Mambo Tag Cleanup
Post by: HoTmetal on March 27, 2006, 11:21:28 PM
Quote from: Goosemoose on March 27, 2006, 09:36:02 PM
I went from a 4 to a 0 after chaning to SEF urls. It's taken 2 months to get a few of my pages back to 4's, but most of them are still 0's. I've totally dropped off the rankings in some of the keywords I was number 1 or 2 in :(

Ok so I'm not the only one... Yeah I fell off in ALL of my key words.. Ah the price to pay for a good CMS... :D
Title: Re: Joomla Mambo Tag Cleanup
Post by: Benson on March 28, 2006, 04:21:55 AM
Ok i have managed to modify the template manually - i did it the wrong way, interpreted <search before> that i have to add the code in front of the one you have searched for...

Now it seems to work, but the browser still doesn't display the correct titles - no mather if i use the manually modified template or the standart template. I have added the code to the joomla template and deleted my browsers cache but with no difference...
Title: Re: Joomla Mambo Tag Cleanup
Post by: rjprince on April 07, 2006, 04:54:14 PM
I was looking to install this with the new bridge (1.13) on Joomla 1.08. The new bridge doesn't require changes to the template file; it uses a system mambot instead.

Has this mod been tested under that scenario? I'm worried about having the code in their twice.
Title: Re: Joomla Mambo Tag Cleanup
Post by: Kindred on April 07, 2006, 05:02:55 PM
RJ...   this mod does not change your joomla template file.

This mod REMOVES the <html><head></head><body></body></html> tags and the appropriate code from your SMF Theme (index.tmeplate.php) for default, babylon and classic themes.

This code is not needed while your system is wrapped, because it is handled in the mambot...
Title: Re: Joomla Mambo Tag Cleanup
Post by: rjprince on April 07, 2006, 07:46:51 PM
OK, I just want to make sure I understand what your saying. The mod page says this, which I interpreted as requiring changes to the template file:

QuoteIMPORTANT. Open up your Joomla template, move the Joomla template_css.css call to immediately
after the <head> and place the following after template_css call which will replace the current bridge code.
     
Do this before installing this mod. Make sure to backup your template first.

lots of code

So are you saying that in Joomla 1.08 using bridge 1.13, I don't need to change the template code in any way?

Sorry for the confusion.
Title: Re: Joomla Mambo Tag Cleanup
Post by: Kindred on April 07, 2006, 08:24:28 PM
that is correct. On Joomla, with bridge v1.1.3, you do not need to change the joomla template code in any way.
Title: Re: Joomla Mambo Tag Cleanup
Post by: rjprince on April 07, 2006, 08:28:00 PM
Thank you.

May I suggest someone update the mod page, then (assuming I didn't miss an update already there, in which case I'll be horribly embarassed. :))
Title: Re: Joomla Mambo Tag Cleanup
Post by: rjprince on April 07, 2006, 09:55:35 PM
Thanks for the help - it worked perfectly. And great mod, by the way.

Quotethe browser still doesn't display the correct titles - no mather if i use the manually modified template or the standart template.

I had to make the changes by hand because I'm using a different template. While I was in there, I added this code just after the } at the end of the second set of inserted code (the closing brace for the first if statement):

else {
global $mainframe;
$mainframe->setPageTitle($context['page_title']);
}


This makes the title work correctly by using Joomla's title-setting function. Hope this helps.
Title: Re: Joomla Mambo Tag Cleanup
Post by: Goosemoose on April 08, 2006, 04:01:49 PM
Quote from: rjprince on April 07, 2006, 08:28:00 PM
Thank you.

May I suggest someone update the mod page, then (assuming I didn't miss an update already there, in which case I'll be horribly embarassed. :))

Done :)
Title: Re: Joomla Mambo Tag Cleanup
Post by: perplexed on April 15, 2006, 09:59:50 AM
I am using smf 1.1 rc2, joomla 1.0.7 and bridge 3.20, I just got most things working so I dont want to do anymore upgrading for a while.

To use this bridge I made changes to my joomla files so they use the same css

I am using a copy of the smf default theme - just a dark version of default theme

I'm not sure I understand what to do with this mod in my existing set-up, but in the instructions it says adding the code isnt necessary for versions of the bridge 1.12 and over?  My version of bridge is 3.20 ???

Also I have already put code in my joomla file to make the bridge work, so does the code in your mod instructions replace this?

I'm also not sure what to do with my theme to make it work, sorry if this sounds dumb
Title: Re: Joomla Mambo Tag Cleanup
Post by: Kindred on April 15, 2006, 01:09:33 PM
perplexed...  adding the code is not needed for v1.1.3 and over.

1.1.2 still requires adding code into your joomla template.
1.1.2 (new numbering scheme with the official embrace of SMF) is the same as 3.20 (old numbering scheme when the bridge was an personal work by orstio)
Title: Re: Joomla Mambo Tag Cleanup
Post by: perplexed on April 15, 2006, 03:09:37 PM
I have just upgraded to the latest version of Orstio's bridge to make this easier but I'm afraid I still dont know what to do since I dont use the default template

I *do* use a copy of default in a different colour though

I opened the xml document (there were two in the zip, so I looked at the one with joomla tag in the name) and the first thing it says is that it installs an 'everywhere chat' program:


<?xml version="1.0" ?>
  <!DOCTYPE modification (View Source for full doctype...)>
- <!--  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This mod integrates the chat progam at http://www.everywherechat.com into SMF

ATTENTION: If you are trying to install this manually, you should try
the package manager.  If it will not work for you, please take a look
at the following for information on this format:
http://mods.simplemachines.org/docs/manual-install.php

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  -->
- <modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">
- <!--  This information needs to be the same as that in the package-info.xml.
  -->
  <id>Goosemoose:JoomlaMamboTagCleanup</id>


This confused me as I dont want to install a chat program

Also I cant tell what to change in my theme template so it would be a great help to me anyway, if someone could post exactly what to do for those not using the three themes you mention - in a non-technical way

thanks for your help and sorry for not understanding
Title: Re: Joomla Mambo Tag Cleanup
Post by: Goosemoose on April 15, 2006, 03:44:59 PM
Oops, thats what I get for starting off by copying my other mod for a template. Thats just the comment at the top of the page, it doesn't affect the mod. I'll have to fix that ;) This needs to be installed via the package manager in you admin section. It should work fine in your theme as color changes only come from CSS.
Title: Re: Joomla Mambo Tag Cleanup
Post by: perplexed on April 15, 2006, 05:23:41 PM
but my theme has a different index.template.php and images etc, so will that be ok?
Title: Re: Joomla Mambo Tag Cleanup
Post by: Goosemoose on April 16, 2006, 01:58:16 PM
It should. Try installing the mod and see if it shows any errors. The package manager will tell you if it finds any. If it finds any, don't click the final install button.
Title: Re: Joomla Mambo Tag Cleanup
Post by: perplexed on April 16, 2006, 02:10:37 PM
Thanks, I tried and it installed no problems :)

thanks again
Title: Re: Joomla Mambo Tag Cleanup
Post by: shirster on May 10, 2006, 09:48:31 AM
Hi Goosemoose,

First off, thanks for the mod ! :)

I'm running Orstio's bridge 1.1.4 for SMF 1.1 RC2 (default theme) and Joomla 1.0.8, I've installed the mod via the forum admin, there wasn't any error but I still get the duplicated tags in my wrapped forum, maybe I did something wrong?

Thanks in advance !
Title: Re: Joomla Mambo Tag Cleanup
Post by: Goosemoose on May 10, 2006, 08:44:33 PM
What site is it on? I'd have to take a look. Did you actually click the proceed button after it lists there are no errors?
Title: Re: Joomla Mambo Tag Cleanup
Post by: shirster on May 10, 2006, 09:04:07 PM
Hi Goosemoose,

Thanks for your reply, please check PM for the link :) Thanks in advance !

Edit: Yes I did proceed to install after it showed no errors.
Title: Re: Joomla Mambo Tag Cleanup
Post by: Goosemoose on May 12, 2006, 09:04:10 PM
Ok it looks like you've edited your default theme some. Basically the mod just comments out a bunch of stuff. Can you pm me an attachment of your index.template.php?
Title: Re: Joomla Mambo Tag Cleanup
Post by: pcjunkie on August 14, 2006, 11:41:17 AM
I managed to get it all working without the mod????

I just copied (into joomla) the first part of the php from the mods help include  up to the point where it states echo' <!doctype

From that point I copied everything from the forum template down to </head>

removed the <!doctype and left the rest in Joomla.

Everything is working / no errors// but I wouldn't try to open the theme standalone....it's a plain white page but it does have content..
Thanx for the effort guys...

8)


Title: Re: Joomla Mambo Tag Cleanup
Post by: meadwench on November 16, 2006, 05:40:29 PM
EEk! My main page is showing blank!!!!!! Orstio, Goosemoose, someone, HELP!

EDIT: Went and double-double checked my restores, and the files hadn't copied over correctly. Re-FTP'd backups of Portal Green 2, and all is well now. ::whew::

I noticed that I also had the double head tags, so figured I'd run this. I'm running Joomla 1.0.10, SMF 1.1RC3, using the 1.1RC3 247 Portal Green2 template on SMF.

Procedure:

1. Backed up Joomla template
2. Backed up SMF templates (all of them)
3. Downloaded Joomla/Mambo Tag Cleanup v 1.1 to my SMF and clicked 'Apply Mod'
4. Test showed all was ok, so I executed it.
5. My site came up, but there was a bunch of code showing at the top of my Joomla main page:
var current_header = ', empty($options['collapse_header']) ? 'false' : 'true', ';
function shrinkHeader(mode)
{';

// Guests don't have theme options!!
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);';
else
echo '
smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "', $context['session_id'], '");';

echo '
document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");
document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";
document.getElementById("upshrinkHeader2").style.display = mode ? "none" : "";

current_header = mode;
}
// ';

// the routine for the info center upshrink
echo '

var current_header_ic = ', empty($options['collapse_header_ic']) ? 'false' : 'true', ';
function shrinkHeaderIC(mode)
{';

if ($context['user']['is_guest'])
echo '
document.cookie = "upshrinkIC=" + (mode ? 1 : 0);';
else
echo '
smf_setThemeOption("collapse_header_ic", mode ? 1 : 0, null, "', $context['session_id'], '");';

echo '
document.getElementById("upshrink_ic").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");
document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";
current_header_ic = mode;
}
//
';

?>
]]>


6. Decided this was a problem, and backed out the package by replacing all SMF index.template.php files with previously backed-up files, and replacing Joomla template index.php with backed up index.php.

Now, my site main page is showing blank! http://www.gotmead.com
However, if you go to my forum install (which is wrapped) here: http://www.gotmead.com/index.php?option=com_smf&Itemid=3 , you'll see that it shows up fine, so I'm completely puzzled here. I can access my admin ok too. But, click from the SMF page to any other item, and you'll get the blank page. What the heck????????

I've cleared all caches on Joomla, removed sessions on Joomla, cleared my history and caches on my browsers, and still no front page. I *just* finished rebuilding the site when I got this same problem after upgrading to Bridge 1.1.6 and SMF 1.1RC3, *please* tell me there is a way to fix this without doing it all *again*........

::edit::
NOTE: Now that I've read this thread from the beginning (I downloaded the mod from another thread, and the mod code *doesn't* say that) I see that I *didn't* need to insert the code at the beginning of my Joomla template. However, even after removing that code, and the changes to my SMF template, the main page (and every other page except the page showing the wrapped forum) is blank.
Title: Re: Joomla Mambo Tag Cleanup
Post by: meadwench on November 16, 2006, 08:48:42 PM
Update: I re-applied the mod manually (again) to my SMF template, and all is well.

Nice mod, Goosemoose!
Title: Re: Joomla Mambo Tag Cleanup
Post by: Goosemoose on November 16, 2006, 08:55:35 PM
Lol, glad everything worked out for you. What thread did you find a link to the mod at that didn't give good instructions?
Title: Re: Joomla Mambo Tag Cleanup
Post by: meadwench on November 16, 2006, 09:03:34 PM
 ::) LOL, thanks. I had a panic situation there! I'd *just* finished re-installing the entire site, took me 5 days. Needless to say, now that its fixed and stable, I'm backing up as we speak!

I didn't see it in a thread, it was the instructions in the mod in the SMF modifications area, v1.1. I took them from the info that displayed after downloading the mod to my installation and telling it to install, so it was the mod instructions internal to the mod. I went and double-checked, and the link I had, and the link you have in this thread are the same. Wish I'd seen the instructions at the beginning of the thread before downloading the mod!!!!
Title: Re: Joomla Mambo Tag Cleanup
Post by: Chriss Cohn on November 22, 2006, 08:37:23 PM
Hi, what is about using this mod with 1.1RC3 and bridge 1.16?
1.Do i need to add that lot of code to my joomla template?
2.I have an error on installation via paket manager:

1.     Modifikation ausführen   ./Themes/default/index.template.php     Erfolgreich
2.     Modifikation ausführen   ./Themes/default/index.template.php     Fehler
3.     Modifikation ausführen   ./Themes/default/index.template.php     Erfolgreich
4.    Modifikation ausführen     ./Themes/babylon/index.template.php    Erfolgreich
5.    Modifikation ausführen     ./Themes/babylon/index.template.php    Erfolgreich
6.    Modifikation ausführen     ./Themes/babylon/index.template.php    Erfolgreich
7.    Modifikation ausführen     ./Themes/classic/index.template.php    Erfolgreich
8.    Modifikation ausführen     ./Themes/classic/index.template.php    Erfolgreich
9.    Modifikation ausführen     ./Themes/classic/index.template.php    Erfolgreich
Title: Re: Joomla Mambo Tag Cleanup
Post by: Goosemoose on November 23, 2006, 12:25:38 AM
Hi g-c,
I'm guessing that line failed since you have a mod installed. It is working fine with other people who are using 1.1RC3.
Title: Re: Joomla Mambo Tag Cleanup
Post by: Chriss Cohn on November 23, 2006, 07:12:03 AM
Yes, yesterday i tried the install anyway and i get an Error:
QuoteParse error: syntax error, unexpected $end in .../Themes/default/index.template.php on line 692

683:    if (empty($button_strip))
684:       return '<td> </td>';
685:
686:    echo '
687:       <td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '"> </td>
688:       <td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode('  |  ', $button_strip) , '</td>
689:       <td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '"> </td>';
690: }
691:

692: ?>

693:
694:

Fortunately i made a backup.....
Question: is there a way to install your mod manually? Or can i send you my index.template.php and you do it?

Edit: i just copied the original index.template.php to my Default Directory and the mod now works + i have no functinally restrictions with the other pre-installed mods.

Title: Re: Joomla Mambo Tag Cleanup
Post by: Goosemoose on November 24, 2006, 01:36:01 AM
So the problem must have been that one of the other mods had changed the index.template.php. I'm glad it works for you!
Title: Re: Joomla Mambo Tag Cleanup
Post by: Chriss Cohn on November 24, 2006, 06:16:58 AM
Yes the Problem was beacause of the Advertising-Mod which display Ads in the Forum. I just unistalled the AD-Mod, intalled your Mod and then just reinstall the Ad-mod again. Works perfect! very goog mod and very helpfuly for all people who are using Jommla/Mambo and the SMF bridged - because of the css issues.
Title: Re: Joomla Mambo Tag Cleanup
Post by: baladeva on December 05, 2006, 04:01:09 AM
i have make the mod just now - with joomla_1.011 and smf 1.1 and orstios_bridge 1.6
basicaly the mod is running but i miss the dynamic title, i also had to manualy but the css_call in the joomla template - that is no problem
what i must do for have the title back on my forum _?

if somone need a link:

wrapped: http://www.harekrischna.de/home/component/option,com_smf/Itemid,123
unwrapped: http://www.harekrischna.de/forum

Title: Re: Joomla Mambo Tag Cleanup
Post by: Goosemoose on December 05, 2006, 03:33:38 PM
Double check that you made all the changes. The dynamic titles work fine on my site.
Title: Re: Joomla Mambo Tag Cleanup
Post by: baladeva on December 05, 2006, 04:02:08 PM
wich changes ? i have run the mod - in the Paket-Manager, did not read about to make some changes,

also you are using  1.1 RC2 and i the final 1.1 , if you can help me to fix the problem, it would be very nice
Title: Re: Joomla Mambo Tag Cleanup
Post by: Goosemoose on December 05, 2006, 05:20:42 PM
Read the first post in this thread (also on the mod page)
Title: Re: Joomla Mambo Tag Cleanup
Post by: baladeva on December 06, 2006, 02:32:32 AM
i have read this more then 10 times,
but becuse i am in use of bridge 1.16 - i have understand, to not do this stuff:

iMPORTANT: THE FOLLOWING IS NOT NEEDED WITH BRIDGE VERSIONS AFTER 1.12. Open up your Joomla template, move the Joomla template_css.css call to immediately
after the <head> and place the following after template_css call which will replace the current bridge code.

please tell me - if i am wrong, and what to do now - if i have miss some thing

Title: Re: Joomla Mambo Tag Cleanup
Post by: Goosemoose on December 06, 2006, 08:24:03 PM
You're right, sorry. I'm still using a really old version of the mod. I'm planning on updating this weekend so I can compare whats going on with several of my mods.
Title: the preview function dont work
Post by: baladeva on December 07, 2006, 01:20:49 PM
thank you Goosemoose - that you concern yourself with this topic (my english  - i dont know ?)

i have just found another problem: the preview function also dont work anymore,

i think - i must go back, to before the mod, how can i do this best ?
do i have just to replace the index.template.php or is there some think more ?
Title: Re: Joomla Mambo Tag Cleanup
Post by: Goosemoose on December 07, 2006, 02:13:18 PM
You can uninstall the mod through the package manager. The preview function might have something  to do with the bridge, you should check out the joomla board and make sure.
Title: Re: Joomla Mambo Tag Cleanup
Post by: baladeva on December 10, 2006, 04:35:57 PM
ok - i have fix the  preview function, by this fix and the help of orstio
http://www.simplemachines.org/community/index.php?topic=115776.msg741636#msg741636,

and i have try out also this 2 haks for DYNAMIC PAGE TITLES:
http://www.simplemachines.org/community/index.php?topic=81152.msg541379#msg541379
but the do not work ....
Title: Re: Joomla Mambo Tag Cleanup
Post by: Goosemoose on December 11, 2006, 02:34:26 PM
Neither dynamic page title method worked for you?
Title: Re: Joomla Mambo Tag Cleanup
Post by: baladeva on December 11, 2006, 04:37:25 PM
yes - with hack 2 it works now, if i put:

<title><?php

 
if ($_REQUEST['id']) {
 
// load the content item name and category
   
$database->setQuery( "SELECT title, catid FROM #__content WHERE id=$id" );
   
$row = null;
   
$database->loadObject( $row );
 }

echo
$context['page_title'] ? $context['page_title'] : ($row->title ? $row->title : $mosConfig_site_name); ?></title>



above the:
<?php mosShowHead(); ?> 

then dynamic title are working,
but now i have 2 <title> tags in the source,

if i just remove the <?php mosShowHead(); ?> term, that brings the second <title>somthing</title>,
then i have other problems!

here is an example: (without delete: <?php mosShowHead(); ?>  )
http://www.harekrischna.de/home/component/option,com_smf/Itemid,123/board,5.0 (http://www.harekrischna.de/home/component/option,com_smf/Itemid,123/board,5.0)
Title: Re: Joomla Mambo Tag Cleanup
Post by: baladeva on December 20, 2006, 06:13:14 PM
so  i have manage to have only one tiltle_tag now, by this plan:
http://www.joomlaspan.com/component/option,com_smf/Itemid,162/topic,136.0 (http://www.joomlaspan.com/component/option,com_smf/Itemid,162/topic,136.0)

however, i still have an error message, that is: 'smf_charset' is undefined
therefore it causes a errors message, when a user logs on to the forum ...,

after I implemented the: Joomla Mambo Tag Cleanup - Mod - the cherset disappeared,
for now  i have put the  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />     by hand - in the joomla_forum template,

so smf cant find the $db_character_set = 'utf8';     that is defined in the Settings.php, so perhaps a path problem only, but i do not know how to fix it !

is there a solution ?
Title: is there a solution ?
Post by: baladeva on December 25, 2006, 05:30:56 PM
...:::  :( :::...   is there a solution ?
Title: Re: Joomla Mambo Tag Cleanup
Post by: baladeva on December 31, 2006, 08:01:21 AM

:D

if anyone has the same problem, just put this in the <head> of the joomla forum template

<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
                 var smf_charset = "UTF-8";
// ]]></script>


but i must say to the owner of the mod joomla tag cleaner that the mod is not in a good condition,
at present - the mod is not cleaning, but just removing things - also importent things!

i have work more as 3 weeks - to have my page back - to no errors, and received practically no assistance,
i think - if someone brings a child to this world - he should give also attention on it,
however - thank you to all anyway - an all the best things 4:
     ...::: 2007 :::...    ..... ::::: a lucky new year :::::.....  ......  :-))  ........     !!!!! ....... 2007 ........
Title: Re: Joomla Mambo Tag Cleanup
Post by: tracilynnb on January 03, 2007, 10:14:07 AM
Joomla 1.0.12
SMF 1.1.1 Wrapped
Oristo's 1.1.6 bridge

Joomla template works fine, forum css template does not work. There is no formatting from the css at all.
Title: Re: Joomla Mambo Tag Cleanup
Post by: Chriss Cohn on January 13, 2007, 10:16:52 AM
Hello baladeva, you speak german? Ok the im telling you this in german:
Ich weiss nicht ob du weisst, das nach dem du den Tagcleanup Mod ausgeführt hast, alle Stylesheet foramtierungen in die Template .css deines Joomla Templates eingefügt werden müssen, bzw doppelte natürlich gelöscht. Das heisst dann, dass Joomla und SMF die SELBEN Stylesheet formatierungen vewenden!
Ich frage mich ganz ehrlich wo dein Problem bei diesem Mod liegt? Installieren  - Stylesheeteinträge des Forums-Themes in das Joomla Template stylesheet hinzufügen - fertig! ganz einfach und ne sache von 30 minuten(inkl. doppelte stylesheet einträge finden, anpassen udn löschen)

gruss Christian
Title: Re: Joomla Mambo Tag Cleanup
Post by: baladeva on January 14, 2007, 02:07:05 PM
danke für deine hilfe, aber mein problem ist schon lange gelöst, css war dabei auch das kleinere problem,

please write english ! this is a english thread !
Title: Re: Joomla Mambo Tag Cleanup
Post by: Chriss Cohn on January 14, 2007, 02:30:50 PM
Quote from: baladeva on January 14, 2007, 02:07:05 PM
please write english ! this is a english thread !
Yes Sir!
gruss Christian der übrigens auch keine Teire isst.
Title: Re: Joomla Mambo Tag Cleanup
Post by: ictus on March 11, 2007, 06:01:49 AM
help....

I installed this mod, which works ok but I want to remove it as I've had some posting issues with my site, which where not their before.

Unfortunatly when i unistalled it it came up with errors, how do i get rid of it ie which files has it effected?
Title: Re: Joomla Mambo Tag Cleanup
Post by: Kindred on March 11, 2007, 09:31:24 AM
well, what files come up with errors when you try to uninstall it?

but more importantly, let's discuss these "posting issues" before you go about uninstalling, since nothing that this mod does should affect your users' posting...
Title: Re: Joomla Mambo Tag Cleanup
Post by: ictus on March 11, 2007, 11:20:39 AM
It started after I upgraded to the latest SMF, but it somehow got a bit garbled along the way with my headers not wrapping properly, I suspect if I get back to a clean forum i can install it again and it should work.

At the moment is is causing blank pages to appear for some posters, though I've had no issues, except for the graphic errors with fonts as it doesn't seem to be doing it's job of removing tags any more.
Title: Re: Joomla Mambo Tag Cleanup
Post by: Kindred on March 11, 2007, 07:46:07 PM
well, if you upgraded your smf install with a new copy, there's a good chance that you overwrite the index.template.php which was modified by the mod...

I suggest that you put a fresh copy of your theme in palce and then re-apply the mod.
I can not thing of anything that this mod does that would result in a blank page for users...
Title: Re: Joomla Mambo Tag Cleanup
Post by: kai920 on October 04, 2007, 03:57:22 AM
I used the guidelines from this mod to modify my index.template.php by adding conditionals around the head, body tags using

if (!defined('_VALID_MOS')){ etc etc }

But my AJAX inline editing and quick reply quoting still doesn't work. The green bar shows and just sits on top.  Can anyone take a look and see if my page has any errors?

http://www.kaitech.hk/option,com_smf/Itemid,71/topic,1755.0.html

PS. I previously followed this tip (http://www.simplemachines.org/community/index.php?topic) and used the CSS "Integreator", not sure if it's the culprit?
Title: Re: Joomla Mambo Tag Cleanup
Post by: Goosemoose on October 05, 2007, 09:10:12 PM
I'd remove the integrator and try again.
Title: Re: Joomla Mambo Tag Cleanup
Post by: kai920 on October 05, 2007, 10:13:37 PM
Quote from: Goosemoose on October 05, 2007, 09:10:12 PM
I'd remove the integrator and try again.

Hmm, okay - maybe it's best I start from scratch and try from a default, non-modified 1.1.4 theme?
Title: Re: Joomla Mambo Tag Cleanup
Post by: kai920 on October 07, 2007, 11:43:19 AM
Quote from: tracilynnb on January 03, 2007, 10:14:07 AM
Joomla 1.0.12
SMF 1.1.1 Wrapped
Oristo's 1.1.6 bridge

Joomla template works fine, forum css template does not work. There is no formatting from the css at all.

Do we need to do something to the CSS after installing this mod?

edit - nevermind, figured it out - turned on "Use SMF CSS in other pages" in SMF bridge settings.
Title: Re: Joomla Mambo Tag Cleanup
Post by: OmenX on June 09, 2008, 10:11:23 AM
For some reason this mod has a compatibility issue with nneonneo's Shoutbox. I was using the cleanup mod to resolve an issue I was having with quotes not working with quick reply enabled. It fixes the quick reply problem I had, but the shoutbox fails to load with the mod installed. Any ideas?