Previous Thread
Next Thread
Print Thread
Hop To
#259843 03/18/2017 5:53 PM
Joined: Mar 2007
Posts: 285
Likes: 1
E
Enthusiast
Enthusiast
E Offline
Joined: Mar 2007
Posts: 285
Likes: 1
I just updated to 7.6 and had a question about the Shout Chat...

I was thinking about using it like a Mini Chat Room for Logged in Members only.
I know in CP I can set so Guests will not see the Shout Box and therefore can't get to the Shout Box without a direct link.

As a convenience to members I can provide a direct link that opens up the Shout Chat. Problem with that is that Guests can then open the Shout Chat.

Is there a way to only allow logged in Members to see the Shout Chat? Or, that would check a direct link to see if someone was logged in? (ie: gives Message you must be logged in to use this feature)

Bill

Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
I'll need to check into how difficult it'd be to make the "can view" permission carry over to the Shout Chat, versus just hiding the Shout Box. The "Can Use" permission carries over though.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
Ok, I built a check that's proposed for v7.6.1, you can test on your forum if you feel comfortable with modifying files.

In /languages/english/portal_islands.php
PHP Code
Find:
$ubbt_lang['SHOUT_CHAT'] = "Shout Chat";

Add Below:
$ubbt_lang['SHOUT_ERR'] = "You don't have the correct permissions to view Shouts."; 


In /scripts/shoutchat.inc.php
PHP Code
Find:
	global $smarty,$user,$in,$ubbt_lang,$config,$forumvisit,$visit,$dbh,$html;

Replace with:
	global $smarty,$user,$in,$ubbt_lang,$config,$forumvisit,$visit,$dbh,$html,$userob;


Find:
	include("{$config['FULL_PATH']}/languages/{$config['LANGUAGE']}/portal_islands.php");

Add Below:
	if(!$userob->check_access("site","CAN_SEE_SHOUTS")) { $html->not_right($ubbt_lang['SHOUT_ERR']); } 


When a user without group access tries to load the page, they should get the new error. The wording of this error will likely change before release.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Mar 2007
Posts: 285
Likes: 1
E
Enthusiast
Enthusiast
E Offline
Joined: Mar 2007
Posts: 285
Likes: 1
I'll give it a shot!

smile
Bill

Joined: Mar 2007
Posts: 285
Likes: 1
E
Enthusiast
Enthusiast
E Offline
Joined: Mar 2007
Posts: 285
Likes: 1
Gizmo,

You da man!! smile

If I set Guests permissions to not see the Shout Box they get the error message following a direct link to Shout Chat

For now I'll let everyone see it. If Members want it to be more private it's an easy switch to throw.

Works great, Thanks!


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
spam issues
by ECNet - 03/19/2024 11:45 PM
Who's Online Now
2 members (Nightcrawler, Ruben), 694 guests, and 214 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)