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.


Send a message to your visitors in real-time

Login / Search

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

Well-settled

Hi all, I think it would be a neat and smart way of alerting visitors if you could make an addon that allows a admin or a privileged user to go in admin zone and go somewhere (function somewhere in the menus to choose from) and enter text and then it's displayed across the whole site and then disappears.
Back to the top
 
Posted
Rating:
#72155
Avatar

Community saint

You can do something similar with the Supershout add-on.

Although it is not restricted to privileged users, it could be modified.

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:
#72195
Avatar

Well-settled

I don't think it would work, it's not doing what I think could be a good idea.
Back to the top
 
Posted
Rating:
#72198
Avatar

Well-settled

Hi, I have decided it's a good idea, how do I set the permissions so that only staff can shake the screen and make posts display everywhere?
Back to the top
 
Posted
Rating:
#72203
Avatar

Community saint

You will need to put the following code:

Code

   {+START,IF,{$OR,{$IS_STAFF},{$IS_SUPER_ADMIN}}}

   {+END}
in the Supershout template around the parts that you don't want normal users to see, namely the input box and the submit button.

I don't know exactly which template it is because I don't have Supershout installed.

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:
#72210
Avatar

Well-settled

Do I put this around the code that is on the page it self?
Back to the top
 
Posted
Rating:
#72211
Avatar

Well-settled

Right, I have done, it, it works well, very good.

But, when I a normal user goes to a page the fly in messaging and shake of screen doesn't happen because of the shout box doesn't show up.
Back to the top
 
Posted
Rating:
#72226
Avatar

Community saint

Then you have probably put the new code around too much of the shout box code.

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:
#72231
Avatar

Well-settled

Ok….?


What do you mean?

All I added was:

(This was before the shout box block:
{+START,IF,{$OR,{$IS_STAFF},{$IS_SUPER_ADMIN}}}

This is after:

{+END}


What's wrong with that I did?
Back to the top
 
Posted
Rating:
#72244
Avatar

Community saint

Sounds like you have put the code in your side panel template instead of the supershout template.

From memory, supershout is more or less a drop-in replacement for the standard shoutbox, in which case the template you want should be BLOCK_SIDE_SHOUTBOX.tpl .

In that template, put the code around:

Code

<form ...

</form>

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:
#72265
Avatar

Well-settled

Thanks, but where is the Super Shout template located?
Back to the top
 
Posted
Rating:
#72267
Avatar

Community saint

Admin Zone Style Manage themes Choose
Edit templates
and select BLOCK_SIDE_SHOUTBOX.tpl .

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:
#72270
Avatar

Well-settled

Thank you SOO much Temp1024, it's worked!
 :thumbs:
Back to the top
 
Posted
Rating:
#72275
Avatar

Well-settled

It's working good, but I can't seem to get "Guest" so see the box…….
Back to the top
 
Posted
Rating:
#72276
Avatar

Well-settled

Ouch I checked for a "Member" and the box didn't show either, but super member and above gets shown the box.
Back to the top
 
Posted
Rating:
#72288
Avatar

Community saint

Did you remove the code that you put in the wrong place before?

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:
#72289
Avatar

Well-settled

There was no code by <form> </form>
Back to the top
 
Posted
Rating:
#72290
Avatar

Community saint

I'm referring to what you wrote here:

Voarsh said

Ok….?


What do you mean?

All I added was:

(This was before the shout box block:
{+START,IF,{$OR,{$IS_STAFF},{$IS_SUPER_ADMIN}}}

This is after:

{+END}


What's wrong with that I did?
That code there hides the whole shout box from everyone except staff and admin.

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:
#72291
Avatar

Well-settled

Well, it's allowing super-members to view it, super-members and above.

But with the super-members above don't get shown the send and shake buttons.

But I do.
Back to the top
 
Posted
Rating:
#72319
Avatar

Community saint

The code checks for staff and admin groups only. If you want to give other groups permissions then you need to add them to the OR list. I think for super-members you need to add {$IS_IN_GROUP,4} .

The main group numbers are
   1   Guests
   2   Administrators
   3   Staff
   4   Super-members

See ocPortal Tutorial: Tempcode programming - ocPortal for more info on IS_IN_GROUP.


Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Expand