0

Osclass 是一个非常好的工具,但我有一些问题。

我有这个代码:

<div class="cell selector">
                    <?php osc_categories_select('sCategory', null, __('Select country/city', 'bender')) ; ?>
                </div>

这段代码呈现了这个 HTML:

<div class="cell selector">
                    <div class="select-box undefined"><select name="sCategory" id="sCategory" style="opacity: 0;"><option value="">Select a category</option><option value="98">Key West</option><option value="101">&nbsp;&nbsp;Miami</option><option value="99">Italy</option><option value="102">&nbsp;&nbsp;Rome</option><option value="97">Madives</option><option value="96">France</option><option value="4">United States</option><option value="43">&nbsp;&nbsp;Houses - Apartments for Sale</option><option value="44">&nbsp;&nbsp;Houses - Apartments for Rent</option><option value="45">&nbsp;&nbsp;Rooms for Rent - Shared</option><option value="46">&nbsp;&nbsp;Housing Swap</option><option value="47">&nbsp;&nbsp;Vacation Rentals</option><option value="48">&nbsp;&nbsp;Parking Spots</option><option value="49">&nbsp;&nbsp;Land</option><option value="50">&nbsp;&nbsp;Office - Commercial Space</option><option value="51">&nbsp;&nbsp;Shops for Rent - Sale</option></select><a href="#" class="select-box-trigger"><span class="select-box-label">Select a category</span><span class="select-box-icon">0</span></a></div>                </div>

所以你可以看到我无法控制:<?php osc_categories_select('sCategory', null, __('Select country/city', 'bender')) ; ?>

我如何以及在哪里可以改变这一点?我需要上课是因为我想创建一个具有新风格的新主题吗?有人知道吗?

4

1 回答 1

0

这应该在 oc-includes > osclass > fm > Category.form.class.php

在下面:

static public function category_select($categories, $category, $default_item = null, $name = "sCategory")
    {
        echo '<select name="' . $name . '" id="' . $name . '">';
        if(isset($default_item)) {
            echo '<option value="">' . $default_item . '</option>';
        }
        foreach($categories as $c) {
            echo '<option value="' . $c['pk_i_id'] . '"' . ( ($category['pk_i_id'] == $c['pk_i_id']) ? 'selected="selected"' : '' ) . '>' . $c['s_name'] . '</option>';
            if(isset($c['categories']) && is_array($c['categories'])) {
                CategoryForm::subcategory_select($c['categories'], $category, $default_item, 1);
            }
        }
        echo '</select>';
    }
于 2014-11-16T00:12:15.163 回答