How to use v1 theme for version 2.1.8 / General theme questions / Forums


  • Here are instruction how to do it correct way (official way)

    https://www.e107.org/developer-manual/theme-basics/upgrading-v1.x-themes

    Here are steps I used to get old theme Race work correctly with Theme manager and Menu manager without big effort:

    1you need theme.xml file

    Way how to get it: 

    copy from other theme and replace related things or use convert tools for it Theme Manager. 

    There is problem how to fill some fields so look at other themes to get inspired.

    Generated theme.xml with convert tool:

    <?xml version="1.0" encoding="utf-8"?>
    <e107Theme name="Race" lan="LAN_PLUGIN" version="2.0" date="1529833978" compatibility="2.0" livedemo="">
    <author name="Flash" url="http://www.themesbase.com/e107-Themes/7106_Race.html" />
    <summary lan="">Race Theme made by Flash</summary>
    <description lan="">Race Theme made by Flash</description>
    <category>gaming</category>
    <keywords>
    <word>game</word>
    <word>legacy</word>
    </keywords>
    <copyright>http://www.themesbase.com/e107-Themes/7106_Race.html</copyright>
    <screenshots>
    <image>preview.jpg</image>
    </screenshots>
    <layouts>
    <layout name='default' title='Default' default='true' />
    </layouts>
    </e107Theme>

    Warning:  you got error if your theme is Race and your folder is Race_cars. So just copy displayed file and create file manually

    Note: you can use this tool only if theme.xml doesn't exist. If you have one, renamed it to somewhere else.

    From this file important part is:

    <layouts>
    <layout name='default' title='Default' default='true' />
    </layouts>

    Result: 

    Race01

    There is problem because there are 2 layouts and Menu Manager doesn't work.

    2. you need to fix layouts in generated theme.xml

    - check for all  $CUSTOMPAGES[] in your theme.php and add them as layout

    - set custompages for saving your time. You can change this in theme manager.

     

  • 3. fix theme.php  

    1.  replace variables $HEADER and $FOOTER  (to rid warning about using deprecated headers and footers).

    Each custompage's header and footer needs use different variable name (in my case $OLDFOOTER01,  $OLDFOOTER02, but header is the same for all pages, so just $OLDHEADER)

    2. add new headers and footers for version 2

    $LAYOUT['_header_'] = '';

    $LAYOUT['_footer_']  = '';

    If you have one version of header, you can use it directly.

    3. add new layouts (according theme.xml)

    add $LAYOUT['default']  with {---} 

    add all needed layouts according theme.xml

    add correct footers 

    Menu manager is now fixed.

    Important:  Check if Go button displays Menu areas, if not, something is wrong.

    Correct result:

    Race06

     

  • 4. Add menus to new layout

    This is new in version 2, each layout has the separate set of menus. 

    Warning:  Be sure that you set correct default layout in Theme Manager at the beginning. If you change it later, you will do this again. 

    Just check what menus are used for default and add the same menus with the same config for new layout.

    Be sure you are on the correct layout and be aware that menu left checked after you add it to layout, so without unchecking you add it again with new menu.

     

  • Troubleshooting

    You did everything right and it still doesn't work as should be?

    In my case  url /forum/  displays wrong layout.

    1. how to check what layout is really used? 

    - open page source and find body tag.

    <body id='layout-default' >

    So default layout is used and fix is in Theme Manager (Site theme)

    2. how to fix correct layout?

    in my case needed layout has this definition when to use it:

    <span>page.php e107_plugins/ submitnews.php download.php upload.php forum.php forum_post.php forum_viewtopic.php user.php usersettings.php</span>

    but my url is /forum/ so changing forum.php to forum is fix 

    <body id='layout-no-right-menu-area' >

    3. great, layouts are correct, but menus are not displayed with second layout. 

    Go to Menu manager and check if menus are there. 

    In my case they didn't (no idea why, I was sure I did it).

    Race07

    Race08

     

Moderator(s): CaMer0n, Jimako
Search just forum
Chatbox
You must be logged in to post comments on this site - please either log in from the Login box or from here.


  • Jimako
    Jimako  2 weeks ago

    Just playing with google custom search. It's searching this site, e107.org and github with e107 in repository name.

  • Jimako
    Jimako  1 month ago

    If you use any my theme: with version 2.2.0 there are core changes - comments and social icons - if you find problem, just tell me.

  • Jimako
    Jimako  4 months ago

    @wrxxy I am ill, sorry cant log in gitter from mobile. Try ask at main room, nothing except update was changed.

  • Jimako
    Jimako  5 months ago

    @wrxxy I got notification from gitter but I am off until Monday. I am not able to log in gitter. Answer is add it to existing gitjub issue.

  • Jimako
    Jimako  7 months ago

    I will be on holiday until end of November. So no answers from me until then.