[Snippet] Colorized Announcements and Stickys (de)

Little Mods and Snips 2

[Snippet] Colorized Announcements and Stickys (de)

Postby Sekuro » 02 Oct 2011, 00:26

Colorized Announcements and Stickys

Snippet-Title: Colorized Announcements and Stickys
Snippet-Version: 0.0.1
Snippet-Autor: 4seven

Snippet-Beschreibung: Dieser Mod ermöglicht verschiedene hintergrundfarben von bekanntmachungen, globalen bekanntmachungen und wichtigen themen (stickys)

phpBB-Version: phpBB 3.0.x
phpBB-Sprachen: mutlilingual
phpBB-Styles: alle Styles, die auf prosilver basieren

Features:

- gestaltet bekanntmachungen, globalen bekanntmachungen und wichtigen themen auffälliger

Demo: viewforum.php?f=3

Image (folgt)

Image (folgt)



Anleitung:

öffne

search.php

Code: Select all
         $template->assign_block_vars('searchresults', array_merge($tpl_ary, array(


dahinter füge ein

Code: Select all
            'S_POST_ANNOUNCE'    => ($row['topic_type'] == POST_ANNOUNCE) ? true : false,
            'S_POST_GLOBAL'      => ($row['topic_type'] == POST_GLOBAL) ? true : false,
            'S_POST_STICKY'      => ($row['topic_type'] == POST_STICKY) ? true : false,


öffne styles/prosilver/template/viewforum_body.html

finde

Code: Select all
<li class="row<!-- IF topicrow.S_ROW_COUNT is even --> bg1<!-- ELSE --> bg2<!-- ENDIF --><!-- IF topicrow.S_POST_ANNOUNCE --> announce<!-- ENDIF -->


ersetze mit

Code: Select all
<li class="row<!-- IF topicrow.S_ROW_COUNT is even --> bg1<!-- ELSE --> bg2<!-- ENDIF --><!-- IF topicrow.S_POST_ANNOUNCE  --> announce<!-- ENDIF --><!-- IF  topicrow.S_POST_GLOBAL --> globalannounce<!-- ENDIF --><!-- IF topicrow.S_POST_STICKY --> sticky<!-- ENDIF -->


öffne styles/prosilver/template/ucp_main_front.html

finde

Code: Select all
      <li class="row<!-- IF topicrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">


ersetze mit

Code: Select all
      <!-- <li class="row<!-- IF topicrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->"> -->
      <li class="row globalannounce">


öffne

styles/prosilver/template/search_results.html

finde

Code: Select all
      <!-- BEGIN searchresults -->
         <li class="row<!-- IF searchresults.S_ROW_COUNT is even --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">


ersetze mit

Code: Select all
      <!-- BEGIN searchresults -->
         <li class="row<!-- IF searchresults.S_ROW_COUNT is even --> bg1<!-- ELSE --> bg2<!-- ENDIF --><!-- IF searchresults.S_POST_ANNOUNCE  --> announce<!-- ENDIF --><!-- IF  searchresults.S_POST_GLOBAL --> globalannounce<!-- ENDIF --><!-- IF searchresults.S_POST_STICKY --> sticky<!-- ENDIF -->">


öffne styles/prosilver/theme/colours.css

finde

Code: Select all
.sticky, .announce {
   /* you can add a background for stickies and announcements*/
}


ersetze mit

Code: Select all
.sticky {
   background-color: yellow;
}

.announce {
   background-color: blue;
}

.globalannounce {
   background-color: red;
}


yellow, blue und red nach belieben ersetzen (#3GB53G, yellow, darkorange etc.)

alle board und browser-caches leeren

enjoy
Mod-Bot / Service-Team
User avatar
Sekuro

Tiptop

Tiptop
 
Posts: 241
Joined: 11 Feb 2008, 11:49
 
Resolution: 1440x900



Re: [Snippet] Colorized Announcements and Stickys (de)

Postby Sekuro » 02 Oct 2011, 00:26

Anleitung für subsilver2 (Erstmal nur für den Viewforum-Bereich)

Da die search.php hier noch ausgenommen ist, brauchen keine weiteren Änderungen gemacht werden als die folgenden.

Version 1 (Farbiger Rahmen)

öffne styles/subsilver2/template/viewforum_body.html.

finde alle

Code: Select all
<td class="row1"  


und

Code: Select all
<td class="row2"  


die zwischen

Code: Select all
        <!-- BEGIN topicrow -->  


und

Code: Select all
        <!-- END topicrow -->  


liegen (der umschlossene Bereich ist im subsilver2 zweimal vorhanden)

und ersetze diese mit

Code: Select all
<td class="row1<!-- IF topicrow.S_POST_ANNOUNCE  --> announce<!-- ENDIF --><!-- IF topicrow.S_POST_GLOBAL --> globalannounce<!-- ENDIF --><!-- IF topicrow.S_POST_STICKY --> sticky<!-- ENDIF -->"  


bzw

Code: Select all
<td class="row2<!-- IF topicrow.S_POST_ANNOUNCE  --> announce<!-- ENDIF --><!-- IF topicrow.S_POST_GLOBAL --> globalannounce<!-- ENDIF --><!-- IF topicrow.S_POST_STICKY --> sticky<!-- ENDIF -->"  


öffne styles/subsilver2/theme/stylesheet.css

finde

Code: Select all
.row1 {  


davor füge ein

Code: Select all
.sticky {
   
border-colorblue
   
border-width4px;
   
border-styleridge;
   
/* background-color: blue; */
}

.
announce {
   
border-colorgreen
   
border-width4px;
   
border-styleridge;
  
/* background-color: green;*/   
}

.
globalannounce {
   
border-colororange
   
border-width4px;
   
border-styleridge;
   
/*background-color: orange;*/    
}  


blue, green und orange nach belieben ersetzen (#3GB53G, yellow etc.)



Version 2 (Hintergrund Farbe)

Möchtet ihr ein background-color (ist in der stylesheet.css /*auskommentiert*/) statt einer Umrahmung haben , dann müsst ihr so vorgehen.

finde alle

Code: Select all
<td class="row1"  


und

Code: Select all
<td class="row2"  


die zwischen

Code: Select all
        <!-- BEGIN topicrow -->  


und

Code: Select all
        <!-- END topicrow -->  


liegen (der umschlossene Bereich ist im subsilver2 zweimal vorhanden)

und ersetze diese mit

für row1
Code: Select all
<td class="<!-- IF topicrow.S_POST_ANNOUNCE  -->announce<!-- ELSEIF topicrow.S_POST_GLOBAL -->globalannounce<!-- ELSEIF topicrow.S_POST_STICKY -->sticky<!-- ELSE -->row1<!-- ENDIF -->"  


bzw

für row2
Code: Select all
<td class="<!-- IF topicrow.S_POST_ANNOUNCE  -->announce<!-- ELSEIF topicrow.S_POST_GLOBAL -->globalannounce<!-- ELSEIF topicrow.S_POST_STICKY -->sticky<!-- ELSE -->row2<!-- ENDIF -->"  


dann in der stylesheet.css

Code: Select all
.sticky {
   
background-colorblue
}

.
announce {
  
background-colorgreen;   
}

.
globalannounce {
   
background-colororange;    
}  




Version 3 - Profi-Variante (Verschiedene Hintergrund Farben for row1 und row2)

Möchtet ihr abwechselnde background-color Farben, wie im Original-subsilver2, dann müsst ihr so vorgehen.

finde alle

Code: Select all
<td class="row1"  


und

Code: Select all
<td class="row2"  


die zwischen

Code: Select all
        <!-- BEGIN topicrow -->  


und

Code: Select all
        <!-- END topicrow -->  


liegen (der umschlossene Bereich ist im subsilver2 zweimal vorhanden)

und ersetze diese mit

für row1
Code: Select all
<td class="<!-- IF topicrow.S_POST_ANNOUNCE  -->row1announce<!-- ELSEIF topicrow.S_POST_GLOBAL -->row1globalannounce<!-- ELSEIF topicrow.S_POST_STICKY -->row1sticky<!-- ELSE -->row1<!-- ENDIF -->"  


bzw

für row2
Code: Select all
<td class="<!-- IF topicrow.S_POST_ANNOUNCE  -->row2announce<!-- ELSEIF topicrow.S_POST_GLOBAL -->row2globalannounce<!-- ELSEIF topicrow.S_POST_STICKY -->row2sticky<!-- ELSE -->row2<!-- ENDIF -->"  


dann in der stylesheet.css

Code: Select all
.row1sticky {
   
background-colorcornflowerblue
}

.
row1announce {
  
background-colorlimegreen;   
}

.
row1globalannounce {
   
background-colororange;    
}

.
row2sticky {
   
background-colorroyalblue
}

.
row2announce {
  
background-colorforestgreen;   
}

.
row2globalannounce {
   
background-colordarkorange;    
}  


.row1** sind die helleren Farben, .row2** die Dunkleren.
Lasst euere Fantasie freien Lauf. Das kann man mit etwas Geduld richtig schön machen ;-)

Hier eine Farbtabelle zur Hilfe:
http://mahopa.de/murks/webfarben-namen.html

Nicht vergessen: Alle Board- und Browser-Caches leeren
Mod-Bot / Service-Team
User avatar
Sekuro

Tiptop

Tiptop
 
Posts: 241
Joined: 11 Feb 2008, 11:49
 
Resolution: 1440x900



Return to Snip Cl@ss II

Who is online

Users browsing this forum: No registered users and 3 guests

cron