Bei den Pro Web Layouts Vertika oder Bootstrap 3 müssen für eine automatische Darstellung von Icons nach dem Text des Linkes zwei Dateien angepasst werden. Zum einem „muss” am Ende der Datei css.tpl (/classes/plugins/ngpluginlayout/styles/bootstrap/tpl/css.tpl für das Bootstrap Layout und /classes/plugins/ngpluginlayout/styles/vertika/tpl/css.tpl für das Vertika Layout) zusätzlich
1
2
3
4
5
6
7
8
9
10
|
.prolink {
display: inline-block;
font: normal normal normal 14px/1 FontAwesome;
margin-left: .33em;
font-size: inherit;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
transform: translate(0, 0);
}
|
eingefügt werden.
Außerdem muss die Datei \classes\util\ngrichtext.php angepasst werden. Hier musst du nach
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
if ($links != null) {
foreach ( $links as $link ) {
/* @var $link DOMElement */
$this->link->parseURL ( $link->getAttribute ( 'href' ) );
$link->setAttribute ( 'href', $this->link->getURL () );
if ($this->link->linkType == NGLink::LinkPicture) {
$link->setAttribute ( 'class', 'gallery' );
} else if ($this->link->linkType == NGLink::LinkPagePopup || $this->link->linkType == NGLink::LinkTopicPopup) {
$link->setAttribute ( 'class', 'galleryiframe' );
} else if ($this->link->linkType == NGLink::LinkWWW) {
$link->setAttribute ( 'target', '_blank' );
}
}
}
|
suchen, und den kompletten Bereich durh folgenden PHP-Code ersetzen:
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
if ($links != null) {
foreach ( $links as $link ) {
/* @var $link DOMElement */
$this->link->parseURL ( $link->getAttribute ( 'href' ) );
$link->setAttribute ( 'href', $this->link->getURL () );
$space = $this->doc->createTextNode('');
$icon = $this->doc->createElement("span");
$icon->appendChild ($space);
if ($this->link->linkType == NGLink::LinkPicture) {
$icon->setAttribute ('class', 'prolink fa-picture-o');
$link->appendChild ($icon);
$link->setAttribute ( 'class', 'gallery' );
} else if ($this->link->linkType == NGLink::LinkPagePopup || $this->link->linkType == NGLink::LinkTopicPopup) {
$icon->setAttribute ('class', 'prolink fa-link');
$link->appendChild ($icon);
$link->setAttribute ( 'class', 'galleryiframe' );
} else if ($this->link->linkType == NGLink::LinkWWW) {
$link->setAttribute ( 'target', '_blank' );
$icon->setAttribute ('class', 'prolink fa-globe');
$link->appendChild ($icon);
} else if ($this->link->linkType == NGLink::LinkMailTo) {
$icon->setAttribute ('class', 'prolink fa-envelope');
$link->appendChild ($icon);
} else if ($this->link->linkType == NGLink::LinkPage) {
$icon->setAttribute ('class', 'prolink fa-link');
$link->appendChild ($icon);
} else if ($this->link->linkType == NGLink::LinkTopic) {
$icon->setAttribute ('class', 'prolink fa-link');
$link->appendChild ($icon);
} else if ($this->link->linkType == NGLink::LinkDownload) {
$icon->setAttribute ('class', 'prolink fa-download');
$link->appendChild ($icon);
}
}
}
|
Hier ein Beispieltext mit Bild-, Download- und WWW-Verlinkung.
Link mit Font-Awesome Icons