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 63 users online :: 0 Registered, 0 Hidden and 63 Guests :: 2 Bots
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
[SOLVED] your FM popup code is not working right
Page 1 of 1 • Share
Hello buddy i have just been told of a bug on your FM popup code
What the member is saying is when they send a PM and then want to edit it before the member there sending the pm to when they press the preview button the popup don't show and also there is no preview working on the button.
can you please see if this can be fixed and let me know.
Much thanks
APE
What the member is saying is when they send a PM and then want to edit it before the member there sending the pm to when they press the preview button the popup don't show and also there is no preview working on the button.
can you please see if this can be fixed and let me know.
Much thanks
APE
Hi,
Is there any error when the member ( or you ) click the preview button ? After clicking the button press CTRL+SHIFT+C to open the console and let me know if there are any errors.
Is there any error when the member ( or you ) click the preview button ? After clicking the button press CTRL+SHIFT+C to open the console and let me know if there are any errors.
I think I found the problem. Try replacing the preview script with this :
If it works, I'd replace it in the tutorial as well.
- Code:
$(function() {
if (!window.FA.Popup || !document.post || !document.post.message || !document.post.mode) return;
document.post.preview.onclick = function(e) {
var mode = document.post.mode.value;
if ($.sceditor) document.post.message.value = $(document.post.message).sceditor('instance').val();
FA.Popup.open('', 'Preview', function(popup) {
popup.innerHTML = '<div class="fa_popup_loading">Loading preview...</div>';
$.post(mode == 'post' ? '/privmsg' : '/post', $(document.post).serialize() + '&preview=1', function(data) {
var preview = $(['.postbody', '.post, #preview', '.main-content.topic', '#preview'][FA.Popup.forum.version], data)[0];
popup.innerHTML = '';
if (preview) {
var content = document.createElement('DIV');
content.className = 'fa_popup_preview';
content.appendChild(preview);
popup.appendChild(content);
}
});
});
e.preventDefault();
}
});
If it works, I'd replace it in the tutorial as well.
I changed the script to this on your forum :
Let me know if there are any problems.
- Code:
$(function() {
if (!window.FA.Popup || !document.post || !document.post.message || !document.post.mode) return;
document.post.preview.onclick = function(e) {
var mode = document.post.mode.value;
if ($.sceditor) document.post.message.value = $(document.post.message).sceditor('instance').val();
FA.Popup.open('', 'Preview', function(popup) {
popup.innerHTML = '<div class="fa_popup_loading">Loading preview...</div>';
$.post(mode == 'post' || 'edit' ? '/privmsg' : '/post', $(document.post).serialize() + '&preview=1', function(data) {
var preview = $(['.postbody', '.post, #preview', '.main-content.topic', '#preview'][FA.Popup.forum.version], data)[0];
popup.innerHTML = '';
if (preview) {
var content = document.createElement('DIV');
content.className = 'fa_popup_preview';
content.appendChild(preview);
popup.appendChild(content);
}
});
});
e.preventDefault();
}
});
Let me know if there are any problems.
- GuestGuest
Ape wrote:Thank you all looks to be working fine now
Pizza is on its way in the post not sure it will be any good when it gets to you thou LOL
15:43:44 >
15:43:46 >
>>> WHOOP WHOOP <<<
>
>>> WHOOP WHOOP <<<
>
>>> WHOOP WHOOP <<<
>
15:44:02 >
15:44:04 >
15:44:07 > HQ: ***** ITALIAN UFO DETECTED *****
15:44:12 >
15:44:14 >
15:44:22 > YUMM... Sorry, @APE... Caught in its flight thru the kitchen...
haha trust you @SamanthaSamantha wrote:Ape wrote:Thank you all looks to be working fine now
Pizza is on its way in the post not sure it will be any good when it gets to you thou LOL
15:43:44 >
15:43:46 >
>>> WHOOP WHOOP <<<
>
>>> WHOOP WHOOP <<<
>
>>> WHOOP WHOOP <<<
>
15:44:02 >
15:44:04 >
15:44:07 > HQ: ***** ITALIAN UFO DETECTED *****
15:44:12 >
15:44:14 >
15:44:22 > YUMM... Sorry, @APE... Caught in its flight thru the kitchen...
Okay Now i have a problem again i just made an edit on my rules thread and then wanted to have a look at it on the preview and bam the preview come up blank like it did on the PM's
@Ape give this a shot and let me know if it works :
- Code:
$(function() {
if (!window.FA.Popup || !document.post || !document.post.message || !document.post.mode) return;
document.post.preview.onclick = function(e) {
var mode = document.post.mode.value;
if ($.sceditor) document.post.message.value = $(document.post.message).sceditor('instance').val();
FA.Popup.open('', 'Preview', function(popup) {
popup.innerHTML = '<div class="fa_popup_loading">Loading preview...</div>';
$.post( /\/t\d+/.test(window.location.pathname) ? (mode == 'post' || 'edit' ? '/privmsg' : '/post') : window.location.pathname , $(document.post).serialize() + '&preview=1', function(data) {
var preview = $(['.postbody', '.post, #preview', '.main-content.topic', '#preview'][FA.Popup.forum.version], data)[0];
popup.innerHTML = '';
if (preview) {
var content = document.createElement('DIV');
content.className = 'fa_popup_preview';
content.appendChild(preview);
popup.appendChild(content);
}
});
});
e.preventDefault();
}
});
Okay, great !
To be honest, I'm not sure why I didn't use the method I added to begin with.. it's a little more accurate, but if there are any problems you can let me know.
To be honest, I'm not sure why I didn't use the method I added to begin with.. it's a little more accurate, but if there are any problems you can let me know.
- Sponsored content
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 1
Permissions in this forum:
You cannot reply to topics in this forum