HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Bug? - Private chat error message not so private.

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#69219 (In Topic #14661)
Avatar

Community saint

I received the following error as admin (typing messages into the shout box):

Code

By System (10:25 PM)

    [private="admin
    "]Flood control blocked this message. You may post a message in 2 seconds.[/priva
    te]

1) But other user can also see the message (I assume that they are not supposed to).

2) It appear that a comcode tag (I assume [private] is a comcode-type tag) is not being processed correctly.

I've recently tried to use a custom comcode tag in BLOCK_SIDE_SHOUTBOX_MESSAGE.tpl but it did not work, so I am assuming the there is no comcode support with chat messages.

3) The line break-ups are as displayed. This info may or may-not be significant..



Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#69220
Avatar

Community saint

4) When you select an emoticon from emoticon popup, "Emoticon:" is inserted into the message before the emoticon. I assume that is is not intentional, because if it is, is really should not be there.

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#69319
Avatar

In sources/chat.php change:

Code

$_message_parsed=insert_lang_comcode('[private="'.$GLOBALS['FORUM_DRIVER']->get_username(get_member()).'"]'.do_lang('FLOOD_CONTROL_BLOCKED',integer_format($time_left)).'[/private]',4,NULL,false,NULL,$wrap_pos);
to:

Code

$_message_parsed=insert_lang_comcode('[private="'.$GLOBALS['FORUM_DRIVER']->get_username(get_member()).'"]'.do_lang('FLOOD_CONTROL_BLOCKED',integer_format($time_left)).'[/private]',4,NULL,false,NULL/*,$wrap_pos*/);

'private' is a virtual Comcode tag used by the chat system. The Comcode parser does nothing with it, and the shoutbox defines tight word-length wrapping so it ended up getting chopped up.

For the next release we are going to make these flood control messages viewable in the shoutbox also, for the member that spawned it.

2– Comcode does work (just tested it in a shoutbox post). But you can't use Comcode in templates directly.

4–Looking at this now


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#69329
Avatar

Community saint

2 - Assume the reason that you can't use comcode in templates directly is because you didn't think that anyone would want to do that. Correct?

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#69337
Avatar

Community saint

Gonna leave this post here for others that may be reading, however, since the word "directly" is being used in the context of this post I'm going to assume this is already known…

You can use it, just needs to be wrapped in a tempcode construct:

Code

{$COMCODE,[title]comcode_goes_here[/title]}
for example.


Last edit: by SoccerDad

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#69338
Avatar

It's just a different language layer. Comcode compiles to templates, basically. But we are considering changing that.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#69349
Avatar

Community saint

Nice pick-up there SoccerDad, works a treat!

Although I was aware of $COMCODE, it didn't occur to me that it would apply in this scenario. I guess I haven't fully got the delineation between to two systems straight yet as I'm not really doing too much with them at the moment.

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#69352
Avatar

Community saint

Glad it helped!

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: