Warning: The author of this contribution does not provide support for it anymore.

Moderator Needed

Using this mod on phpBB 3.0.10 - Moderator Needed

Using this mod on phpBB 3.0.10

by amblabs » Fri Jan 13, 2012 7:24 pm

Is anyone running this mod on a 3.0.10 board? The download page menu for 1.0.5 of this mod only goes up to 3.0.9. But I installed it on my 3.0.10 board anyway. However, I am not seeing any change. Yes, I have applied the mods according to the instructions and had purged the cache and refreshed the template (also did the theme and imageset for that matter). I even tried deleting the files manually from the cache directory and it still doesn't make any difference. The board still runs fine, but I just don't see any effect from this mod.

I have Site Admin, Global Moderators and Registered User permissions, and see the "[ Moderator Control Panel ]" link at the top of the pages. I log in as a test user on another browser and make a post that requires moderation. But the MCP link still looks the same (i.e., doesn't show that a post is pending moderation). If I go into the MCP then the post is shown in its standard place.

I also tried reporting a post, and it, too, does not show up on the MCP link line.

Any tips on how to debug this?
amblabs
Registered User
Posts: 31
Joined: Thu Jan 12, 2012 11:09 am
Location: Sunnyvale, CA, USA
Contact:

Re: Using this mod on phpBB 3.0.10

by RMcGirr83 » Sat Jan 14, 2012 12:04 am

The mod will work fine on a 3.0.10 board
Appreciate the extensions/mods/support then buy me a beerImage
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21337
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Using this mod on phpBB 3.0.10

by amblabs » Sat Jan 14, 2012 1:51 am

RMcGirr83 wrote:The mod will work fine on a 3.0.10 board

Ok. That's reassuring. But any suggestions on debugging my installation?
amblabs
Registered User
Posts: 31
Joined: Thu Jan 12, 2012 11:09 am
Location: Sunnyvale, CA, USA
Contact:

Re: Using this mod on phpBB 3.0.10

by RMcGirr83 » Sat Jan 14, 2012 9:54 am

You made the edits to your style as the mod has you do for either prosilver or subsilver2 depending on which your style is based off of?
Appreciate the extensions/mods/support then buy me a beerImage
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21337
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Using this mod on phpBB 3.0.10

by amblabs » Sat Jan 14, 2012 10:06 am

RMcGirr83 wrote:You made the edits to your style as the mod has you do for either prosilver or subsilver2 depending on which your style is based off of?

Yes, I only have prosilver on my board and I did edit the four html files under the template directory per instructions.

Intalled new files:
includes/hooks/hook_moderator_needed.php
language/en/mods/moderator_needed.php
language/en_us/mods/moderator_needed.php (same as the en version)

Edited these files:
includes/mcp/mcp_pm_reports.php
styles/prosilver/template/index_body.html
styles/prosilver/template/viewtopic_body.html
styles/prosilver/template/mcp_header.html
styles/prosilver/template/viewforum_body.html

As an example, here is the top of my index_body.html file, after edit:

Code: Select all

<!-- INCLUDE overall_header.html -->

<p class="{S_CONTENT_FLOW_END}<!-- IF S_USER_LOGGED_IN --> rightside<!-- ENDIF -->"><!-- IF S_USER_LOGGED_IN -->{LAST_VISIT_DATE}<!-- ELSE -->{CURRENT_TIME}<!-- ENDIF --></p>
<!-- IF U_MCP --><p>{CURRENT_TIME} <br />[ <a href="{U_MCP}">{L_MCP}</a><!-- IF TOTAL_MODERATOR_REPORTS --> • <a href="{U_MODERATOR_REPORTS}">{TOTAL_MODERATOR_REPORTS}</a><!-- ENDIF --><!-- IF TOTAL_MODERATOR_POSTS --> • <a href="{U_MODERATOR_APPROVE_POSTS}">{TOTAL_MODERATOR_POSTS}</a><!-- ENDIF --><!-- IF TOTAL_MODERATOR_TOPICS --> • <a href="{U_MODERATOR_APPROVE_TOPICS}">{TOTAL_MODERATOR_TOPICS}</a><!-- ENDIF --><!-- IF TOTAL_MODERATOR_PMS --> • <a href="{U_MODERATOR_PMS}">{TOTAL_MODERATOR_PMS}</a><!-- ENDIF --> ]</p><!-- ELSEIF S_USER_LOGGED_IN --><p>{CURRENT_TIME}</p><!-- ENDIF -->

Last edited by amblabs on Sat Jan 14, 2012 11:21 am
amblabs
Registered User
Posts: 31
Joined: Thu Jan 12, 2012 11:09 am
Location: Sunnyvale, CA, USA
Contact:

Re: Using this mod on phpBB 3.0.10

by Oyabun1 » Sat Jan 14, 2012 10:15 am

Did you purge the cache (ACP > General tab > Purge the cache) and refresh the templates (ACP > Style tab > Templates > prosilver > Refresh)?

You may also need to reload the index page in your web browser (usually Ctrl + F5 or Shift + refresh).
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests
User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill
Contact:

Re: Using this mod on phpBB 3.0.10

by amblabs » Sat Jan 14, 2012 10:31 am

Oyabun1 wrote:Did you purge the cache (ACP > General tab > Purge the cache) and refresh the templates (ACP > Style tab > Templates > prosilver > Refresh)?

As mentioned in my first post, yes indeed I did all that.

You may also need to reload the index page in your web browser (usually Ctrl + F5 or Shift + refresh).

Did that too...

No change.
amblabs
Registered User
Posts: 31
Joined: Thu Jan 12, 2012 11:09 am
Location: Sunnyvale, CA, USA
Contact:

Re: Using this mod on phpBB 3.0.10

by RMcGirr83 » Sat Jan 14, 2012 11:53 am

Remove all files from the cache directory of your forum except for index and htaccess
Appreciate the extensions/mods/support then buy me a beerImage
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21337
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Using this mod on phpBB 3.0.10

by Oyabun1 » Sat Jan 14, 2012 11:58 am

Do you have at least one post requiring moderator action? You don't see anything unless there is something to show.
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests
User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill
Contact:

Re: Using this mod on phpBB 3.0.10

by amblabs » Sat Jan 14, 2012 12:11 pm

RMcGirr83 wrote:Remove all files from the cache directory of your forum except for index and htaccess

Done that already... See my first post above.

Oyabun1 wrote:Do you have at least one post requiring moderator action? You don't see anything unless there is something to show.

Yes, see my first post above -- I logged in as a test user in a different browser, and made a post. This test user is a new user and has no post history, and this board requires the first two posts of any new user to be moderated. The test post showed up in the MCP as it should, but not at the top of the other pages at the "[ Moderator Control Panel ]" link.

Similarly, I also tried reporting a post, and that also shows up in the MCP, but not at the MCP link at the top of the other pages.

I am not new to installing mods. This board has quite a number of mods installed already, including some much more complex than this. They all work except this one. It really has me stumped...
amblabs
Registered User
Posts: 31
Joined: Thu Jan 12, 2012 11:09 am
Location: Sunnyvale, CA, USA
Contact:

Re: Using this mod on phpBB 3.0.10

by amblabs » Sat Jan 14, 2012 10:10 pm

Any more ideas about where to look for this problem?
amblabs
Registered User
Posts: 31
Joined: Thu Jan 12, 2012 11:09 am
Location: Sunnyvale, CA, USA
Contact:

Re: Using this mod on phpBB 3.0.10

by RMcGirr83 » Sun Jan 15, 2012 2:45 pm

I just installed it on a test forum running 3.0.10 and it works fine. I would recommend that you check your permissions as I can't reproduce the problem you seem to be having.
Appreciate the extensions/mods/support then buy me a beerImage
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21337
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Using this mod on phpBB 3.0.10

by amblabs » Sun Jan 15, 2012 7:41 pm

RMcGirr83 wrote:I just installed it on a test forum running 3.0.10 and it works fine. I would recommend that you check your permissions as I can't reproduce the problem you seem to be having.

I don't think it's a 3.0.10 issue either.

But which permissions are you suggesting me to check?

If you're referring to file/directory permissions on the Linux server's filesystem, I have checked them and did not see anything wrong. Except for this mod not working, the board is running just fine.

If you're talking about phpBB's forum/user/group permissions, then let me know what this mod needs/assumes. As I said, I have Administrator, Global Moderator and Registered User privs.
amblabs
Registered User
Posts: 31
Joined: Thu Jan 12, 2012 11:09 am
Location: Sunnyvale, CA, USA
Contact:

Re: Using this mod on phpBB 3.0.10

by amblabs » Mon Jan 16, 2012 9:53 am

I did a bit more digging. In the forum_root/cache directory, I looked at the various php files pertaining to the pages where this mod is supposed to display posts/reports/etc pending approval. I think what I see is correct. For example, here is the first line in the tpl_prosilver_viewtopic_body.html.php file:

Code: Select all

<?php if (!defined('IN_PHPBB')) exit; $this->_tpl_include('overall_header.html'); if ($this->_rootref['U_MCP']) {  ?><p>[&nbsp;<a href="<?php echo (isset($this->_rootref['U_MCP'])) ? $this->_rootref['U_MCP'] : ''; ?>"><?php echo ((isset($this->_rootref['L_MCP'])) ? $this->_rootref['L_MCP'] : ((isset($user->lang['MCP'])) ? $user->lang['MCP'] : '{ MCP }')); ?></a><?php if ($this->_rootref['TOTAL_MODERATOR_REPORTS']) {  ?> &bull; <a href="<?php echo (isset($this->_rootref['U_MODERATOR_REPORTS'])) ? $this->_rootref['U_MODERATOR_REPORTS'] : ''; ?>"><?php echo (isset($this->_rootref['TOTAL_MODERATOR_REPORTS'])) ? $this->_rootref['TOTAL_MODERATOR_REPORTS'] : ''; ?></a><?php } if ($this->_rootref['TOTAL_MODERATOR_POSTS']) {  ?> &bull; <a href="<?php echo (isset($this->_rootref['U_MODERATOR_APPROVE_POSTS'])) ? $this->_rootref['U_MODERATOR_APPROVE_POSTS'] : ''; ?>"><?php echo (isset($this->_rootref['TOTAL_MODERATOR_POSTS'])) ? $this->_rootref['TOTAL_MODERATOR_POSTS'] : ''; ?></a><?php } if ($this->_rootref['TOTAL_MODERATOR_TOPICS']) {  ?> &bull; <a href="<?php echo (isset($this->_rootref['U_MODERATOR_APPROVE_TOPICS'])) ? $this->_rootref['U_MODERATOR_APPROVE_TOPICS'] : ''; ?>"><?php echo (isset($this->_rootref['TOTAL_MODERATOR_TOPICS'])) ? $this->_rootref['TOTAL_MODERATOR_TOPICS'] : ''; ?></a><?php } if ($this->_rootref['TOTAL_MODERATOR_PMS']) {  ?> &bull; <a href="<?php echo (isset($this->_rootref['U_MODERATOR_PMS'])) ? $this->_rootref['U_MODERATOR_PMS'] : ''; ?>"><?php echo (isset($this->_rootref['TOTAL_MODERATOR_PMS'])) ? $this->_rootref['TOTAL_MODERATOR_PMS'] : ''; ?></a><?php } ?>&nbsp;]</p><?php } ?>

Does this look ok?

I also checked these files, and they also contain the stuff added for this mod.
tpl_prosilver_index_body.html.php
tpl_prosilver_mcp_header.html.php
tpl_prosilver_viewforum_body.html.php

Clearly those cached files contain the code for this mod to work. But I think somehow there is a disconnect between the phpBB's accounting of the number of posts/reports/etc pending approval and what this mod "sees" in the variables that it checks. Perhaps the "hook" that this mod installs (i.e., includes/hooks/hook_moderator_needed.php stuff isn't happening?). But that file is there and has read permissions to the apache2 web server (which runs as user wwwrun and group www), and its containing directory hierarchy are all searchable by the server.

Does this provide any more clues as to where to look?

Here is a screen shot of my MCP screen showing the problem:

moderator_needed.png
amblabs
Registered User
Posts: 31
Joined: Thu Jan 12, 2012 11:09 am
Location: Sunnyvale, CA, USA
Contact:

Re: Using this mod on phpBB 3.0.10

by RMcGirr83 » Mon Jan 16, 2012 12:43 pm

A user/group permission of "never" will override any other of the same permission.
Appreciate the extensions/mods/support then buy me a beerImage
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21337
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact: