FM Design
Would you like to react to this message? Create an account in a few clicks or log in to continue.

IMPORTANT

FM Design is in read-only mode, please click here for more information.

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

Recent Tutorials
Top posting users this month

Who is online?
In total there are 9 users online :: 0 Registered, 0 Hidden and 9 Guests :: 2 Bots

None

[ View the whole list ]


Most users ever online was 515 on Tue 14 Sep 2021, 15:24

[SOLVED] your FM popup code is not working right

View previous topic View next topic Go down

Ape
Ape

Gender : Male
Age : 49
Posts : 136
Points : 3822
Reputation : 29
Location : UK kent
Language : English i think
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB3
http://missingpeople.darkbb.com

PostApe Sun 03 Jul 2016, 11:16

Hello buddy i have just been told of a bug on your FM popup code

hello i notice that in the outbox pms when i edit a message the preview button doesnt work
but when i want to send a new message all works fine
*maybe its me
[SOLVED] your FM popup code is not working right Screen53

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
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12044
Reputation : 2375
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Tue 05 Jul 2016, 09:30

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.
Ape
Ape

Gender : Male
Age : 49
Posts : 136
Points : 3822
Reputation : 29
Location : UK kent
Language : English i think
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB3
http://missingpeople.darkbb.com

PostApe Tue 05 Jul 2016, 10:51

it may be better if you take a look there is lots of things coming up but no warnings Sad
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12044
Reputation : 2375
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Wed 06 Jul 2016, 06:40

I think I found the problem. Try replacing the preview script with this :
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. Wink
Ape
Ape

Gender : Male
Age : 49
Posts : 136
Points : 3822
Reputation : 29
Location : UK kent
Language : English i think
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB3
http://missingpeople.darkbb.com

PostApe Wed 06 Jul 2016, 08:37

the popup comes up but it has no text in the box even thou there is text in the PM
[SOLVED] your FM popup code is not working right Captur34
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12044
Reputation : 2375
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Fri 08 Jul 2016, 11:59

I changed the script to this on your forum :
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.
Ape
Ape

Gender : Male
Age : 49
Posts : 136
Points : 3822
Reputation : 29
Location : UK kent
Language : English i think
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB3
http://missingpeople.darkbb.com

PostApe Mon 11 Jul 2016, 11:43

Thank you all looks to be working fine now Smile

Pizza is on its way in the post not sure it will be any good when it gets to you thou LOL
Anonymous
Guest
Guest

PostGuest Mon 11 Jul 2016, 11:47

Ape wrote:Thank you all looks to be working fine now Smile

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... Razz Sorry, @APE... Caught in its flight thru the kitchen... Laughing
Ape
Ape

Gender : Male
Age : 49
Posts : 136
Points : 3822
Reputation : 29
Location : UK kent
Language : English i think
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB3
http://missingpeople.darkbb.com

PostApe Fri 15 Jul 2016, 06:46

Samantha wrote:
Ape wrote:Thank you all looks to be working fine now Smile

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... Razz Sorry, @APE... Caught in its flight thru the kitchen... Laughing
haha trust you @Samantha
Ape
Ape

Gender : Male
Age : 49
Posts : 136
Points : 3822
Reputation : 29
Location : UK kent
Language : English i think
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB3
http://missingpeople.darkbb.com

PostApe Tue 19 Jul 2016, 12:04

Okay Now i have a problem again Sad 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 Sad
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12044
Reputation : 2375
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Tue 19 Jul 2016, 12:22

@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();
  }
});
Ape
Ape

Gender : Male
Age : 49
Posts : 136
Points : 3822
Reputation : 29
Location : UK kent
Language : English i think
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB3
http://missingpeople.darkbb.com

PostApe Tue 19 Jul 2016, 13:23

Yes that got it LOL I've tested it on all the forum now and its ok Thank you Smile
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12044
Reputation : 2375
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Tue 19 Jul 2016, 14:04

Okay, great ! Smile

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. Think
Ape
Ape

Gender : Male
Age : 49
Posts : 136
Points : 3822
Reputation : 29
Location : UK kent
Language : English i think
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB3
http://missingpeople.darkbb.com

PostApe Thu 21 Jul 2016, 09:23

lol well its working really well now thank you Smile
Sponsored content

PostSponsored content

View previous topic View next topic Back to top

Create an account or log in to leave a reply

You need to be a member in order to leave a reply.

Create an account

Join our community by creating a new account. It's easy!


Create a new account

Log in

Already have an account? No problem, log in here.


Log in

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