we_universal

Subscribe Button hidden for Read-Only Users - we_universal

Subscribe Button hidden for Read-Only Users

by NameLess295 » Sat Feb 29, 2020 2:51 pm

Hello everyone,

first of all: Sorry for my bad english - I am german.
I found out that only Users with write permission are able to subscribe a forum in the we_universal theme. If i change the style to prosilver, then i get the Button for the Read-Only User too. Is there anybody who can tell my how to fix this?

Thanks!
NameLess295
Registered User
Posts: 3
Joined: Fri Feb 28, 2020 5:03 pm

Re: Subscribe Button hidden for Read-Only Users

by v12mike » Sat Feb 29, 2020 6:27 pm

How are you making the users "read-only"?
v12mike
Registered User
Posts: 589
Joined: Thu Jul 09, 2015 5:03 pm

Re: Subscribe Button hidden for Read-Only Users

by NameLess295 » Sat Feb 29, 2020 11:40 pm

In the ACP -> Permissions -> group forum permissions -> then I choose my group ->select the forum -> Choose Role "Read Only access"

In advanced permissions "can subscribe forum" = yes
NameLess295
Registered User
Posts: 3
Joined: Fri Feb 28, 2020 5:03 pm

Re: Subscribe Button hidden for Read-Only Users

by PELP » Sat Mar 14, 2020 5:02 pm

We have the same problem at https://dfac.dk/fritforum. Nobody gets the subscribe button - not even me and I am full administrator. The settings in permissions look OK - "can subscribe forum" = yes. When it has changed I am not aware of, but we were told today by a user.
Just so that there is no coubt that it is a we_universal thing, I also administrate another forum using another style, and there are no problems there.
Yours truly
Poul Erik Lind Pedersen
Denmark
PELP
Registered User
Posts: 71
Joined: Sun Nov 22, 2015 4:14 pm
Name: Poul Erik Lind Pedersen

Re: Subscribe Button hidden for Read-Only Users

by v12mike » Sun Mar 15, 2020 7:39 am

PELP wrote:We have the same problem at https://dfac.dk/fritforum. Nobody gets the subscribe button - not even me and I am full administrator. The settings in permissions look OK - "can subscribe forum" = yes. When it has changed I am not aware of, but we were told today by a user.
Just so that there is no coubt that it is a we_universal thing, I also administrate another forum using another style, and there are no problems there.
I think that you may have a different issue.
I don't see it on my live forum, nor my test sites. Can you try the version from my git repository https://github.com/v12mike/we_universal ... master.zip as there were a few differences from the currently released version (for reasons outside of my control).
NameLess295 wrote: I found out that only Users with write permission are able to subscribe a forum in the we_universal theme. If i change the style to prosilver, then i get the Button for the Read-Only User too. Is there anybody who can tell my how to fix this?
This is still on my list to investigate, but I have been busy elsewhere.
v12mike
Registered User
Posts: 589
Joined: Thu Jul 09, 2015 5:03 pm

Re: Subscribe Button hidden for Read-Only Users

by NameLess295 » Sat Aug 29, 2020 2:43 pm

v12mike wrote:
NameLess295 wrote: I found out that only Users with write permission are able to subscribe a forum in the we_universal theme. If i change the style to prosilver, then i get the Button for the Read-Only User too. Is there anybody who can tell my how to fix this?
This is still on my list to investigate, but I have been busy elsewhere.
Hey,

did you already had some time to investigate my issue?
NameLess295
Registered User
Posts: 3
Joined: Fri Feb 28, 2020 5:03 pm

Re: Subscribe Button hidden for Read-Only Users

by v12mike » Sat Aug 29, 2020 9:01 pm

I just had a look at the code, and I think I see the problem.

In the file we_universal/template/viewforumbody.html at line 40 if you find the block:

Code: Select all

	<!-- IF not S_IS_BOT and S_DISPLAY_POST_INFO -->
		<!-- EVENT viewforum_buttons_top_before -->

		<a href="{U_POST_NEW_TOPIC}" class="button" title="<!-- IF S_IS_LOCKED -->{L_FORUM_LOCKED}<!-- ELSE -->{L_POST_TOPIC}<!-- ENDIF -->">
			<!-- IF S_IS_LOCKED -->
				<span>{L_BUTTON_FORUM_LOCKED}</span> <i class="icon fa-lock fa-fw" aria-hidden="true"></i>
			<!-- ELSE -->
				<span>{L_BUTTON_NEW_TOPIC}</span> <i class="icon fa-pencil fa-fw" aria-hidden="true"></i>
			<!-- ENDIF -->
		</a>
		<!-- IF U_WATCH_FORUM_LINK -->
			<a href="{U_WATCH_FORUM_LINK}" class="button" title="{S_WATCH_FORUM_TITLE}" id="forum_watch_button">
				<span>{S_WATCH_FORUM_TITLE}</span> 
				<i class="icon fa-<!-- IF S_WATCHING_FORUM -->check-<!-- ENDIF -->square-o fa-fw" aria-hidden="true"></i>
			</a>
		<!-- ENDIF -->
	<!-- EVENT viewforum_buttons_top_after -->
	<!-- ENDIF -->
and replace it with:

Code: Select all

	<!-- IF not S_IS_BOT -->
		<!-- EVENT viewforum_buttons_top_before -->

		<!-- IF S_DISPLAY_POST_INFO -->
			<a href="{U_POST_NEW_TOPIC}" class="button" title="<!-- IF S_IS_LOCKED -->{L_FORUM_LOCKED}<!-- ELSE -->{L_POST_TOPIC}<!-- ENDIF -->">
				<!-- IF S_IS_LOCKED -->
					<span>{L_BUTTON_FORUM_LOCKED}</span> <i class="icon fa-lock fa-fw" aria-hidden="true"></i>
				<!-- ELSE -->
					<span>{L_BUTTON_NEW_TOPIC}</span> <i class="icon fa-pencil fa-fw" aria-hidden="true"></i>
				<!-- ENDIF -->
			</a>
		<!-- ENDIF -->
		<!-- IF U_WATCH_FORUM_LINK -->
			<a href="{U_WATCH_FORUM_LINK}" class="button" title="{S_WATCH_FORUM_TITLE}" id="forum_watch_button">
				<span>{S_WATCH_FORUM_TITLE}</span> 
				<i class="icon fa-<!-- IF S_WATCHING_FORUM -->check-<!-- ENDIF -->square-o fa-fw" aria-hidden="true"></i>
			</a>
		<!-- ENDIF -->
	<!-- EVENT viewforum_buttons_top_after -->
	<!-- ENDIF -->
I think that it may fix your issue.

Note that I have not tested this yet, but it should be safe.
v12mike
Registered User
Posts: 589
Joined: Thu Jul 09, 2015 5:03 pm