News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Theme LongGreen/Red/Orange/Blue/Gray

Started by xenovanis, August 26, 2005, 08:49:03 PM

Previous topic - Next topic

phil_roy

Hi all,

Just about to migrate a site from Joomla/phpBB to SMF and the altered templates are just great.

Just wondered, the altered templates means I seem to have lost the links "Show unread posts since last visit." and "Show new replies to your posts." which I know I will use myself constantly. Is there any way to add them back in?...I'm fairly sure it's not something I've switched off, but happy to be corrected.

I think what I want to do is have those two links appear at the top of the board and have tracked down where I need to put the code...in the "BoardIndex.template.php" file and in the code (about line 12) where it says...
Quote<td valign="bottom">', theme_linktree(), '</td>
I want the links to be to the right of that....but what file has the code in that I need to put in there?

Phil
http://www.nzmac.com
NZMac.com - Supporting the New Zealand Mac community

Kindred

1- those links exist in the smf-joomla login module (mod_smf_login)
2- why would you add them into the linktree function???   just add them before or after the call to linktree.

something like this might work...
<td valign="bottom">', theme_linktree(), '</td><td align="right">SHOW LINKS HERE</td>
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

phil_roy

Thanks, that's exactly what I needed (I wasn't wanting to add them as a function). I've hacked the login module for it to be a horizontal login and dropped that code, so forgot that it included the necessary coding...I'll go back to the original module and nab the code.

Phil
http://www.nzmac.com
NZMac.com - Supporting the New Zealand Mac community

MadPax

Dang!

This thing is Killing me!

Noonz's problem is somewhere in the display.template.php I guess because that's where the Pages: [xx] appear.

But that's only true for when you're already reading the topic. If you are looking at the the boards' post listing the pages: part of the header is coded in another part of the script or even file and I can't find it Dang dang dang!

Already took care of the background problem though. It was indeed a css thing .catbg3 was being used from the default template. The long xxx templates' css must have this style defined as well.

Hope this helps

MadPax


MadPax

OK stay tuned I got this almost nailed down. It's got to do with messageindex.template.php.

MadPax

Done!

Here it is.

You must have a template specific message.template.php for your smf topics list to look ok. I've made the necessary alterations for the template to show ok but I do not have upload permissions here.

What shall I do to give other users the possibility to check this out?

Pax


mpetrie

MCleod5000 wrote:
QuoteDoes anyone has problems displaying this in Opera? In Opera 8.50 everything appears centered. In Firefox everything is shown just fine. Any ideas what I need to do?

The same thing happens with IE7, although IE6 is OK.

Any ideas on how to fix the display for Opera and IE7?

Cheers
Mike

Bogie

I am trying to add a link to the menu (home, search, logout, i.e.) for my shop.  I thought this was gonna be an easy task since I didn't need to add a button but everytime I make a change to the index.template I get a parse error.

Can anyone tell me what code I need to add to the template and where to add a link to the shop.  Thanks in advance.

http://www.congressionalsimulation.com

Bogie

I continued to research after posting this thread and although nothing really fit my theme that I found, with a little experimentation I found the correct way to do it.  This is for anyone using the LongBlue theme that has the same question I did.

Here's the modifications I made to index.template.php to add [shop] and [bank] links:

Quote// Show the menu up top.  Something like [home] [help] [profile] [logout]...
function template_menu()
{
        global $context, $settings, $options, $scripturl, $txt;

        // Show the [home] and [help] buttons.

        echo '

                                <a href="', $scripturl, '">',$txt[103],'</a>
                                <a href="', $scripturl, '?action=help" target="_blank">',$txt[119],'</a>';

        // How about the [search] button?
        if ($context['allow_search'])
                echo '
                                <a href="', $scripturl, '?action=search">',$txt[182],'</a>';

        // Is the user allowed to administrate at all? ([admin])
        if ($context['allow_admin'])
                echo '
                                <a href="', $scripturl, '?action=admin">',$txt[2],'</a>';

        // Edit Profile... [profile]
        if ($context['allow_edit_profile'])
                echo '
                                <a href="', $scripturl, '?action=profile">',$txt[467],'</a>';
                               
        // How about the [bank] button?
              echo '
                        <a href="http://www.congressionalsimulation.com/index.php?option=com_smf&Itemid=26&?action=shop;do=bank">', (Bank), '</a>';                       
                               
        // How about the [shop] button?
              echo '
                        <a href="http://www.congressionalsimulation.com/index.php?option=com_smf&Itemid=26&action=shop">', (Shop), '</a>'; 
         

        // The [calendar]!
        if ($context['allow_calendar'])
                echo '
                                <a href="', $scripturl, '?action=calendar">',$txt['calendar24'],'</a>';

        // If the user is a guest, show [login] and [register] buttons.
        if ($context['user']['is_guest'])
        {
                echo '
                                <a href="', $scripturl, '?action=register">',$txt[97],'</a>';
        }
        // Otherwise, they might want to [logout]...
        else
                echo '
                                <a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">', $txt[108], '</a>';

Hope this helps someone else.

Kindred

No wonder you were getting parse errors....   you actually will continue to get them with the code that you just pasted....   if not parse errors, worse ones down the road.

this should actually be:


      // How about the [bank] button?
              echo '
                        <a href="', $scripturl, '?action=shop;do=bank">', $txt[bank], '</a>';                       
                               
        // How about the [shop] button?
              echo '
                        <a href="', $scripturl, '?action=shop">', $txt[shop], '</a>';     

where you have added the $txt[bank] and $txt[shop] definitions into modifications.english.php

or, if you really want to hard code the text:

      // How about the [bank] button?
              echo '
                        <a href="', $scripturl, '?action=shop;do=bank"> (BANK) </a>';                       
                               
        // How about the [shop] button?
              echo '
                        <a href="', $scripturl, '?action=shop"> (SHOP) </a>';     


Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

pacer

Would anyone have these themes available to download for RC2?
Specifically, longblue

Main site doesn't seem to be up/exist anymore :/

pyko

hmm, i've updated my smf to 1.1RC3 - and then realised that my longBlue is still 1.1RC2 - is that alright? everything seems to still work.

Or is there an update for 1.1RC3?
thanks!

mpetrie

#53
I'm now on SMF 1.1.1 and the theme still works, but with an unwanted space between each board title bar and the list of boards in the group. I guess this is a problem with either the css with the updated board index template.

Xenovanis, are you going to do an "official" SMF 1.1.x and Joomla 1.0.xx (as of today 1.0.12) update to the themes?




OK, update. I've fixed the unwanted spaces. I'd post a picture here, but there's no option to do so. However, if you see a gap above the grey bands that group each set of boards and the boards from the previous group; or above the key for posts read and unread icons, or between that and the Info Centre, the fix is to remove two <br /> tags:

To fix gaps above board titles find the following code and remove the <br /> in the last line. Do not delete the '; following the <br />:

                                if (!empty($board['last_post']['id']))

                                        echo '
                        ', $board['last_post']['time'], '<br />
                        ', $board['last_post']['link'], ' <br />
                        ', $txt[525], ' ', $board['last_post']['member']['link'];

                                echo '
                </td>
        </tr>';
                        }
                }

                echo '
</table></div>
<br />';


To fix gap above Info Centre find this code block and remove the <br /> on the third line:

        // Here's where the "Info Center" starts...
        echo '
<br />
<div class="tborder"><table border="0" width="100%" cellspacing="0" cellpadding="4">
        <tr class="catbg">
                <td align="center" colspan="2">', $txt[685], '</td>
        </tr>';


Mike

Loverboy


Hj Ahmad Rasyid Hj Ismail

Do anybody have these themes? Please email them to me ok. Thank you in adavance.

Advertisement: