Verzeichnisstruktur phpBB-3.3.15
- Veröffentlicht
- 28.08.2024
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
Images.js
01 function parse()
02 {
03 var pos = text.indexOf(' > 0)
09 {
10 parseInlineImages();
11 }
12 if (hasReferences)
13 {
14 parseReferenceImages();
15 }
16 }
17
18 /**
19 * Add an image tag for given text span
20 *
21 * @param {number} startPos Start tag position
22 * @param {number} endPos End tag position
23 * @param {number} endLen End tag length
24 * @param {string} linkInfo URL optionally followed by space and a title
25 * @param {string} alt Value for the alt attribute
26 */
27 function addImageTag(startPos, endPos, endLen, linkInfo, alt)
28 {
29 var tag = addTagPair('IMG', startPos, 2, endPos, endLen);
30 setLinkAttributes(tag, linkInfo, 'src');
31 tag.setAttribute('alt', decode(alt));
32
33 // Overwrite the markup
34 overwrite(startPos, endPos + endLen - startPos);
35 }
36
37 /**
38 * Parse inline images markup
39 */
40 function parseInlineImages()
41 {
42 var m, regexp = /!\[(?:[^\x17[\]]|\[[^\x17[\]]*\])*\]\(( *(?:[^\x17\s()]|\([^\x17\s()]*\))*(?=[ )]) *(?:"[^\x17]*?"|'[^\x17]*?'|\([^\x17)]*\))? *)\)/g;
43 while (m = regexp.exec(text))
44 {
45 var linkInfo = m[1],
46 startPos = m.index,
47 endLen = 3 + linkInfo.length,
48 endPos = startPos + m[0].length - endLen,
49 alt = m[0].substring(2, m[0].length - endLen);
50
51 addImageTag(startPos, endPos, endLen, linkInfo, alt);
52 }
53 }
54
55 /**
56 * Parse reference images markup
57 */
58 function parseReferenceImages()
59 {
60 var m, regexp = /!\[((?:[^\x17[\]]|\[[^\x17[\]]*\])*)\](?: ?\[([^\x17[\]]+)\])?/g;
61 while (m = regexp.exec(text))
62 {
63 var startPos = m.index,
64 endPos = startPos + 2 + m[1].length,
65 endLen = 1,
66 alt = m[1],
67 id = alt;
68
69 if (m[2] > '' && linkReferences[m[2]])
70 {
71 endLen = m[0].length - alt.length - 2;
72 id = m[2];
73 }
74 else if (!linkReferences[id])
75 {
76 continue;
77 }
78
79 addImageTag(startPos, endPos, endLen, linkReferences[id], alt);
80 }
81 }