Forensis Virtualis: Code-Schnippsel
Posts mit dem Label Code-Schnippsel werden angezeigt. Alle Posts anzeigen
Posts mit dem Label Code-Schnippsel werden angezeigt. Alle Posts anzeigen

Dienstag, 13. November 2018

Inhaltsverzeichnis für Blogger (Blogspot) Blogs

Um ein Inhaltsverzeichnis ALLER Blog-Artikel auf einer Seite zu erstellen, gibt es einige Möglichkeiten, die besten in Javascript. Ich mag lieber Javscripte selbst schreiben, aber hier ging es um was "Zügiges". Ich hab noch eins in der Schublade, abder bis das fertig ist, benutze ich dies:

TOC SCRIPT ("Table of Content" = Inhaltsverzeichnis)

Benutzt habe ich jetzt erstmal das hier ...
https://blogcode101.blogspot.com/2017/04/how-to-create-table-of-content-toc-on.html

... und dasselbe ist in einer etwas anderes Style-Variante auch hier beschrieben:
http://myblogsideas.blogspot.com/2015/10/i-make-sitemap-table-of-contents-blog.html

Anleitung weiter unten, noch etwas vorweg:

SICHERHEIT

Wie gesagt - es ist kein eigenes Script, sondern greift auf ein fertiges, kostenloses, externes Script zurück, dass bei storage.googleapis.com gehostet ist. Was das für eine Service ist, wird hier erklärt:

https://www.quora.com/What-is-Storage-googleapis-com:
http://storage.googleapis.com is the service that hosts Google Cloud Storage. You can read about the product information at cloud.google.com/storage.

Obwohl die googleapis Platform in der Vergangenheit von einige Hackern missbraucht wurde, bezeichnet das WebOfTrust den Service inzwischen wieder als sicher. Immerhin. Dennoch wird es gelegentlich gegen was Eigenes ausgetauscht.

Aber für "im Moment" geht das so:

INHALTSVERZEICHNIS FÜR BLOGGER (BLOGSPOT) BLOGS:

# 1. Blogger > Seite erstellen > HTML Modus > Code einfügen:

<div id="bp_toc">Loading TOC. Please wait....</div>
<script src="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/bloggergadgets/blogtoc_orig.js" type="text/javascript"></script>
<script src="/feeds/posts/summary?alt=json-in-script&amp;max-results=500&amp;callback=loadtoc" type="text/javascript"></script>

Unter "Seitenoptionen" noch die Kommentare abschalten, speichern.

# 2. Dann in Blogger > Design > Anpassen >  Erweitert  > CSS hinzufügen:

STYLE 1 (einfache Tabelle mit dunklem Header)

#bp_toc { border: 0px solid #000000; background: #ffffff; padding: 5px;
width:100%; margin-top:10px; }
.toc-header-col1, .toc-header-col2, .toc-header-col3 {
background: #eee; color: #000; padding-left: 5px; width:43.5%; }
.toc-header-col2 { width:13%; }
.toc-header-col3 { width:43.5%; }
.toc-header-col1 a:link, .toc-header-col1 a:visited, .toc-header-col2 a:link, .toc-header-col2 a:visited, .toc-header-col3 a:link, .toc-header-col3 a:visited { font-size:100%; text-decoration:none; }
.toc-header-col1 a:hover, .toc-header-col2 a:hover, .toc-header-col3 a:hover { font-size:100%; text-decoration:underline; }
.toc-entry-col1, .toc-entry-col2, .toc-entry-col3 { padding-left: 5px; font-size:90%; }

ALTERNATIV: STYLE 2 (sehr schick, mehr Pepp)


<div id="bp_toc">Loading TOC. Please wait....</div>
<script src="http://bloggergadgets.googlecode.com/files/blogtoc_orig.js" type="text/javascript"></script>
<script src="/feeds/posts/summary?alt=json-in-script&max-results=500&callback=loadtoc" type="text/javascript"></script>

<style>
#bp_toc { border: 0px solid #000000;background: #ffffff;  padding: 5px;  width:500px;  margin-top:10px; }
.toc-header-col1, .toc-header-col2, .toc-header-col3 {
  background: #fafafc;  color: #000000;  padding-left: 5px;  width:250px; }
.toc-header-col2 {  width:75px; }
.toc-header-col3 {  width:125px; }
.toc-header-col1 a:link, .toc-header-col1 a:visited, .toc-header-col2 a:link, .toc-header-col2 a:visited, .toc-header-col3 a:link, .toc-header-col3 a:visited {font-size:80%; text-decoration:none; }
.toc-header-col1 a:hover, .toc-header-col2 a:hover, .toc-header-col3 a:hover {
  font-size:80%; text-decoration:underline; }
.toc-entry-col1, .toc-entry-col2, .toc-entry-col3 { padding-left: 5px; font-size:70%; }

Viel Erfolg!

Montag, 15. Oktober 2018

Kartenausschnitte

Braucht jemand eine Karte für Blog oder Webseite?

Natürlich gibt's da was von Google:

https://www.google.com/maps
Menü > Meine Orte > Karten > Karte erstellen

Eventuell funktioniert auch der direkte Link (ich bin mir nicht sicher):
https://www.google.com/maps/d/u/0/edit?hl=de&hl=de&mid=1Fa-20v3AX4MSVSM8qJcF6PPU-2Epplgj&ll=51.04816036506509%2C10.4515265&z=6

Dann solange rumspielen, bis die Wunschkarte erstellt ist.
Wenn fertig, auf "Teilen" klicken > Zugriff: "öffentlich".

Unter den drei Punkten steht der Kartenname, dort findet man auch die Option "In meine Website einbinden". HTML Code schnappen, in Blog oder Webseite kopieren, fertig.

Alternativen

Wer lieber auf open source statt Kommerz zurückgreift, mag vielleicht das hier lieber (bei Wordpress ist das angeblich sogar bereits integriert, muss ich noch testen):

https://leafletjs.com/examples/quick-start/

LOL - ich sehe gerade, hier finden sich bereits perfekte Beschreibungen:
https://www.katzentante.at/karten-blog-posts-einfugen/

Weitere Alternativen:
https://de.batchgeo.com/features/embedded/
http://mapsblog.de/spezielle-online-maps/reiseblog-karten-speichern/
https://blog.outdooractive.com/2012/07/25/einbindung-von-karten-in-eigene-webseiten/

Mittwoch, 10. Oktober 2018

HTML für klick/klappbare Seitenleiste

Ich aktualisiere gerade das Blog, dabei fallen einige alte Inhalte weg. Hier möchte ich allerdings ein Script aufbewahren, dass immer recht nett war: eine aufklappbare Seitenleiste mit "Untermenüs", also ein klappbare Linkliste für die Blogspot-Blogs. Einfach im Layout/Design einen HTML Block einsetzen, und dieses Script verwenden (die Link-Inhalte natürlich individuell anpassen):




<style type="text/css"><!--
 .subm {padding-left:3px;}
//--></style>

<script language="JavaScript" type="text/javascript"><!--
function show(start,ende) { if(document.getElementById) {
  if(document.getElementById("subm"+start).style.display == 'inline') { hide(start,ende); }
  else { for(i=start; i<ende+1; i++) { document.getElementById('subm'+i).style.display = 'inline'; } } } }
function hide(start,ende) { 
  if(document.getElementById('subm'+start).style.display == 'none') { show(start,ende); }
  else { for(i=start; i<ende+1; i++) { document.getElementById('subm'+i).style.display = 'none'; } } }
--></script>

<b><a href="javascript:hide(101,107);">ר Friends & Projects</a></b><br/>
<div id="subm101" style="display:none"><div class="subm"><a href="http://www.debiler-leben.de.gg/">♥ debiler-leben.de.gg</a></div></div>
<div id="subm102" style="display:none"><div class="subm"><a href="http://kassandra-irrealewelt.blogspot.com/">♥ Kassandra's Irreale Welt</a></div></div>  
<div id="subm103" style="display:none"><div class="subm"><a href="http://www.momentos-sinceros.de.gg/">♥ Momentos Sinceros</a></div></div>  
<div id="subm104" style="display:none"><div class="subm"><a href="http://prinzgoliath.blogspot.com/">♥ Prinz Goliath</a></div></div>  
<div id="subm105" style="display:none"><div class="subm"><a href="http://nilsisblog.blogspot.com/">♥ Nilsi's Blog</a></div></div>  
<div id="subm106" style="display:none"><div class="subm"><a href="http://www.wir-in-guetersloh.de.gg/">♥ Wir in GT</a></div></div>  
<div id="subm107" style="display:none"><div class="subm"><a href="http://schoen-heits-farm.blogspot.com/">♥ schoen-heits-farm</a></div></div>  

<!-- ####### -->

<b><a href="javascript:hide(201,299);">ר Photo & Video</a></b><br/>
<div id="subm201" style="display:none"><div class="subm"><a href="http://www.youtube.com/profile_play_list?user=forentube">Φ youtube: forentube</a></div></div>
<div id="subm202" style="display:none"><div class="subm"><a href="http://picasaweb.google.com/forengeist">Φ picasa: forengeist</a></div></div>  
<div id="subm203" style="display:none"><div class="subm"><a href="http://de.sevenload.com/mitglieder/wir-in-gt">Φ sevenload: wiringt</a></div></div>  
<div id="subm204" style="display:none"><div class="subm"><a href="http://www.flickr.com/photos/baer_chi/">Φ flickr: baer_chi</a></div></div>  
<div id="subm205" style="display:none"><div class="subm"><a href="http://www.flickr.com/photos/baerchn/">Φ flickr: baerchn</a></div></div>  
<div id="subm206" style="display:none"><div class="subm"><a href="http://www.fotocommunity.de/pc/pc/mypics/844487">Φ Kassi's FotoCommunity</a></div></div>  
<div id="subm207" style="display:none"><div class="subm"><a href="http://shop.posterxxl.com/cgi-bin/xps_shop_poster.cgi?xps=0711261404">Φ KassaForens Poster</a></div></div>  
<div id="subm250" style="display:none"><div class="subm"><hr/></div></div>  
<div id="subm251" style="display:none"><div class="subm"><a href="http://www.flickr.com/badge.gne">- flickr badge</a></div></div>  
<div id="subm252" style="display:none"><div class="subm"><a href="http://www.picnik.com">- picnik.com</a></div></div>  
<div id="subm253" style="display:none"><div class="subm"><a href="http://www.fotoflexer.com">- fotoflexer</a></div></div>  
<div id="subm254" style="display:none"><div class="subm"><a href="http://www.slide.com">- slide.com</a></div></div>  
<div id="subm255" style="display:none"><div class="subm"><a href="http://www.save.tv">- save.tv</a></div></div>  

<!-- ####### -->

<b><a href="javascript:hide(301,315);">ר Online Office</a></b><br/>
<div id="subm301" style="display:none"><div class="subm"><a href="http://www.google.de/ig?hl=de">> I-Google</a></div></div>
<div id="subm302" style="display:none"><div class="subm"><a href="http://mail.google.com/mail">>> Google Mail</a></div></div>
<div id="subm303" style="display:none"><div class="subm"><a href="http://www.google.com/calendar">>> Google Kalender</a></div></div>
<div id="subm304" style="display:none"><div class="subm"><a href="http://www.google.com/reader/">>> Google Reader</a></div></div>
<div id="subm305" style="display:none"><div class="subm"><a href="https://webmailcluster.1und1.de/">>> 1&1 WebMail</a></div></div>

<div id="subm306" style="display:none"><div class="subm"><a href="http://www.facebook.com">> facebook.com</a></div></div>
<div id="subm307" style="display:none"><div class="subm"><a href="http://www.gmx.de">> gmx.de</a></div></div>
<div id="subm308" style="display:none"><div class="subm"><a href="http://www.web.de">> web.de</a></div></div>
<div id="subm309" style="display:none"><div class="subm"><a href="http://www.freenet.de">> freenet</a></div></div>
<div id="subm310" style="display:none"><div class="subm"><a href="http://www.yahoo.de">> yahoo</a></div></div>

<div id="subm311" style="display:none"><div style="padding-top:3px;" class="subm"><a href="http://www.eBuddy.com">> Msg eBuddy</a></div></div>
<div id="subm312" style="display:none"><div class="subm"><a href="http://www.meebo.com">> Msg meebo</a></div></div>

<div id="subm313" style="display:none"><div class="subm"><a href="http://www.pfingo.com">> Tel & Msg. pfingo.com</a></div></div>
<div id="subm314" style="display:none"><div class="subm"><a href="http://www.debitel-light.de">> Tel debitel-light.de</a></div></div>
<div id="subm315" style="display:none"><div class="subm"><a href="http://www.blau.de">> Tel blau.de</a></div></div>


<!-- ####### -->

<b><a href="javascript:hide(401,407);">ר WebTools & Scripts</a></b><br/>
<div id="subm401" style="display:none"><div class="subm"><a href="http://de.wikipedia.org/wiki/Benutzer:1001/Sonderzeichen_und_Entit%C3%A4ten">Ξ 1000 Sonderzeichen</a></div></div>
<div id="subm402" style="display:none"><div class="subm"><a href="http://www.opinionatedgeek.com/DotNet/Tools/HTMLEncode/Encode.aspx">Ξ HTML Encoder</a></div></div>
<div id="subm403" style="display:none"><div class="subm"><a href="http://www.bitteklickensiehier.de/webseiten/_blogstuff/forengeist/media-converter.html">Ξ Media Converter</a></div></div>
<div id="subm404" style="display:none"><div class="subm"><a href="http://www.feeddigest.com/">Ξ FeedDigestl</a></div></div>
<div id="subm405" style="display:none"><div class="subm"><a href="http://www.drawanywhere.com/">Ξ DrawAnyWhere</a></div></div>
<div id="subm406" style="display:none"><div class="subm"><a href="http://docx-converter.com/">Ξ DocXConverter</a></div></div>
<div id="subm407" style="display:none"><div class="subm"><a href="http://www.tinyurl.com">Ξ TinyUrl</a></div></div>

<!-- ####### -->

<b><a href="javascript:hide(501,505);">ר Suchen & Nachgucken</a></b><br/>
<div id="subm501" style="display:none"><div class="subm"><a href="http://www.dasoertliche.de/e">> Tel: DasOertliche</a></div></div>
<div id="subm502" style="display:none"><div class="subm"><a href="http://www.11880.com/">> Tel: 11880</a></div></div>
<div id="subm503" style="display:none"><div class="subm"><a href="http://dict.leo.org">> D/E Wörterbuch</a></div></div>
<div id="subm504" style="display:none"><div class="subm"><a href="http://books.google.com/books?hl=de">> Google Books</a></div></div>
<div id="subm505" style="display:none"><div class="subm"><a href="http://www.postleitzahl.org/">> postleitzahl.org</a></div></div>

<!-- ####### -->

<b><a href="javascript:hide(601,611);">ר Musik & Radio</a></b><br/>
<div id="subm601" style="display:none"><div class="subm"><a href="http://www.bitteklickensiehier.de/webseiten/_blogstuff/forengeist/ringtones/">Ω Ringtones</a></div></div>   
<div id="subm602" style="display:none"><div class="subm"><a href="http://yp.shoutcast.com/directory/index.phtml">Ω Radios: shoutcast.com</a></div></div>
<div id="subm603" style="display:none"><div class="subm"><a href="http://www.ndr2.de/pages_special_lib/0,3322,SPM9296,00.html">Ω Radio GT</a></div></div>
<div id="subm604" style="display:none"><div class="subm"><a href="http://www1.ndr2.de/pages_special_lib/0,3322,SPM7078,00.html">Ω Radio NDR2</a></div></div>  
<div id="subm605" style="display:none"><div class="subm"><a href="http://www.wdr.de/radio/wdr2/musik/playlist.phtml">Ω Radio WDR2</a></div></div>  
<div id="subm606" style="display:none"><div class="subm"><a href="http://www.starlight-media.de/radioefr/">Ω Radio EFR</a></div></div>  
<div id="subm607" style="display:none"><div class="subm"><a href="http://www.rmnradio.de/index2.html">Ω Radio RMN</a></div></div>  
<div id="subm608" style="display:none"><div class="subm"><a href="http://www.phonostar.de/">Ω phonostar.de</a></div></div>  
<div id="subm609" style="display:none"><div class="subm"><a href="http://www.mpex.net/">Ω mpex.net</a></div></div>  
<div id="subm610" style="display:none"><div class="subm"><a href="http://www.musopen.com/music.html">Ω musopen.com</a></div></div>   
<div id="subm611" style="display:none"><div class="subm"><a href="http://www.laut.de/">Ω laut.de</a></div></div>   

<!-- ####### -->

<b><a href="javascript:hide(701,705);">ר Bookmarks</a></b><br/>
<div id="subm701" style="display:none"><div class="subm"><a href="http://www.google.com/bookmarks/">> Google Bookmarks</a></div></div>
<div id="subm702" style="display:none"><div class="subm"><a href="http://my.foxmarks.com/">> foxmarks.com</a></div></div>  
<div id="subm703" style="display:none"><div class="subm"><a href="http://terese.linkarena.com/linklist">> linkarena</a></div></div>  
<div id="subm704" style="display:none"><div class="subm"><a href="http://www.mister-wong.de/user/Forengeist/">> mister-wong.de</a></div></div>  
<div id="subm705" style="display:none"><div class="subm"><a href="http://del.icio.us/forengeist?setcount=50">> del.icio.us</a></div></div>



Sonntag, 16. September 2007

YouTube Playlist im Blog einbinden

Eine YouTube Playlist kann man wie folgt auf seinem Blog einbinden:

a) Deine Playlist bei YouTube aufrufen.
b) Das Script kopieren, das im oberen Seitenbereich neben "Embed" (direkt über "Create Custom Player") angezeigt wird.
c) Darin die Werte für height und width anpassen (zweimal im Skript vorhanden), siehe Muster (nicht verwenden! Nur zur Ansicht!):

<object width="200" height="140"><param name="movie" value="http://www.youtube.com/p/....."></param><embed src="http://www.youtube.com/p/....." type="application/x-shockwave-flash" width="200" height="140"></embed></object>

d) bei Blogger ein neues Seitenelement "HTML/Javascript" hinzufügen
e) Skript reinkopieren, fertig.

Fügt man in YouTube neue Titel hinzu, aktualisiert sich die Playlist auf dem Blog ebenfalls automatisch selbst. Dauert nur manchmal ein bisschen, je nach Datenbankupdate zwischen Google und YouTube.

Donnerstag, 6. September 2007

Blogger-Notiz: Sprungziele definieren

So kann man in Blogger aus einem Seitenelement heraus einen Link zu einem anderen Seitenelement legen (zum Beispiel, wenn man das Gästebuch im Fuss-Bereich anlegt und über ein oberes Menü erreichbar machen will):

Im Ziel-Element einen HTML-Anker definieren, z.B. <a name="gbuch"> </a>

Dann im Menü-Element einen Link zu diesem Anker setzen, z.B.
Name: [Trag Dich ins Gästebuch ein!]
URL: [http://mein.blogspot.com/#gbuch]

Oder ein HTML-Element setzen:
<a href="http://mein.blogspot.com/#gbuch">Trag Dich bitte hier ein!</a>

Beispiele finden sich auf => Kassandra's Blog und => Nilsi's Blog

Dienstag, 4. September 2007

CopyScape: sag mir, wo die Texte sind ...

Bei => copyscape kann man google-artig gucken, auf welchen anderen Webseiten die gleichen Texte vorkommen. So lassen sich "Textklauer" im WEb leichter identifizieren.

Mittwoch, 29. August 2007

Bye, bye Snap-Code

=> Snap.com bietet einen Code für die eigene Website / Blog, mit der eine Vorschau angezeigt wird, sobald man mit der Maus über einen Link fährt, der sog. "Snap-Preview".

Das ist toll, und ich habe den Code lange Zeit gern auf meinem Blog benutzt. Inzwischen ist dies aber durch => CoolIris (ein FireFox-PlugIn) überholt.

Ausserdem macht Snap bei blogger Schwierigkeiten: will man am Blogger-Layout arbeiten, muss man erst den Snap-Code wieder vorübergehend entfernen, da er sich mit den Layoutfunktionen von Blogger "beisst".

Darum: bye, bye Snap-Code. Zur Erinnerung und für mein Archiv hier nochmal der Code, der direkt ins HTML einzubinden war:

<head>

<script defer='defer' id='snap_preview_anywhere' src='http://spa.snap.com/snap_preview_anywhere.js?ap=1&amp;key=e39cc2624aec8934874087c0455dd937&amp;sb=1&amp;domain=wir-in-gt.blogspot.com/' type='text/javascript'/>

Nebenbei beim Schreiben dieses Postings gefunden: der => HTML-Encoder (mit dem das Einbinden solcher Code-Schnippsel vereinfacht wird).