News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

View Only Boards

Started by Rudolf, January 31, 2007, 10:45:10 AM

Previous topic - Next topic

Rudolf

I updated the mod with the fixes for the 2.0 Gold version.
If you get installation errors about the templates you can ignore them, they are only for visual purposes and shouldn't cause any seurity issues or errors in the log.

Look for the package view_only_boards_1.2b.zip.

I recommend you to make a backup before installing the modification.
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

TheListener

I installed the mod despite a few erros on install ( which I edited except one which I couldn't find).

I'm getting this error:

Apply Filter: Only show the error messages of this URL
http://wwwxxxxxxxxxxxx/index.php?/board,1.0.html
Apply Filter: Only show the errors with the same message
8: Undefined index: last_post
Apply Filter: Only show the errors from this file
File: /home/xxxxxx/public_html/Themes/default/MessageIndex.template.php
Line: 85

81:    
// The board's and children's 'last_post's
82:    
echo '<td class="lastpost">';
83:    
84:    
if (!$modSettings['disable_avatar'])
==>85:    
echo '<div style="float: left; margin-right: 6px;">', $board['last_post']['member']['avatar'], '</div>';
86:    
87:    
if (!empty($board['last_post']['id']))

The section within the boardindex.template I had to find was:

$children[] = $child['new'] ? '<strong>' . $child['link'] . '</strong>' : $child['link'];

I was unable to do so and now find my childboards empty.

The boards which guests Do Not have access to show the posts topic and are red in colour. However when these are clicked on the register box shows.

Hj Ahmad Rasyid Hj Ismail

Brack1, that is in MessageIndex.template.php:

One of the find was wrongly worded in the latest version:
$children[] = $child['new'] ? '<b>' . $child['link'] . '</strong>' : $child['link'];
Change to this and repackage the mod:
$children[] = $child['new'] ? '<strong>' . $child['link'] . '</strong>' : $child['link'];

TheListener

Hmm yet this is when I go to install.

   3.    Replace    .Themes/default/BoardIndex.template.php    Test failed

Hj Ahmad Rasyid Hj Ismail

Line 215. Few lines below "// Has it posts awaiting approval?"

TheListener

Phew sorted that one out.

The restricted topics are now unclickable and show in red.

However the topics still show instead of a 'Protected' although I can live with that.


TheListener

Just noticed.

None of the Child Board topics are showing.

Hj Ahmad Rasyid Hj Ismail

Quote from: Brack1 on September 08, 2011, 12:33:00 PM
Phew sorted that one out.

The restricted topics are now unclickable and show in red.

However the topics still show instead of a 'Protected' although I can live with that.
Glad to hear that. By the way, IMO this mod is supposed to show the topics in the selected boards but protected them from being read/access in full. In other words, they can just a view their "synopsis" but can never read their details.

Quote from: Brack1 on September 08, 2011, 09:00:56 PM
Just noticed.

None of the Child Board topics are showing.
Ah! That must be another bug.

TheListener

#568
Have included the file for you to look at.


EDIT:

The mod which seems to conflict with this one is the Avatar On Board mod.

I tested this mod on a clean test forum with NO other mods and it worked as it should.

The posts showed as protected.

TheListener

Have since uninstalled the Avatar On Board mod and still have the blank Child boards.

TheListener

UPDATE

This mod shows as it should on my test forum but refuses to play ball on the main one.

Also the child boards last post area is completely blank.

I have looked through the files and tried to remove older mods which I thought may be conflicting yet there has been no changes.

Hj Ahmad Rasyid Hj Ismail

I have not tested this but try to find this in Subs-BoardIndex.php:
// Set the last post in the parent board. //- View Only Boards MOD- modified condition
if (empty($row_board['id_parent']) || ($isChild && !empty($row_board['poster_time']) && (!$this_last_post['protected'] || !empty($modSettings['vob_allowMessageIndexView'])) && $this_category[$row_board['id_parent']]['last_post']['timestamp'] < forum_time(true, $row_board['poster_time'])))

And change to this:
// Set the last post in the parent board. //- View Only Boards MOD- modified condition
if (empty($row_board['id_parent']) == $boardIndexOptions['parent_id'] || ($isChild && !empty($row_board['poster_time']) && (!$this_last_post['protected'] || !empty($modSettings['vob_allowMessageIndexView'])) && $this_category[$row_board['id_parent']]['last_post']['timestamp'] < forum_time(true, $row_board['poster_time'])))

TheListener

All the last posts on the main board went blank.

Hj Ahmad Rasyid Hj Ismail

Brack1, I thought they are already blank? The only concern is that you want yourchild board back? Just reverse the suggested edit above, and you should be fine.

If I were you, the only hack to this mod that I would do is to restore BoardIndex.template.php and MessageIndex.template.php to before the mod is installed. IMO via that's one of the way you can achieve what you want.

TheListener

Quote from: ahrasis on September 11, 2011, 11:55:10 PM
Brack1, I thought they are already blank? The only concern is that you want yourchild board back? Just reverse the suggested edit above, and you should be fine.

If I were you, the only hack to this mod that I would do is to restore BoardIndex.template.php and MessageIndex.template.php to before the mod is installed. IMO via that's one of the way you can achieve what you want.

The childboards were already blank.

The main forum board ( board index I presume) is where everything else went blank.


TheListener

The childboards haven't changed.

Is strange how the mod is working perfect on the test forum and not the main.

Hj Ahmad Rasyid Hj Ismail

It might be disturbed by other mods and changes you have made. All mods work the same in the new SMF environment but always have limitations on heavily modded site.

TheListener

On my test forum I installed this mod before the Vbulletin style Board Index mod.

The VOB mod was working as it should until then.
As a guest all I see is the childboards last posts are completely blank.

Instead of Protected I see the last posters name and topic reply in red.

Is there a way the two mods can be harmonised so they work together?

I am also posting this on that mods topic.

ForumGuy789

#578
Great mod, I'm holding off on upgrading to 2.0 until it's fixed because I need it. I have not been able to get ahold of Rudolf in a while so if someone wants to completely fix it for me I'll pay $50 - PM me and we'll talk.

I have no other mods installed on my test site.
Here are 3 bugs I've found:

BUG #1:

- If member does not have access to Child Boards then they are listed as a nasty Red color for some reason for some people like Guests
- If member does not have access to Child Boards then the Last Post info from it on each board is also Red for username of the last post and the subject

I definitely do not like that red - it messes up the theme.

BUG #2
- I think this error occurs in all member-groups if you enter a forum with child boards but no topics
- I confirmed it's the mod by uninstalling the mod and seeing no errors.
- I think this error actually happens when you click on a board that has sub-boards and some of the sub-boards have their own sub-boards.. and there are no posts in the board you clicked on (only sub-boards)

http://smf2.mysite.com/index.php?board=148.0
Apply Filter: Only show the errors with the same message
8: Undefined index: last_post
Apply Filter: Only show the errors from this file
File: D:/inetpub/vhosts/smf2.mysite.com/httpdocs/forum/Sources/Subs-BoardIndex.php
Line: 264



Bug #3:
Some boards are not showing Last Post info. That column is blank. It appears to happen to happen when you click on a board that has multiple child boards. The child boards w/out child boards of their own seem to be missing the "last post" info.

This happens to all membergroups even admin.
I uninstalled the mod to confirm that the problem goes away w/out the mod installed.

Hj Ahmad Rasyid Hj Ismail

I haven't tested this mod in full but I think the mod author is the best person to reply on this.

Advertisement: