Cara Menambahkan Tombol Konversi dan Emoticon di Blog

tombol konverensi dan tombol emoticon


Untuk Tampilan Tombolnya, bisa dilihat seperti di bawah:



aditya galuh martdova

Jika anda mengklik tombol 'Conversion', maka akan muncul tabel konversi, dan jika anda mengklik tombol 'Emoticon', maka akan muncul emoticon komentar.


Ingin memasangnya? Ini dia caranya:


1. Log in Blogger

2. Klik Template, edit HTML
3. Cari kode <b:includable id='threaded-comment-form' var='post'>...</b:includable>
dengan Ctrl + F
4. Ubah kode di atas menjadi seperti :
 
<b:includable id='threaded-comment-form' var='post'>
<div class='comment-form'>
<div id='form-wrapper'>
<b:if cond='data:mobile'>
<p><data:blogCommentMessage/></p>
<data:blogTeamBlogMessage/>

<b:if cond='data:blog.pageType == &quot;static_page&quot;'>

<a expr:href='&quot;http://www.blogger.com/comment-iframe.g?blogID=&quot; + data:blog.blogId + &quot;&amp;amp;pageID=&quot; + data:post.id' id='comment-editor-src' title='comment editor'/>

<iframe class='blogger-iframe-colorize blogger-comment-from-post' height='410' id='comment-editor' name='comment-editor'/>

</b:if>

<b:if cond='data:blog.pageType == &quot;item&quot;'>

<a expr:href='&quot;http://www.blogger.com/comment-iframe.g?blogID=&quot; + data:blog.blogId + &quot;&amp;amp;postID=&quot; + data:post.id' id='comment-editor-src' title='comment editor'/>

<iframe class='blogger-iframe-colorize blogger-comment-from-post' height='410' id='comment-editor' name='comment-editor'/>

</b:if>
<b:else/>
<div id='threaded-comment-form'>
<p><data:blogCommentMessage/>
<span class='small-button'>
<span id='show-konversi'><a class='konversi-button' href='javascript:void(0)' onclick='document.getElementById(&apos;konversi-box&apos;).style.display=&apos;inline-block&apos;;document.getElementById(&apos;hide-konversi&apos;).style.display=&apos;inline-block&apos;;document.getElementById(&apos;show-konversi&apos;).style.display=&apos;none&apos;' title='Show Conversion Box'>Conversion</a></span><span id='hide-konversi'><a class='konversi-button' href='javascript:void(0)' onclick='document.getElementById(&apos;konversi-box&apos;).style.display=&apos;none&apos;;document.getElementById(&apos;hide-konversi&apos;).style.display=&apos;none&apos;;document.getElementById(&apos;show-konversi&apos;).style.display=&apos;inline-block&apos;' title='Hide Conversion Box'>Conversion</a></span>
</span>
<span class='small-button1'>
<span id='show-emo'><a class='emo-button' href='javascript:void(0)' onclick='document.getElementById(&apos;emo-box&apos;).style.display=&apos;inline-block&apos;;document.getElementById(&apos;hide-emo&apos;).style.display=&apos;inline-block&apos;;document.getElementById(&apos;show-emo&apos;).style.display=&apos;none&apos;' title='Show Emoticon'>Emoticon</a></span><span id='hide-emo'><a class='emo-button' href='javascript:void(0)' onclick='document.getElementById(&apos;emo-box&apos;).style.display=&apos;none&apos;;document.getElementById(&apos;hide-emo&apos;).style.display=&apos;none&apos;;document.getElementById(&apos;show-emo&apos;).style.display=&apos;inline-block&apos;' title='Hide Emoticon'>Emoticon</a></span>
</span>
</p>
<div id='konversi-box'>
<textarea id='codes' placeholder='Write/paste the code here then click &apos;Conversion&apos;' spellcheck='false'/>
<div class='button-group'>
<button id='cvrt' onclick='cdConvert();this.disabled = true;'>Conversion</button>
<button onclick='cdClear();'>Clean</button>
</div>
<span class='checkbox'>
<input checked='true' id='opt1' type='checkbox'/>Konversi <code>&amp;</code><br/>
<input id='opt2' type='checkbox'/>Konversi <code>&#39;</code><br/>
<input id='opt3' type='checkbox'/>Konversi <code>&quot;</code><br/>
<input checked='true' id='opt4' type='checkbox'/>Konversi <code>&lt;</code><br/>
<input checked='true' id='opt5' type='checkbox'/>Konversi <code>&gt;</code>
<script type='text/javascript'>
//<![CDATA[
function cdClear() {
var wtarea = document.getElementById('codes');
wtarea.value = '';
wtarea.focus();
document.getElementById('cvrt').disabled = false;
}
function cdConvert() {
var ctarea = document.getElementById('codes'),
cv = ctarea.value,
opt1 = document.getElementById('opt1'),
opt2 = document.getElementById('opt2'),
opt3 = document.getElementById('opt3'),
opt4 = document.getElementById('opt4'),
opt5 = document.getElementById('opt5');
cv = cv.replace(/\t/g, " ");
if (opt1.checked) cv = cv.replace(/&/g, "&amp;");
if (opt2.checked) cv = cv.replace(/'/g, "&#039;");
if (opt3.checked) cv = cv.replace(/"/g, "&quot;");
if (opt4.checked) cv = cv.replace(/</g, "&lt;");
if (opt5.checked) cv = cv.replace(/>/g, "&gt;");
if (cv.lastIndexOf('\n') != -1 || cv.length > 40) {
cv = cv.replace(/^/, "<i rel=\"pre\">");
} else {
cv = cv.replace(/^/, "<i rel=\"code\">");
}
cv = cv.replace(/$/, "</i>");
ctarea.value = cv;
ctarea.focus();
ctarea.select();
};
//]]>
</script>
</span>
</div>
</div>
<div id='emo-box'>
<div class='comment_emo_list'/>
</div>
<data:blogTeamBlogMessage/>

<b:if cond='data:blog.pageType == &quot;static_page&quot;'>

<a expr:href='&quot;http://www.blogger.com/comment-iframe.g?blogID=&quot; + data:blog.blogId + &quot;&amp;amp;pageID=&quot; + data:post.id' id='comment-editor-src' title='comment editor'/>

<iframe class='blogger-iframe-colorize blogger-comment-from-post' height='410' id='comment-editor' name='comment-editor'/>

</b:if>

<b:if cond='data:blog.pageType == &quot;item&quot;'>

<a expr:href='&quot;http://www.blogger.com/comment-iframe.g?blogID=&quot; + data:blog.blogId + &quot;&amp;amp;postID=&quot; + data:post.id' id='comment-editor-src' title='comment editor'/>

<iframe class='blogger-iframe-colorize blogger-comment-from-post' height='410' id='comment-editor' name='comment-editor'/>

</b:if>
</b:if>
</div>
<data:post.friendConnectJs/>
<data:post.cmtfpIframe/>
<script type='text/javascript'>
BLOG_CMT_createIframe(&#39;<data:post.appRpcRelayPath/>&#39;, &#39;<data:post.communityId/>&#39;);
</script>
</div>
</b:includable>

5. Cari kode </style> atau ]]></b:skin>> dengan Ctrl + F

6. Copy kode di bawah, lalu paste di atas kode </style> atau ]]></b:skin>
 /* CSS Small Button Forum Komentar */
#konversi-box, #hide-konversi,#emo-box,#hide-emo {display:none}
#konversi-box {width:100%;color:#eee;background:none;line-height:1.6em;margin-bottom:20px;padding:0;text-align:left;}
.checkbox{font:11px
Tahoma,Verdana,Arial,Sans-Serif;line-height:1.6em;color:#eee;}
#codes{border:none;width:100%;height:200px;display:block;background-color:#333;color:#aaa;font:normal
12px 'Courier New',Monospace;margin:7px 0
10px;padding:8px;box-shadow:inset 0 0 0 1px #ddd;transition:all 0.5s
linear;}
#codes:focus{background-color:#303030;color:#aaa;border:none;outline:none;transition:all
0.3s linear;}
.button-group{float:right;text-align:left;margin:0 auto}
button,button[disabled]:active{border:none;font-size:12px;font-family:'Open
Sans';font-weight:400;padding:4px
10px;text-decoration:none;background:#eee;color:#aaa;display:inline-block;transition:initial;cursor:pointer;border:0;}
button:hover{background:#aaa;color:#fff;}
button:active{background:#aaa;color:#fff;}
button[disabled],button[disabled]:active{color:#fff;cursor:default}
#opt1,#opt2,#opt3,#opt4,#opt5{display:inline-block;vertical-align:middle;border:none;outline:none;margin:0
10px 0 0}
.small-button a,.small-button1 a {font-size:12px;font-family:'Open
Sans';cursor:pointer;font-weight:700;margin:10px 5px 5px
0;text-decoration:none;text-transform:none;text-shadow:none;display:inline-block;color:#fff;padding:4px
10px;cursor:pointer;border-radius:2px;transition: all 0.3s ease-out;}
.small-button a {background-color:#aaa;transition: all 0.3s ease-out;}
.small-button1 a {background-color:#f48878;transition: all 0.3s ease-out;}
.small-button:hover a {background-color:#888;color:#fff;}
.small-button1:hover a {background-color:#f56954;color:#fff;}
span.small-button,span.small-button1 {text-align:left;display:inline-block;}

Selesai, semoga bermanfaat =)

Mencoba Berbagi Pengalaman di bidang Internet di blog asli Indonesia

Share this


Previous
Next Post »

Penulisan markup di komentar
  • Untuk menulis tag code gunakan <i rel="code">Kode yang sudah diparse di sini</i>.
  • Untuk menulis tag pre gunakan <i rel="pre">Kode yang sudah diparse di sini</i>.
  • Untuk memasukkan gambar gunakan <i rel="image">URL gambar di sini</i>.
  • Untuk memasukkan video gunakan <i rel="youtube">URL Video Youtube di sini</i>.
  • Kemudian parse kode pada kotak parser di bawah ini.

✔ Harap Berkomentar Sesuai Dengan Judul Bacaan,
✖ Tidak diperbolehkan Untuk Mempromosikan Barang Atau Berjualan
✖ Jangan Berkomentar Dengan Link Aktif