ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Custom Profile Field - In Forums

January 22, 2008 7:35am

Subscribe [0]
  • #1 / Jan 22, 2008 7:35am

    Corvaire Wind

    60 posts

    I need the query script to drop in a Skinning procedure (ie., style/style_{my_skin}.css)

    This is to draw into forums css import line. (not to worry, I have a backup css called style_ so if query fails at anytime it will display default skin.)

    I have this integrated into both the wiki and the weblog already.. would love to finish it off with forums.

  • #2 / Jan 22, 2008 7:13pm

    Corvaire Wind

    60 posts

    O.k.!
    I’m doing this completely backwards!
    I should be looking to grab the current Forums theme folder name and applying that into the wiki and site css import links. (creating corresponding template groups with same name.)

    Then, in the forums hard coding (for each theme) the location of said css files (located in there Template group.)

    make sense?

    how do I draw what the current theme selected is? (cookies), (create a function) or just query the forums table for it?—and can that be done?

  • #3 / Jan 22, 2008 7:15pm

    Corvaire Wind

    60 posts

    I’m going to go look and see how the “latest forum thread” is drawn and see if I can utilize same code.

  • #4 / Jan 22, 2008 8:00pm

    Corvaire Wind

    60 posts

    kk, went ahead and dropped the switcher in the member profile menu towards the bottom in “extras” because, after all it is changing your profile as well, once I figure out how to grab what theme is selected, I can then apply it to the rest of the site.

    <div class='menuItem'><a href="http://{path:notepad}">{lang:notepad}</a></div>
    /*<div class='menuItem'>Select a theme: 
    <select name="theme_switcher" class="select" onchange="if (this.value != '') location.href=this.value">
    <option value="">{lang:select_theme}</option>
    {include:theme_option_list}
    </select></div>*/

    of course I commented it out so this option isn’t available yet.

    Anyone know how I can fetch this variable?

  • #5 / Jan 22, 2008 8:03pm

    Corvaire Wind

    60 posts

    maybe then putting it in a fresh global veriables to process first?

  • #6 / Jan 22, 2008 8:39pm

    Corvaire Wind

    60 posts

    ok, how would i adjust this to fetch just the current theme from a fresh variable so I can then grab it with {current_theme}

    function fetch_theme_list()
        {    
            $filelist = array();
        
            if ($fp = @opendir($this->_fetch_pref('board_theme_path'))) 
            { 
                while (false !== ($file = readdir($fp))) 
                { 
                    if (is_dir($this->_fetch_pref('board_theme_path').$file) AND substr($file, 0, 1) != '.' AND substr($file, 0, 1) != '_')
                    {   
                        $filelist[] = $file;
                    }
                } 
                
                closedir($fp); 
            } 
            
            return $filelist;
        }
  • #7 / Jan 23, 2008 10:20pm

    Corvaire Wind

    60 posts

    in Core.template.php
    (around line 2479)
    add

    , 'forum_theme'

    to the end of array
    and again farther (around 2856) down where Javascript checks which items not to secure

    you can now use your ‘stored’ template name as a single variable {forum_theme}.

    Like I said above.. make sure to create an alternate “default” css file and/or template group that extends prior to naming convention (ie., style_ [when it loads above parse would look like style_blue or style_developer.])

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases