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 13 users online :: 0 Registered, 0 Hidden and 13 Guests :: 2 Bots

None

[ View the whole list ]


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

[SOLVED] Write on Walls

View previous topic View next topic Go down

Anonymous
Guest
Guest

PostGuest Thu 31 Mar 2016, 04:15

I really don't know in what section I should ask this Embarassed , but is there a way to prevent users from writing on one's wall except for their friends? The Wall must however remain visible to all.

Another thing. Late February I asked you this question on FM. Perhaps you remember:

"I dunno if it's worth asking or possible at all, but I was thinking. Remember you helped us with the 'latest topics' stuff yesterday @ friendcodes.nl ? Well, I was wondering if we could add something to the toolbar in the messages and quick reply, something tough but kinda cool. I was thinking of blocking individual messages from preview and guest view using BBCode, using [secret]<message>[/secret] so it will be visible to regular members, but not to guests, even not in preview mode (preview symbol should be dropped) or by clicking message links. The message displayed should be none at all or something like "This message is accessable to members only" or something like that, 'message blocking' style like we have on our site. Do you think it's possible for you to create something like that for us?"

You responded with:

"Yes, it's possible. You can check the _userdata object to get the user login state, you can then proceed to parse the bbcode client-side. There are some small quirks with this method though :

1. Client-side parsing can force resized images to become natural dimensions. ( if using the AP option )
2. For things that use AJAX -- like the preview -- the parsing will need to be done after getting the message. So having it in a recallable function would help with that one.
"

Could you please have a look into this? Smile You know me and coding, they just won't pair [SOLVED] Write on Walls Lightning-smiley-face Laughing Thanks X

Samantha.


Last edited by Samantha on Fri 29 Jul 2016, 07:18; edited 1 time in total
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12052
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 Thu 31 Mar 2016, 05:00

Add the following script in all the pages
Code:
function fa_parse_secret() {
  if (!_userdata.session_logged_in) {
    for (var a = $('.postbody .content'), i = 0, j = a.length; i < j; i++) {
      if (/\[secret\].*?\[\/secret\]/.test(a[i].innerHTML)) {
        a[i].innerHTML = a[i].innerHTML.replace(/\[secret\].*?\[\/secret\]/gi, 'Content Hidden');
      }
    }
  }
};

$(fa_parse_secret);
It'll just give the parsing functionality. Try hiding a few messages using the tags [secret][/secret] to see how it works. ( It wont work for members )

Personally, I think it might not be too good because it's using JavaScript to hide the content once it's already visible. It might be better to use a tag that's already hidden without JS, but visible with JS when conditions are met. But either way, if someone clicks "View Page Source" from the context menu or saves the page they'll still be able to see the content.

Honestly, I wish FA would just allow us to create custom bbcode already. So we can write tags that are parsed server-side. Zen
Anonymous
Guest
Guest

PostGuest Thu 31 Mar 2016, 05:15

I've read it quickly, Seth. And tbh it's all Chinese to me, as usual, but once the final script is in place I'm able to read it all back (which is rather strange, I mean, I can read JS, but I cannot create anything!).

I'll try after I get home from another check-up & (pre)med @ the hospital (yk). Not sure how I feel after so don't mind me responding to this tomorrow, k? ty anyway! X

PS: the Wall... you got an answer to that?

Got to go fast now!

Samantha.
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12052
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 Thu 31 Mar 2016, 06:02

Don't worry about it, there's no rush. Wink

Oops yeah, I forgot about that. xD If I'm not mistaken I believe there's an option in the Profile Settings. Go to preferences and edit the option "Allow visitor messages on my profile"

Take care Bye
SLGray
SLGray
Valued Member
Gender : Male
Age : 51
Posts : 2465
Points : 7145
Reputation : 290
Location : United States
Language : English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : ModernBB
http://www.fmthemes.forumotion.com https://www.facebook.com/FM-Themes-655055824604957 https://twitter.com/FMThemes https://pinterest.com/FMThemes

PostSLGray Thu 31 Mar 2016, 06:12

Do you mean this:  Profile > Perferences
Allow visitor messages on my profile :   All Friends
Anonymous
Guest
Guest

PostGuest Thu 31 Mar 2016, 13:52

Oh lol that. I never noticed before. So it's a per user setting eh? Hmm... great! TY! Smile

& Seth, I'm gonna try the script tomorrow if you don't mind. I'm too tired to concentrate atm, I'm afraid.

Sammy.
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