Vereinfachung bzw. Zusammenführung einzelner If-Anweisungen

  • Seite 2 von 2
10.02.2020 12:53 (zuletzt bearbeitet: 10.02.2020 13:08)
avatar  Mike48
#16 RE: Vereinfachung bzw. Zusammenführung einzelner If-Anweisungen
avatar
Mitglied

Ich habe mir das PDF interssenhalber mal angeschaut.
Sieht echt wüst aus.
Ich glaube nicht dass sich da Einer durchwühlen will um den Code zu bereinigen und zu optimieren.

Ich mache aber doch mal ein paar Anmerkungen

1. Forenvariablen die in geschweiften Klammern {{ . . . }} stehen funktionieren nicht in Kopf- und Fusszeile, hat Ingmar ja auch schon erklärt.

2. style Elemente setzt man in der Regel ins CSS

3. Von den script Tags braucht man nur einen am Anfang und einen am Ende.

4. Wenn man den kompletten script-Block mit allen Scripten in document ready fasst, dann funktionieren die Scripte auch in der Kopfzeile.

1
2
3
4
5
6
7
 
<script>
$(document).ready(function(){
 
/* hier den Code hin der nach dem laden der Seite ausgeführt werden soll */
 
});
</script>
 


Zitat
Tja, in der Kopfzeile funktioniert nur 1/4 des Codes:


Das sind die Scripte, die nicht in document ready stehen.


5. Einige Codes sind vielfach vorhanden. Zum Beispiel wird die Navi scheinbar in allen Scripten ausgeschalte. Wenn sie überall weg soll, dann genügt das einmal. Oder man dreht es um und schaltet sie nur in den wenigen Seiten ein, wo so erscheinen soll.

6. Ich würde ein Plugin dafür erstellen. Da kann man gezielter den Code in bestimmte Template-Elemente plazieren damit sie nur da geladen und ausgeführt werden, wo sie gebraucht werden. Außerdem kann man mit den Template-Variablen arbeiten, damit nicht immer der ganze Code auf allen Seiten geladen wird. .


www.friends-of-xobor.de (621181 - V4 Template)
www.seniorenclub-sel-koeln.de (578865 - V6 Template)

 Antworten

 Beitrag melden
10.02.2020 13:14
#17 RE: Vereinfachung bzw. Zusammenführung einzelner If-Anweisungen
avatar
Mitglied

Hallo Mike,
zu 5.) Der Gedanke kam mir schon, den "Spieß umzudrehen", bin aber noch nicht bereit dazu.
Man muss auch mal die Chronologie heranziehen: Woche für Woche erstellt man Seiten, eine nach der anderen
funktioniert tadellos und plötzlich steht man vor der Schallmauer 65.000.
Selbstverständlich habe ich zum Start vor 3 Monaten nicht darüber nachgedacht, wie viele Seiten dass Schachportal irgendwann "im Bauch" hat und die Fusszeile begrenzt sein könnte....da ja u.a. der Profivertrag unbegrenzten Speicherplatz verspricht...

zu 4.) Danke für den Tip, werde ich ausprobieren.

zu 1 u 2.) Da kann ich dir jetzt nicht folgen, die Scripte funktionieren alle, ich kann nur keine weiteren erstellen..."Ende-Gelände" Sobald ich z.B. oben in der Fusszeile 10 Zeilen einfüge, sind die Zeilen unten am Ende weg..


Ich habe in keinster Weise verlangt, dass irgendjemand diese Codes durchwühlt und optimiert.....ich möchte einfach nur weitermachen !


 Antworten

 Beitrag melden
10.02.2020 13:38
#18 RE: Vereinfachung bzw. Zusammenführung einzelner If-Anweisungen
avatar
Mitglied

und schon wieder ist das Forum futsch.....rödel..rödel..rödel..rödel...seit ca. 5 Minuten


 Antworten

 Beitrag melden
10.02.2020 13:48 (zuletzt bearbeitet: 10.02.2020 14:10)
avatar  Mike48
#19 RE: Vereinfachung bzw. Zusammenführung einzelner If-Anweisungen
avatar
Mitglied

Die Styles können aber nicht wie gewollt funktionieren.
Laut Code sollen die nur bei ausgeloggten Usern funktionieren.
Da aber {{user_registered==false.start}} .. {{user_registered==false.end}} in der Fußzeile nicht funktioniert werden die Styles bei jedem ausgeführt.

Aus diesem Grund kannst du sie einfach ins CSS eintragen
Admin → Layout → Farben & Einstellungen → CSS

Ich meine diese styles

1
2
3
4
5
6
7
8
9
 
#usercont_bottom {
display: none;
}
.stats {
display: none;
}
.footer #faq_link, #member_link, #useronline_link {
display: none;
}
 



Die styles kann man auch zusammenfassen und ins CSS setzen

1
2
3
 
#usercont_bottom, .stats, .footer #faq_link, #member_link, #useronline_link {
display: none;
}
 



Hier sind zwei Fehler drin.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
 
{{user_registered==false.start}}
<style type="text/css">
#usercont_bottom {
display: none;
}
.stats {
display: none;
}
.footer #faq_link, #member_link, #useronline_link {
display: none;
}
</style>
{{user_registered==false.end
</script>
 



Das {{user_registered==false.end ist offen.
Muss so aussehen
{{user_registered==false.end}}

Unter dem {{user_registered==false.end ist noch ein script-End-Tag.
Der muss weg.


www.friends-of-xobor.de (621181 - V4 Template)
www.seniorenclub-sel-koeln.de (578865 - V6 Template)

 Antworten

 Beitrag melden
10.02.2020 14:53
#20 RE: Vereinfachung bzw. Zusammenführung einzelner If-Anweisungen
avatar
Mitglied

Ok, die Aufteilung der Codes in die Kopf- u. Fusszeile klappt.
Nun habe ich wieder Platz für weitere...
Mike, du hast mir sehr geholfen !

Melde mich wieder, wenn ich 2 x 65.000 voll habe

@ Ingmar: Einfach 3 Nullen hinten dran..und schon ist der Drop gelutscht


 Antworten

 Beitrag melden
10.02.2020 15:44 (zuletzt bearbeitet: 11.02.2020 12:43)
avatar  Mike48
#21 RE: Vereinfachung bzw. Zusammenführung einzelner If-Anweisungen
avatar
Mitglied

Ich habe mich doch mal mit dem StrubbelCode beschäftigt.

Der Code ist nur noch etwa ein Vietel vom Ursprung.

Das unter Admin → Layout → Farben & Einstellungen → CSS

1
2
3
4
5
6
7
8
9
 
#usercont_bottom {
display: none;
}
.stats {
display: none;
}
.footer #faq_link, #member_link, #useronline_link {
display: none;
}
 



Das hier entweder in die Kopf- oder Fußzeile.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
 
<script>
$(document).ready(function(){
$(".blog-article a:contains('Jetzt kommentieren')").hide();
$("div.page_blog_entry").find("div.spacer10:contains('Sie haben nicht die erforderlichen Rechte')").closest("div.box").hide();
$("div.page_blog_entry").find("a:contains('Melden Sie sich an')").closest("center").hide();
if (document.location.href.search('./gallery.php')!=-1) {
if (document.location.href.search('.?show=last')!=-1) {
$('.page_gallery').css('background-color','#0000ff');//Hintergrundfarbe show=last
}
else{
$('.page_gallery').css('background-color','#000000');//Hintergrundfarbe Gallery
}
}
$('#userbox_').closest('.box_container').remove();
$('.blog-article-header').hide();
$('#navigation').remove();
$('.blog-article-body').css("background-image","url(https://files.homepagemodules.de/b782117/resize/1063x1200/pictures_u1468_idqFtWzY.png)");
$('#logo_andreas').attr("src", "//files.homepagemodules.de/b782117/a_198_b4cfa889.png");
if(window.location.href=='https://www.andili.de/blog-e20752-Schach-lernen.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20555-SchachportalStartseite.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20686-Schachtraining-mitShazzarr-Blitzschach-mit-Live-Kommentar.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20628-SchachtrainingStartseite.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20756-LedatorAmateurspieler-besiegen.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20628-SchachtrainingStartseite.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20555-SchachportalStartseite.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de';
});
}
if(window.location.href=='https://www.andili.de/page-782117-1.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20584-NRW-Vereinsportal.html';
});
}
if(window.location.href=='https://www.andili.de/page-782117-2.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20584-NRW-Vereinsportal.html';
});
}
if(window.location.href=='https://www.andili.de/page-782117-3.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20584-NRW-Vereinsportal.html';
});
}
if(window.location.href=='https://www.andili.de/page-782117-4.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20584-NRW-Vereinsportal.html';
});
}
if(window.location.href=='https://www.andili.de/page-782117-5.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20584-NRW-Vereinsportal.html';
});
}
if(window.location.href=='https://www.andili.de/page-782117-6.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20584-NRW-Vereinsportal.html';
});
}
if(window.location.href=='https://www.andili.de/page-782117-7.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20584-NRW-Vereinsportal.html';
});
}
if(window.location.href=='https://www.andili.de/page-782117-9.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20584-NRW-Vereinsportal.html';
});
}
if(window.location.href=='https://www.andili.de/page-782117-10.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20584-NRW-Vereinsportal.html';
});
}
if(window.location.href=='https://www.andili.de/page-782117-11.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20584-NRW-Vereinsportal.html';
});
}
if(window.location.href=='https://www.andili.de/page-782117-12.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20584-NRW-Vereinsportal.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20743-Lichess.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20628-SchachtrainingStartseite.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20694-Aufgaben-Matt-inZuegen.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20628-SchachtrainingStartseite.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20556-Partien-MagnusCarlsen.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20619-Schachpartien-derWeltklasse.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20558-Partien-VincentKeymer.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20619-Schachpartien-derWeltklasse.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20559-Partien-TimLipske.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20620-Schachpartien-vonVereinsspielern.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20560-Match-desJahrhunderts.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20619-Schachpartien-derWeltklasse.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20561-Schloss-Open.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20564-Weitere-Turniere.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20562-Sekt-oderSelters.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20564-Weitere-Turniere.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20563-Turm-Open.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20564-Weitere-Turniere.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20564-WeitereTurniere.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20555-SchachportalStartseite.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20577-Die-besten-Partienaller-Zeiten.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20619-Schachpartien-derWeltklasse.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20581-Chessmail.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20628-SchachtrainingStartseite.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20582-Partien-GarryKasparov.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20619-Schachpartien-derWeltklasse.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e1403-Clip-Schach.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20555-SchachportalStartseite.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20584-NRWVereinsportal.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20555-SchachportalStartseite.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20585-Partien-BobbyFischer.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20619-Schachpartien-derWeltklasse.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20587-StappenmethodeAufgaben-der-Woche.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20628-SchachtrainingStartseite.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20608-Partien-RalfWagner.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20620-Schachpartien-vonVereinsspielern.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20607-Partien-RalfSchlaap.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20620-Schachpartien-vonVereinsspielern.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20606-Partien-HansjoergHimmel.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20620-Schachpartien-vonVereinsspielern.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20601-Partien-RafaelTorres-Kuckel.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20620-Schachpartien-vonVereinsspielern.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20605-Partien-HeinzGeorg.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20620-Schachpartien-vonVereinsspielern.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20604-Partien-KlausBusche.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20620-Schachpartien-vonVereinsspielern.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20602-Partien-Karl-HeinzVolesky.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20620-Schachpartien-vonVereinsspielern.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20603-Partien-CarstenSteinle.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20620-Schachpartien-vonVereinsspielern.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20666-Partien-HeinerHappel.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20620-Schachpartien-vonVereinsspielern.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20668-Partien-HartmutKauder.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20620-Schachpartien-vonVereinsspielern.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20701-Partien-ChristianSchwarzkopf.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20620-Schachpartien-vonVereinsspielern.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20702-Partien-Dr-StefanBeulertz.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20620-Schachpartien-vonVereinsspielern.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20703-Partien-DietmarStolle.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20620-Schachpartien-vonVereinsspielern.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20704-Partien-ThomasLampe.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20620-Schachpartien-vonVereinsspielern.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20665-Partien-RalfFrombach.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20620-Schachpartien-vonVereinsspielern.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20664-Partien-ManuelDargel.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20620-Schachpartien-vonVereinsspielern.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20619-Schachpartien-derWeltklasse.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20555-SchachportalStartseite.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20722-Warum-Schach.html')
{
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20555-SchachportalStartseite.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20620-Schachpartien-vonVereinsspielern.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20555-SchachportalStartseite.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e1403-Schachtraining-mitShazzarr.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20628-SchachtrainingStartseite.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20689-Schachtraining-mitShazzarr-Schnellschach-mit-Live-Kommentar.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20628-SchachtrainingStartseite.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20624-Schachtraining-mitTopschach-de-Typische-Endspielfehler.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20628-SchachtrainingStartseite.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20627-Schachtraining-mitTopschach-de-Strategie.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20628-SchachtrainingStartseite.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20693-Schachtipps-de.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20628-SchachtrainingStartseite.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20628-SchachtrainingStartseite.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20555-SchachportalStartseite.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20629-SchachportalDisclaimer.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20555-SchachportalStartseite.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20630-SchachportalDatenschutzerklaerung.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20555-SchachportalStartseite.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20631-SchachportalImpressum-und-Datenschutz.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20555-SchachportalStartseite.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20632-Schachtraining-mitTopschach-de-Eroeffnungsfallen.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20628-SchachtrainingStartseite.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20651-Partien-VladimirKramnik.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20619-Schachpartien-derWeltklasse.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20650-Partien-ViswanathanAnand.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20619-Schachpartien-derWeltklasse.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20655-Partien-FabianSchlottmann.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20620-Schachpartien-vonVereinsspielern.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20656-Partien-MartinMerz.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20620-Schachpartien-vonVereinsspielern.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20657-Partien-JensLuetke.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20620-Schachpartien-vonVereinsspielern.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20679-Partien-LandoKorten.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20620-Schachpartien-vonVereinsspielern.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20680-Partien-ChrisHuckebrink.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20620-Schachpartien-vonVereinsspielern.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20660-Online-Schach.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20555-SchachportalStartseite.html';
});
}
if(window.location.href=='https://www.andili.de/page-782117-37.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20660-Online-Schach.html';
});
}
if(window.location.href=='https://www.andili.de/donations.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20700-Informationen-undSpendenkonto.html';
});
}
if(window.location.href=='https://www.andili.de/payedabo_forum.php?donate=1'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/donations.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20700-Informationen-undSpendenkonto.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20555-SchachportalStartseite.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20715-Die-wichtigstenMomente-der-Schachgeschichte.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20719-Schachbildung-Wissenist-Macht.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20718-Die-Geschichte-desSchachs.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20719-Schachbildung-Wissenist-Macht.html';
});
}if(window.location.href=='https://www.andili.de/blog-e20719-SchachbildungWissen-ist-Macht.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20555-SchachportalStartseite.html';
});
}
if(window.location.href=='https://www.andili.de/page-782117-52.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20719-Schachbildung-Wissenist-Macht.html';
});
}
if(window.location.href=='https://www.andili.de/page-782117-53.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20719-Schachbildung-Wissenist-Macht.html';});
}
if(window.location.href=='https://www.andili.de/page-782117-54.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20719-Schachbildung-Wissenist-Macht.html';
});
}
if(window.location.href=='https://www.andili.de/page-782117-55.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20719-Schachbildung-Wissenist-Macht.html';
});
}
if(window.location.href=='https://www.andili.de/page-782117-57.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20719-Schachbildung-Wissenist-Macht.html';
});
}
if(window.location.href=='https://www.andili.de/page-782117-58.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20719-Schachbildung-Wissenist-Macht.html';
});
}
if(window.location.href=='https://www.andili.de/page-782117-59.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20719-Schachbildung-Wissenist-Macht.html';
});
}
if(window.location.href=='https://www.andili.de/page-782117-60.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20719-Schachbildung-Wissenist-Macht.html';
});
}
if(window.location.href=='https://www.andili.de/page-782117-61.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20719-Schachbildung-Wissenist-Macht.html';
});
}
if(window.location.href=='https://www.andili.de/page-782117-62.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20719-Schachbildung-Wissenist-Macht.html';
});
}
if(window.location.href=='https://www.andili.de/page-782117-63.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20719-Schachbildung-Wissenist-Macht.html';
});
}
if(window.location.href=='https://www.andili.de/page-782117-64.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20719-Schachbildung-Wissenist-Macht.html';
});
}
if(window.location.href=='https://www.andili.de/page-782117-65.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20719-Schachbildung-Wissenist-Macht.html';
});
}
if(window.location.href=='https://www.andili.de/page-782117-67.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20719-Schachbildung-Wissenist-Macht.html';
});
}
if(window.location.href=='https://www.andili.de/page-782117-68.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20719-Schachbildung-Wissenist-Macht.html';
});
}
if(window.location.href=='https://www.andili.de/page-782117-69.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20719-Schachbildung-Wissenist-Macht.html';
});
}
if(window.location.href=='https://www.andili.de/page-782117-70.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20719-Schachbildung-Wissenist-Macht.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20745-Chess-Results.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20555-SchachportalStartseite.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20507-Kegelclub.html'){
$('.blog-article-body').css("background-image","url(https://files.homepagemodules.de/b782117/a_184_c1b0f99e.png)");
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20507-Kegelclub.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e14989-Kegelclub.html'){
$('.blog-article-body').css("background-image","url(//files.homepagemodules.de/b782117/a_184_c1b0f99e.png)");
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20507-Kegelclub.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20540-KegelclubSpiele.html'){
$('.blog-article-body').css("background-image","url(//files.homepagemodules.de/b782117/a_184_c1b0f99e.png)");
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20507-Kegelclub.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20539-KegelclubAusflugziele.html'){
$('.blog-article-body').css("background-image","url(https:///files.homepagemodules.de/b782117/a_184_c1b0f99e.png)");
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20507-Kegelclub.html';
});
}
if(window.location.href=='https://www.andili.de/blog-e20541-KegelclubSpieltage.html'){
$('#logo_andreas').click(function(){
window.location = 'https://www.andili.de/blog-e20507-Kegelclub.html';
});
}
});
</script>
 


www.friends-of-xobor.de (621181 - V4 Template)
www.seniorenclub-sel-koeln.de (578865 - V6 Template)

 Antworten

 Beitrag melden
10.02.2020 17:41
#22 RE: Vereinfachung bzw. Zusammenführung einzelner If-Anweisungen
avatar
Mitglied

Wahnsinn Mike
Bin sprachlos...klasse
Werde das aber erst nächstes Wochenende ausprobieren können.
Der Alltagsstress ist zurück....Teerpappe vom Hüttendach geflogen, Blumenpötte umgekippt, etc.
Der Garten braucht meine Aufmerksamkeit .
Werde mich hier passend zurückmelden..

Gruß Andi


 Antworten

 Beitrag melden
10.02.2020 18:42 (zuletzt bearbeitet: 10.02.2020 18:43)
avatar  Mike48
#23 RE: Vereinfachung bzw. Zusammenführung einzelner If-Anweisungen
avatar
Mitglied

Die meisten Funktionen in den Scripten ändert nur die Zieladresse vom Logo-Bild in den einzelnen Blog-Artikeln.
Dafür könnte man auch ein Icon in die Iconbar einbauen.

Admin → Layout → Iconbar

1
2
3
 
[logoandreas] . . . [/logoandreas]
<script>$('#logo_andreas').click(function(){window.location = '
';});</script>
 



Das Icon verwendet man im Blog-Artikel und setzt einfach die Adresse dazwischen.
Damit entfällt der meiste Code aus deiner Fußzeile.


www.friends-of-xobor.de (621181 - V4 Template)
www.seniorenclub-sel-koeln.de (578865 - V6 Template)

 Antworten

 Beitrag melden
Bereits Mitglied?
Jetzt anmelden!
Mitglied werden?
Jetzt registrieren!