-
AuthorPosts
-
July 16, 2018 at 11:50 am #985903
Hello,
i was embeding an html code from just answers (https://www.justanswer.com) for a question window.
I used the code block element – after refresh the backend all layout elements was deleted.
Do you have any experience with (https://www.justanswer.com) or do you know another way to embed the html with no risk?
Here ist de code – maybe it helps:
<div style=”position:relative;margin:auto;cursor:default;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;width:300px;height:250px;overflow:hidden;background-image:url(http://gadgets.justanswer.com/ja/assets/2015gadget_BG.jpg);”><div id=”headline__justanswer__” style=”position:absolute;left:14px;top:10px;width:272px;height:32px;font-family:Arial Black,sans-serif;color:#ffffff;line-height:110%;text-align:left;”>Fragen Sie jetzt einen Arzt</div><div id=”tagline__justanswer__” style=”position:absolute;left:14px;top:40px;width:272px;height:48px;font-family:Arial,sans-serif;color:#ffffff;line-height:130%;text-align:left;”>12 Ärzte sind gerade online.<br/>Alle 9 Sekunden wird eine Frage beantwortet!</div><form style=”margin:0;padding:0;background-color:transparent;display:inline;” id=”frm__justanswer__” target=”_blank” method=”POST” onsubmit=”go__justanswer__(this);return false;”><input id=”fid__justanswer__” type=”hidden” value=”” name=”fid” /><input id=”question__justanswer__” type=”hidden” value=”” name=”question” /><input id=”refid__justanswer__” type=”hidden” value=”” name=”refid” /><input id=”tpath__justanswer__” type=”hidden” value=”” name=”tpath” /><textarea id=”input__justanswer__” placeholder=”Geben Sie hier Ihre Frage ein…” style=”position:absolute;left:20px;top:85px;width:260px;height:100px;font-family:Arial,sans-serif;color:#000000;font-size:13px;text-align:left;border:none;background-color:#ffffff;”></textarea></form><div id=”__justanswer__button” style=”cursor:pointer;position:absolute;white-space:nowrap;right:12px;top:206px;height:32px;” onclick=”go__justanswer__();”><div style=”position:absolute;right:0;height:31px;”><div style=”position:absolute;right:7px;top:0;height:31px;background-repeat: norepeat;background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAnCAYAAADdN2JWAAAD8GlDQ1BJQ0MgUHJvZmlsZQ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IVNSFToX5ZB9hL8AhkVhJMWPgSKJ9g74NnQ1OrUItkG4RUTOHc7xtt9KojwqTZKFb+Mqix+c5VXyFOj0/O11fG9PS6QxJ16AypPSjlehr1jAAAAAElFTkSuQmCC);”><div id=”button_text__justanswer__” style=”display:inline-block;position:relative;top:0.1em;font-family:Arial,sans-serif;color:#ffffff;text-align:center;white-space:nowrap;line-height:100%”>Antwort erhalten</div></div></div></div></div>
<script>
//<!–
(function() {var _gel__justanswer__ = function(id) {
return document.getElementById(id);
};var getArgs = function() {
var params = {};
var paramString = window.location.search.substring(1);
if (paramString) {
var pairs = paramString.split(‘&’);
for (var i = 0; i < pairs.length; i++) {
var p = pairs[i].split(‘=’);
var paramval = ”;
var decodedName = decodeURIComponent(p[0]);
if (decodedName.length > 0) {
if (p.length > 1) {
paramval = decodeURIComponent(p[1]);
}
params[decodedName] = paramval;
}
}
}
return params;
}
var args = getArgs();var fitText = function(node) {
var fsz = 30;
if (node) {
do {
node.style.fontSize = (–fsz) + ‘px’;
} while (fsz > 12 && (node.scrollHeight > node.clientHeight || node.scrollWidth > node.clientWidth));
}
return fsz;
};var landing_page = ‘http://www.justanswer.de/gadget-landing.aspx?r={REFID}&FID={FID}&TP={TPATH}JPRC=1&JPAF=gadget&question={QUESTION}’;
var landing_page_noq = ‘http://www.justanswer.de/medizin/’;var go__justanswer__ = function(frm) {
var args = getArgs();
// get question value
var question = ”;
var inp = document.getElementById(‘input__justanswer__’);
if (inp) {
question = (inp.value || ”).substr(0, 1024);
}// get selection value
var forum = ‘135’ || ‘6’;
var sel = document.getElementById(‘selection__justanswer__’);
if (sel) {
if (sel.selectedIndex >= 0) {
forum = sel.options[sel.selectedIndex].value;
}
}var url = (question ? landing_page : landing_page_noq);
url = url.replace(‘{FID}’, forum);
url = url.replace(‘{REFID}’, ‘JAPPC’ || ”);
url = url.replace(‘{TPATH}’, ‘tech.300×250’ || ”);if (question && url.indexOf(‘{QUESTION}’) < 0) {
url += ‘&question={QUESTION}’;
}
url = url.replace(‘{QUESTION}’, encodeURIComponent(question));if (‘<mpvc/><mpck/>’ != (‘<mp’ + ‘vc/><mp’ + ‘ck/>’)) {
url = ‘<mpvc/>http://<mpck/>?mpre=’ + encodeURIComponent(url);
} else if (‘http://trk.justanswer.com/aff_c?offer_id=14&aff_id=6956&file_id=434’ != (‘{tracki’ + ‘ng_link}’)) {
url = ‘http://trk.justanswer.com/aff_c?offer_id=14&aff_id=6956&file_id=434&url=’ + encodeURIComponent(url);
}
// do it again in case the tracking page needs it
url = url.replace(‘{QUESTION}’, encodeURIComponent(question));
url = url.replace(‘{FID}’, forum);
url = url.replace(‘{REFID}’, encodeURIComponent(‘JAPPC’) || ”);
url = url.replace(‘{TPATH}’, ‘tech.300×250’ || ”);
console.log(‘landing_page: ‘ + url);frm = frm || document.getElementById(‘frm__justanswer__’);
if (!frm) {
location.href = url;
} else {
(document.getElementById(‘question__justanswer__’) || {}).value = (document.getElementById(‘input__justanswer__’) || {}).value;
(document.getElementById(‘fid__justanswer__’) || {}).value = forum;
(document.getElementById(‘refid__justanswer__’) || {}).value = ‘JAPPC’;
(document.getElementById(‘tpath__justanswer__’) || {}).value = ‘tech.300×250’;
frm.target = ‘_blank’;
frm.action = url;
frm.submit();
}
};
var load_script = function(script_url) {var script = document.createElement(‘script’);
script.type = ‘text/javascript’;
script.charset = ‘UTF-8’;
script.src = script_url;
var head = (document.getElementsByTagName(‘head’)[0] || document.documentElement);
head.insertBefore(script, head.firstChild);
console.log(‘brandaware: ‘ + script_url);
};var script_url = ”;
script_url = ‘http://just-answer-hrd.appspot.com/ac?’;
script_url += ‘&uq=’ + encodeURIComponent(‘__justanswer__’);
script_url += ‘&sz=’ + encodeURIComponent(‘300×250’);
script_url += ‘&topic=’ + encodeURIComponent(‘tech’);
script_url += ‘§ion=’ + encodeURIComponent(” || ‘dd’);
script_url += ‘&lang=’ + encodeURIComponent(” || ‘en’);// signals
script_url += ‘&s0=’ + encodeURIComponent(” || ‘0’);
script_url += ‘&s1=’ + encodeURIComponent(” || ‘0’);
script_url += ‘&s2=’ + encodeURIComponent(” || ‘0’);
script_url += ‘&s3=0’; // nosip: true for pearl only
script_url += ‘&s4=0’; // + encodeURIComponent(”);
script_url += ‘&s5=0’; // + encodeURIComponent(”);
script_url += ‘&s6=0’; // + (it.style.display != ‘none’ ? 1 : 0);
script_url += ‘&s7=0’; // + encodeURIComponent(”);try {
script_url += ‘&site_domain=’ + encodeURIComponent(document.domain);
script_url += ‘&title=’ + encodeURIComponent(document.title || ”);
script_url += ‘&site=’ + encodeURIComponent(top.location.hostname);
} catch(err) {
}var site_url = ”;
try {
site_url = (args[‘site_url’] || top.location.href || ”);
} catch(err) {
site_url = ‘http://’ + document.domain || ”;
}
script_url += ‘&urid=’ + encodeURIComponent(‘contextual’);
script_url += ‘&cid=’ + encodeURIComponent(site_url.substr(0, 1024));load_script(script_url);
fitText(document.getElementById(‘headline__justanswer__’));
fitText(document.getElementById(‘tagline__justanswer__’));window.textFits__justanswer__ = function(){};
window.rightSize__justanswer__ = function(){};
window.go__justanswer__ = go__justanswer__;
window._gel__justanswer__ = _gel__justanswer__;
window.boot__justanswer__ = function(o) {if (o[‘headline’]) {
var node = _gel__justanswer__(‘headline__justanswer__’);
if (node) {
node.innerHTML = o[‘headline’];
fitText(node);
}
}if (o[‘tagline’]) {
var node = _gel__justanswer__(‘tagline__justanswer__’);
if (node) {
node.innerHTML = o[‘tagline’];
fitText(node);
}
}if (o[‘destination_url’]) {
//landing_page = o[‘destination_url’];
}
};
})();
// –>
</script>Thank you for helping!
July 16, 2018 at 1:19 pm #985923about 140 topics started – and you realy don’t know how to use the code tag here on board.?
If you want to have such a long code checked, it would be good if we didn’t have to edit it a lot. Because Boardsoft converts many tags and special characters to other characters.
this is very time-consumingJuly 18, 2018 at 4:09 am #986743Hi
Thank you for using Enfold.
What is the script for? You can use hooks to embed the script instead of using the code block element.
// https://codex.wordpress.org/Plugin_API/Action_Reference/wp_head
// https://codex.wordpress.org/Plugin_API/Action_Reference/wp_footerYes, @guenni007 is right. The script is little bit too long so it will take a while to review. Please post the code on pastebin.com.
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.