AkoBlue-Midland Combined Theme

Started by chadness, February 04, 2005, 11:48:40 AM

Previous topic - Next topic

chadness

#20
OK, here's an even better SMF theme - check this out.  It should work great for those who have people access their forums both wrapped an unwrapped.  If they access it unwrapped, it will have the logo on top and the login box to the left, and all of the CSS stuff (the extra is in the file style-unwrapped.css).  If it is accessed wrapped, it won't.  (Thanks to Kindred for that handy piece of code).

http://www.technoadvice.com/component/option,com_docman/task,doc_download/gid,2/Itemid,53/

Again, this needs to be added to you Mambo/Joomla template just before the </head> statement, instead of the normal code the bridge install instructs you to do:

<?php 
global $sc$context$settings;

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);

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'" />';
/* 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" />';
if ($context['user']['popup_messages'] && !empty($options['popup_messages']) && (!isset($_REQUEST['action']) || $_REQUEST['action'] != 'pm'))
{
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
if (confirm("' 
$txt['show_personal_messages'] . '"))
window.open("' 
$scripturl '?action=pm");
// ]]></script>'
;
}
?>



repete

Hey chadness, do you know if the AiM theme's working well in RC2?  As I contemplate converting to Joomla, upgrading from 1.0.5 and the old bridge, I want to make sure the theme is all good.  Great job on your efforts!

chadness

I was looking at this post about theme changes in RC2, and it looks like it should work, but I haven't tried it yet.  I'll update it to full RC2 compatibility soon.

guilliam

hi chad,.. guilliam of joomla here. will give the theme of yours a spin. thanks for sharing!


- g
----
SMF ported on Joomla:
http://www.jcip-zugbuana.org

chadness

Hi, Guilliam, good to see you!  FYI, I'll probably be posting the RC2 version in the next few days.

chadness


deejayh

#26
Hi Chadness,

I have just updated forum to SMF 1.1 RC2  with the Bridge version 1.1.4, though still using Mambo 4.5.2.(  :( )

Just downloaded the Custom SMF 1.1RC2 theme for use in a site integrated with Joomla or Mambo (updated midland theme RC2 version). I cannot for the life of me get it to work!  ;)

There are no images or anything - just the writing! Tried re-uploading then deleting and re-installing.

Help,
Dave
Regards,
Dave
Family History UK  - http://www.familyhistory.uk.com

chadness

That's odd.  Go in to your SMF config, in to the Current Theme settings, and check to make sure "This theme's images URL:" is set correctly.

This is the one you downloaded?
http://www.technoadvice.com/component/remository/Download/SMF/Themes/AiM-Custom-SMF-theme-for-SMF-1.1-RC2/

deejayh

Hi Chadness,
I have checked, deleted and re-installed again.

On checking the source (from Firefox) there is no head detail - nothing above the following:
Quote


<table width="100%" align="center" cellpadding="0" cellspacing="0">
   <tr>
   <td width="100%" valign="top" style="padding-left: 10px;">
   <div style="margin-top: 10px; padding-top: 0px; padding-left: 0px; padding-right: 0px; background-color: #ffffff; margin-left: 0px; margin-right: 0px; border-left: solid 0px black; border-top: solid 0px black; border-right: solid 0px black; margin-bottom: 0px; border-bottom: solid 0px black;">
   <center>
   <table cellspacing="0" cellpadding="0" border="0" width="98%">
        <tr>
            <td align="center">

   <div align="center">
   <center>
   <table border="0" cellpadding="0" cellspacing="0" width="475">
      <tr>
         <td>
         <div align="center">
         <center>
         <table border="0" cellpadding="0" cellspacing="0" width="475">
            <tr>

            <td><a href="http://www.familyhistory.uk.com/component/option,com_smf/Itemid,119/," onmouseover="titlebar.src='http://www.familyhistory.uk.com/forum/Themes/aim_1-1-rc2/images/english/titlebar_admin_home.gif'" onmouseout="titlebar.src='http://www.familyhistory.uk.com/forum/Themes/aim_1-1-rc2/images/blank.gif'"><img border="0" src="http://www.familyhistory.uk.com/forum/Themes/aim_1-1-rc2/images/menu/home.gif" width="40" height="40" alt="home" /></a></td>
            <td><a href="http://www.familyhistory.uk.com/component/option,com_smf/Itemid,119/action,help" target="_blank" onmouseover="titlebar.src='http://www.familyhistory.uk.com/forum/Themes/aim_1-1-rc2/images/english/titlebar_admin_help.gif'" onmouseout="titlebar.src='http://www.familyhistory.uk.com/forum/Themes/aim_1-1-rc2/images/blank.gif'"><img border="0" src="http://www.familyhistory.uk.com/forum/Themes/aim_1-1-rc2/images/menu/help.gif" width="40" height="40" alt="help" /></a></td>
            <td><a href="http://www.familyhistory.uk.
code goes on .......................................

Therefore there is no script or css styles attached! ??? I am running the forum Un-Wrapped
I am wondering if your code to put in the mambo template is different from the one I have?
Cheers,
Dave
Regards,
Dave
Family History UK  - http://www.familyhistory.uk.com

chadness

If the forum you are running is unwrapped, the code in the Mambo template shouldn't matter.

One thing you could do, if you are only running it unwrapped, is remove the lines that take out the headers, etc.  All the lines that look like this:

    // check to see if the forum is running wrapped in mambo or standalone...
    if (empty($_REQUEST['option'])){

and this:

    }
    //end of check to see if forum is wrapped


There should be 5 each of those.

deejayh

#30
Sorry in the delay of responding.

I have done as you suggested - but still the same!

I have also just downloaded your "SMF-RC2-modified_default_theme.zip " - that has the same issues as well!! :(  - no headers!

Cheers,
Dave
Regards,
Dave
Family History UK  - http://www.familyhistory.uk.com

deejayh

Since changing to SMF 1.1 RC2 and adding the code to the mambo template, it has effected my mambo template styles - where as before it did not!!??
I wonder if it has anything to do with the code added to to the Mambo template?
<!--SMF Forum-->
<?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'" />';
?>

<!--SMF Forum End-->


As I am using rc2 does this code need to be changed:
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/style.css?rc1" />


Realy scratching my head ??? ???
Dave
Regards,
Dave
Family History UK  - http://www.familyhistory.uk.com

deejayh

Hi,

Commenting out the following link to the style sheet helped for some style issues:
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/style.css?rc1" />

BUT .... Still need to get the AiM-Custom-SMF-theme-for-SMF-1.1-RC2 running!

Regards,
Dave
Regards,
Dave
Family History UK  - http://www.familyhistory.uk.com

deejayh

Regards,
Dave
Family History UK  - http://www.familyhistory.uk.com

Robbie van Riet

I want to translate the images to dutch :).. but i cant remove the text in the original english images, do you have the empty image files for me or a howto for removing the text :)?
Dance with the stars

timmyo

First of all, thanks a million for this work  8)

I've got things working like this so far : http://www.timodonnell.co.uk/musiconline [nofollow]

What I'm hoping to be able to do is add back in the Private Messaging part of SMF that is not in the Midland theme (which I was using) and your RC2 theme (which I am now using - I couldn't find the RC1-ified Midland one anywhere . . .)

Anyway - what is involved in putting the PM function back ?

Thanks in advance, Tim

chadness

Are you just looking to have an icon across the top for Private Messages?  If so, you would go to the bottom of index.template.php to the template_menu() function, and duplicate one of these lines:

<td><a href="', $scripturl, '?action=search" onmouseover="titlebar.src=\'' . $settings['images_url'] . '/' . $context['user']['language'] . '/titlebar_guest_search.gif\'" onmouseout="titlebar.src=\'' . $settings['images_url'] . '/blank.gif\'"><img border="0" src="' . $settings['images_url'] . '/menu/search.gif" width="40" height="40" alt="search" /></a></td>';

Change the ?action=search to ?action=pm and then make new icon pictures for the gifs.

You need to do this in three spots - there's a guest section, a regular user section, and an admin section.

timmyo

Quote from: chadness on December 13, 2006, 10:28:24 AM
Are you just looking to have an icon across the top for Private Messages?  If so, you would go to the bottom of index.template.php to the template_menu() function, and duplicate one of these lines:

<td><a href="', $scripturl, '?action=search" onmouseover="titlebar.src=\'' . $settings['images_url'] . '/' . $context['user']['language'] . '/titlebar_guest_search.gif\'" onmouseout="titlebar.src=\'' . $settings['images_url'] . '/blank.gif\'"><img border="0" src="' . $settings['images_url'] . '/menu/search.gif" width="40" height="40" alt="search" /></a></td>';

Change the ?action=search to ?action=pm and then make new icon pictures for the gifs.

You need to do this in three spots - there's a guest section, a regular user section, and an admin section.

Great stuff - I shall give that a go,

thanks,

Tim

Advertisement: