Achso ja, ich verwende Mod_rewrite in einer eigenen Zusammenstellung.
Wie müsste ich das machen?
(jetzt verstehe ich das, was der meinte...Das ist ja ne Pornoseite der link...Sory !)
Um schreiben oder kommentieren zu können, benötigen Sie ein Benutzerkonto.
Sie haben schon ein Benutzerkonto? Melden Sie sich hier an.
Jetzt anmeldenHier können Sie ein neues Benutzerkonto erstellen.
Neues Benutzerkonto erstellenAchso ja, ich verwende Mod_rewrite in einer eigenen Zusammenstellung.
Wie müsste ich das machen?
(jetzt verstehe ich das, was der meinte...Das ist ja ne Pornoseite der link...Sory !)
Layerads würde ich Dir raten gar nicht einzubinden, denn die zahlen oft nicht. Unter Angabe fadenscheiniger Begründungen zahlt man Dir Dein Geld nicht aus und Du kannst klagen :)
Würde Dir Euros4Click empfehlen. Die arbeiten seriös !
na wenn ich dem Ding margin: 10px 5px 0 0 ; gebe, reagiert es nicht darauf
Ich habe meinem Bild in der Widecolumn (Einzelansicht) einen Besondere Bildgrösse gegeben, was auch wie folgt wunderbar funktioniert:
.widecolumn .entry img {
width : 250px;
}
Weiss jemand, wieso ich jetzt aber keinen getrennten margin anwenden kann bzw. wie ich das machen muss ?
Hallo,
wie zeigt man die Bildbeschreibung unter dem Bild (als eigenständiges Objekt, dem man eine eigene Klasse zuweisen kann) an ?
Frage auch noch, ist es vernünftig, dafür die Bildbeschreibung zu nehmen oder eher den Bildtitel ? (Es sind in der tat Beschreibungen, die da rein sollen, daher denke ich die Beschreibung. zum Beispiel: Hier sehen Sie Guido Westerwelle im Gespräch mit Wordpress Deutschland :)))
Tja...das hab ich auch schon gelesen.
Binde ich es jedoch ein, so ich der ganze Bildschirm weiss und nichts geht mehr !
Sag mal was schreibst Du hier für einen Bullshit um es mal ganz deutlich zu sagen ?
Wieso soll ich einen Riesenärger bekommen ? Ich sitze weder in Deutschland, noch betreibe ich Seiten, die irgendetwas mit über oder unter 18 zu tun haben noch hast Du die Möglichkeit die Seite zu sehen, um die es sich hier dreht.
Ich bin hier auch nicht in diesem Forum, um mit Laien über juristische Dinge zu diskutieren, sondern um Fragen zum Thema Wordpress zu stellen.
Ich habe hier noch nie eine Seite von uns hier veröffentlicht. Wie kommst Du also auf solchen Mist ?
Zu Sache selbst bzw. zu meiner Fragestellung kannst Du mir aber nix sagen oder ?
(P.S.: Falls Du den oben angegebenen Link meinst, das ist eine reine Phantasiekombination, um nicht die echte Page abbilden zu müssen, um die es geht)
Hallo,
wo muss der Code der Breadcrump-Navi eingebaut werden ?
Ich will ja nur diese zahl am ende wegbekommen und dass er keine Überschrift (Ähnliche Artikel) macht)
Ne will schon bei Simple Tags bleiben
Super danke, so funktioniert´s !
Leider nein !
Auch hier erzeugt er mir einen Linkfehler, der wie folgt aussieht :
http://www.xxx.com/%5C%22http://w…d-rewrite%5C%22
Falsch hierbeir ist, dass er zweimal die URL aufruft und jeweils das "%5C%22" in der Mitte und einmal am Schluss einfügt (was auch immer das sein soll)
Die beiden stehen davor:
<div id="content" class="widecolumn">
<div class="post" id="post-21">
Sorry, aber wie muss das dann sein?
Teil 2:
.nav .sub {
display : table;
margin : 0 auto;
padding : 0;
list-style : none;
}
.nav .sub_active .current_sub a, .nav .sub_active a:hover {
background : transparent;
}
.nav .select :hover .select_sub, .nav .current .show {
display : block;
position : absolute;
width : 773px;
top : 100px;
background : url(images/submenu-background.gif);
padding : 0;
z-index : 100;
left : 0;
text-align : left;
}
.nav .current .show {
z-index : 10;
}
.nav .select :hover .sub li a, .nav .current .show .sub li a {
display : block;
float : left;
background : transparent;
padding : 0 5px 0 5px;
margin : 5px;
white-space : nowrap;
border : 0;
color : #c11919;
}
.nav .current .sub li.sub_show a {
color : #088;
cursor : default;
background : url(images/menu.gif);
}
.nav .select :hover .sub li a:hover, .nav .current .sub li a:hover {
visibility : visible;
}
.nav ul {
display : inline-block;
}
.nav ul {
display : inline;
}
.nav ul li {
float : left;
}
.nav {
text-align : left;
}
.nav .select a:hover b, .nav .select li:hover a b {
float : none;
}
.nav .select li, div.nav ul.curent li {
display : inline;
}
.nav .select li a, div.nav ul.curent li a {
float : left;
}
.kategorie-start {
font-family : Verdana, 'Lucida Grande', Arial, Sans-Serif;
font-size : 0.9em;
border-bottom : 1px solid #666666;
padding-bottom : 0.2em;
border-color : black;
font-weight : bold;
color : black;
margin : 40px 0 0 0;
}
.cats li.cat-item a {
margin : 0;
}
.ueberschrift-kuenstler-sidebar {
font-family : Verdana, 'Lucida Grande', Arial, Sans-Serif;
font-size : 1em;
background : #cccccc;
font-weight : bold;
padding : 0;
color : black;
padding : 1px 7px 1px 7px;
}
.ueberschrift-schlager-sidebar {
font-family : Verdana, 'Lucida Grande', Arial, Sans-Serif;
font-size : 1em;
background : #cccccc;
font-weight : bold;
padding : 0;
color : black;
padding : 1px 7px 1px 7px;
margin : 7px 0 0 0;
}
.ueberschrift-werbung-content-ad {
font-family : Verdana, 'Lucida Grande', Arial, Sans-Serif;
font-size : 1em;
background : #cccccc;
font-weight : bold;
padding : 0;
color : black;
padding : 1px 7px 1px 7px;
margin : 7px 0 0 0;
}
.sidebar-artikel {
font-family : Verdana, 'Lucida Grande', Arial, Sans-Serif;
background : #efefef;
font-size : 1em;
margin : 0px 0 0 0;
padding : 0px 7px 7px 7px;
min-height: 100px;
}
.sidebar-artikel img {
width : 100px;
}
.content-ad {
background : #efefef;
font-weight : bold;
padding : 0;
color : black;
padding : 5px 7px 5px 7px;
text-align : center;
}
.ueberschrift-kuenstler-a-z {
font-family : Verdana, 'Lucida Grande', Arial, Sans-Serif;
font-size : 1em;
background : #cccccc;
font-weight : bold;
padding : 0;
color : black;
padding : 1px 7px 0 7px;
margin : 7px 0 0 0;
}
.kuenstler-a-z {
margin : 0 0 0 0;
}
.kuenstler-a-z img {
text-align : center;
width : 336px;
margin : -9px 0 0 0;
}
.ueberschrift-dcrs-news-rss-feed {
font-family : Verdana, 'Lucida Grande', Arial, Sans-Serif;
font-size : 1em;
background : #cccccc;
font-weight : bold;
padding : 0;
color : black;
padding : 1px 7px 0 7px;
margin : -16px 0 0 0;
}
.dcrs-news-rss-feed {
background : #efefef;
font-weight : bold;
padding : 0;
color : black;
padding : 2px 0 5px 0;
text-align : left;
}
.ueberschrift-tag-cloud {
font-family : Verdana, 'Lucida Grande', Arial, Sans-Serif;
font-size : 1em;
background : #cccccc;
font-weight : bold;
padding : 0;
color : black;
padding : 1px 7px 0 7px;
margin : 9px 0 -14px 0;
}
.tag-cloud {
background : #efefef;
padding : 0;
padding : 2px 7px 5px 7px;
text-align : center;
}
.ueberschrift-hithaus-user-charts {
font-family : Verdana, 'Lucida Grande', Arial, Sans-Serif;
font-size : 1em;
background : #cccccc;
font-weight : bold;
padding : 0;
color : black;
padding : 1px 7px 0 7px;
margin : 9px 0 0 0;
}
.hithaus-user-charts img {
text-align : center;
width : 336px;
margin : -9px 0 0px 0;
}
.ueberschrift-hithaus-hit-tip {
font-family : Verdana, 'Lucida Grande', Arial, Sans-Serif;
font-size : 1em;
background : #cccccc;
font-weight : bold;
padding : 0;
color : black;
padding : 1px 7px 0 7px;
margin : 9px 0 0 0;
}
#alphalist {
display: inline;
}
#alphalist li {
display:inline;
}
#alphalist li a{
display:inline;
margin: 0 10px 0 10px;
}
#alphasearch {
width : 386px;
text-align: center;
margin: 0 50px 0 50px;
}
#alphasearch input {
/* Styles fuer Input-Elemente */
}
.sidebar-artikel .cats h2 a {
color: #c00;
font-size: 1.0em;
}
.sidebar-artikel .cats h2 {
margin: 12px 0 -2px 0;
padding: 2px 0 0 0;
margin: 0 0 2px 0;
}
.sidebar-artikel a:link {
color: #c00;
}
.sidebar-artikel a:visited {
color: #c00;
}
.sidebar-artikel a:hover {
color: #c00;
}
.hithaus-hit-tip {
font-family : Verdana, 'Lucida Grande', Arial, Sans-Serif;
background : #efefef;
font-size : 1em;
margin : 0px 0 10px 0;
padding : 0px 7px 7px 7px;
min-height: 100px;
}
.hithaus-hit-tip img {
width : 100px;
}
.hithaus-hit-tip .cats h2 a {
color: #c00;
font-size: 1.0em;
}
.hithaus-hit-tip .cats h2 {
margin: 12px 0 -2px 0;
padding: 2px 0 0 0;
margin: 0 0 2px 0;
}
.hithaus-hit-tip a:link {
color: #c00;
}
.sidebar-artikel a:visited {
color: #c00;
}
.hithaus-hit-tip a:hover {
color: #c00;
}
.related-posts-start a:link {
color: black;
font-size: 1.0em;
font-family : Verdana, 'Lucida Grande', Arial, Sans-Serif;
}
.related-posts-start a:visited {
color: black;
font-size: 1.0em;
font-family : Verdana, 'Lucida Grande', Arial, Sans-Serif;
}
.related-posts-start a:hover {
color: black;
font-size: 1.0em;
font-family : Verdana, 'Lucida Grande', Arial, Sans-Serif;
}
.aehnliche-artikel-start {
font-family : Verdana, 'Lucida Grande', Arial, Sans-Serif;
font-size : 0.9em;
font-weight : bold;
color : black;
margin : 10px 0 0 0;}
Alles anzeigen
Problem ist nur, es ändert sich nichts, wenn ich es anwende.
Es handelt sich dabei um die Überschrift der Einzelansicht.
Anbei mal das ganze CSS (nicht dass ich das irgendwo ausgeschlossen habe)
body {
font-size : 62.5%;
font-family : 'Lucida Grande', Verdana, Arial, Sans-Serif;
background : #d5d6d7;
color : #333;
}
#page {
background-color : white;
text-align : left;
}
#header {
background : url('images/header.jpg') no-repeat bottom left;
}
#headerimg {
margin : 0 0 0;
height : 80px;
width : 780px;
}
#content {
font-size : 1.2em;
}
.narrowcolumn .entry {
line-height : 1.25em;
font-size : 1.015em;
color : black;
font-family : Verdana, 'Lucida Grande', Arial, Sans-Serif;
margin : -5px 0 50px 0;
}
.widecolumn .entry {
line-height : 1.25em;
font-size : 1.015em;
color : black;
font-family : Verdana, 'Lucida Grande', Arial, Sans-Serif;
}
.narrowcolumn a:link {
color : #c00;
}
.narrowcolumn a:visited {
color : #c00;
}
.narrowcolumn a:hover {
color : #c00;
}
.narrowcolumn img {
width : 120px;
margin : 4px 6px 0 0;
}
.widecolumn a:link {
color : #c00;
}
.widecolumn a:visited {
color : #c00;
}
.widecolumn a:hover {
color : #c00;
}
.widecolumn .entry img {
width : 200px;
}
.sidebar img {
width : 120px;
margin : 4px 6px 0 0;
}
.narrowcolumn .postmetadata {
text-align : center;
}
.alt {
background-color : #f8f8f8;
border-top : 1px solid #ddd;
border-bottom : 1px solid #ddd;
}
#footer {
border : none;
}
small {
font-family : Arial, Helvetica, Sans-Serif;
font-size : 0.9em;
line-height : 1.5em;
}
h1, h2, h3 {
font-family : 'Trebuchet MS', 'Lucida Grande', Verdana, Arial, Sans-Serif;
font-weight : bold;
}
h1 {
font-size : 4em;
text-align : center;
}
#headerimg .description {
font-size : 1.2em;
text-align : center;
}
h2 {
font-size : 1.6em;
}
h2.pagetitle {
font-size : 1.6em;
}
h3 {
font-size : 1.3em;
}
h1, h1 a, h1 a:hover, h1 a:visited, #headerimg .description {
text-decoration : none;
color : white;
}
h2, h2 a, h2 a:visited, h3, h3 a, h3 a:visited {
color : #c00;
font-family : Verdana, 'Lucida Grande', Arial, Sans-Serif;
font-size : 1.16em;
}
h2, h2 a, h2 a:hover, h2 a:visited, h3, h3 a, h3 a:hover, h3 a:visited, #sidebar h2, #wp-calendar caption, cite {
text-decoration : none;
}
.entry p a:visited {
color : #b85b5a;
}
.commentlist li, #commentform input, #commentform textarea {
font : 0.9em 'Lucida Grande', Verdana, Arial, Sans-Serif;
}
.commentlist li {
font-weight : bold;
}
.commentlist cite, .commentlist cite a {
font-weight : bold;
font-style : normal;
font-size : 1.1em;
}
.commentlist p {
font-weight : normal;
line-height : 1.5em;
text-transform : none;
}
#commentform p {
font-family : 'Lucida Grande', Verdana, Arial, Sans-Serif;
}
.commentmetadata {
font-weight : normal;
}
small, #sidebar ul ul li, #sidebar ul ol li, .nocomments, .postmetadata, blockquote, strike {
color : #777;
}
code {
font : 1.1em 'Courier New', Courier, Fixed;
}
acronym, abbr, span.caps {
font-size : 0.9em;
letter-spacing : 0.07em;
}
a, h2 a:hover, h3 a:hover {
color : #06c;
text-decoration : none;
}
a:hover {
color : #147;
text-decoration : underline;
}
#wp-calendar #prev a, #wp-calendar #next a {
font-size : 9pt;
}
#wp-calendar a {
text-decoration : none;
}
#wp-calendar caption {
font : bold 1.3em 'Lucida Grande', Verdana, Arial, Sans-Serif;
text-align : center;
}
#wp-calendar th {
font-style : normal;
text-transform : capitalize;
}
body {
margin : 0 0 0 0;
padding : 0;
}
#page {
background-color : white;
margin : 0;
padding : 0;
width : 780px;
border : 0;
}
#header {
margin : 0 0 0 0;
padding : 0;
height : 80px;
width : 780px;
}
#headerimg {
margin : 0;
height : 80px;
width : 780px;
}
.narrowcolumn {
float : left;
padding : 0 0 20px 0;
margin : 10px 0 0 15px;
width : 404px;
}
.widecolumn {
float : left;
padding : 0 0 20px 0;
margin : 40px 0 0 15px;
width : 486px;
}
.post {
margin : 0 0 40px;
text-align : left;
}
.post hr {
display : block;
}
.widecolumn .post {
margin : 0;
}
.narrowcolumn .postmetadata {
padding-top : 5px;
}
.widecolumn .postmetadata {
margin : 30px 0;
}
.widecolumn .smallattachment {
text-align : center;
float : left;
width : 128px;
margin : 5px 5px 5px 0;
}
.widecolumn .attachment {
text-align : center;
margin : 5px 0;
}
.postmetadata {
clear : left;
}
#footer {
margin : 0;
width : 780px;
clear : both;
}
#footer p {
margin : 0;
padding : 40px 15px 20px 15px;
color : silver;
font-size : 1.18em;
line-height : 1.4em;
text-align : center;
}
#footer a:visited {
color : silver;
}
#footer a:hover {
color : silver;
}
h1 {
padding-top : 70px;
margin : 0;
}
h2 {
margin : 10px 0 5px 0;
}
h2.pagetitle {
margin-top : 30px;
text-align : center;
}
h3 {
padding : 0;
margin : 30px 0 0;
}
h3.comments {
padding : 0;
margin : 40px auto 20px;
}
p img {
padding : 4px 6px 10px 0;
}
img.centered {
display : block;
margin-left : auto;
margin-right : auto;
}
img.alignright {
padding : 4px;
margin : 0 0 2px 7px;
display : inline;
}
img.alignleft {
padding : 4px;
margin : 0 7px 2px 0;
display : inline;
}
.alignright {
float : right;
}
.alignleft {
float : left;
}
html > body .entry ul {
margin-left : 0;
padding : 0 0 0 30px;
list-style : none;
padding-left : 10px;
text-indent : -10px;
}
html > body .entry li {
margin : 7px 0 8px 10px;
}
.entry ul li:before, #sidebar ul ul li:before {
}
.entry ol {
padding : 0 0 0 35px;
margin : 0;
}
.entry ol li {
margin : 0;
padding : 0;
}
.postmetadata ul, .postmetadata li {
display : inline;
float : left;
list-style-type : none;
list-style-image : none;
}
#sidebar ul, #sidebar ul ol {
margin : 0;
padding : 0;
}
#sidebar ul li {
list-style-type : none;
list-style-image : none;
margin-bottom : 15px;
}
#sidebar ul p, #sidebar ul select {
margin : 5px 0 8px;
}
#sidebar ul ul, #sidebar ul ol {
margin : 5px 0 0 10px;
}
#sidebar ul ul ul, #sidebar ul ol {
margin : 0 0 0 10px;
}
ol li, #sidebar ul ol li {
list-style : decimal;
}
#sidebar ul ul li, #sidebar ul ol li {
margin : 3px 0 0;
padding : 0;
}
#searchform {
margin : 10px auto;
padding : 5px 3px;
text-align : center;
}
#sidebar #searchform #s {
width : 108px;
padding : 2px;
}
#sidebar #searchsubmit {
padding : 1px;
}
.entry form {
text-align : center;
}
select {
width : 130px;
}
#commentform input {
width : 170px;
padding : 2px;
margin : 5px 5px 1px 0;
}
#commentform textarea {
width : 100%;
padding : 2px;
}
#commentform #submit {
margin : 0;
float : right;
}
.alt {
margin : 0;
padding : 10px;
}
.commentlist {
padding : 0;
text-align : justify;
}
.commentlist li {
margin : 15px 0 3px;
padding : 5px 10px 3px;
list-style : none;
}
.commentlist p {
margin : 10px 5px 10px 0;
}
#commentform p {
margin : 5px 0;
}
.nocomments {
text-align : center;
margin : 0;
padding : 0;
}
.commentmetadata {
margin : 0;
display : block;
}
#sidebar {
float : right;
border : 1px solid silver;
margin : 50px 7px 30px 0;
width : 336px;
}
#sidebar form {
margin : 0;
}
#sidebar2 {
float : right;
padding : 20px 0 20px 0;
border : 1px solid #666666;
margin : 50px 7px 30px 0;
width : 254px;
}
#sidebar form {
margin : 0;
}
#sidebar form {
margin : 0;
}
#wp-calendar {
empty-cells : show;
margin : 10px auto 0;
width : 155px;
}
#wp-calendar #next a {
padding-right : 10px;
text-align : right;
}
#wp-calendar #prev a {
padding-left : 10px;
text-align : left;
}
#wp-calendar a {
display : block;
}
#wp-calendar caption {
text-align : center;
width : 100%;
}
#wp-calendar td {
padding : 3px 0;
text-align : center;
}
#wp-calendar td.pad:hover {
background-color : #fff;
}
acronym, abbr, span.caps {
cursor : help;
}
acronym, abbr {
border-bottom : 1px dashed #999;
}
blockquote {
margin : 15px 30px 0 10px;
padding-left : 20px;
border-left : 5px solid #ddd;
}
blockquote cite {
margin : 5px 0 0;
display : block;
}
.center {
text-align : center;
}
hr {
display : none;
}
a img {
border : none;
}
Pre-Navigation .navigation {
display : block;
text-align : center;
margin-top : 10px;
margin-bottom : 60px;
}
div#prenavmenu {
text-align : right;
height : 20px;
width : 773px;
background-color : white;
}
div#prenavmenu ul {
margin : auto;
padding : 2px;
text-align : right;
font-family : 'Lucida Grande', Verdana, Arial, Sans-Serif;
font-size : 0.9em;
line-height : 20px;
background : #f9f9f9 repeat-y fixed 773px 0%;
}
div#prenavmenu li {
list-style-type : none;
display : inline;
}
div#prenavmenu li a {
text-decoration : none;
padding : 5px 0 0 1px;
color : #666666;
}
div#navmenu li a:hover {
color : #114477;
}
.nav .table {
display : table;
float : right;
margin : 50px 7px 0 0;
}
.nav .select, .nav .current {
margin-right : 0;
padding : 0;
list-style : none;
display : table-cell;
white-space : nowrap;
}
.nav li {
margin : 0;
padding : 0;
height : 26px;
float : left;
}
.nav .select a {
display : block;
height : 30px;
float : right;
background : url(images/navi-raster.gif);
padding : 0 15px 0 15px;
text-decoration : none;
line-height : 28px;
white-space : nowrap;
color : white;
}
.nav .current a {
display : block;
height : 30px;
float : right;
background : url(images/navi-raster-visited.gif);
text-decoration : none;
line-height : 23px;
white-space : nowrap;
color : #fff;
}
.nav .current a b {
display : block;
padding : 0 30px 0 15px;
background : url(images/navi-raster-vistited.gif) right top;
}
.nav .select a:hover, .nav .select li:hover a {
background : url(images/navi-raster-visited.gif);
cursor : pointer;
color : #fff;
}
.nav .select a:hover b, .nav .select li:hover a b {
display : block;
float : right;
background : url(images/navi-raster-visited.gif) right top;
cursor : pointer;
}
.nav .select_sub {
display : none;
}
.nav table {
border-collapse : collapse;
margin : -1px;
font-size : 1em;
width : 0;
height : 0;
}
Alles anzeigen
Muss leider noch einmal eine dumme Frage stellen, weil ich es irgendwie nicht hinbekommen.
Ich habe für die h2 Überschrift gewissen Bearbeitungen geamcht.
Nun möchte ich aber, dass die h2 (ausschließlich in der widecolumn) eine anderer Schriftart, grösse und Frabe bekommt.
ich habe es mit h2 .widecolumn probiert aber das funktioniert nicht.
Wie müsste es richtig sein ?
Danke Monika.
Ich werde Dich für das Bundesverdienstkreuz vorschlagen :)
Der code ist oben abgebildet.
Es würde mir im Übrigen auch schon reichen, wenn ich alles wie oben schon vorgeschlagen aus der Klammer rauslassen könnte, ausser die Postinganzahl, die soll 3 sein und die comment-counts sollen weg): Weiss jemand, wie das dann korrekt aussehen müsste, dann lass ich das Linkzeugs ganz raus
Nach dem Klicken auf den Aktivierbutton kommt:
Das Plugin kann nicht aktiviert werden, da es einen fatalen Fehler erzeugt.
Den Plugincode habe ich Dir ja oben komplett mit Deinen Änderungen abgebildet
Wenn ich das mache, dann funktioniert die ganze seite nicht mehr
So sieht der gesamte code dann aus
<?php
/*
Plugin Name: the_excerpt Reloaded
Plugin URI: http://guff.szub.net/the-excerpt-reloaded/
Description: This mod of WordPress' template function the_excerpt() knows there is no spoon.
Version: R1
Author: Kaf Oseo
Author URI: http://szub.net
Copyright (c) 2004, 2005 Kaf Oseo (http://szub.net)
the_excerpt Reloaded is released under the GNU General Public
License: http://www.gnu.org/licenses/gpl.txt
This is a WordPress plugin (http://wordpress.org). WordPress is
free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your
option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
For a copy of the GNU General Public License, write to:
Free Software Foundation, Inc.
59 Temple Place, Suite 330
Boston, MA 02111-1307
USA
You can also view a copy of the HTML version of the GNU General
Public License at http://www.gnu.org/copyleft/gpl.html
~Changelog:
R1 (21-Aug-2005)
Lots of changes and additions. Now a full-blown Release version...
0.3 (20-Apr-2005)
Fixed '...' so it appears when expected; added 'all' argument to
allowedtags parameter (allows all HTML tags); altered filter_type
so if 'content' is the argument, WordPress text formatting occurs
(HTML paragraphs, 'fancy' punctuation, etc).
0.2 (16-Dec-2004)
Plugin now attempts to correct *broken* HTML tags (those allowed
through 'allowedtags') by using WP's balanceTags function. This
is controlled through the 'fix_tags' parameter.
*/
function wp_the_excerpt_reloaded($args='') {
parse_str($args);
if(!isset($excerpt_length)) $excerpt_length = 120; // length of excerpt in words. -1 to display all excerpt/content
if(!isset($allowedtags)) $allowedtags = '<a>'; // HTML tags allowed in excerpt, 'all' to allow all tags.
if(!isset($filter_type)) $filter_type = 'none'; // format filter used => 'content', 'excerpt', 'content_rss', 'excerpt_rss', 'none'
if(!isset($use_more_link)) $use_more_link = 1; // display
if(!isset($more_link_text)) $more_link_text = "(more...)";
if(!isset($force_more)) $force_more = 1;
if(!isset($fakeit)) $fakeit = 1;
if(!isset($fix_tags)) $fix_tags = 1;
if(!isset($no_more)) $no_more = 0;
if(!isset($more_tag)) $more_tag = 'div';
if(!isset($more_link_title)) $more_link_title = 'Continue reading this entry';
if(!isset($showdots)) $showdots = 1;
return the_excerpt_reloaded($excerpt_length, $allowedtags, $filter_type, $use_more_link, $more_link_text, $force_more, $fakeit, $fix_tags, $no_more, $more_tag, $more_link_title, $showdots);
}
function the_excerpt_reloaded($excerpt_length=120, $allowedtags='<a>', $filter_type='none', $use_more_link=true, $more_link_text="(more...)", $force_more=true, $fakeit=1, $fix_tags=true, $no_more=false, $more_tag='div', $more_link_title='Continue reading this entry', $showdots=true) {
if(preg_match('%^content($|_rss)|^excerpt($|_rss)%', $filter_type)) {
$filter_type = 'the_' . $filter_type;
}
echo get_the_excerpt_reloaded($excerpt_length, $allowedtags, $filter_type, $use_more_link, $more_link_text, $force_more, $fakeit, $no_more, $more_tag, $more_link_title, $showdots);
}
function get_the_excerpt_reloaded($excerpt_length, $allowedtags, $filter_type, $use_more_link, $more_link_text, $force_more, $fakeit, $no_more, $more_tag, $more_link_title, $showdots) {
global $post;
if (!empty($post->post_password)) { // if there's a password
if ($_COOKIE['wp-postpass_'.COOKIEHASH] != $post->post_password) { // and it doesn't match cookie
if(is_feed()) { // if this runs in a feed
$output = __('There is no excerpt because this is a protected post.');
} else {
$output = get_the_password_form();
}
}
return $output;
}
if($fakeit == 2) { // force content as excerpt
$text = $post->post_content;
} elseif($fakeit == 1) { // content as excerpt, if no excerpt
$text = (empty($post->post_excerpt)) ? $post->post_content : $post->post_excerpt;
} else { // excerpt no matter what
$text = $post->post_excerpt;
}
if($excerpt_length < 0) {
$output = $text;
} else {
if(!$no_more && strpos($text, '<!--more-->')) {
$text = explode('<!--more-->', $text, 2);
$l = count($text[0]);
$more_link = 1;
} else {
$text = explode(' ', $text);
if(count($text) > $excerpt_length) {
$l = $excerpt_length;
$ellipsis = 1;
} else {
$l = count($text);
$more_link_text = '';
$ellipsis = 0;
}
}
for ($i=0; $i<$l; $i++)
$output .= $text[$i] . ' ';
}
if('all' != $allowed_tags) {
$output = strip_tags($output, $allowedtags);
}
// $output = str_replace(array("\r\n", "\r", "\n", " "), " ", $output);
$output = rtrim($output, "\s\n\t\r\0\x0B");
$output = ($fix_tags) ? $output : balanceTags($output);
$output .= ($showdots && $ellipsis) ? '...' : '';
switch($more_tag) {
case('div') :
$tag = 'div';
break;
case('span') :
$tag = 'span';
break;
case('p') :
$tag = 'p';
break;
default :
$tag = 'span';
}
if ($use_more_link && $more_link_text) {
if($force_more) {
$output .= ' <' . $tag . ' class="more-link"><a href="'. get_permalink($post->ID) . " title="' . $more_link_title . '">' . $more_link_text . '</a></' . $tag . '>' . "\n";
} else {
$output .= ' <' . $tag . ' class="more-link"><a href="'. get_permalink($post->ID) . '" title="' . $more_link_title . '">' . $more_link_text . '</a></' . $tag . '>' . "\n";
}
}
$output = apply_filters($filter_type, $output);
return $output;
}
?>
Alles anzeigen