| |
| | |

CodersClub

 Forgot password?
 Register
Search
View: 10919|Reply: 10
Collapse the left

How to disable display of "New" button when members no right to post

[Copy link]
Post time: 2012-02-21 02:02
| Show all posts |Read mode
本帖最后由 fengshui-123 于 2012-2-21 07:03 编辑

see screenshot, I already set the member no right to post at this forum but the "New" button still show up.
How to disable the display of "New" and/or "Reply" buttons for each member who do not have right to post the respective message in respective forum.


This post contains more resources

You have to Login for download or view attachment(s). No Account? Register

x

 Korea, Republic of

Post time: 2012-02-21 07:58
| Show all posts
Edited by ionobgy at 2012-2-21 09:11

No method in admin panel.
It is possible only by the source code modification.
But I do not recommend the source code modification because not support at code upgrading.
Nevertheless if you want that, the code modification is below.

In /template/default/forum/forumdisplay.htm(line 161) and /template/default/forum/forumdisplay_list.htm(line 339)

replace <!--{if !$_G['gp_archiveid']}--> with <!--{if !$_G['gp_archiveid'] && $_G[group][grouptitle]!="group titlename"}-->

group titlename is guest or newbie etc that you want to hide from.
The word "guest" or "newbie" must be changed along your group setting in admin panel.

And if you want that this modifcation is applied on certain special forum,
<!--{if $_G[fid]=="forum id number"}-->    <!--{/if}--> code is added.

 Author| Post time: 2012-02-21 08:13
| Show all posts
本帖最后由 fengshui-123 于 2012-2-21 13:22 编辑

Thank you Ionobgy.

What I want is not based on group, but based the "right" setting, see picture below. If someone do not have right then do not show the button.

Anyway, it look too complicated to me at this moment. I will not modify this.



This post contains more resources

You have to Login for download or view attachment(s). No Account? Register

x

 Korea, Republic of

Post time: 2012-02-21 08:25
| Show all posts
Edited by ionobgy at 2012-2-21 09:42
fengshui-123 replied at 2012-2-21 09:13
Thank you Ionobgy.

What I want is not based on group, but based the "right" setting, see picture be ...

Yes, I think so.
Above modification is not simple and not recommended method.

But right setting is based on user group and newbie, member, gold member etc.. is a user group titlename.

I guess that if you will get your wish, only method is that you input "newbie" or "member"  to group titlename of above my code.

 Russia

Post time: 2012-02-26 16:10
| Show all posts
I think, the idea of fengshui-123 is great!

Why to show any "Add Post" buttons or "Quick Reply" form if the visitor has NO permission to post anything?!
AFAIK, X2 have runtime variable $_G['group']['allowpost'] that is "true" only if the visitor can post anything.

I'll try to implement this idea into tempates....
 Author| Post time: 2012-02-26 16:14
| Show all posts
not I great, because I saw one forum using discuz have this feature, can't remember which forum.

 Russia

Post time: 2012-02-26 16:22
| Show all posts
The first my solution for this problem:
http://code.google.com/p/discuzx-en/source/detail?r=374

Let's test this!!!
 Author| Post time: 2012-02-27 07:40
| Show all posts
Hi Vot,

It works, great!

 Korea, Republic of

Post time: 2012-02-27 08:11
| Show all posts
Edited by ionobgy at 2012-2-27 19:01
vot replied at 2012-2-26 17:22
The first my solution for this problem:
http://code.google.com/p/discuzx-en/source/detail?r=374

I want that this function is optional by administrator.
Because I want that visitor can write / reply the thread at some forum.
But for this modification, visitor cannot write / reply the thread due to not visible write/ reply button although permission of writing / relying.
At original discuzx, visitor can write the thread as anonymous if visitor have a write / reply permission.
And write / reply submit button view have a some merit.
The merit is login guidance to teach that after login, he can write.


Post time: 2012-02-27 17:08
| Show all posts
And write / reply submit button view have a some merit.
The merit is login guidance to teach that after login, he can write.


+1
You have to log in before you can reply Login | Register

Points Rules

Archive|Mobile|Dark room|CodersClub

Top.Mail.Ru
Top.Mail.Ru

2024-05-07 17:19 GMT+3 , Processed in 0.109474 sec., 8 queries .

Powered by Discuz! X3.4 Release 20230520

© 2001-2024 Discuz! Team.

MultiLingual version, Rev. 4301, © codersclub.org

Quick Reply To Top Return to the list