Demo
	
		
			Probiere ClanSphere aus und teste daran herum.
			Demo
		
	
 
      
Spenden
  
    ClanSphere ist freie OpenSource Software.
Bitte unterstützt uns.
    Spenden
  
 
			
				
  
  
  
    Antworten: 1 
      Seite  [1]   | 
  
  
  
      spflug 
       
      
      
      
         
      Beginner  
       
      
      
        
       
      Herkunft: Hüllhorst 
      Beiträge: 3      | 
     # Thema - 09.02.2010 um 20:04 Uhr
       
      
      Hallo, 
 
wir haben 3 Benutzer Zugriffsgruppen angelegt: 
Besucher, Forum Stufe 1 
Benutzer, Forum Stufe 2  
Mitglieder, Forum Stufe 2  
 
In den öffentlichen Boards ( Zugriff ab 0) dürfen 
- Besucher nur lesen 
- Benutzer lesen und schreiben 
 
In den Vereinsintern Boards ( Zugriff ab 3) dürfen 
beide Gruppen erstmal gar nichts ( sie sehen sie ja nicht einmal). 
 
Die internen Boards habe ich der Klasse "RCO Mitglieder" zugeordnet, so dass Benuter, die als Mitglied angelegt werden und der Klasse zugeordnet wurden auf diese Boards zugreifen können. 
 
Zum Problem: 
Nun werden die ungelesenen Beiträge der internen Boards nicht in der navlist angezeigt, da die folgende Bedingungen nicht erfüllt ist 
 
 1.  
  | 1. / 2. / ... 
  frm.board_access <= \''.$account['access_board'].   |  
  
 
Ich habe etwas rumgebastelt und habe  
 
 1.  
2.  
3.  
4.  
5.  
  | 1. / 2. / ... 
  $cond    = 'frm.board_access <= \''.$account['access_board'].'\' AND frm.board_pwd = \'\''; 
 
if(!empty($account['users_id'])) { 
  $cond   .= ' AND thr.threads_last_time > \'' . $cs_readtime . '\' AND (thr.threads_last_time > red.read_since OR red.threads_id IS NULL)'; 
}  |  
  
durch folgendes ersetzt: 
 
 1.  
2.  
3.  
4.  
5.  
6.  
7.  
8.  
9.  
10.  
  | 1. / 2. / ... 
   
if(!empty($account['users_id'])) { 
  $cond    = '( frm.board_access <= \''.$account['access_board'].'\' OR frm.squads_id in ( SELECT sqd.squads_id FROM {pre}_members mem Left JOIN `{pre}_squads` sqd ON mem.squads_id = sqd.squads_id Where mem.users_id= \''.$account['users_id'].'\' )) '; 
  $cond   .= ' AND frm.board_pwd = \'\' '; 
  $cond   .= ' AND thr.threads_last_time > \'' . $cs_readtime . '\' AND (thr.threads_last_time > red.read_since OR red.threads_id IS NULL)'; 
} 
else { 
    $cond    = 'frm.board_access <= \''.$account['access_board'].'\' AND frm.board_pwd = \'\''; 
} 
  |  
  
 
Nun zu meinem Anliegen: 
a) ist das richtig, was ich da zusammengeknobelt habe ( ich habe keine Ahnung von PHP) 
b) handelt es sich dabei um einen Bug oder habe ich das Rechtesystem nur falsch interpretiert ? 
 
Gruß 
 
Stefan
      
      
      
      
        
       
      Zuletzt editiert von spflug am 10.02.2010 um 08:46 Uhr (1x Editiert) 
       | 
  
  
     | 
    
            | 
  
  
  
  
  
     | 
  
  
      Miraculix 
      
       
      
      
      
         
      Going for pro  
       
      
      
        
  
       
      Herkunft: Füssen 
      Beiträge: 429      | 
     # Antwort: 1 - 23.06.2010 um 19:39 Uhr
       
      
      Ist zwar schon älter. Aber die SuFu hat mir eigentlich nur diesen Thread ausgespuckt. 
 
Habe das bei mir jetzt so gelöst: 
 
in der mods/board/navlist.php aus dem hier: 
 
 1.  
2.  
3.  
4.  
5.  
6.  
7.  
8.  
  | 1. / 2. / ... 
  $tables  = 'threads thr INNER JOIN {pre}_board frm ON frm.board_id = thr.board_id ';  
$tables .= 'LEFT JOIN {pre}_read red ON thr.threads_id = red.threads_id AND red.users_id = \''.$account['users_id'].'\'';  
$cells   = 'thr.threads_headline AS threads_headline, thr.threads_id AS threads_id, ';  
$cells  .= 'thr.threads_last_time AS threads_last_time, frm.board_name AS board_name, frm.board_id AS board_id';  
$cond    = 'frm.board_access <= \''.$account['access_board'].'\' AND frm.board_pwd = \'\'';  
if(!empty($account['users_id'])) {  
  $cond   .= ' AND thr.threads_last_time > \'' . $cs_readtime . '\' AND (thr.threads_last_time > red.read_since OR red.threads_id IS NULL)';  
}  |  
  
Das hier: 
 
 1.  
2.  
3.  
4.  
5.  
6.  
7.  
8.  
9.  
  | 1. / 2. / ... 
  $tables  = 'threads thr INNER JOIN {pre}_board frm ON frm.board_id = thr.board_id '; 
$tables .= 'LEFT JOIN {pre}_read red ON thr.threads_id = red.threads_id AND red.users_id = \''.$account['users_id'].'\' '; 
$tables .= 'LEFT JOIN {pre}_members mrs ON frm.squads_id = mrs.squads_id AND mrs.users_id = \''.$account['users_id'].'\''; 
$cells   = 'thr.threads_headline AS threads_headline, thr.threads_id AS threads_id, '; 
$cells  .= 'thr.threads_last_time AS threads_last_time, frm.board_name AS board_name, frm.board_id AS board_id'; 
$cond    = '(frm.board_access <= \''.$account['access_board'].'\' OR frm.squads_id = mrs.squads_id) AND frm.board_pwd = \'\''; 
if(!empty($account['users_id'])) { 
  $cond   .= ' AND thr.threads_last_time > \'' . $cs_readtime . '\' AND (thr.threads_last_time > red.read_since OR red.threads_id IS NULL)'; 
}  |  
  
Eigentliche Änderung: 3. Zeile ($tables .=...) hinzu und 6. Zeile ($cond =...) geändert 
 
Sollte auch mit der 2010er noch funktionieren da sich da nix geändert hat. 
 
PS: unnötige Leerzeichen sind zu entfernen.
      
      
      
  
------------------ 
greeetz Miraculix 
 
 Band-Page -> www.muddleheaded-scum.de
      
      
  Zuletzt editiert von Miraculix am 04.08.2010 um 07:33 Uhr (1x Editiert) | 
  
  
     | 
    
        |     | 
  
  
  
  
  
  
    Antworten: 1 
      Seite  [1]   | 
  
 
  
    | Sie müssen sich registrieren, um zu antworten. |