Latest topics
» Forumactif Edge - Releases
by Ange Tuteur Tue 03 Sep 2019, 11:49
» GIFActif - Giphy Button for the Editor
by Ange Tuteur Wed 08 May 2019, 17:21
» Forum Closure
by Ange Tuteur Mon 01 Jan 2018, 01:28
» Chit Chat Thread
by Valoish Sun 31 Dec 2017, 19:15
» Font/Text background color.
by Valoish Sun 31 Dec 2017, 19:11
» Forumactif Messenger - Instant Message Application for Forumotion
by Wolfuryo Sun 31 Dec 2017, 18:24
» [GAME] Count to One Million!
by brandon_g Fri 29 Dec 2017, 18:58
» Post Cards
by manikbiradar Wed 20 Dec 2017, 07:50
» [GAME] Countdown from 200,000
by Valoish Wed 13 Dec 2017, 23:22
» GeekPolice Tech Support Forums - GeekPolice.net
by Dr Jay Mon 11 Dec 2017, 19:12
» Asking about some plugin for Forumotion
by Dr Jay Mon 11 Dec 2017, 19:10
» [GAME] What are you thinking right now?
by Van-Helsing Sat 09 Dec 2017, 14:51
» Widget : Similar topics
by ranbac Wed 06 Dec 2017, 18:11
» Change the Background of the Forum and put an image and how to make prefixs?
by Clement Wed 06 Dec 2017, 15:19
» Hello from Western Australia
by SarkZKalie Wed 06 Dec 2017, 05:34
by Ange Tuteur Tue 03 Sep 2019, 11:49
» GIFActif - Giphy Button for the Editor
by Ange Tuteur Wed 08 May 2019, 17:21
» Forum Closure
by Ange Tuteur Mon 01 Jan 2018, 01:28
» Chit Chat Thread
by Valoish Sun 31 Dec 2017, 19:15
» Font/Text background color.
by Valoish Sun 31 Dec 2017, 19:11
» Forumactif Messenger - Instant Message Application for Forumotion
by Wolfuryo Sun 31 Dec 2017, 18:24
» [GAME] Count to One Million!
by brandon_g Fri 29 Dec 2017, 18:58
» Post Cards
by manikbiradar Wed 20 Dec 2017, 07:50
» [GAME] Countdown from 200,000
by Valoish Wed 13 Dec 2017, 23:22
» GeekPolice Tech Support Forums - GeekPolice.net
by Dr Jay Mon 11 Dec 2017, 19:12
» Asking about some plugin for Forumotion
by Dr Jay Mon 11 Dec 2017, 19:10
» [GAME] What are you thinking right now?
by Van-Helsing Sat 09 Dec 2017, 14:51
» Widget : Similar topics
by ranbac Wed 06 Dec 2017, 18:11
» Change the Background of the Forum and put an image and how to make prefixs?
by Clement Wed 06 Dec 2017, 15:19
» Hello from Western Australia
by SarkZKalie Wed 06 Dec 2017, 05:34
Recent Tutorials
Top posting users this month
Top Achievers
Who is online?
In total there are 31 users online :: 0 Registered, 0 Hidden and 31 Guests :: 1 Bot
None
Most users ever online was 515 on Tue 14 Sep 2021, 15:24
None
Most users ever online was 515 on Tue 14 Sep 2021, 15:24
Problems through toolbar.replace
Page 1 of 2 • Share
Page 1 of 2 • 1, 2
Hello @Ange Tuteur,
every script which has the content
TypeError: toolbar.replace is not a function
https://i.servimg.com/u/f35/16/43/86/96/fdghjg10.png
(Only an example)
This is part of a problem I mentioned here:
https://fmdesign.forumotion.com/t596p25-widgets-below-instead-of-left-right
The problem appears not everytime - sometimes yes, sometimes no. But if the problem appears, the toolbar disappears and the widgets below the forum appear somewhere else like I said in the thread above.
Why? And what is the reason for the error message for scripts with the content
I deleted scripts with this content. I hope I got all.
every script which has the content
- Code:
toolbar.replace
- Code:
toolbar = toolbar.replace(/date/, 'emotiuser,date');
TypeError: toolbar.replace is not a function
https://i.servimg.com/u/f35/16/43/86/96/fdghjg10.png
(Only an example)
This is part of a problem I mentioned here:
https://fmdesign.forumotion.com/t596p25-widgets-below-instead-of-left-right
The problem appears not everytime - sometimes yes, sometimes no. But if the problem appears, the toolbar disappears and the widgets below the forum appear somewhere else like I said in the thread above.
Why? And what is the reason for the error message for scripts with the content
- Code:
toolbar.replace
I deleted scripts with this content. I hope I got all.
Hm.. you may need to check if toolbar is defined, by default it is, if the sceditor is defined. So all you would need to add in the script is :
- Code:
if (!toolbar) return;
@Ange Tuteur I added it to the script like that:
- Code:
if (!toolbar) return; toolbar = toolbar.replace(/date/, 'emotiuser,date');
That's weird.. it shouldn't occur in that case because you're strictly telling JavaScript to return if "toolbar" is undefined. Could you post the scripts in question ?
"Could you post the scripts in question ?" Means I am asking you to post the scripts that are being discussed. This will probably explain better, maybe.
Post both the ones you mentioned here and I'll have a look at 'em.
Post both the ones you mentioned here and I'll have a look at 'em.
The following for example, but as I said I didn't make any modifications except from the language. Also the result is the same by using your fix or not.
- Code:
if (!toolbar) return;
- Code:
(function() {
'EmotiUser - Become your own personal emoticon !';
'DEVELOPED BY ANGE TUTEUR';
'NO DISTRIBUTION WITHOUT CONSENT OF THE AUTHOR';
'ORIGIN : http://fmdesign.forumotion.com/';
window.EmotiUser = {
default_icon : 'http://2img.net/i/fa/invision/pp-blank-thumb-38px.png', // default avatar
cacheTime : 1*60*60*1000, // amount of time the avatar is cached ( 1 hour )
// tagType influences the type of tags used
// 0 = BBCode
// 1 = HTML
tagType : 0,
// markup format
tag : [
'[table class="emotiuser"][tr][td]:u{UID}:[/td][/tr][/table]',
'<span class="emotiuser">:u{UID}:</span>'
],
parse : function() {
if (!EmotiUser.tags) {
EmotiUser.tags = $('.emotiuser');
EmotiUser.index = -1;
}
var tag = EmotiUser.tags[++EmotiUser.index];
if (tag) {
var txt = $(tag).text(),
tag_id = txt.replace(/:u(\d+):/, '$1'),
storage = window.localStorage;
if (storage && storage['emotiuser_' + tag_id] && storage['emotiuser_' + tag_id + '_exp'] > +new Date - EmotiUser.cacheTime) {
var icon = document.createElement('IMG'),
data = JSON.parse(storage['emotiuser_' + tag_id]);
icon.className = 'emotiuser_icon';
icon.src = data.src;
icon.alt = data.alt;
icon.title = data.title;
tag.parentNode.insertBefore(icon, tag);
tag.parentNode.removeChild(tag);
EmotiUser.parse();
} else {
$.get('/ajax/index.php?f=m&user_id=' + tag_id, function(d) {
var icon = $('.tooltip-content > img', d)[0],
name = $('.tooltip-title', d).text() || d;
if (!icon) {
icon = document.createElement('IMG');
icon.src = EmotiUser.default_icon;
}
icon.className = 'emotiuser_icon';
icon.title = name;
icon.alt = txt;
if (storage && window.JSON) {
storage['emotiuser_' + tag_id] = JSON.stringify({
src : icon.src,
alt : icon.alt,
title : icon.title
});
storage['emotiuser_' + tag_id + '_exp'] = +new Date;
}
tag.parentNode.insertBefore(icon, tag);
tag.parentNode.removeChild(tag);
EmotiUser.parse();
});
}
} else {
delete EmotiUser.tags;
delete EmotiUser.index;
}
}
};
document.write('<style type="text/css">.emotiuser, .emotiuser * { display:inline-block; } .emotiuser_icon { height:30px; vertical-align:middle; margin:3px; } .sceditor-button-emotiuser div { background:none !important; }</style>');
$(function(){
EmotiUser.parse();
if ($.sceditor && toolbar) {
$.sceditor.command.set('emotiuser', {
dropDown : function(editor, caller, callback) {
var content = document.createElement('DIV'),
input = document.createElement('INPUT'),
submit = document.createElement('INPUT');
input.type = 'text';
input.value = _userdata.user_id;
input.id = 'emotiuser_number';
submit.type = 'button';
submit.className = 'button';
submit.value = 'Einfügen';
submit.onclick = function() {
var id = +$('#emotiuser_number', this.parentNode)[0].value;
if (typeof id === 'number' && id > 0) {
callback(id);
editor.closeDropDown(true);
} else {
alert('Bitte füge eine User ID ein.');
}
};
content.innerHTML = '<div><label for="emotiuser_number">User Id</label></div>';
content.firstChild.appendChild(input);
content.appendChild(submit);
editor.createDropDown(caller, 'emotiuser', content);
},
exec : function(c) {
var e = this;
$.sceditor.command.get('emotiuser').dropDown(e, c, function(content) {
e.insertText(EmotiUser.tag[EmotiUser.tagType].replace(/\{UID\}/, content));
});
},
txtExec : function(c) {
var e = this;
$.sceditor.command.get('emotiuser').dropDown(e, c, function(content) {
e.insertText(EmotiUser.tag[EmotiUser.tagType].replace(/\{UID\}/, content));
});
},
tooltip : 'EmotiUser'
});
toolbar = toolbar.replace(/date/, 'emotiuser,date');
$(function() {
var button = $('.sceditor-button-emotiuser div')[0];
if (button) {
$(button).append(_userdata.avatar.replace(/<img/, '<img style="height:16px;width:16px;"'));
button.style.textIndent = '0px';
}
});
}
});
}());
Hmm.. I looked over it and I can't see how it would cause an error with the toolbar, because it's already checking to make sure both the editor and toolbar are defined. Is the error on your forum right now ? If so, could you provide me a link the where it's occurring, it'd be 1000 times easier to debug.
You can try by yourself. I sent you a PM with the details for account with admin rights.
So, install the plugins I named like you want to and look, whether you can find the bugs. Actually I deleted all this scripts to prevent the bugs.
For me and my co admin the error occurs not every time. Sometimes you have to reload the page multiple times to see the bug in the console and in the forum (toolbar disappears and the widgets below the forum appear somewhere else).
So, install the plugins I named like you want to and look, whether you can find the bugs. Actually I deleted all this scripts to prevent the bugs.
For me and my co admin the error occurs not every time. Sometimes you have to reload the page multiple times to see the bug in the console and in the forum (toolbar disappears and the widgets below the forum appear somewhere else).
Am I logging into the wrong forum ?
--> http://www.schiggysboard.com/login
EDIT :
Disregard that, I entered them in the wrong order.
I installed the emotiuser script, but thus far I haven't encountered anything, yet. I do however notice that there's a constant error on your forum which appears to be caused by something you install in the overall_header. Go to Admin Panel > Template > General > overall_header
Find and remove this code :
Let's try clearing this error up first before fully testing, because it may be affecting a few things on your forum.
Find and remove this code :
- Code:
<script src="http://www.schiggysboard.com/h21-statusupdater"></script><div id="LGstatus"></div><script>status_box.init('profile_field_13_11')</script>
Let's try clearing this error up first before fully testing, because it may be affecting a few things on your forum.
Thank you, @Ange Tuteur. I will delete this script this day or maybe tomorrow as soon as I'm in front of the computer.
Even if I don't understand how this error related to my actual problem from start post.
Too bad, it's a nice feature developed by LG from avacweb.
Even if I don't understand how this error related to my actual problem from start post.
Too bad, it's a nice feature developed by LG from avacweb.
There's a chance it could be conflicting with your other scripts, plus in the current condition it doesn't even work or display from what I'm seeing.
It's causing these two erreurs :
It's causing these two erreurs :
@Ange Tuteur I removed this script in overall_header. After reloading the page multiple times, the error from start post occurs again.
Please have a look at my forum. The script is still removed from template. "EmotiUser" is placed in javascript management, but deactivated again. The account I gave you is still in action.
Please have a look at my forum. The script is still removed from template. "EmotiUser" is placed in javascript management, but deactivated again. The account I gave you is still in action.
Does the error occur in a certain page ? If so could you provide me with the links ? It's just really weird that I can't seem to get the error to happen for the life of me, I feel like I might not be looking in the right place..
@Ange Tuteur I get the error in every page, but most times I test it in forum's index page. I reload the page, sometimes up to ten times and suddenly the toolbar (the one with "Welchome XY" and so on) disappears, the widgets below the forum move to another place and rhe error message in console appears.
Is it possible that chrome's and firefox's console show different errors/ messages? I can't believe, but maybe an idea.
Is it possible that chrome's and firefox's console show different errors/ messages? I can't believe, but maybe an idea.
Hey,
I'm sorry, but I still cannot see the problem you've mentioned. I reloaded the index about 50 times on Firefox and each time the page loaded like it usually does. I seriously do not know why I cannot see the error.
I'm sorry, but I still cannot see the problem you've mentioned. I reloaded the index about 50 times on Firefox and each time the page loaded like it usually does. I seriously do not know why I cannot see the error.
Hmm .. is there maybe a possibility that the scripts like EmojiUser don't have the content/ line
Or do they strictly need this part to work? @Ange Tuteur
- Code:
toolbar.replace
Or do they strictly need this part to work? @Ange Tuteur
instead of replace you can do it like this :
or like this :
This method however will place the button at the end of the toolbar.
- Code:
toolbar = toolbar + ',button_name';
or like this :
- Code:
toolbar += ',button_name';
This method however will place the button at the end of the toolbar.
Hey @Ange Tuteur, how do I have to replace it? I tried it, but the result was either a blank editor toolbar or a normal editor toolbar without the EmotiUser button.
I tried it like the following with both options you posted one post above:
Also I tried it without this part:
I tried it like the following with both options you posted one post above:
- Code:
toolbar = toolbar + ',button_name';(/date/, 'emotiuser,date');
Also I tried it without this part:
- Code:
(/date/, 'emotiuser,date');
- Sponsored content
Page 1 of 2 • 1, 2
Similar topics
Create an account or log in to leave a reply
You need to be a member in order to leave a reply.
Page 1 of 2
Permissions in this forum:
You cannot reply to topics in this forum