Home arrow Forum <solved> Hack is messing with template assigning
  Welcome, Guest. Please login or register.
Did you miss your activation email?
November 22, 2008, 06:07:41 PM
Home New Posts Search Calendar


Login with username, password and session length
+  Joomla Forum
|-+  Joomla Hacks
| |-+  Joomla-SMF Forum Support
| | |-+  Joomla-SMF 2.0.x (Moderators: -Wolverine, kai920)
| | | |-+  <solved> Hack is messing with template assigning
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: <solved> Hack is messing with template assigning  (Read 1688 times)
Andrew
Joomla Newbie
*

Karma: +0/-4
Offline Offline

Posts: 7


View Profile
<solved> Hack is messing with template assigning
« on: February 08, 2007, 07:58:34 PM »

I have a site with two templates.

The default template has 3 colunms and the assigned template has 1

I've assigned the single colunm template to the menu item which links to the SMF and that works ok .... BUT click on any link in the SMF and whammo the default 3 colunm template is what is used.

I don't believe this is a SMF issue as I've used this concept with SMF where I didn't use a bridge. Using this bridge/hack makes it happen.

What am I missing or what haven't I done which I should have?

============================
Version Information:
Your Joomla version is: 1.0.12
Your SMF version is: 1.1.1
Your Joomla-SMF version: 2.0.2
Single database
Single database
« Last Edit: February 10, 2007, 03:41:38 PM by Andrew » Logged
-Wolverine
Moderator
Joomla Guru
*****

Karma: +376/-34
Offline Offline

Posts: 3393


Lead Developer


View Profile WWW
Re: Hack is messing with template assigning
« Reply #1 on: February 08, 2007, 08:16:22 PM »

depending on when mosShowHead() is called in your joomla template, SMF's CSS may be loaded after your joomla template and conflicting CSS definitions get overwritten.
Logged

Need help?  Check Here First!
Get the JSMF User Guide
SEARCH this forum.
Andrew
Joomla Newbie
*

Karma: +0/-4
Offline Offline

Posts: 7


View Profile
Re: Hack is messing with template assigning
« Reply #2 on: February 08, 2007, 08:40:21 PM »

Quote
depending on when mosShowHead() is called in your joomla template, SMF's CSS may be loaded after your joomla template and conflicting CSS definitions get overwritten.
Ok I can understand that ...

• where should this go or is there a thread about this here?
• conflicting css isn't the issue here I believe as the SMF template is workign ok, it's the wrapper which is causing the issue. The wrong template get's used when you click inside the SMF.

-- edit clarity --
Thanks
« Last Edit: February 08, 2007, 08:44:47 PM by Andrew » Logged
-Wolverine
Moderator
Joomla Guru
*****

Karma: +376/-34
Offline Offline

Posts: 3393


Lead Developer


View Profile WWW
Re: Hack is messing with template assigning
« Reply #3 on: February 08, 2007, 09:00:56 PM »

the wrong template?  Do you have the wrong template assigned to the forum link possibly?  I'm trying to understand here.
Logged

Need help?  Check Here First!
Get the JSMF User Guide
SEARCH this forum.
Andrew
Joomla Newbie
*

Karma: +0/-4
Offline Offline

Posts: 7


View Profile
Re: Hack is messing with template assigning
« Reply #4 on: February 09, 2007, 12:54:54 AM »

I'm not explaining this well eh?   Wink

Template A ... is the default 3 colunm template applies to everything except the forum

Template B ... is the single colunm template which is assigned to the SMF menu link.

When I click on the link to SMF Template B is used. Which is correct.
When I click on any link inside the SMF Tempalte A is used. Which is not correct.

Trying to work out why it's reverting to the default (Template A) and not what's assigned. It's never happened before hence my query as to whetehr this is a bridge issue or SMF issue


Logged
-Wolverine
Moderator
Joomla Guru
*****

Karma: +376/-34
Offline Offline

Posts: 3393


Lead Developer


View Profile WWW
Re: Hack is messing with template assigning
« Reply #5 on: February 09, 2007, 07:41:15 AM »

and to be clear, these are Joomla templates, right?  My guess is that the template engine isn't matching the url for whatever reason.  My general method of handling this scenario is doing it using a file I call isPage.php.  In this file I have methods like this:

Code:
function isHomePage()
{

    global $mosConfig_live_site;
    $req = mosGetParam($_SERVER, 'REQUEST_URI', '');

    if (substr_count($mosConfig_live_site, '/') > 2 ) {
$site = substr($mosConfig_live_site, strrpos($mosConfig_live_site, '/')).'/';
    } else {
$site = '/';
    }
    if (strcasecmp($site, $req) == 0 ||
        strcasecmp($site.'index.php', $req) == 0 ||
        strcasecmp($site.'component/option,com_frontpage/Itemid,1/', $req) == 0 ||
        strcasecmp($site.'index.php?option=com_frontpage&Itemid=1', $req) == 0) {
        return true;
    }
    return false;
}

This allows me to define a special subtemplate and still retain a single template for the site, with separate layouts.  Does this sound like what you might need?  I frequently use this to remove everything but the header and footer from a site that displays SMF.  That way it is wrapped without the side modules, and gets full screen for display. 
Logged

Need help?  Check Here First!
Get the JSMF User Guide
SEARCH this forum.
joomlanewbie
Joomla Master
***

Karma: +20/-5
Offline Offline

Posts: 145


View Profile
Re: Hack is messing with template assigning
« Reply #6 on: February 09, 2007, 08:32:14 AM »

there is a known issue with j.012 that affects how it generates content ids (which are menu items)
could this confuse the bridge?


Logged
-Wolverine
Moderator
Joomla Guru
*****

Karma: +376/-34
Offline Offline

Posts: 3393


Lead Developer


View Profile WWW
Re: Hack is messing with template assigning
« Reply #7 on: February 09, 2007, 04:43:14 PM »

its not the bridge that is failing here, as far as I can tell.  Joomla templates use the itemid to determine which template to display, but every bridge URL contains the Itemid.
Logged

Need help?  Check Here First!
Get the JSMF User Guide
SEARCH this forum.
Livebox
Guest
Re: Hack is messing with template assigning
« Reply #8 on: February 09, 2007, 05:13:26 PM »


• conflicting css isn't the issue here I believe as the SMF template is workign ok, it's the wrapper which is causing the issue. The wrong template get's used when you click inside the SMF.


When you use the wrapper Mode both Css files ar loaded. The isseu is that the Joomla! and SMF template are using the same Class ID's so you have to fix that. Search this board for an example (posted this severall times)

Great tool that can help you with this is the Webdeveloper Toolbar for Firefox. https://addons.mozilla.org/firefox/60/

Edit: also handy is to know how Css works. (specially when there are duplicate Class Id's) http://www.w3.org/Style/CSS/
« Last Edit: February 09, 2007, 05:16:43 PM by Livebox » Logged
Andrew
Joomla Newbie
*

Karma: +0/-4
Offline Offline

Posts: 7


View Profile
<solved> Re: Hack is messing with template assigning
« Reply #9 on: February 10, 2007, 03:41:13 PM »

I'm beginning to think it actually is an itemid issue, as the whole look and feel of the site is perfect. Sorry Livebox  Sad

Here's what I have ...

Menu link is  .... index.php?option=com_smf&Itemid=80
Links inside the SMF are all  ... index.php?option=com_smf&Itemid=78

There is no menu item with itemid 78 in any menu and none in the trash either.

----------- Solution ----------
I've left the post above so that others searching may see what's happened as what I'm about to say makes no sense otherwise.

When I first made a menu link to the forum it had Itemid=78 and was in the the wrong menu.
I removed that item id and trashed it.
I created a new menu item now Itemid=80

I've been away for a day and I've discovered that the problem was actually cookies.

Yes I've got cookies with Itemid=78 in them .... clean all the cookies and whammo it works!!

Doh!!  A trap so obvious when you think of it! <shaking head><red faced>

Thanks to all for your time
« Last Edit: February 10, 2007, 03:43:00 PM by Andrew » 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