The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

How can I add this button on my website.

View previous topic View next topic Go down

Solved How can I add this button on my website.

Post by smurfavr on September 7th 2014, 7:30 pm

How can I add this button on my website.

smurfavr
Active Poster

Male Posts : 1422
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: How can I add this button on my website.

Post by SLGray on September 7th 2014, 7:32 pm



When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 36697
Reputation : 2445
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Solved Re: How can I add this button on my website.

Post by smurfavr on September 7th 2014, 7:51 pm

I added it in Javascript Code. In all the pages
Code:
function selectCode(a){a=$(a).closest("dl").find(".cont_code,code")[0];if(window.getSelection){var c=window.getSelection();if(c.setBaseAndExtent)c.setBaseAndExtent(a,0,a,a.innerText.length-1);else{window.opera&&a.innerHTML.substring(a.innerHTML.length-4)=="<BR>"&&(a.innerHTML+=" ");var b=document.createRange();b.selectNodeContents(a);c.removeAllRanges();c.addRange(b)}}else document.getSelection?(c=document.getSelection(),b=document.createRange(),b.selectNodeContents(a),
  c.removeAllRanges(),c.addRange(b)):document.selection&&(b=document.body.createTextRange(),b.moveToElementText(a),b.select())}
 
  $(function(){
  $("dl.codebox:not(.spoiler,.hidecode) > dd.code, dl.codebox:not(.spoiler,.hidecode) > dd > code").closest("dl").find('dt').append('<span onClick="selectCode(this)" class="selectCode">Select Content</span>');
  });


I added it in CSS
Code:
.selectCode { float:right; text-transform: uppercase; cursor:pointer; }
div.cont_code { clear: right; }

Button does not appear.

smurfavr
Active Poster

Male Posts : 1422
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: How can I add this button on my website.

Post by Ange Tuteur on September 7th 2014, 7:56 pm

Hello smurfavr,

From what I can tell you have some HTML in your JavaScript management.
Administration Panel > Modules > JavaScript Codes management

Find and remove this script :
Code:
<!--NACHALO NA TYXO.BG BROYACH--><script type="text/javascript"><!--d=document;d.write('<a href="http://www.tyxo.bg/?139434" title="Tyxo.bg counter"><img width="80" height="15" border="0" alt="Tyxo.bg counter" src="'+location.protocol+'http://cnt.tyxo.bg/139434?rnd='+Math.round(Math.random()*2147483647));d.write('&sp='+screen.width+'x'+screen.height+'&r='+escape(d.referrer)+'"></a>');</script><noscript><a href="http://www.tyxo.bg/?139434" title="Tyxo.bg counter"><img src="http:<!--KRAI NA TYXO.BG BROYACH--><script type="text/javascript">var gaJsHost=(("https:"==document.location.protocol)?"https://ssl.":"http://www.");document.write(unescape("%3Cscript src='"+gaJsHost+"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));</script><script type="text/javascript">var pageTracker=_gat._getTracker("UA-xxxxxx-x");pageTracker._trackPageview();</script>

This is most likely the cause of the script not working.

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: How can I add this button on my website.

Post by smurfavr on September 7th 2014, 8:01 pm

Remove this code, but the problem does not get better.

smurfavr
Active Poster

Male Posts : 1422
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: How can I add this button on my website.

Post by Ange Tuteur on September 7th 2014, 8:04 pm

I am still getting a syntax error from your JavaScripts set in all the pages. They may be in multiple scripts :

This :
Code:
<script type="text/javascript">var gaJsHost=(("https:"==document.location.protocol)?"https://ssl.":"http://www.");document.write(unescape("%3Cscript src='"+gaJsHost+"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));</script>

and this :
Code:
<script type="text/javascript">var pageTracker=_gat._getTracker("UA-xxxxxx-x");pageTracker._trackPageview();</script>

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: How can I add this button on my website.

Post by smurfavr on September 7th 2014, 8:10 pm

These are all the codes that I have.

Code:
$(document).ready(function() {
  // Index
  document.getElementById('i_icon_mini_index').nextSibling.nodeValue='Форум';
  // Portal
  document.getElementById('i_icon_mini_portal').nextSibling.nodeValue='Сайт';
});

Code:
$(function() {
 replaceText('.postbody div', /\[You must be.*?to see this [A-Z]+.\]/ig, 'Трябва да си регистриран за да виждаш линковете..');
 replaceText('.attachbox', /You don't have permission to download attachments./ig, 'Вие нямате права за сваляне !');
 replaceText('.attachbox', /(\(\d+ [A-Z]+\)) Downloaded (\d+) times/ig, '$1 Свален $2 пъти.');
 replaceText('.attachbox', /Attachments/g, 'Прикачени файлове.');
 
 function replaceText(element, reg, rep){var el=$('.post '+element);for(i=0;i<el.length;i++)if(reg.test(el[i].innerHTML))el[i].innerHTML=el[i].innerHTML.replace(reg,rep)}
});

Code:
$(function() {
  $.getScript("http://perso.numericable.fr/antonywar/HA/chauve1.js");
});

$(function() {
  $.getScript("http://sd-1.archive-host.com/membres/up/37821634957680146/toile_r.js");
});

Code:
$(function() {
 var x = document.getElementById('variables').getElementsByTagName('span');
 for (var i = 0, v; (v = x[i++]); ) {
  $('.' + v.id).html(v.innerHTML);
  $('.' + v.id + '-replace').each(function(i, e) {
  e.innerHTML = e.innerHTML.replace( RegExp('{' + v.id + '}', 'g') , v.innerHTML );
  });
 }
});

Code:
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-xxxxxx-x");
pageTracker._trackPageview();
</script>


Code:
<!-- NACHALO NA TYXO.BG BROYACH -->
<script type="text/javascript">
<!--
d=document;d.write('<a href="http://www.tyxo.bg/?139434" title="Tyxo.bg counter"><img width="80" height="15" border="0" alt="Tyxo.bg counter" src="'+location.protocol+'http://cnt.tyxo.bg/139434?rnd='+Math.round(Math.random()*2147483647));
d.write('&sp='+screen.width+'x'+screen.height+'&r='+escape(d.referrer)+'"></a>');
//-->
</script><noscript><a href="http://www.tyxo.bg/?139434" title="Tyxo.bg counter"><img src="http://cnt.tyxo.bg/139434" width="80" height="15" border="0" alt="Tyxo.bg counter" /></a></noscript>
<!-- KRAI NA TYXO.BG BROYACH -->


Last edited by smurfavr on September 8th 2014, 1:24 pm; edited 1 time in total

smurfavr
Active Poster

Male Posts : 1422
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: How can I add this button on my website.

Post by Ange Tuteur on September 7th 2014, 8:11 pm

The first 4 are fine.

This one you should remove from JS managment :
Code:
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-xxxxxx-x");
pageTracker._trackPageview();
</script>

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: How can I add this button on my website.

Post by smurfavr on September 7th 2014, 8:16 pm

I removed it, but still no result.

smurfavr
Active Poster

Male Posts : 1422
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: How can I add this button on my website.

Post by Ange Tuteur on September 7th 2014, 8:21 pm

I keep running into syntax errors, this time an ID is null. I believe it may be this script :
Code:
$(function () {
 var x = document.getElementById('variables').getElementsByTagName('span');
 for (var i = 0, v; (v = x[i++]); ) {
  $('.' + v.id).html(v.innerHTML);
  $('.' + v.id + '-replace').each(function (i, e) {
  e.innerHTML = e.innerHTML.replace(RegExp('{' + v.id + '}', 'g'), v.innerHTML)
  })
 }
});

Try removing it and see if it will work.

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: How can I add this button on my website.

Post by smurfavr on September 7th 2014, 8:29 pm

@Ange Tuteur wrote:I keep running into syntax errors, this time an ID is null. I believe it may be this script :
Code:
$(function () {
 var x = document.getElementById('variables').getElementsByTagName('span');
 for (var i = 0, v; (v = x[i++]); ) {
  $('.' + v.id).html(v.innerHTML);
  $('.' + v.id + '-replace').each(function (i, e) {
  e.innerHTML = e.innerHTML.replace(RegExp('{' + v.id + '}', 'g'), v.innerHTML)
  })
 }
});

Try removing it and see if it will work.



The problem was in this code. Now the button appears, but is not displayed well.


smurfavr
Active Poster

Male Posts : 1422
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: How can I add this button on my website.

Post by SLGray on September 7th 2014, 8:33 pm

Is your forum version phpBB 2?


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 36697
Reputation : 2445
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Solved Re: How can I add this button on my website.

Post by Ange Tuteur on September 7th 2014, 8:35 pm

Find and remove this from your CSS :
Display > Colors > CSS stylesheet
Code:
.code {
  max-width: 500px;
}

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: How can I add this button on my website.

Post by smurfavr on September 7th 2014, 8:41 pm

As I removed this code, the pages become very large.


smurfavr
Active Poster

Male Posts : 1422
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: How can I add this button on my website.

Post by Ange Tuteur on September 7th 2014, 8:45 pm

Try setting the max width on the box itself :
Display > Colors > CSS stylesheet
Code:
.codebox { max-width:500px; }

You can adjust the "500px" if you want.

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: How can I add this button on my website.

Post by smurfavr on September 7th 2014, 8:53 pm

Now the problem is corrected.

I changed the words to my language but there is no distance between words. How to make a distance between them. ИЗБЕРИЦЕЛИЯКОД Must be so. ИЗБЕРИ ЦЕЛИЯ КОД
I have a few questions. This adds it to you again.

Code:
.code {
  max-width: 500px;
}


These codes useful you'd be. ???

Code:

<!-- NACHALO NA TYXO.BG BROYACH -->
<script type="text/javascript">
<!--
d=document;d.write('<a href="http://www.tyxo.bg/?139434" title="Tyxo.bg counter"><img width="80" height="15" border="0" alt="Tyxo.bg counter" src="'+location.protocol+'http://cnt.tyxo.bg/139434?rnd='+Math.round(Math.random()*2147483647));
d.write('&sp='+screen.width+'x'+screen.height+'&r='+escape(d.referrer)+'"></a>');
//-->
</script><noscript><a href="http://www.tyxo.bg/?139434" title="Tyxo.bg counter"><img src="http://cnt.tyxo.bg/139434" width="80" height="15" border="0" alt="Tyxo.bg counter" /></a></noscript>
<!-- KRAI NA TYXO.BG BROYACH -->

Code:
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-xxxxxx-x");
pageTracker._trackPageview();
</script>

smurfavr
Active Poster

Male Posts : 1422
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: How can I add this button on my website.

Post by Ange Tuteur on September 8th 2014, 12:39 am

Try replacing the words by :
Code:
ИЗБЕРИ&nbsp;ЦЕЛИЯ&nbsp;КОД

&nbsp; adds a space

This changes the max width of the code, not the container. It is most likely what misaligned the words.
Code:
.code { max-width: 500px; }

I'm not entirely sure what those scripts are for, but if you want to use them they should be added where HTML formats. Such as Administration Panel > Modules > Forum widgets management

If they cause you trouble again you can remove them. Smile

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: How can I add this button on my website.

Post by smurfavr on September 8th 2014, 1:25 pm

Thank you Ange Tuteur.

smurfavr
Active Poster

Male Posts : 1422
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: How can I add this button on my website.

Post by APE on September 8th 2014, 2:06 pm

is this now solved ?





APE
Manager
Manager

Male Posts : 8631
Reputation : 756
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

Solved Re: How can I add this button on my website.

Post by smurfavr on September 8th 2014, 2:14 pm

@APE wrote:is this now solved ?

I remarked to the topic that solved.

smurfavr
Active Poster

Male Posts : 1422
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: How can I add this button on my website.

Post by APE on September 8th 2014, 2:20 pm

ok thank you i just wanted to make sure Wink
Topic solved and archived





APE
Manager
Manager

Male Posts : 8631
Reputation : 756
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum