Demo

Probiere ClanSphere aus und teste daran herum. Demo


Antworten: 2
Seite [1]
Mehmet


Beginner




Beiträge: 8
# Thema - 13.08.2012 um 21:52 Uhr
Hi all;
this select box figure is made to the normal menu?
system/output/xhtml_10.php
 
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
1. / 2. / ... 
 
function cs_html_option($name$value$select 0$style 0)
{
  global 
$cs_main;
  
$value htmlspecialchars($valueENT_QUOTES$cs_main['charset']);
  
$var "<option value=\"" $value "\"";
  if (!empty(
$style))
  {
    
$var .= " style=\"" $style "\"";
  }
  if (!empty(
$select))
  {
    
$var .= " selected=\"selected\"";
  }
  return 
$var '>' $name "</option>\n";
}

themes/base/news/recent.tpl
 
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
1. / 2. / ... 
 <form method="post" action="{url:news_recent}">
<
table class="forum" cellpadding="0" cellspacing="{page:cellspacing}" style="width:{page:width}">
<
tr>
  <
td class="headb" colspan="3">{lang:mod_name} - {lang:recent}</td>
 </
tr>
 <
tr>
  <
td class="leftb">{lang:category}
    {
cats:dropdown}
    <
input type="submit" name="submit" value="Anzeigen" />
  </
td>
  <
td class="leftb"><a href="{url:news_list}">{lang:list}</a></td>
  <
td class="rightb">{head:pages}</td>
 </
tr>
</
table>
</
form>

please help.
Dateianhänge:
jpg selectbox.jpg (23.79 KiB - 37 mal heruntergeladen )


Zuletzt editiert von Mehmet am 13.08.2012 um 21:52 Uhr (1x Editiert)
Inaktiv
Deaktiviert

Supporter
Supporter



Beiträge: 1287
# Antwort: 1 - 14.08.2012 um 02:20 Uhr
Hello Mehmet,

No, this code isnt the one which creates this selectbox. You find it in /mods/news/recent.php. It could be that it is a function which exists in another file, that would you see over an include in the data start.

Hope that was what you were asking for.

Regards,
Schalla


Inaktiv
|
Mehmet
Thread-Ersteller


Beginner




Beiträge: 8
# Antwort: 2 - 14.08.2012 um 14:29 Uhr
i not founded in mods/news/recent.php
codes
 
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
1. / 2. / ... 
 $cs_lang cs_translate('news');
$data = array();
$cs_post cs_post('where');
$cs_get cs_get('where');

require_once 
'mods/categories/functions.php';

$cat_id = empty($cs_get['where']) ? $cs_get['where'];
if (!empty(
$cs_post['where']))  $cat_id $cs_post['where'];

$cs_option cs_sql_option(__FILE__'news');
$abcode explode(","$cs_option['abcode']);
$where "nws.news_public = 1 AND cat.categories_access <= " $account['access_news'];
if(!empty(
$cat_id)) {
  
$cat_where 'categories_subid = ' $cat_id;
  
$categories cs_sql_select(__FILE__,'categories','categories_id',$cat_where,0,0,0);
  if(!empty(
$categories)) {
    
$where .= " AND (cat.categories_id = '" $cat_id "'";
    for(
$a=0$a<count($categories); $a++) {
      
$where .= " OR cat.categories_id = '" $categories[$a]['categories_id'] . "'";
    }
    
$where .= ")";
  }
  else {
    
$where .= " AND cat.categories_id = '" $cat_id "'";
  }
............
more
}

also;
mods/categories/functions.php

 
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
1. / 2. / ... 
 function cs_categories_dropdown($mod$categories_id) {

    global 
$account;
    
$where "categories_mod='" $mod "'";
    
$list_data cs_sql_select(__FILE__,'categories','categories_id, categories_name',$where,'categories_order ASC, categories_name',0,0);

    
$data = array();
    
$data['categories']['dropdown'] = cs_dropdown('categories_id','categories_name',$list_data,$categories_id);
    
$data['if']['cat_access'] = ($account['access_categories'] >= 3) ? true false;

    return 
cs_subtemplate(__FILE__,$data,'categories','cat_dropdown');
}

function 
cs_categories_dropdown2($mod$categories_id 0$new 1$name 'categories_id') {

    global 
$account;
    
$data = array();
    
$cells 'categories_id, categories_name, categories_subid';
    
$categories cs_sql_select(__FILE__,'categories',$cells,"categories_mod = '".$mod"' AND categories_access <= '" $account['access_news'] . "'",'categories_subid ASC, categories_name',0,0);
    
$categories cs_catsort($categories);

    
$data['categories']['options'] = '';
    if (!empty(
$categories)) {
        foreach (
$categories AS $cat) {
            
$blank '';
            if (!empty(
$cat['layer'])) {
                for (
$i 0$i $cat['layer']; $i++) { $blank .= '  '; }
                
$blank .= '»';
            }
            
$data['categories']['options'] .= cs_html_option($blank $cat['categories_name'],$cat['categories_id'], $cat['categories_id'] == $categories_id);
        }
    }

    
$data['if']['new'] = !empty($new) ? TRUE FALSE;
    
$data['dropdown']['name'] = $name;
    return 
cs_subtemplate(__FILE__,$data,'categories','cat_dropdown2');
}




Inaktiv
|
Antworten: 2
Seite [1]


Sie müssen sich registrieren, um zu antworten.