Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=610)
*****************************************************
View Only Boards - Modification for SMF
version 1.1
© 2007, Rudolf Martincsek
*****************************************************
Make boards visible on the forum index based on member groups.
Does not affect anything else. The access permission is still valid.
There is a setting to allow the view of the board index (topic listing).
Members with no access to boards won't be able to enter the board or the topics - depending on the above setting.
In the package file you downloaded you'll find a readme.html file. Consult with that file for more information.
Have fun!
Finally it got approved, I have benn looking for some time now to use such a mod and the options it has to offer. Thank u Rudolf for creating such a mod, I know that pleanty of other people will be happy as well with this mod.
It installed clean and uninstalled clean so congratulations. :) I don't have any particular need for it but I had a few moments to spare so I figured I would take a peek at it.
I have installed since a few days and works fine without problem.
It's one of most important mods.
Thanks :)
Great mod, maybe I don't know how to set my wish:
I want to show the boards, the topics, but NOT the content of the topics.
Is this possible?
In Admin -> Features and Settings
after "Allow guests to browse the forum"
you'll find the setting Show the message index for "view only" boards
Quote from: Rudolf on February 05, 2007, 03:18:48 AM
In Admin -> Features and Settings
after "Allow guests to browse the forum"
you'll find the setting Show the message index for "view only" boards
Thanks, I had looking for that option as well but I couldn''t find it. It''s such a very great mod
Thanks for the quick answer, exact what I am looking for, thumbs up!!!
Last question, where can I found the text:
The topic or board you are looking for appears to be either missing or off limits to you.
In the normal error language file I found this text, but after changing your mod will say the same...
I like to put a link in the text to pay to get access. Is this possible?
Errors.english.php
maybe you have a custom theme which overwrites the default. Or maybe another language ???
Or it could be the cache, in which case it should appear the new text after a time.
Ok, is the string:
$txt['topic_gone'] = ??
Problem:
checking: Show the message index for "view only" boards to on, will give the error:
The topic or board you are looking for appears to be either missing or off limits to you.
on all other boards, so no normal members can have access, even if I checked both boxes after the member in the board settings.
???
sorry, knows the answer: level 1 cache...
I installed this and now my mods can only view one board??? Help what could be wrong?
Quote from: qtime on February 05, 2007, 03:55:42 PM
Problem:
checking: Show the message index for "view only" boards to on, will give the error:
The topic or board you are looking for appears to be either missing or off limits to you.
on all other boards, so no normal members can have access, even if I checked both boxes after the member in the board settings.
???
sorry, knows the answer: level 1 cache...
this is the exact same thing my mods get. What do I do? I am using the default theme multi colored 1.1.2.
Just check all in the second row to make the topics visible for the normal members.
Quote from: qtime on February 14, 2007, 01:37:51 PM
Just check all in the second row to make the topics visible for the normal members.
I'm sorry if this sounds a little dumb but, what do I check in the 2nd row of what?
Hi Avidum,
Go to modify board, and in that setting, check off the left hand or 1st column boxes of those you want to be able to access or actually get into the board. In the right hand column of boxes, you can check the boxes of those you want to see the board listed in the board index on the main forum page, but they cannot get into the board to read or post or anything. They will get that error message.
Quote from: Rudolf on February 05, 2007, 02:55:33 PM
Errors.english.php
maybe you have a custom theme which overwrites the default. Or maybe another language ???
Or it could be the cache, in which case it should appear the new text after a time.
Hi, Rudolf, could you tell me what the appropriate message would be? I've been getting the above message "Warning, the topic or board you are looking for..."
But when I would expect to. I don' t have a problem that the request to login or register is coming up. I just want to change the message a bit. I haven't been able to find where the above text is to edit it. I looked in the default theme language files, and found a similar text in login.english.php, but not the above quote, so the message can't be coming from there. I looked through a number of other files, couldn't find the text.
It's not my cache and it's not in errors.english.php. I'm not sure I understand what you mean by another language. I use only english in my forum, though I see other language files in the default folder. I couldn't see anything in the azure theme I am using to edit.
I do have a message on their forum, but wanted to make sure I asked you as well, as I don't know if the answer is to be found in the mod or the theme. Someone there said it might be the mod, but here you say it might be the theme.
Would appreciate any help in this! Love this mod! Thanks.
smf 1.1.1/tp 9.7/azure theme
Hi DreamSinger and thank you so much for replying. Please forgive the dumb questions that I ask, I am not an expert in this stuff. Just so I am understanding you correctly, do I go to the admin panel and then to the "boards". TIA
No questions are dumb - they're just questions! I'm learning too.
Yes, go to admin, then boards and then click the modify link for the board you want to work on. :)
LOL I finally figured that out but when I click both the boxes for the guests for a certain board the board itself is eliminated from the main page. It's not viewable at all. I just want to make the boards and topics viewable to guests but not the posts. BTW thanks, I do appreciate the help. ;)
Well, I'm no expert here, and I know you can click both boxes, but I'm not sure why you'd want to. If you click the left box, the guests can see the boards exisit and go on them to read at least read, depending on whether you give them permission to post or not. If you click only the right box, they can only see the boards exist, but cannot enter it. Which is basically what I wanted the mod for.
I dont' know why the board would be eliminated from the main page for guests with both boxes checked. I thought the left box overrode the right...but I've been doing a lot of reading here tonight trying to figure stuff out for myself and I could be thinking backwards by now!
Just try clicking the right column and leaving the left blank for the guests. Did you go to Admin/Features and Options/ and then click "Show the message index for "view only" boards?" It's the second line, and I think you need to do that for the topics index to show, but not the whole posts.
Hope you can get it to work the way you want. :)
Thanks Demian. I ended up just checking off the right box and now the guests can view the boards but not the posts. Yes I did go to the Features/Options and checked off the box. It all works fine now but I guess I thought this mod made it so that guests could view the boards and threads, just not the posts. Oh well this is better than nothing. LOL
Thanks again for all your help. BTW I have done so much reading too and my brain got so fogged up that nothing made sense anymore! LOL
Quote from: avidum on February 15, 2007, 08:39:59 AM
this mod made it so that guests could view the boards and threads, just not the posts.
With proper configuration this mod makes so that guests can view the boards and the threads. However it's scope is wider then that. You can set boards to be "view only" for any other membergroup you want.
For example, you have
board1,
board2, and
board3.
Only
board1 is "view only" for guests, the other two are completely invisible.
Once the person registers you can set that the "Newbies" have
board2 as "view only". So the new member will get access to
board1 and will discover that there's something else there ... that they don't have access. You can set a policy based on what members get "upgraded" to a higher level group (let's say "VIP members"). Once the member becomes a VIP he or she will have access to
board2 ... and will see a new board
board3 wich he/she can only view but not access.
All this with proper combination of those checkboxes, of course.
Hi Rudolph any advice on how to proceed? I get all these errors
1. Execute Code DB.php
2. Execute Modification sources.xml Modification parse error
3. Execute Modification - Modification parse error
4. Execute Modification themes.xml Modification parse error
5. Execute Modification - Modification parse error
It sounds like an issue with the forum, not the mod.
Maybe this (http://www.simplemachines.org/community/index.php?topic=73458.0) topic can help you?
Hello, i'm looking forward to install this mod in my forum. This kind of mod should be bundled with the official SMF install files, it is such a good idea for a mod, imo :)
Well, i'd like to know if version 1.1.2 brought any -possible- problems with this mod. I hope not, and will await for your answer. Thanks in advance.
I just noticed something. Certain boards I have allowed guests to view and some not view. But in the info center it says "view the most recent posts" and guests can click this on and read any post and access that board too! How can I prevent guests from viewing the most recent posts?
I checked my board, logged out, and as a guest went through the most recent posts in the info center. The only topics it listed were from boards that were public. The boards I couldn't enter as a guest weren't listed in the center. However, I don't have the box checked where the guests could view the topics index. They can only view the board index on the main forum page, not the listing of topics within the board.
Quote from: avidum on February 16, 2007, 09:23:38 PM
I just noticed something. Certain boards I have allowed guests to view and some not view. But in the info center it says "view the most recent posts" and guests can click this on and read any post and access that board too! How can I prevent guests from viewing the most recent posts?
I have kind of the same problem. I have set view only boards on all forums, but guests can get in through the forum statistics!!! If they "view latest post" or "view the most recent posts"they get direct access to any topic that`s open for regular members.
This must definately be a "security" issue with this mod. I can see guests browsing/reading topics all the time, topics they are not supposed to see !
I can't reproduce this issue. I have a test forum where I have two boards with topics in each of them. One board is accessible to guest the other no.
The recent posts page shows only the posts from the board the guest have access. But not from the other.
Do you mean that I additionally have to set local permissions to every forum, and restrict guests access to read topics from there?
Board: test1
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fdigilander.libero.it%2Frudoka%2Fsmfmods%2Fvoboards%2Ftest_01.png&hash=06af4b3af3e52059cd9ee2d840dc4782280f1d14)
Board: test2
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fdigilander.libero.it%2Frudoka%2Fsmfmods%2Fvoboards%2Ftest_02.png&hash=5d06f053a342b6600b70d016a9b40f6880a5d7dc)
The permissions are all the default ones.
Maybe check if you don't give access to guests in the local permissions.
Thank you! My mistake :)
Quote from: Iron IC on February 17, 2007, 10:46:01 AM
Quote from: avidum on February 16, 2007, 09:23:38 PM
I just noticed something. Certain boards I have allowed guests to view and some not view. But in the info center it says "view the most recent posts" and guests can click this on and read any post and access that board too! How can I prevent guests from viewing the most recent posts?
I have kind of the same problem. I have set view only boards on all forums, but guests can get in through the forum statistics!!! If they "view latest post" or "view the most recent posts"they get direct access to any topic that`s open for regular members.
This must definately be a "security" issue with this mod. I can see guests browsing/reading topics all the time, topics they are not supposed to see !
This is the exact same problem I am noticing too! Guests are viewing boards and topics they are not supposed to be allowed to view.
Oops sorry I guess I did not see that. Will try this and hopefully this will do it. Thanks!
Ok I just realized what you are talking about. I have to make additional boards for each membergroup right? I think I am going to be somewhat busy for the rest of the evening. lol
I think I need to start from scratch again, cuz maybe I am not following this right. This is all new to me and I think the permissions by membergroup with selections is what I am not following. I feel like I am back in school again, lol. ;D
Quote from: avidum on February 17, 2007, 04:22:36 PM
Ok I just realized what you are talking about. I have to make additional boards for each membergroup right?
No! You do not have to make a separate board for each membergroup! Is that what you're asking here?
There's one board, and different member groups are assigned different levels of permission as to whether they can
access it (get inside the board and only read the threads or read and post in the threads) or just
view the board index on the main forum page (that is they can see the board exists but cannot enter). I also believe you can set it up so they can see the titles of each thread within that board, but not read the posts in them, although I don't have mine set up that way.
Then you can create another board and set the permissions for that one. But not different boards for each membergroup. That would make me want to jump off a cliff. :)
LOL ok maybe that is not what I meant. I think I just need to start this all over again. I am getting confused for some reason and it has nothing to do with how any of you are explaining it. I got lost somewhere back there and everything from that point on made no sense to me. It is really hard sometimes being a newbie because I sound like a complete goof. lol
Could someone just walk me through this, where should I start with this again? Sorry folks. :(
QuoteI also believe you can set it up so they can see the titles of each thread within that board, but not read the posts in them, although I don't have mine set up that way.
This is how I would like to have mine set up. How can I do this?
Hello! I can try to explain what I did to make this work that way (like you want).
First you must enable the mod in admin -> configurations -> Features and options, and check the checkbox for "Show the message index for "view only" boards"
Go to admin ->members -> permissions -> permission by board. Set the boards you would like to let guests only see the topic headings in, to "local".
(I found that I also had to set my other boards to local, if/where I wanted to give guests read permissions inside topics.)
Then, go to forum -> Boards -> and Modify (choose the forum(s) where you want it enabled). There you only give the guests visibility (checkbox on the right). For those groups you want to give both access and visibility, you must check both boxes.
For the boards you want to let them into, you do the oposit thing, check both boxes for guests and only access to other groups.
Hope this helps you. This is working nice on my board as far as I can tell.
Iron IC thank you so much! Your instructions were great and easy to follow! Thanks again! If I run into any trouble I will let you know. But so far so good. :)
I`m only glad to help.
Look at the 3 last sentences in my previous post. That is incorrect, regular members can`t view the boards. Check both boxes for all the other groups you want to let inside aswell as the guests (of course, my mistake! Sorry..) I only recently discovered it myself.
LOL no problem. Just this morning I received an email from one of my mods saying she could not get into the site. I don't know what I did wrong. I think I messed things up, this is why I think I need to restart everything just as if I am starting the board. Somewhere along the line I got messed up with this. I really appreciate your help though Iron IC. I probably sound like an idiotic not getting this stuff. lol
OH Boy now I really screwed things up. None of my mods can view the posts. I have no idea what I have done wrong? Anyone suggest anything as to what I can do? PLEASE HELP!!
Give a link to your forum and PM me with the username and password of a temporary admin account.
ok give me one sec
Ok did you get in?
Well I am having more problems now even though Rudolf helped me so much. For some reason my mods can't view certain boards or even post in the ones they should be allowed to. I don't know what the heck I am doing or not doing. My mod also tells me all her pm's are gone plus the only board she can view is the admin/mod discussion board. Any suggestions?
Have you enabled it at Features and Options? If so, uncheck the box there, and se if it gets better
Thank you all for your help. Rudolf was kind enough to correct my idiotic mistakes. lol Now the board is running the way it should. I have another question to ask though so bear with me please, I have changed the rankings in the membergroups, and now want to make it so that certain membergroups can only view certain boards. Where do I do the changing of this and how do I do it without making another mess of my board, lol. Thanks!
Quote from: avidum on February 21, 2007, 01:51:20 PM
Thank you all for your help. Rudolf was kind enough to correct my idiotic mistakes. lol Now the board is running the way it should. I have another question to ask though so bear with me please, I have changed the rankings in the membergroups, and now want to make it so that certain membergroups can only view certain boards. Where do I do the changing of this and how do I do it without making another mess of my board, lol. Thanks!
At your admin''s panel in your forum, go to Boards and click Modify at the end. There you should have all the membergroups, at access and visibility uncheck the boxex for all the other membergropups but the membergruop that you want to give access, that you don''t unchechk the box, and click save at the end after you are done. That should take care of it. Hope this helps
When you say to go to boards and click Modify at the end, are you referring to the board that I want only certain membergroups to view?
Quote from: avidum on February 21, 2007, 04:36:30 PM
When you say to go to boards and click Modify at the end, are you referring to the board that I want only certain membergroups to view?
After you go to the boards in the admin'' panel, then you can choose that specified board that you want only certain membergroups to view. In short yeas, that''s what I meant
I have tried the mod, and it works as expected :-)
There is one issue. I noticed new errors generated in the error log when i create a new board.
http://localhost/v2/forum/index.php?action=manageboards;sa=newboard;cat=1
8: Undefined index: memberGroupsView
File: C:\xampplite\htdocs\v2\forum\Sources\ManageBoards.php
Line: 474
and
http://localhost/v2/forum/index.php?action=manageboards;sa=newboard;cat=1
2: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument
File: C:\xampplite\htdocs\v2\forum\Sources\ManageBoards.php
Line: 474
at ManageBoards.php:
$context['groups'][(int) $row['ID_GROUP']] = array(
'id' => $row['ID_GROUP'],
'name' => trim($row['groupName']),
'checked' => in_array($row['ID_GROUP'], $curBoard['memberGroups']),
'view' => in_array($row['ID_GROUP'], $curBoard['memberGroupsView']), //-View Only Boards MOD-[line 474]
'is_post_group' => $row['minPosts'] != -1,
);
Mod still works, but error log filling up whenever i create a new board.
Quick Question: Is there a way to disable this so guests can not click on the title to the side of it
I'd like to know that too....i can set permissions so that guests can see only the board forums but not the threads....however, if they click on the "LAST POST" link on the right hand side, they have access to read that thread....how do I disable that??
I still have this problem as well.
Hmmm I wonder does anyone know?
I see nothing wrong with the latest posts.
It won't show the posts from the boards you can't see.
But in the title/ latest posts they can just click it and it will bring it to them :?
Can you see some errors in the error log?
I dont see any is the mod just as deafult for that. That you can view urls and topics but not the boards
any way to change the warning message to when ppl try to view this area?
Excellent Mod Thanks
Hi ,for first really good mod (i needed it) just a thing ,is possible to for example to hide the text on the last topic of the Board that only certain member can access to the other members that isn't able to access it ? like to see on the topic : "Protected" or "Not Accessible" ,it is just an example :)
Thanks in Advance
Dr3amer
I'm sorry but I don't understand what you want.
You know the topic title...
Like the new logo? <<<<<<< Topic title
by shadow82x
Today at 03:08:33 pm
Members without viewing the forum permission can see it
I have the same problem with etdwh, but le me say that this not so quite stressfull as the next problem:<br />
I have a board that has 2 child boards. The members who have access to the first child board dosen't have for the second and vice-versa, but I want all of them to be able to see both boards (but acces just one) and not just from index of the forum but in the index of the board that has the 2 child board itself.
Is it possible that view only chid-boards to be shown in the board index in wich the child-boards are? :o
Thanks in advance for any sollutions/answers!
<br /><br /><br />
Quote from: etdwh on March 07, 2007, 12:57:10 AM<br />I have tried the mod, and it works as expected :-)<br /><br />There is one issue. I noticed new errors generated in the error log when i create a new board.<br /><br /><a href="http://localhost/v2/forum/index.php?action=manageboards;sa=newboard;cat=1" target="_blank" class="bbc_link extern">http://localhost/v2/forum/index.php?action=manageboards;sa=newboard;cat=1</a><br />8: Undefined index: memberGroupsView<br />File: C:xampplitehtdocs2orumSourcesManageBoards.php<br />Line: 474
<br /><br />and<br /><br />http://localhost/v2/forum/index.php?action=manageboards;sa=newboard;cat=1<br />2: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument<br />File: C:xampplitehtdocs2orumSourcesManageBoards.php<br />Line: 474
<br /><br />at ManageBoards.php:<br /><br /> $context['groups'][(int) $row['ID_GROUP']] = array(<br /> 'id' => $row['ID_GROUP'],<br /> 'name' => trim($row['groupName']),<br /> 'checked' => in_array($row['ID_GROUP'], $curBoard['memberGroups']),<br /> 'view' => in_array($row['ID_GROUP'], $curBoard['memberGroupsView']), //-View Only Boards MOD-[line 474]<br /> 'is_post_group' => $row['minPosts'] != -1,<br /> );
<br /><br />Mod still works, but error log filling up whenever i create a new board. <br />
Hi Rudolf ,
i meaned like this :
this is the original :
http://img89.imageshack.us/img89/5014/originalyn0.gif
and this is what the members that can't access the board will view after applied the mod and the access restrict only to for example VIP user:
http://img214.imageshack.us/img214/5954/afterthemodcu5.gif
so they (the users that haven't access permission to that board) can't view the last topic title and will see : "Protected"
Tell me if is possible and how to add this new feature :)
Thanks in Advance
Dr3amer
I will see if it's possible and update the mod if necessary.
I'll get back to you shortly.
Quote from: Dr3amer on April 12, 2007, 07:35:50 AM
Hi Rudolf ,
i meaned like this :
this is the original :
http://img89.imageshack.us/img89/5014/originalyn0.gif
and this is what the members that can't access the board will view after applied the mod and the access restrict only to for example VIP user:
http://img214.imageshack.us/img214/5954/afterthemodcu5.gif
so they (the users that haven't access permission to that board) can't view the last topic title and will see : "Protected"
Tell me if is possible and how to add this new feature :)
Thanks in Advance
Dr3amer
Thats very much like what im after here...and im using the View Only Boards mod, accept I dont want them to see how posted last either really.
http://www.simplemachines.org/community/index.php?topic=164290.0
I hope you can get the title thing working. It gets annoying :) Also a way to block recent posts by the stats? ;D
Is there a way we could make this mod Search engine (SE) friendly? For example, use a Useragent switch to decide whether the users is a human or an SE bot for example?
I already have a demo code for the UA switch (this one decides whether or not to start a php session) -->
<?
if (strpos( $_SERVER['HTTP_USER_AGENT'], 'Googlebot/2.1' ) > 0 OR strpos( $_SERVER['HTTP_USER_AGENT'], 'msnbot/1.0' ) > 0 OR strpos( $_SERVER['HTTP_USER_AGENT'], 'googlebot' ) > 0 OR strpos( $_SERVER['HTTP_USER_AGENT'], 'Googlebot' ) > 0)
{
// Useragent declaration
}
else {
session_start();
}
?>
DoA
p.s. I KNOW it's very easy to fake useragents, but I need this so that my topics remain SEO friendly!
Quote from: shadow82x on April 12, 2007, 02:57:18 PM
I hope you can get the title thing working. It gets annoying :) Also a way to block recent posts by the stats? ;D
I will release the updated version this weekend (probably tomorrow), it has the "protected" feature and possibly some other tweaks.
In the mean time if you explain that part with the recent posts. I'm a bit slow these days, and just don't get it. The recent posts are not visible if you can't
see a board.
Quote from: DoA on April 12, 2007, 03:16:00 PM
Is there a way we could make this mod Search engine (SE) friendly? For example, use a Useragent switch to decide whether the users is a human or an SE bot for example?
I already have a demo code for the UA switch (this one decides whether or not to start a php session) -->
<?
if (strpos( $_SERVER['HTTP_USER_AGENT'], 'Googlebot/2.1' ) > 0 OR strpos( $_SERVER['HTTP_USER_AGENT'], 'msnbot/1.0' ) > 0 OR strpos( $_SERVER['HTTP_USER_AGENT'], 'googlebot' ) > 0 OR strpos( $_SERVER['HTTP_USER_AGENT'], 'Googlebot' ) > 0)
{
// Useragent declaration
}
else {
session_start();
}
?>
DoA
p.s. I KNOW it's very easy to fake useragents, but I need this so that my topics remain SEO friendly!
Please be patient with be, because I don't understand this either. What has to do the useragents with being search engine friendly, and what would be the
//Useragent declaration, and for what can I use that information? This mod decides to show a board based on the member's permissions. Bots are guests, so they will see what you let the guests to see. I think it's logical.
Maybe he wants the bots to have access in the boards that are set to ,,view only" for guests.
Rudolf, could you, in the release you want to make this w-e, integrate what I said earlier this week? I mean:
"view only chid-boards to be shown in a sub-board index (that has the access setting, not just view only) in wich the child-boards are? "
(this is a summary of my post above (http://www.simplemachines.org/community/index.php?topic=146964.msg1048707#msg1048707)
I thank you in anticipation!
QuoteI will release the updated version this weekend (probably tomorrow), it has the "protected" feature and possibly some other tweaks.
In the mean time if you explain that part with the recent posts. I'm a bit slow these days, and just don't get it. The recent posts are not visible if you can't see a board.
Thanks Rudolf for this and good work :)
cheers
Dr3amer
I hope the new version is released soon :)
Here's a question for you, about protecting the last post.
You can choose between two ways:
1. | (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fdigilander.libero.it%2Frudoka%2Fsmfmods%2Fvoboards%2Fprotected1.jpg&hash=b46f225f128310587caf2f3802aabcda1a78c89a) | or | 2. | (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fdigilander.libero.it%2Frudoka%2Fsmfmods%2Fvoboards%2Fprotected2.jpg&hash=ec1a2f2f728bb400e904a55f033e7a5bae2b9368) |
You have a couple of hours until I do some test and start updating the package. I think I will go with the first option, but let me hear what you think. Besides, it's a simple template change so you can personalize it easily.
I like #1 better can you send a pm for me to test :) Thanks for letting me suggest this idea
Any errors in the log? It works fine for me on SMF 1.1.2.
No errors it just does not show anything except you know what ill get a screenshot
OK everything is enabled so guests can see it. I checked all permissions and I get an error at the top of the board but that can just be from other mods
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg122.imageshack.us%2Fimg122%2F4941%2Funtitled22rh9.png&hash=fcb161ae6194ddbd0107faf0931493b7f43c5f56)
Verion 1.0 was working fine with my forums..
Hi Rudolf ,
realllllllllllllllllly thanks to added this feature :D ,for me is better the first image :
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fdigilander.libero.it%2Frudoka%2Fsmfmods%2Fvoboards%2Fprotected1.jpg&hash=b46f225f128310587caf2f3802aabcda1a78c89a)
because you can see the last time of the last post ,tonight i will try the mod so i will tell you if i have same errors or all go fine :)
Other time Thanks
cheers
Dr3amer
Can you PM me with a link to the forum and an administrative account?
If you don't have anything in the error log then probably it's a misconfiguration error.
Check the Modifications.english.php file and put any text that is after ?> before it.
Quote from: Dr3amer on April 14, 2007, 04:48:12 PM
Hi Rudolf ,
realllllllllllllllllly thanks to added this feature :D ,for me is better the first image :
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fdigilander.libero.it%2Frudoka%2Fsmfmods%2Fvoboards%2Fprotected1.jpg&hash=b46f225f128310587caf2f3802aabcda1a78c89a)
because you can see the last time of the last post ,tonight i will try the mod so i will tell you if i have same errors or all go fine :)
Other time Thanks
cheers
Dr3amer
Yes, that's the one I used, because it's more logical.
However if you check the "Show the message index for 'view only' boards" then the last post is not protected. It makes no sense in that case. You can open the board and see it.
Now child boards can be view_only too, in this case it might happen that you get a "protected" last post even for a normal board. If the last post of a board is made in a child board (of any depth) that is view_only for the user, the post will appear as protected.
Finally, the issue of the recent posts list shown on the main index page. It should show only posts from boards you have access, regardless of the setting to allow the message index in the view only boards. It is outside of the purpose of this mod, and it would be too much work for me to modify that part, and it wouldn't worth the extra processing done.
Yeah, for those who didn't noticed, I updated the mod.
Hmmm..
I re-uploaded the mod with a couple of fixes. I kept the version number so if you already downloaded the 1.1 version then please download the new one and reinstall.
Shadow82x, you already have the new version but if you want feel free to repeat the procedure.
Quote from: Rudolf on April 14, 2007, 06:14:38 PM
I re-uploaded the mod with a couple of fixes. I kept the version number so if you already downloaded the 1.1 version then please download the new one and reinstall.
Shadow82x, you already have the new version but if you want feel free to repeat the procedure.
Im good thanks for the new release! Its a lot better than 1.0 :p
Hi Rudolf ,
so i installed the new mod ,doing this :
i had the previous mod installed ,so i uninstalled it and deleted it ,then i uploaded the new mod and when i clicked on "Apply Mod" got this errors :
1) http://img53.imageshack.us/img53/9352/1errorwithnewmodoc2.gif
2) http://img407.imageshack.us/img407/5084/2errorwithnewmodys9.gif
So i backed up the files that should be modified and i applyed, also if there was that errors, the mod and seem to work fine ,i see Protected on the restricted boards ,and if i click on Uninstall i get this errors :
http://img102.imageshack.us/img102/9984/erroronuninstallingthemrq0.gif
Is possible that the mod shuouldn't work fine ,or can work fine also if got that errors ?
PS:Now the mod is really complete and easy to use and customize ,thx Rudolf :)
cheers
Dr3amer
Update:
I went now on Admin Panel and Features ,and i have two of this settings that are the same :
http://img407.imageshack.us/img407/3968/doubletextce8.gif
Maybe i did errors by applyng the mod with that errors ?
It is not working.. WEll the protection and guests are allowed to view it for me
For me the Protected post is working ,also if i'm admin i see Protected ,and no prob for this ,but i have two options that are the same on Features on Admin control panel and don't know if by applyng the mod also with errors is ok ,now i'm tryng to use the forum at the max and for now is working ,i tryed guest ,regular members ,moderators and Admin and the last topic is always in Protected but for me the Boards is Hidden from Guest will post later after tryed a lot the forum :)
Whats the link to your board
Uninstalled old version, deleted files, reinstalled new version...works a treat :)
Dr3amer, I suppose you uninstalled the previous version of the mod.
You should uninstall all versions, and upload a clean copy of the files (at least the ones that giving errors), then apply the new version again.
Load.php is a critical file for this mod to work, not making the chancges there will result in malfunctioning.
Hi Rudolf ,
so i unistalled all the mods and i got lots of errors ,so to be a clearly thing I deleted all the forum and reinstalled it :D ,restored the DB with PhpMyAdmin and reinstalled all the mods and now all is working perfect :D
The mod works like a charm :D
Thanks Rudolf
cheers
Dr3amer
Rudolf have any suggestions why it is not showing up as "Private" on the index
Because or
1. you didn't apply the changes in the BoardIndex.template.php (you have a modified BoardIndex.template.php)
and/or
2.
you are not using the default template (I saw the quick theme changer in your forum with a bunch of themes)
or
3. You have the "Allow the message index to 'view only' boards" setting checked in Features and Settings.
In either case the posts won't be protected.
Quote from: Rudolf on April 15, 2007, 12:36:04 PM
Because or
1. you didn't apply the changes in the BoardIndex.template.php (you have a modified BoardIndex.template.php)
and/or
2.
you are not using the default template (I saw the quick theme changer in your forum with a bunch of themes)
or
3. You have the "Allow the message index to 'view only' boards" setting checked in Features and Settings.
In either case the posts won't be protected.
No errors and replaced the original board template and still does not work. Using the deafult theme and I have the "view board index" checked. Also all the permissions are set correctly. I cant seem to find whats wrong. IF you want to see I made your Rodulf account admin for now...
Quote from: shadow82x on April 15, 2007, 12:43:00 PM
Using the deafult theme and I have the "view board index" checked
That's the first reason. This allows users to view the list of topics in a board. So what's the point int protecting the last post, if one can simply click and see it inside?
You have to uncheck it to work, and you need to modify the BoardIndex.template.php and MessageIndex.template.php files in every theme you want to protect the posts. Not modifying a theme will give no errors, won't break anything, it will simply display last posts as the theme wants.
When I installed the mod your MessageIndex.template was modified successfully but not the BoardIndex.template
Now theres no errors
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg145.imageshack.us%2Fimg145%2F8703%2Funtitled12bs6.png&hash=b3db2c06207614abcded91395d3135e26f9d5226)
Probably you don't have the mod installed. :P
It is installed...
No errors either
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg114.imageshack.us%2Fimg114%2F2171%2Funtitledko4.png&hash=08a6e8e319d4d186cb0cb7a82047a8e093056cca)
Sorry, I haven't seen the line with the setting. Too small the image.
However you have it checked: that's the state that will prevent the "protect" feature. Un-check it. Clear the checkbox next to it.
Then apply the changes to your theme as I explained in the PM over your forum.
Right click view
UNcheck what box? Sorry
from here:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg145.imageshack.us%2Fimg145%2F8703%2Funtitled12bs6.png&hash=b3db2c06207614abcded91395d3135e26f9d5226)
UNcheck the "Show the message index for the "view only" boards".
I did but nothing happens..
Quote from: shadow82x on April 15, 2007, 09:13:32 PM
I did but nothing happens..
Because after that you have to modify the BoardIndex.template.php (in every theme you want to protect the posts). I'm trying to say this ince two days.
Quote from: Rudolf on April 16, 2007, 04:11:57 AM
Quote from: shadow82x on April 15, 2007, 09:13:32 PM
I did but nothing happens..
Because after that you have to modify the BoardIndex.template.php (in every theme you want to protect the posts). I'm trying to say this ince two days.
How do you modify it. I installed the mod and used it only for the default theme and still does not show protected
Quote from: Rudolf on April 12, 2007, 06:27:09 PM
Quote from: DoA on April 12, 2007, 03:16:00 PM
Is there a way we could make this mod Search engine (SE) friendly? For example, use a Useragent switch to decide whether the users is a human or an SE bot for example?
I already have a demo code for the UA switch (this one decides whether or not to start a php session) -->
<?
if (strpos( $_SERVER['HTTP_USER_AGENT'], 'Googlebot/2.1' ) > 0 OR strpos( $_SERVER['HTTP_USER_AGENT'], 'msnbot/1.0' ) > 0 OR strpos( $_SERVER['HTTP_USER_AGENT'], 'googlebot' ) > 0 OR strpos( $_SERVER['HTTP_USER_AGENT'], 'Googlebot' ) > 0)
{
// Useragent declaration
}
else {
session_start();
}
?>
DoA
p.s. I KNOW it's very easy to fake useragents, but I need this so that my topics remain SEO friendly!
Please be patient with be, because I don't understand this either. What has to do the useragents with being search engine friendly, and what would be the //Useragent declaration, and for what can I use that information? This mod decides to show a board based on the member's permissions. Bots are guests, so they will see what you let the guests to see. I think it's logical.
The useragent declaration decides whether or not (in this example) to start a session. Google will send a bot with the useragent = "Googlebot" therefore if that happens, then the topic can be seen. If the useragent isn't google then it is treated as a normal guest.
I need a way to hide the "view only" boards from guests (humans) - this is what the MOD does at present, and it is working perfectly. However, I also need allow the search engine spiders access to the page.
Therefore I need to know where the code is that decides whether or not to allow access to the topic (based on the permissions set) then I can do the following:-
if
{
Visitor is a Guest
}
Allow the "view only boards" mod to do its thing and block access
{
else
}
Allow access because if the visitor isn't a human, they must be a BOT and we want to allow bots access to the topic page so they can cache it and store it in their index!
DoA
Hi, i'm getting this error... why? I'm using SMF1.1.2.. it should work fine all other mods work no prob.. i get this error when applying the mod.. please help..
QuoteInstalling this package will perform the following actions:
Type Action Description
1. Execute Code DB.php
2. Execute Modification ./Sources/BoardIndex.php Test successful
3. Execute Modification ./Sources/MessageIndex.php Test successful
4. Execute Modification ./Sources/ManageBoards.php Test successful
5. Execute Modification ./Sources/Subs-Boards.php Test successful
6. Execute Modification ./Sources/Load.php Test successful
7. Execute Modification ./Sources/ModSettings.php Test successful
8. Execute Modification ./Themes/default/BoardIndex.template.php Test failed
9. Execute Modification ./Themes/default/MessageIndex.template.php Test successful
10. Execute Modification ./Themes/default/ManageBoards.template.php Test successful
11. Execute Modification ./Themes/default/languages/ManageBoards.english.php Test successful
12. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
You have a modified BoardIndex.template.php.
Install the mod and apply the changes to that file manually. Look at the themes.xml file in the package to see how.
i get this error
Unknown column 'b.memberGroupsView' in 'where clause'
File: /home/ssnation/public_html/forums/Sources/BoardIndex.php
Line: 70
can somebody help :(
Execute this query on your database, use phpMyAdmin? (http://www.simplemachines.org/community/index.php?topic=21919.msg174759#msg174759)
ALTER IGNORE TABLE {$db_prefix}boards ADD column memberGroupsView TINYTEXT NULL AFTER memberGroups
Replace {$db_prefix} in the above code with the prefix of your tables.
u sure its that cuz it aint working
Check your database if the boards tables has the memberGroupsView columns. Probably it's missing, and that's the query intended to fix.
I can't imagine any other reason for the error.
Hallo Rudolf!
Ich möchte, dass die recent topics den Gästen weiterhin gezeigt werden, wie mache ich das?
Darin liegt der Sinn, die Leute sollen sehen, dass es interessante Dinge gibt und sich anmelden, damit sie den Inhalt lesen können.
Could you rephrase that in english? I tried to translate with google but it makes no sense.
Quote from: Rudolf on April 24, 2007, 04:02:03 AM
Could you rephrase that in english? I tried to translate with google but it makes no sense.
Yes, sorry.
Your Mod dont show RECENT TOPICS to guests but I need that guest can see it.
How can I made your Mod not so good in a way that the guest can see rcent topics?
Love the idea of the mod,
I need to show the name of the board to every one, but only certain member groups can access it.
Like you side.
Show the message index for "view only" boards CHECKED
First row (only member groups i need CHECKED)
Second row (ALL member groups CHECKED)
===================================
Still not showing anything where the boaard should be to visitors, and yes visitors are checked.
www.dragox.org look in forum u cants see members lounge but its in the general board. and there are much more but none are showing
Quote from: besucher on April 24, 2007, 05:50:55 AM
Quote from: Rudolf on April 24, 2007, 04:02:03 AM
Could you rephrase that in english? I tried to translate with google but it makes no sense.
Yes, sorry.
Your Mod dont show RECENT TOPICS to guests but I need that guest can see it.
How can I made your Mod not so good in a way that the guest can see rcent topics?
Recent topics is a complicated part and I haven't seen any point in modifying it. Besides functionality-wise it's not the even so useful. Do you allow the index for "view only" boards? In that case I really don't see point in it.
However I will look into it one more time.
Quote from: RaXavier69 on April 27, 2007, 12:42:42 AM
Love the idea of the mod,
I need to show the name of the board to every one, but only certain member groups can access it.
Like you side.
Show the message index for "view only" boards CHECKED
First row (only member groups i need CHECKED)
Second row (ALL member groups CHECKED)
===================================
Still not showing anything where the boaard should be to visitors, and yes visitors are checked.
www.dragox.org look in forum u cants see members lounge but its in the general board. and there are much more but none are showing
Any errors in the error log?
nop not that i see, installed perfectly
Hi rudolf
I have this mod installed in my forum and it''s working like a charm, my compliments. I have a question though, just curious, whatt does ''to allow the index for "view only" boards'' mean? I have it uncheked this at Features and Option and the mod is working fine as I said. Can u tell me please where is the difference betwen enabling ''index for "view only" boards'' or just leave it like it shows, without enabling. Thank you
Quote from: babjusi on May 11, 2007, 12:41:27 AM
Hi rudolf
I have this mod installed in my forum and it''s working like a charm, my compliments. I have a question though, just curious, whatt does ''to allow the index for "view only" boards'' mean? I have it uncheked this at Features and Option and the mod is working fine as I said. Can u tell me please where is the difference betwen enabling ''index for "view only" boards'' or just leave it like it shows, without enabling. Thank you
Checking that box will make the content of the boards visible. That is, when a person clicks on the board it will show the topics inside, however clicking on the topics will give a permission denied error.
Quote from: RaXavier69 on April 27, 2007, 12:42:42 AM
Love the idea of the mod,
I need to show the name of the board to every one, but only certain member groups can access it.
Like you side.
Show the message index for "view only" boards CHECKED
First row (only member groups i need CHECKED)
Second row (ALL member groups CHECKED)
===================================
Still not showing anything where the boaard should be to visitors, and yes visitors are checked.
www.dragox.org look in forum u cants see members lounge but its in the general board. and there are much more but none are showing
You have to check the second for for the
Guest group, if you want guests to see those boards.
Quote from: Rudolf on May 11, 2007, 02:39:02 AM
Quote from: babjusi on May 11, 2007, 12:41:27 AM
Hi rudolf
I have this mod installed in my forum and it''s working like a charm, my compliments. I have a question though, just curious, whatt does ''to allow the index for "view only" boards'' mean? I have it uncheked this at Features and Option and the mod is working fine as I said. Can u tell me please where is the difference betwen enabling ''index for "view only" boards'' or just leave it like it shows, without enabling. Thank you
Checking that box will make the content of the boards visible. That is, when a person clicks on the board it will show the topics inside, however clicking on the topics will give a permission denied error.
Thanks for the explanation rudolf. But if I enable it, those persons that will get a permission denied error while clicking on the topics, do I have to deny them access at the boards or they will be getting the same error even if they have the permissions to enter the boards. Thank you
as i said every one is checked on second.
heres an image of it
That should work.
I registered on your site, but I still can't see that board.
If you can give me admin right I could check to see what's wrong.
The package manager gave no errors when you installed the mod?
Can anyone suggest something for the following error message that I keep getting?
2: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument
File: /usr/home/westweb/public_html/hkpnetsforum/Sources/ManageBoards.php
Line: 474
It also happens in line 454.
I checked the Boards table as mentioned in another post and confirmed that the memberGroupsView column exists.
line 474 is the 'View only Boards mod' line in the following code:
Quote// Load membergroups.
$request = db_query("
SELECT groupName, ID_GROUP, minPosts
FROM {$db_prefix}membergroups
WHERE ID_GROUP > 3 OR ID_GROUP = 2
ORDER BY minPosts, ID_GROUP != 2, groupName", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($request))
{
if ($_REQUEST['sa'] == 'newboard' && $row['minPosts'] == -1)
$curBoard['memberGroups'][] = $row['ID_GROUP'];
$context['groups'][(int) $row['ID_GROUP']] = array(
'id' => $row['ID_GROUP'],
'name' => trim($row['groupName']),
'checked' => in_array($row['ID_GROUP'], $curBoard['memberGroups']),
'view' => in_array($row['ID_GROUP'], $curBoard['memberGroupsView']), //-View Only Boards MOD-
'is_post_group' => $row['minPosts'] != -1,
);
}
Thank you
Can you give instructions how to reproduce this? What you do when they appear?
Make sure that all the changes were applied to your files, including the templates.
Admin - Boards - Add Board >> generates 11 of the error messages.
Clicking Add Board again to save the new board does not create errors. Neither do the Modify Board or Delete Board functions.
There's also an associated error message as follows, but it's probably caused by the first error message:
Quote2: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument
File: /usr/home/westweb/public_html/hkpnetsforum/Sources/ManageBoards.php
Line: 474
There is a part missing, are you sure you are using the last available download?
If yes, then in ManageBoards.php find
'memberGroups' => array(0, -1),
Add after
'memberGroupsView' => array(), //-View Only Boards MOD-
Thanks, Rudolph.
I'm using 1.0 so will upgrade immediately. Apologies for not checking this beforehand! :-[
It's a great mod by the way, exactly what I've been looking for for ages :)
Upgrade Update:
All fixed now, thanks again. :D
hey Rudolf,
was wondering where is the text for the message that apears when members cant enter saved? i want to edit it and is it possible to add an image?
In Errors.english.php
$txt['topic_gone'] = 'The topic or board you are looking for appears to be either missing or off limits to you.';
Apologies for this post this was intended for another mod (Membergroup On Registration).
Please delete my post and thanks for your help.
Thanks.
I'm sorry but I don't understand your requests.
You can already select multiple groups, and as of the second request I don't remember planing anything alike. I'm not even sure what you mean.
Hi,
Please can you point me to the file and code I need to change to replace the word "Protected" with "Members Only". I find the use of the word "protected" a bit unfriendly and unwelcoming.
Maybe for future revisions you could enable it so that people can choose what word to show when boards are view only boards?
In the meantime though, if you tell me where I can change the work "Protected" I'll be happy :)
Great mod btw - been needed for a long time :)
Paul
www.fgoc.co.uk
In Modification.english.php
$txt['vob_protected'] = 'Protected';
change the value on the right side
thanks for the quick response! keep up the good work!
This mod broke my forums!
I installed it over 1.x after getting 3 errors
sources/load
manage forums
and another one
Than I uninstall it and I get this
Modification parse error
2. Execute Modification - Modification parse error
Execute Modification - Modification parse error
I'm not even sure how youmanaged to install the new version over the old. SMF doesn't let me to do that.
You will have to remove manually the mod. Open the sources.xml and themes.xml in the package and reverse-apply the modifications.
Any reason why it wont let me login now after I installed 1.0
I get:
Incorrect key file for table '/tmp/#sql_6cea_0.MYI'; try to repair it
File: /home/clandis/www/Sources/Recent.php
Line: 102
Your database might got corrupted, though there is no way it was caused by the mod.
You'll have to repair the database by going in with phpMyadmin.
Quote from: Rudolf on January 31, 2007, 10:45:10 AM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=610)
*****************************************************
View Only Boards - Modification for SMF
version 1.1
© 2007, Rudolf Martincsek
*****************************************************
Make boards visible on the forum index based on member groups.
Does not affect anything else. The access permission is still valid.
There is a setting to allow the view of the board index (topic listing).
Members with no access to boards won't be able to enter the board or the topics - depending on the above setting.
In the package file you downloaded you'll find a readme.html file. Consult with that file for more information.
Have fun!
I L O V E Y O UUUUUU!!!!
Thank YOu! GRAZIE !!!
It's 2 years that I wanted this mod!!!!
:'( :'( THANK YOU!!
Exuse me for CAPS, but I very happy!
Today is national party!!!
i am getting this error, after i click on Apply Mod-
8. Execute Modification ./Themes/default/BoardIndex.template.php Test failed
9. Execute Modification ./Themes/default/MessageIndex.template.php Test failed
PLease Help. Thanks
I am attaching both files.
Quote from: Cool999 on June 23, 2007, 05:14:49 PM
I am attaching both files.
You have attached the same file twice.
Hello Sir, now i am attaching all the theme files which needs to be edit for view only board MOD.
PLease Help me out.
I tried 2-3 times, but unable to make it work
Thanks
Quote from: Sarge on June 28, 2007, 02:55:08 AM
Quote from: Cool999 on June 23, 2007, 05:14:49 PM
I am attaching both files.
You have attached the same file twice.
Installation of the mod doesn't give a "Test failed" error on the MessageIndex.template.php that you attached, only on BoardIndex.template.php (click on the picture for full size):
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg409.imageshack.us%2Fimg409%2F4076%2Ffailedch7.png&hash=166c48656ccfc23997b0a5f5bd71cdc7463f45a5) (http://img409.imageshack.us/img409/4076/failedch7.png)
Are you sure you attached the correct files?
You have a custom biardIndex.template.
After you installed the mod in your BoardIndex.template.php search
if (!empty($board['last_post']['id']))
{
echo '
', $board['last_post']['time'], '<br />
In: <a href="', $scripturl . '?topic=' . $board['last_post']['topic'], '.0" />', ((substr($board['last_post']['subject'], 0,3) == 'Re:') ? substr($board['last_post']['subject'],3) : $board['last_post']['subject']), '</a> <a href="', $board['last_post']['href'], '"><img src="'. $settings['images_url']. '/goto_new.gif" alt="Go to last post." title="Go to last post." /></a><br />
By: ', $board['last_post']['member']['link'], '';
}
else
{
echo ' ';
}
Replace it with
if (!empty($board['last_post']['id']))
{
echo $board['last_post']['protected'] ? '<span class="vob_protected">' . $txt['vob_protected'] . '</span>' :
$board['last_post']['time'], '<br />
In: <a href="', $scripturl . '?topic=' . $board['last_post']['topic'], '.0" />', ((substr($board['last_post']['subject'], 0,3) == 'Re:') ? substr($board['last_post']['subject'],3) : $board['last_post']['subject']), '</a> <a href="', $board['last_post']['href'], '"><img src="'. $settings['images_url']. '/goto_new.gif" alt="Go to last post." title="Go to last post." /></a><br />
By: ', $board['last_post']['member']['link'], '';
}
else
{
echo ' ';
}
I use Smartmc_blue theme.
But i get error in both.
Yes i have attached the correct files.
Please help
Thanks
Quote from: Sarge on June 28, 2007, 06:19:44 PM
Installation of the mod doesn't give a "Test failed" error on the MessageIndex.template.php that you attached, only on BoardIndex.template.php (click on the picture for full size):
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg409.imageshack.us%2Fimg409%2F4076%2Ffailedch7.png&hash=166c48656ccfc23997b0a5f5bd71cdc7463f45a5) (http://img409.imageshack.us/img409/4076/failedch7.png)
Are you sure you attached the correct files?
Have you applied the modification in my previous post to the BoardIndex?
The MessageIndex is good, and it should work.
NO i havent applied yet,
I am getting Test Failed in-
./Themes/default/BoardIndex.template.php Test failed
./Themes/default/MessageIndex.template.php Test Failed
Note- I m using different them (Smartmc_blue)
Please check this Screenshot-
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg244.imageshack.us%2Fimg244%2F4095%2Fjhdjhfjvp8.jpg&hash=a06a295f014b4673d31a21b9b6d1465c88d9deb0)
Please Help.
Thanks a lot
The MessageIndex.template.php file that you attached is correct. Is this the default one or the one of your theme's?
Does the Smartmc theme have these two files in the folder? If yes then you will have to edit them both manually because the package manager won't do it for you.
In any case your default theme is modified and the package manager can't apply the theme changes. The mod works fine without those two changes, you just won't see the protected message as the last post for the boards.
In MessageIndex.template.php search for
if (!empty($board['last_post']['id']))
echo '
<b>', $txt[22], '</b> ', $txt[525], ' ', $board['last_post']['member']['link'] , '<br />
', $txt['smf88'], ' ', $board['last_post']['link'], '<br />
', $txt[30], ' ', $board['last_post']['time'];
Replace with:
if (!empty($board['last_post']['id']))
echo '
<b>', $txt[22], '</b> ', $txt[525], ' ', $board['last_post']['protected'] ? '<span class="vob_protected">' . $txt['vob_protected'] . '</span>' : $board['last_post']['member']['link'] , '<br />
', $txt['smf88'], ' ', $board['last_post']['protected'] ? '<span class="vob_protected">' . $txt['vob_protected'] . '</span>' : $board['last_post']['link'], '<br />
', $txt[30], ' ', $board['last_post']['time'];
For the BoardIndex you already have how to modify it here (http://www.simplemachines.org/community/index.php?topic=146964.msg1142635#msg1142635)
Yes, the Messageindex.template file is of my theme. (I m attaching both files again, becoz maybe by mistake before i have attached the wrong one). Yes my theme has both these files in the folder. And i have already manually edited them 3 times, but my whole forum look changes. (like sometimes the below stat shows at the top and etc etc). SO can u please edit it for me, and attach both the files in your next reply
Thanks a lot for your support.
Here they are. They should work.
Remove the attachments from your previous posts to don't clutter the topic/forum.
Edit: attachements removed by me (Rudolf)
I have removed my attachment.
Its showing this error at the top of the forum-
//-View Only Boards MOD- Start $txt['vob_allowMessageIndexView'] = 'Show the message index for "view only" boards'; $txt['vob_protected'] = 'Protected'; //-View Only Boards MOD- End
Please Help
Thanks
That's the default/languages/Modification.english.php.
If there's something after the ?>, then move it before it.
I meant all the attachemnts from all your previous posts (in this topic). ;) There's no use for them anymore.
Ok Done, now working fine. Thanks a lot, you are the best.
Thanks once again.
Ok now i have removed my all attachments.
Can u also help me with Forum Staff Mod, i m getting this error- Unable to load the 'adminset' template.
Thanks
You're welcome.
Have you asked in the mod's topic? Can you give me a link?
no, i havent asked, wait let me post.
Here is the link- http://www.simplemachines.org/community/index.php?topic=88352.msg1143331#msg1143331
Thanks. :)
Thanks a lot for the Forum Staff MOd Help.
Need MOre help
With Auto BBC Mod
Please Check this LInk- http://www.simplemachines.org/community/index.php?topic=103268.msg1143599#msg1143599
Hope you will help me.
Thanks a lot.
You are the best Guy here. :D
can i install this on 1.1.3v. plz help
I haven't received words of not working with 1.1.3. Go on and install, the package manager will tell you if there's something wrong.
@Rudolf
Man, thanks for replying . it works on 1.1.3 without any problem/no errors. thanks again
Rudolf:
Sorry to ask, but I have tried to make the necessary modifications to both BoardIndex and MessageIndex, but as I'm using a custom theme (SMF's Internette Gazette), I haven't gotten it to work properly. Could you possibly make the modifications to the files for me and repost them? They are attached, and I'll be happy to remove the attachments once done.
Thanks in Advance,
Frail
The modified files
Edit: attachments removed by the author
Thanks, works perfectly, and amazing response time. You've been a blessing.
Rudolf Martincsek you are superb.This mod is awesome.I'm looking for such thing for almost 1 year.
Thank you and I gt my mistake when u correct it.You are genius.
once again ,Thank you
Quote from: Iron IC on February 18, 2007, 06:24:42 PM
Hello! I can try to explain what I did to make this work that way (like you want).
First you must enable the mod in admin -> configurations -> Features and options, and check the checkbox for "Show the message index for "view only" boards"
Go to admin ->members -> permissions -> permission by board. Set the boards you would like to let guests only see the topic headings in, to "local".
(I found that I also had to set my other boards to local, if/where I wanted to give guests read permissions inside topics.)
Then, go to forum -> Boards -> and Modify (choose the forum(s) where you want it enabled). There you only give the guests visibility (checkbox on the right). For those groups you want to give both access and visibility, you must check both boxes.
For the boards you want to let them into, you do the oposit thing, check both boxes for guests and only access to other groups.
Hope this helps you. This is working nice on my board as far as I can tell.
Just add something to this.
You have to set guest permission to view topic [own/any]
Then only guest can see topic or threads where guest can see.
view only topic - you tick this it will show threads but cannt access post
if uncheck it will show protected like IPB
Enjoy
Quote
Recent topics is a complicated part and I haven't seen any point in modifying it. Besides functionality-wise it's not the even so useful. Do you allow the index for "view only" boards? In that case I really don't see point in it.
However I will look into it one more time.
any news?
thanks in advance,
First I thought such goof forum as SMF have it but I do not know how to set it.
Recently I asked for help and I come across this mod.
I tried it few days ago and I found it imposable to understand what to do to use it with different theme. (I have very limited knowledge in this field)
I want forum to use Babylon theme so I modified default theme with Babylon files.
I installed mod and it works fine. I checked other themes Babylon, classic, default, and EsRaReNGiZ and it works as well.
How that can be possible, I did not modify any files?
I don't understand your problem. Does it work for you or no?
How mod can work with other themes, if I never modified files as it was required.
For me it looks as it is working perfectly with all 4 themes. I am using latest SMF 1.1.3 version. Could it give me some security problems.
The only problem that I could notice is in Features and Options. I have Allowed guests to browse the forum, additional box is without any text, but when I click it lets me see posts but I can't read them. I do not know if should be any text next to the box but who cares if I know what it is.
Great job.
That's right, the mod will work in any theme because there are no theme changes in it.
The only them change is on the board index, to make the last posts protected.
Like this: (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fdigilander.libero.it%2Frudoka%2Fsmfmods%2Fvoboards%2Fprotected1.jpg&hash=b46f225f128310587caf2f3802aabcda1a78c89a)
If you don't modify other themes the last post won't be hidden, but this doesn't affects the functionality, and people still won't be able to enter topics. If you have checked to make the message index visible then you really don't need to bother with other themes, as the protection won't be active anyway.
It's up to you to check your themes and apply this change. Ifone theme doesn't have BoardIndex.template.php and MessageIndex.template.php then they will work as needed.
The checkbox without text is probably a language issue. Probably the language strings are missing.
Check that you have this in your Modifications.english.php and that it's before the final ?> closing tag.
//-View Only Boards MOD- Start
$txt['vob_allowMessageIndexView'] = 'Show the message index for "view only" boards';
$txt['vob_protected'] = 'Protected';
//-View Only Boards MOD- End
I copyed Modifications.english.php from default to Babylon and everything looks fine.
I have latest post from SMF on joomla page that I checked and everything looks great.
Thanks for great mod and support.
it seems to be uncompatible with global announcements...can someone help me??
I can't help you if you don't tell me what is the problem.
Saying "seems to be incompatible" is simply not enough.
great mod!
but it dosn't work with SSI?
right now i'm using this > ssi_boardNews Multiple Boards
Oh I am THIS close....I sent you a PM Rudolph.....Thanks!
I can't figure out where I am supposed to copy and paste the changes into a custom theme....
Hello,
I changed hosting and when I install the Mod I get the message: Modification parse error
The error is not in the DB.php file but in the 4 other ones. Is there a why I can get around this? May a manual install or something?
Regards,
Mario
It's more likely a problem with the temp directory not being created.
Before installing the mod go into the Packages folder and created a dir called temp. The folder must have read/write permissions.
Once you are on the test page, before clicking on "Install" create again the dir.
To avoid having to do this with every mod you can install this (http://custom.simplemachines.org/mods/index.php?mod=724) mod. The way to install it is the same as before.
Hello again,
There is defenatly something going on with the temp-folder, because it always gets deleted. But I always created it back and I managed to succesfully install the View Only Boards mod. Next problem: When I go to the features menu in the admin there is no extra "Show the message index for "view only" boards". Did it move? I havent yet uninstalled it and installed it again, because of the temp and all but could that do the trick?
I tried also the mod from sleepy to fix the temp dir. problem. It did not work. I also got It installed, but the temp folder keeps getting deleted.
Update: I uninstalled it and installed it again and now I have got the options and the mod works. Still nothing with the mod that should keep the temp there at all times, but all work on it.
thx!
Great mod. I just installed it on my forum; 1.1.3 and it works flawless. It's exactly what I needed. Thanks Rudolf.
Someone asked how to make this mod work with the ssi_boardNews() (http://support.simplemachines.org/function_db/index.php?action=view_function;function=610) function and it's extension through the ssi_boardNews Multiple Boards (http://custom.simplemachines.org/mods/index.php?mod=759) mod.
The problem is extremely limited. From the notes on the info page:
Quote
* If you specify a board, guests must be able to see that board...
* If no board is specified, pulls from the first board that guests can see
* If guests can't see the specified board or can't see any boards, function dies with an error or returns an empty array depending on output_method
* Doesn't check other board access - assumes if guests can see it than anyone can see it
* Great for displaying the latest announcements on your website
* Can be called directly via a URL (SSI.php?ssi_function=boardNews;board=x)
That's one ridiculously major design flaw, and this will prevent my mod to work with this function. Actually you can't do much with that function except to show posts from boards that
everyone can see.
How to fix this problem:
1. Optional stepIf you want the function to support multiple boards then install the above mentioned mod.
2. Open u the SSI.php file and find the line where the ssi_boardNews() function begins. All the changes are made in that function.
3.global $scripturl, $db_prefix, $txt, $settings, $modSettings, $context;
global $scripturl, $db_prefix, $txt, $settings, $modSettings, $context, $user_info;
4.If you don't have the multiple boards mod installed, then find
// Make sure guests can see this board.
$request = db_query("
SELECT ID_BOARD
FROM {$db_prefix}boards
WHERE " . ($board === null ? '' : "ID_BOARD = $board
AND ") . "FIND_IN_SET(-1, memberGroups)
LIMIT 1", __FILE__, __LINE__);
If you have it installed then find
// If no boards were passed, get the first board guests can view
// Otherwise, check if all the passed boards are valid.
$request = db_query("
SELECT ID_BOARD, name
FROM {$db_prefix}boards
WHERE " . ($board === null ? '' : $boardQuery . '
AND ') . 'FIND_IN_SET(-1, memberGroups)
ORDER BY ID_BOARD ASC' . ($board === null ? '
LIMIT 1' : ''), __FILE__, __LINE__);
5. The above code replace with
//-View Only Boards MOD- Start
$user_info['view_only_boards'] = array();
$context['query_vob_boards'] = array();
$result = db_query("
SELECT b.ID_BOARD
FROM {$db_prefix}boards as b
WHERE (FIND_IN_SET(" . implode(', b.memberGroupsView) OR FIND_IN_SET(', $user_info['groups']) . ', b.memberGroupsView)) AND NOT ' . $user_info['query_see_board'],__FILE__,__LINE__);
while ($row = mysql_fetch_row($result))
$user_info['view_only_boards'][] = $row[0];
$query_see_board = $user_info['query_see_board'];
if ($user_info['query_see_board'] != '1')
if (!$user_info['is_guest'])
$user_info['query_see_board'] = substr($query_see_board,0,-1) . ' OR FIND_IN_SET(\'' . implode('\', b.memberGroupsView) OR FIND_IN_SET(\'', $user_info['groups']) . '\', b.memberGroupsView))';
else
$user_info['query_see_board'] = '(' . $query_see_board . ' OR FIND_IN_SET(-1, b.memberGroupsView))';
//-View Only Boards MOD- End
// If no boards were passed, get the first board guests can view
// Otherwise, check if all the passed boards are valid.
$request = db_query("
SELECT ID_BOARD, name
FROM {$db_prefix}boards as b
WHERE " . ($board === null ? '' : $boardQuery . '
AND ') . $user_info['query_see_board'] .'
ORDER BY ID_BOARD ASC' . ($board === null ? '
LIMIT 1' : ''), __FILE__, __LINE__);
$user_info['query_see_board'] = $query_see_board; //-View Only Boards MOD-
6. Only if you have the multiple boards mod installed:
'link' => '<a href="' . $scripturl . '?board=' . $row['ID_BOARD'] . '">' . $boardInfo[$row['ID_BOARD']]['name'] . '</a>'
'protected' => in_array($row['ID_BOARD'],$user_info['view_only_boards']), //- View Only Boards MOD-
7. Only if you don't have the multiple boards mod installed. Note that there are more occurances of the search string in the file. You need to use the one in the ssi_boardNews function!
'is_last' => false
'board' => array(
'protected' => in_array($row['ID_BOARD'],$user_info['view_only_boards']) //- View Only Boards MOD-
),
8. <div class="post" style="padding: 2ex 0;">', $news['body'], '</div>
<div class="post" style="padding: 2ex 0;">', !$news['board']['protected'] ? $news['body'] : '<em>' . $txt['vob_protected'] . '</em>' , '</div>
.Once you made these modifications and you have set up the board access the way you want, use the boardNews function to pull news topics from the forum. The function will respect the permission settings, and it will pull news from the boards that a user has access or can see.
The body of the messages that are in "view only" boards will not be shown, instead it shows the "protected" text.
If you return the results asan array then you can use $return[$counter]['board']['protected'] to check the status of the board.
I hope the instructions are clear and it will be useful for someone. Feel free to give feedback on this.
:) thanks a lot for this mod it is great !!
i haved problems to add this on my template :(-Çöl Atesi Multicolor by rallyproco-
but i did it :o
so here are two scahges for this template !!
install from packeges .. normaly..
then open in /Themes/Colatesi_Multi_tp:
MessageIndex.template.php and find -
if (!empty($board['last_post']['id']))
echo '
<img align="absmiddle" src="', $settings['images_url'], '/post/xx.gif" alt="Icon" />
<font style="font-size: 9pt"><b>', $board['last_post']['link'], '</b></font><br />
', $txt[525], ' ', $board['last_post']['member']['link'] , '<br />
replace with
if (!empty($board['last_post']['id']))
echo '
<img align="absmiddle" src="', $settings['images_url'], '/post/xx.gif" alt="Icon" />
<font style="font-size: 9pt"><b>', $board['last_post']['link'], '</b></font><br />
', $txt[525], ' ', $board['last_post']['protected'] ? '<span class="vob_protected">' . $txt['vob_protected'] . '</span>' : $board['last_post']['member']['link'] , '<br />
', $txt['smf88'], ' ', $board['last_post']['protected'] ? '<span class="vob_protected">' . $txt['vob_protected'] . '</span>' : $board['last_post']['link'], '<br />
BoardIndex.template.php and find -
if (!empty($board['last_post']['id']))
echo '
<img align="absmiddle" src="', $settings['images_url'], '/post/xx.gif" alt="Icon" /><font style="font-size: 9pt">', $txt['smf88'], ' <b>', $board['last_post']['link'], '</b></font><br />
', $txt[525], ' ', $board['last_post']['member']['link'] , '<br />
<div style="float: right">
', $txt[30], ' ', $board['last_post']['time'], '<a href="', $board['last_post']['href'], '"><img alt="Son Mesaja Git" align="absmiddle" src="', $settings['images_url'], '/newmark.gif" align="right" hspace="3" border="0" /></a></div>' ;
and replace with-
if (!empty($board['last_post']['id']))
echo '
<img align="absmiddle" src="', $settings['images_url'], '/post/xx.gif" alt="Icon" /><font style="font-size: 9pt">', $txt['smf88'], ' <b>', $board['last_post']['protected'] ? '<span class="vob_protected">' . $txt['vob_protected'] . '</span>' : $board['last_post']['link'], '</b></font><br />
', $txt[525], ' ', $board['last_post']['protected'] ? '<span class="vob_protected">' . $txt['vob_protected'] . '</span>' : $board['last_post']['member']['link'] , '<br />
<div style="float: right">
', $txt[30], ' ', $board['last_post']['time'], '<a href="', $board['last_post']['href'], '"><img alt="Son Mesaja Git" align="absmiddle" src="', $settings['images_url'], '/newmark.gif" align="right" hspace="3" border="0" /></a></div>' ;
thats all !!
thanks !! :)
remeber it is only for this theme !!
does anyone have this problem, when i install this mod i get the permision setting all messed up. please see the attached photo, and tell me what to do. thanks,
i use 1.1.3 default theme with some mods
What do you mean that it's messed up? That's how it's supposed to be.
The right column you have there with the menu and the other stuff makes the center part too narrow, so some cells become too high.
oh sorry, i thought they were supposed to be underneath. Thanks
Hi,
my forum error log seems to be getting quite a few of the following errors:
http://www.96thentrylocking.net/forum/index.php?action=manageboards;sa=newboard;cat=3
2: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument
File: /home/alisoncc/public_html/96thentrylocking/forum/Sources/ManageBoards.php
Line: 474
http://www.96thentrylocking.net/forum/index.php?action=manageboards;sa=newboard;cat=3
8: Undefined index: memberGroupsView
File: /home/alisoncc/public_html/96thentrylocking/forum/Sources/ManageBoards.php
Line: 474
I am running the latest v1.1.3 and mods
1. Contact Page 1.1
2. Custom Profile Field Mod 3.16
3. Moderator Activity Report for SMF1.1.2 1.2
4. View Only Boards 1.0
5. Skype Name Mod 2.0
6. SMF Gallery Lite 1.8
7. SMF 1.0.11 / 1.1.3 Update
It has been suggested that the errors are related to the "View Only Boards" mod
Alison
Does anyone know if it works with the new 1.1.4?
Line 474 is this:
$context['groups'][(int) $row['ID_GROUP']] = array(
'id' => $row['ID_GROUP'],
'name' => trim($row['groupName']),
'checked' => in_array($row['ID_GROUP'], $curBoard['memberGroups']),
'view' => in_array($row['ID_GROUP'], $curBoard['memberGroupsView']), //-View Only Boards MOD-
'is_post_group' => $row['minPosts'] != -1,
);
Alison
I have upgraded to 1.1.4 and it hasn't fixed my problem
Maybe the database changes were not made.
Try to run this query (You can use phpMyadmin):
ALTER IGNORE TABLE {$db_prefix}boards ADD column memberGroupsView TINYTEXT NULL AFTER memberGroups
Replace {$db_prefix} in the above code with the prefix of your tables.
it works fine with 1.1.4, i am using the default theme
Hi Rudolf. Absolutely great mod. I just have one question for you:
Any progress on getting SSI Recent Topics to work?
The reason that I ask is we use it to organize article content. Rather than using a CMS system, we just have SSI display the article topics of our "Learning Center" in an organized way. You can check out the site at http://www.sellcenter.net/community to see what I'm talking about.
We're using the mod to offer paid content that regular users can only see the titles of, but not the full text. A lot of our contributing experts were unwilling to give out their articles for free.
We can't entice users to pay for the content, however, if they don't see at least the titles of what they're NOT getting on the front page.
Again, thanks for a great mod. If there's even half a fix I can play around with it myself and see if I can get it to work.
Reading the thread, I noticed there were a few people that would want SE bots to still be able to read the threads for SEO purposes. The problem with that is they'll cache a version of the page. If your posts come up in a search, someone could just hit the "cached" link under your SE listing and read the post!
How can I change the message:
"The topic or board you are looking for appears to be either missing or off limits to you." ?
http://www.simplemachines.org/community/index.php?topic=146964.msg1099028#msg1099028
Can I use this mod only for a few boards and not for all?
Quote from: Zeri YT! on November 12, 2007, 07:59:26 AM
Can I use this mod only for a few boards and not for all?
Yes, you can. You can set the permissions as to which group will be able to see the board/s of your choosing.
does the current verison of this most listed in the mod section work for smf 1.1.4?
Quote from: netridge on November 12, 2007, 07:16:18 PM
does the current verison of this most listed in the mod section work for smf 1.1.4?
Yes
Please, integrate this fantastic mod in SMF 2 as default option!!!
:-* :-* :-*
Quote from: netridge on November 12, 2007, 07:16:18 PM
does the current verison of this most listed in the mod section work for smf 1.1.4?
HELP!
I tried to install this mod to my 1.1.4 and it made the board admin section go all wrong. Half the buttons were missing and none of it made sense. It told me part of it didn't install properly and so I uninstalled it.
I still have the same problems within the board admin settings. Help! What do I do to put it right!
Edit to add: Now my forum will not load, it just gives the error message:
"Unable to load the 'main' template".
OK, the package manager said this:
Quote1. Execute Code DB.php
2. Execute Modification ./Sources/BoardIndex.php Test successful
3. Execute Modification ./Sources/MessageIndex.php Test successful
4. Execute Modification ./Sources/ManageBoards.php Test successful
5. Execute Modification ./Sources/Subs-Boards.php Test successful
6. Execute Modification ./Sources/Load.php Test successful
7. Execute Modification ./Sources/ModSettings.php Test successful
8. Execute Modification ./Themes/default/BoardIndex.template.php Test failed
9. Execute Modification ./Themes/default/MessageIndex.template.php Test successful
10. Execute Modification ./Themes/default/ManageBoards.template.php Test successful
11. Execute Modification ./Themes/default/languages/ManageBoards.english.php Test failed
12. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
I reloaded the original ./Themes/default/BoardIndex.template.php and ./Themes/default/languages/ManageBoards.english.php and all is well now, but why did it go wrong?
I would like to use this mod, but I'm a bit worried about trying it again.
OK, I did try again, this time I tried to download it through the package manager, rather than download it, and then upload it.
When I tried, I got this message:
QuoteThe package you are trying to download or install is either corrupt or not compatible with this version of SMF.
.............so, is there a problem or does this not work with 1.1.4?
Downloading from the package manager won't work because some bugs in the SMF.
The mod works with 1.1.4. The package manager fails to make the changes in those files, because you probably changed them. If you installed other mods or made manual changes then it's very likely.
Those two files are not critical for the mod to work, so you can ignore the errors and install the mod. Once you installed the mod you can apply the changes to the two failed files manually. To see what changes you should make you should open the package and look at the themes.xml file.
If you don't understand the syntax, there is a mod parser available (please search the forum for it).
If you made a packup of your forum you shouldn't worry about installing this mod.
Really want to have this mod on my forum. Installed it through the package manager and ended up with one error:
6. Execute Modification ./Sources/Load.php Test failed
I'm using a Crip theme with several other mods. SMF 1.1.4 and TP 0.9.8
What can I do next to complete install? Edit what?
* EDIT - figured it all out. Works like a charm! Thanks anyways, and thanks for a great mod!
Having removed it, tried again, removed it again and then tried it again, it now works perfecty. Thanks for all your help.
Great mod, it should included in the SMF package by default.
This is such a great mod!!
BTW The right column is for the view only?
an ofcourse the left column is for the access?
Am I right...
Would it be possible to show the recent Topicnames to guests in the Info-Center ?
EDiT: Doesn't seem to work - what should i change inside the Code to get this Feature ?
Before i used Read Topic Permission (http://custom.simplemachines.org/mods/index.php?mod=231)-Mod, disabled every related Rights for Guests and allowed Guest-Viewing on the Forum.
But unfortionatly that MOD doesent had any effect on RSS-Feeds ::)
This MOD is really fine - except for the Info-Center :'(
Love the mod, but is there a way, or even an additional mod that will hide the posts counts, topics count, and last post stats at the index board using this mod? I want members to see that the restricted board exists and nothing else.
Like this Yuku board:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Ftinyurl.com%2Fytn475&hash=c090f2049e37eaf64a8295ea4d5ea6f05366b026)
Thanks Rudolph!
Hiding those fields from the board index is mostly a template change. I will soon revisit the mod to make it more site-wide (including he Info-Center) and easier to show/hide stuff in the templates.
Thank You
Quote from: Rudolf on November 29, 2007, 03:15:53 PM
Hiding those fields from the board index is mostly a template change. I will soon revisit the mod to make it more site-wide (including he Info-Center) and easier to show/hide stuff in the templates.
Great! Really look forward to it! Thanks for improving upon an already great mod!
Quote from: fmofmpls on November 29, 2007, 03:24:36 PM
Great! Really look forward to it! Thanks for improving upon an already great mod!
In the mean time you can hide fields on the index by using the $board['last_post']['protected'] variable. The name is misleading, it actually means that the board is view only.
Your theme seems different so I can't tell you exactly what to change but I can show you how it's done on the default theme as an example.
In BoardIndex.template.php you need to replace
<td class="windowbg" valign="middle" align="center" style="width: 12ex;"><span class="smalltext">
', $board['posts'], ' ', $txt[21], ' <br />
', $board['topics'],' ', $txt[330], '
</span></td>
with
<td class="windowbg" valign="middle" align="center" style="width: 12ex;">', !$board['last_post']['protected'] ? '<span class="smalltext">
'. $board['posts']. ' '. $txt[21]. ' <br />
'. $board['topics'].' '. $txt[330]. '
</span>' : '<span class="vob_protected">' . $txt['vob_protected'] . '</span>' ,'</td>
The basic idea is to replace the text you want to hide with
<?php //ignore this line
!$board['last_post']['protected'] ? 'text to replace' . 'here the strings have to be' . 'concatendated using dots not commas' : '<span class="vob_protected">' . $txt['vob_protected'] . '</span>'
The text after the
? is the thing that will be hidden, while the text after
: is the text you want to be show in it's place (you can leave it empty, using only
'')
Note: I'm explaining in such layman's terms, because I don't know how much you know about php, or the ?: operator. If you know how to use it just ignore my explanation If the text is part of a larger echo string then you have to "break out" of the string, as in the below example:
echo 'some view_only text';
Becomes
echo 'some ' , !$board['last_post']['protected'] ? 'view_only' : 'protected' , ' text';
Hope it helps.
If you still have problems post the piece of code with the bits you want to hide and I'll take a look at it.
The new version will be like this one, only with a more suggestive name for the variable and more widely available. Since this part is mostly template based and themes tend to be different I tend to keep the theme changes to the minimum in the mods.
In this particular mod it's quite easy (and hopefully it will be even easier) to customize themes to use this mod's features.
hi - i've found some of these Error-MSGs in my Log:
8: Undefined index: protected
Datei: /forum/Themes/default/MessageIndex.template.php (main sub template - eval?)
Zeile: 64
8: Undefined index: protected
Datei: /forum/Themes/default/MessageIndex.template.php (main sub template - eval?)
Zeile: 63
My Line 63+64:
<b>', $txt[22], '</b> ', $txt[525], ' ', $board['last_post']['protected'] ? '<span class="vob_protected">' . $txt['vob_protected'] . '</span>' : $board['last_post']['member']['link'] , '<br />
', $txt['smf88'], ' ', $board['last_post']['protected'] ? '<span class="vob_protected">' . $txt['vob_protected'] . '</span>' : $board['last_post']['link'], '<br />
These errors show up if regular Users joins a Board which has hidden Sub-Boards to Guests (Guests have no rights to view them at all). But those regulars Users are allowed to view those Subforums.
Do you have some boards that don't have posts in them?
I'm afraid you will have to wait for the next version to really fx that. Should take less then a week.
No - there are posts in every Subforum - its no big deal, because the users are able to view it.
I just wanted to report that error.
I updated the mod. (http://custom.simplemachines.org/mods/index.php?mod=610)
I left the post count of the boards untouched. To hide it apply this change:
<td class="windowbg" valign="middle" align="center" style="width: 12ex;"><span class="smalltext">
', $board['posts'], ' ', $txt[21], ' <br />
', $board['topics'],' ', $txt[330], '
</span></td>
with
<td class="windowbg" valign="middle" align="center" style="width: 12ex;">', !$board['protected'] ? '<span class="smalltext">
'. $board['posts']. ' '. $txt[21]. ' <br />
'. $board['topics'].' '. $txt[330]. '
</span>' : '<span class="vob_protected">' . $txt['vob_protected'] . '</span>' ,'</td>
The drill is like before, only that you use $board['protected'] instead of $board['last_post']['protected']
You can also add a different icon for the boards that are protected
// If the board is new, show a strong indicator.
if ($board['new'])
echo '<img src="', $settings['images_url'], '/on.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
if ($board['protected'])
echo '<img src="', $settings['images_url'], '/off2.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
else
You will have to create the image call it off2.gif and place it in yout theme's images directory.
Both changes (posts/topic display and the board icon) have to be applied in both BoardIndex.template.php and MessageIndex.template.php (this later one for the sub boards).
A lot of great effort here Rudolf. Thanks.
I would like to either show just the word "Protected" for the view only users or the last post/user/time info.
Here is my code in the two templates:
if (!empty($board['last_post']['id']))
echo '
', $txt[22], ' ', $txt[30], ' ', $board['last_post']['time'], '<br />
', $txt['smf88'], ' ', $board['last_post']['link'], ' ', $txt[525], ' ', $board['last_post']['member']['link'];
echo '
What do I need to change it to in order to make it work? Thanks!!
Something like this:
if (!empty($board['last_post']['id']))
echo !$empty($board['last_post']['protected']) ? '<span class="vob_protected">' . $txt['vob_protected'] . '<span>' : '
'. $txt[22]. ' '. $txt[30]. ' '. $board['last_post']['time']. '<br />
'. $txt['smf88']. ' '. $board['last_post']['link']. ' '. $txt[525]. ' '. $board['last_post']['member']['link'];
echo '
Thanks Rudolf. I think we're almost there. When I place your code in the two templates I get a fatal error after the first board of the index shows. So instead of saying "Protected" or last post/user/time info, it says:
Fatal error: Call to undefined function: () in ../../Sources/Load.php(1752) : eval()'d code on line 204
Any ideas on this?
I don't see why it should give you that error.
What you have around the line 204 in BoardIndex.template.php?
Thank you very much - nice Idea with the Protected-Colored-Link and the removal of the Links :-*
Works fine on smf 1.1.4.
They are still links, only that the cursor doesn't changes into the hand.
You can change how the boards and posts appear in the style.css of your theme. Change color, background, font-size, family, weight etc.
Some CSS knowledge is required.
/* You can customize here the appearence of the protected areas */
.vob_protected
{
cursor: default;
}
.vob_protected, .vob_protected a:link, .vob_protected a:visited, .vob_protected a:hover
{
color: #666;
color: red;
text-decoration: none;
cursor: default;
}
/* //-View Only Boards MOD- END */
Personally I would put some less contrasting color. Depending on the theme I would put something that doesn't emphasizes those posts.
I've put red as default, because people wouldn't have noticed it. ;)
@redline, here's the correct code to use. (There was an extra $ sign)
if (!empty($board['last_post']['id']))
echo !empty($board['last_post']['protected']) ? '<span class="vob_protected">' . $txt['vob_protected'] . '<span>' : '
'. $txt[22]. ' '. $txt[30]. ' '. $board['last_post']['time']. '<br />
'. $txt['smf88']. ' '. $board['last_post']['link']. ' '. $txt[525]. ' '. $board['last_post']['member']['link'];
echo '
Perfect! Thank you!
Please correct me if I'm wrong, but it seems like its possible for guests to read the rss-news - even on boards with no Guest-Access .
With the new way I handle the visibility of the boards, I expected something like this to happen.
I updated the mod package to disable the rss feeds and the search.
Anyway, this gave me an idea to implement. I'll look at it tonight.
Thank You
Since the upgrade to 1.1.4 I get all the time this error message in the error log:
Quote8: Undefined index: protected
Fichier: /..../...../...../...../forum/Themes/default/MessageIndex.template.php (eval?)
Line: 78
8: Undefined index: protected
Fichier: /..../...../...../...../forum/Themes/default/MessageIndex.template.php (eval?)
Line: 77
What's wrong there?
Can you post what on lines 70-85 of your MessageIndex.temlate.php?
Are you sure that the changes in the Sources/MessagesIndex.php file were applied?
Line 70 - 84 of our MessageIndex.template.php
Quote/* The board's and children's 'last_post's have:
time, timestamp (a number that represents the time.), id (of the post), topic (topic id.),
link, href, subject, start (where they should go for the first unread post.),
and member. (which has id, name, link, href, username in it.) */
if (!empty($board['last_post']['id']))
echo '
<b>', $txt[22], '</b> ', $txt[525], ' ', $board['last_post']['protected'] ? '<span class="vob_protected">' . $txt['vob_protected'] . '</span>' : $board['last_post']['member']['link'] , '<br />
', $txt['smf88'], ' ', $board['last_post']['protected'] ? '<span class="vob_protected">' . $txt['vob_protected'] . '</span>' : $board['last_post']['link'], '<br />
', $txt[30], ' ', $board['last_post']['time'];
echo '</small>
</td>
</tr>';
When I installed the Modification, I got the message "Successful".
What a fantastic mod!
I had put all my boards hidden but showing on index page (via another mod), but yet wanted that extra SEO of guests/bots being able to enter boards but not the topics/posts. The site had suffered ranking since hidden. I figured bots could still grab the titles of topics and see their links if I could find something to do it!
This mod does exactly that!! Full credit to the author, it's really helped.
Allow access to some, disallow access to others. Brilliant!
Running 1.1.4. Had a few edits to two template files (mainly because board redirect mod interfered on a few lines). So installed via package manager, then updated the two files. After 10 mins of working out how to combine it with another mod (name escapes me, but it's the other that shows the forums as opposed to hidding from guests on index), working exactly how I need it too.
Thanks again, really great mod to have.
Anyway of changing it, so the text isn't red on index page where it's set on boards.
They are also unlinked too, which normally goes to login/register, which is normally handy.
Still a good mod.
You can customize it using the style.css. Read here. (http://www.simplemachines.org/community/index.php?topic=146964.msg1328468#msg1328468)
Thanks Rudolph
Excellent Mod. Very, very helpful. Great work,
Andy
Great mod,
however there's something that doesn't work on my board.
in the admin side I cannot see the ling
QuoteShow the message index for "view only" boards'
I have manually checked all the files and all the modifications are there.
What am I missing?
In the default theme, it's under Admin->Features & Options-> (about the 3rd line down, right after allow guests to browse the forum)...
Any thoughts on adding a feature to allow stickied topics to override the visibility? I want guests to be able to read the stickied topics, but only see the titles of the others...
Thanks for this Mod... Awesome!!!
But is there a way that guest wont able to see the topics?
Its good!
But they can only see the boards but not the topics or messages?
I mean a certain membergroup can see the certain boasrds, but them cant see the topics inside cause it says "You are not allowed to see the baord". I wanted them to be able to view the topics but not b able to reply to them
thanks
please step by step to apply this mod in custom theme.
thanks
http://modparser.dev.dansoftaustralia.net/
Quote from: jamesk on February 14, 2008, 04:02:09 PM
http://modparser.dev.dansoftaustralia.net/
THANK YOU JAMESK...
Quote from: M_rTable on February 13, 2008, 06:36:06 PM
Its good!
But they can only see the boards but not the topics or messages?
I mean a certain membergroup can see the certain boasrds, but them cant see the topics inside cause it says "You are not allowed to see the baord". I wanted them to be able to view the topics but not b able to reply to them
thanks
will u update this mod for smf 2 beta 3?
I will update it for smf 2, but probably for the RC or the next beta.
something is not working on my forum, when a user has one or more board on only view, all child boards with new posts are RED written
on BoardIndex.template.php and MessageIndex.template.php
$children[] = $child['new'] ? '<b>' . $child['link'] . '</b>' : $child['protected'] ? '<span class="vob_protected">' . $child['link'] . '</span>' : $child['link'];
if($child['protected'])
$children[] = '<span class="vob_protected">' . $child['link'] . '</span>';
else
$children[] = $child['new'] ? '<b>' . $child['link'] . '</b>' : $child['link'];
with my code it seems to be fixed
Indeed this is a small bug in the code, thanks for reporting it.
The code should be:
$children[] = $child['new'] ? '<b>' . $child['link'] . '</b>' : ($child['protected'] ? '<span class="vob_protected">' . $child['link'] . '</span>' : $child['link']);
But your code is good too.
i am getting the red colors too, and when i replaced the code with the one you are showing something went wrong. maybe i modified the wrong files, where can i find these files, in the default theme? i am using a default theme 1.1.4
BoardIndex.template.php and MessageIndex.template.php
Thanks
for me the code is working good, the Rudolf's one.
attach your BoardIndex.template.php and MessageIndex.template.php
QuoteI will update it for smf 2, but probably for the RC or the next beta.
WHEN? :D :D :D
Quote from: Rudolf on April 30, 2008, 02:27:29 AM
Indeed this is a small bug in the code, thanks for reporting it.
The code should be:
$children[] = $child['new'] ? '<b>' . $child['link'] . '</b>' : ($child['protected'] ? '<span class="vob_protected">' . $child['link'] . '</span>' : $child['link']);
But your code is good too.
Was this fixed in the 1.2 version of this mod?
Nevermind. Got it. Just the mod I needed to help with incentive on my board.
Thank you. :)
I got this error on the log:
http://www.ackronic.net/ackws/smf/index.php?topic=6162.0;wap2
Unable to load template 'kick_guest' .
I think it's your mod couse the board is View only
EDIT: it happens in two cases, hidden section, and view only board
well, i upgraded my board to 1.1.5 after reinstalling the database.Now, m installing all my previous mods.Now, this mod ain't installing.While installing 2 tests are not going good:
9. Execute Modification ./Themes/default/BoardIndex.template.php Test failed
10. Execute Modification ./Themes/default/MessageIndex.template.php Test failed
What to do?
I have
Powered by SMF 1.1.5 | SMF © 2006-2007, Simple Machines LLC
TinyPortal v0.9.8 and theme - Mystic Jade
I use to have this mod installed with SMF 1.1.4
Now I am using SMF 2.0
Can I manually add this mod as it is described?
What about DB, it looks as it is already there.
How can I edit ./Sources/ModSettings.php if it doesn't exist with SMF 2.0
I am using smf v 1.1.5 , I need this mod urgently. Plz can you update this mod for v 1.1.5 or can someone suggest a mod which provides category and forum browsing for guests but guests cannot open a topic until they register. In my forum everybody just browse the forum and leave. Sorry if I am being impatient !!!
This mod works fine on my 1.1.5 board. I installed it prior to upgrading to 1.1.5. If you get the test failed when trying to install on the default theme, you may have other mods that have already modified those files. If that is the case then you will need to edit the files manually. The edits can be found by selecting the parser on the download page for your version of the mod.
It installs successfully. But as a guest , I can still view topics. And I have applied this mod on the default core theme.
Quote from: akya on May 18, 2008, 03:29:25 AM
It installs successfully. But as a guest , I can still view topics. And I have applied this mod on the default core theme.
Consult readme.html in the mod package.
Quote from: akya on May 18, 2008, 03:29:25 AM
It installs successfully. But as a guest , I can still view topics. And I have applied this mod on the default core theme.
you don't need this mod to do what you need, just set different groups with specific permissions...i use this mod and it works great, but the reason i use it is because i want guests to navigate through certain forums but without permission to post or reply.
Quote from: Iron IC on February 18, 2007, 06:24:42 PM
Hello! I can try to explain what I did to make this work that way (like you want).
First you must enable the mod in admin -> configurations -> Features and options, and check the checkbox for "Show the message index for "view only" boards"
Go to admin ->members -> permissions -> permission by board. Set the boards you would like to let guests only see the topic headings in, to "local".
(I found that I also had to set my other boards to local, if/where I wanted to give guests read permissions inside topics.)
Then, go to forum -> Boards -> and Modify (choose the forum(s) where you want it enabled). There you only give the guests visibility (checkbox on the right). For those groups you want to give both access and visibility, you must check both boxes.
For the boards you want to let them into, you do the oposit thing, check both boxes for guests and only access to other groups.
Hope this helps you. This is working nice on my board as far as I can tell.
These are a wonderful set of instructions. However, there was one missed crucial part. Under Features and Options, you must also check off the box Allow Guests to Browse Forum. This will allow guests to see the topics, but not access the posts within them.
In My
Forum Error LogQuoteUndefined index: protected
Ficheiro: /home/nemigue/public_html/Themes/dilbermc/MessageIndex.template.php (main sub template - eval?)
Linha: 121
Undefined index: protected
Ficheiro: /home/nemigue/public_html/Themes/dilbermc/MessageIndex.template.php (main sub template - eval?)
Linha: 122
Undefined index: protected
Ficheiro: /home/nemigue/public_html/Themes/dilbermc/MessageIndex.template.php (main sub template - eval?)
Linha: 121
In my MessageIndex.template.php line 119 - 127
if (!empty($board['last_post']['id']))
echo '
<b>', $txt[22], '</b> ', $txt[525], ' ', $board['last_post']['protected'] ? '<span class="vob_protected">' . $txt['vob_protected'] . '</span>' : $board['last_post']['member']['link'] , '<br />
', $txt['smf88'], ' ', $board['last_post']['protected'] ? '<span class="vob_protected">' . $txt['vob_protected'] . '</span>' : $board['last_post']['link'], '<br />
', $txt[30], ' ', $board['last_post']['time'];
echo '</small>
</td>
</tr>';
using View Only Boards 1.1
some suggestion?
somebody help...
Where is Rudolf?
This is a great mod.
Is upgrade for SMF 2 is coming soon?
@ne.miguelito - according to the mod page, it should work for the default theme. From looking at your errors, you are using dilbermc. In that case use the mod parser on the download page to see the manual edits you will need to make it work with your theme.
I'm using default theme SMF version 1.1.5
I got this error message while testing before installing the mod ( version 1.2)...
Execute Modification ./Themes/default/BoardIndex.template.php Test failed
I found out this mod is very good so please tell me how to solve this problem
thank you
Quote from: ssufian on June 27, 2008, 08:31:38 AM
I'm using default theme SMF version 1.1.5
I got this error message while testing before installing the mod ( version 1.2)...
Execute Modification ./Themes/default/BoardIndex.template.php Test failed
I found out this mod is very good so please tell me how to solve this problem
thank you
manually install it
Quote from: djrem on June 27, 2008, 10:55:07 AM
Quote from: ssufian on June 27, 2008, 08:31:38 AM
I'm using default theme SMF version 1.1.5
I got this error message while testing before installing the mod ( version 1.2)...
Execute Modification ./Themes/default/BoardIndex.template.php Test failed
I found out this mod is very good so please tell me how to solve this problem
thank you
manually install it
How to manually install it?
Use the parser on the download page, select you SMF version and it will display the manual edits for each file.
Everything went fine, sort of.
Installed the mod and everything was installed successfully, it just doesn't show because im using a custom them.
So we just change the two files, message and boardindex as statedby someone before and it should appear right bro?
Quote from: ssufian on June 27, 2008, 08:31:38 AM
I'm using default theme SMF version 1.1.5
I got this error message while testing before installing the mod ( version 1.2)...
Execute Modification ./Themes/default/BoardIndex.template.php Test failed
I found out this mod is very good so please tell me how to solve this problem
thank you
Problem solved
Actually 'View Only Boards' conflict with 'Password Protect Boards' mod
Uninstalled the 'Password Protect Boards' mod and problem solved
I am getting this same error:
Execute Modification ./Themes/default/BoardIndex.template.php Test failed
Plus the big, scary red: Error in Package Installation
At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF.
So I did manually install. Same errors. ??? Any help? Thanks.
great mod, dude!
I've installed the package with the SMF tool and then modified the files of my custom template.
Everything is working great, I even can show any board's to guests but keep them from opening the threads :D
Thanks ;)
Yes it is great mod but now I need it for SMF 2.0
When ?
Can anybody update this mod?
I need to be able to apply this mod to the SimplePortal... any ideas? I need to figure out how to make the recent topics block "protect" (or skip would be better) boards they cant see...
Thanks!
Scratch that... got it working!
Any update for smf 2.0?
Does anyone knows if there is something similar intergrated to the smf 2.0 ?
Hi Rudolf,
Are you planning to update this mod for smf 2.0?
I've been using this mod for a while now to limit the views my guests has into the 'for sale' boards on my forum. however, recently I needed it for something slightly different. I want my new members (with post counts less than 10) to have the same limit - ability to view a board, but not to Post/reply.
Turns out, while it still block views and replies, a member in this post group (newbie) can still post a new thread. Does this mod not affect new thread posting? Am I doing something wrong?
You can set local permissions to guests for this specific forum.
So many people need this for 2.0
It would be a perfect companion to paid subscription..
let the other mebergroups see what they will get access too if they sign up for paid subscription..
please upgrade this mod for 2.0 and i am sure it will be a great christmas present to us all :)
Thanks for your work :)
Quote from: Tanks on November 18, 2008, 03:57:56 AM
please upgrade this mod for 2.0 and i am sure it will be a great christmas present to us all :)
AGREED
Strange, Rudolf was very helpful, but now he doesn't replay.
I hope he comes back soon, with update. :D
:(
I made a big mistake expecting that this mod will be updated, and shifting to smf 2.0.
Wondering if someone else can update it?
This mod should be a part of the smf 2.0.
Definitely!!!
I am really struggling since I changed to smf2.0
Has Rudolf left this mod ??
Is it a lot of work to make it 2.x compatible ?
It's a shame that such a useful mod is not upgraded to work with the latest SMF.
I would donate some money via Paypal if Rudolf would upgrade this mod !
Please make this a good christmas Rudolf !
Me too, i would donate some money too.
Happy Xmas Rudolf!
It should be ready the next week.
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.augk18.dsl.pipex.com%2FSmileys%2Fthankyou.gif&hash=e71e4d6ce781ff6d77a29d873933f34736f38aad)
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.augk18.dsl.pipex.com%2FSmileys%2FChristmas%2Fanimated-snowman.gif&hash=74993c3a60a5062d2916fe7db65fe629dadda0b0)
Quote from: Rudolf on December 31, 2008, 01:42:30 AM
It should be ready the next week.
This is HUGE, Thank you very much for working on this!
Quote from: Rudolf on December 31, 2008, 01:42:30 AM
It should be ready the next week.
This will have a HUGE impact on my board ! Thank you so much !
wow, cant wait this mod will be great!!
Any status on the update ?
Can't wait to be able to use this mod :)
its already 2nd week still no luck...
I'm doing the final tests.
I don't actually use the mod, so I needed to set up some test cases.
This mod should be included as a default feature in Smf :)
Quote from: babjusi on January 11, 2009, 10:47:50 AM
This mod should be included as a default feature in Smf :)
AGREED!
That sounds great !
This is such a great mod for anyone who runs a forum with paid subscriptions. :)
To SMF DEVELOPERS: PLEASE INCLUDE THIS MOD AS A DEFAULT FEATURE IN SMF!
I uploaded the new package which is compatible with both SMF 1 and SMF 2.
The file is View_Only_Boards_1.2a.zip
Uninstall any previous version before installing, and make sure to backup your database and source files.
Buhuu i get test failed on boardindex and messageindex files - Guess there must be some conflict with other mods :(
I will wait and see what others are experiencing :)
Templates or source files?
Template files:
8. Execute Modification ./Themes/default/BoardIndex.template.php Test failed
1. Replace ./Themes/default/BoardIndex.template.php Test failed
2. Replace ./Themes/default/BoardIndex.template.php Test successful
3. Replace ./Themes/default/BoardIndex.template.php Test failed
4. Replace ./Themes/default/BoardIndex.template.php Test failed
5. Replace ./Themes/default/BoardIndex.template.php Test failed
9. Execute Modification ./Themes/default/MessageIndex.template.php Test failed
1. Replace ./Themes/default/MessageIndex.template.php Test successful
2. Replace ./Themes/default/MessageIndex.template.php Test failed
3. Replace ./Themes/default/MessageIndex.template.php Test failed (Ignore Errors)
4. Replace ./Themes/default/MessageIndex.template.php Test failed (Ignore Errors)
13. Execute Modification ./Themes/default/languages/ManageBoards.english.php Test failed
1. Replace ./Themes/default/languages/ManageBoards.english.php Test failed
The changes in the templates are optional. The only thing they do is to show which board is protected.
You can still install the mod, and then apply the changes manually.
If you're having problem finding the things you have to change, try the modifications for those files for the 1.1 version. I suspect that you're using the 1.1 default templates .
My forum is 2.0 3.1 Public
Can this be the reason ?
I try to install but it tells me i dont have a table named boards so the installation stops there !
Yes, there were changes between beta 3 and beta 4, that impact on the installation process.
Ahh that explains it... upgrading to the latest release of smf gave me so many errors that i gave up on it !
Maybe i should look it to that again and then return to this mod ;)
Thanks for your support !
how do i do manually the database edits? i cant install it via package manager cause it always times out so i edited the files manually now i need to install the tables in mysql, please help
thanks
ok i finally installed the mod and the "Visibility" doesnt work im using smf 2.0 beta 4
Does anybody tested this mod in smf 2b4? Are there any problems?
It's working fine for me on 2.0 B4
thnx
Rudolf pls give me a paypal account in order to donate for this amazing mod. Please keep on updating this mod.
Does this mod do anything that is not already built into 1.1.7?
QuoteDescription:
Note: The View_Only_Boards_1.2a.zip package is compatible with both SMF 1.1.x and SMF 2. There are no new features.
I would assume that means there are no new features in the current version of the mod that were not in the previous version. It does not tell me what features this mod provides that the 1.1.7 does not have by default. I can already hide forums and the most recent post on a hidden forum from anyone who does not have access to that forum by the settings in admin>boards>Allowed Groups
Quote from: searchgr on January 16, 2009, 12:37:05 PM
QuoteDescription:
Note: The View_Only_Boards_1.2a.zip package is compatible with both SMF 1.1.x and SMF 2. There are no new features.
It provides a feature where you can allow visibility of the board index, but disallow access to read the topics in that board.
Quote from: searchgr on January 16, 2009, 11:32:22 AM
Rudolf pls give me a paypal account in order to donate for this amazing mod. Please keep on updating this mod.
Donation Completed.
Add the paypal image in the mod's page. I'm sure that there are more members that they want to donate.
Quote from: searchgr on January 17, 2009, 11:35:18 AM
Donation Completed.
Add the paypal image in the mod's page. I'm sure that there are more members that they want to donate.
I figure that for users who would really like to donate, like yourself, wouldn't be too much trouble asking for the payment options.
For everyone else the buttons (or any other ad) would be just a nuisance.
Thank you for your donation.
Hi!
Thanks for this very nice mod!
Maybe someone can help me with this issue: In the logs it says:
"8: Undefined index: protected
File: /.../Themes/default/BoardIndex.template.php (eval?)
Line: 301"
-->
<dt ' , $post['board']['protected'] ? 'class="vob_protected"' : '' , '><strong>', $post['link'], '</strong> ', $txt['by'], ' ', $post['poster']['link'], ' (', $post['board']['link'], ')</dt>
What's going wrong here? ???
Since this seems to be happening at every click it's flooding my error logs... ::)
Hi,
Is this MOD able to do the below described?
I just found a vB forum with a feature that I would like to have on my SMF 2.0B4, a guest be able to see only the first post of a topic and have a message below telling them to login or register to see the rest, exactly like this site below:
http://www.forex4noobs.com/forums/talking-forex/486-your-money-safe.html
If this MOD doesn't do this, what changes I need to do to have the same feature.
Thanks for any help, very appreciated.
Quote from: Dr Web on January 20, 2009, 03:55:45 AM
Hi,
Is this MOD able to do the below described?
I just found a vB forum with a feature that I would like to have on my SMF 2.0B4, a guest be able to see only the first post of a topic and have a message below telling them to login or register to see the rest, exactly like this site below:
http://www.forex4noobs.com/forums/talking-forex/486-your-money-safe.html
If this MOD doesn't do this, what changes I need to do to have the same feature.
Thanks for any help, very appreciated.
My mod doesn't allows this, however what you ask is a simle change in the template.
I'm at work now, but later I'll be able to write exactly what you need to changed.
Good, nice idea! Thanks Rudolf.
Does this applies to all the membergroups or only to the guests?
Quote from: Rudolf on January 20, 2009, 06:34:47 AM
Quote from: Dr Web on January 20, 2009, 03:55:45 AM
Hi,
Is this MOD able to do the below described?
I just found a vB forum with a feature that I would like to have on my SMF 2.0B4, a guest be able to see only the first post of a topic and have a message below telling them to login or register to see the rest, exactly like this site below:
http://www.forex4noobs.com/forums/talking-forex/486-your-money-safe.html
If this MOD doesn't do this, what changes I need to do to have the same feature.
Thanks for any help, very appreciated.
My mod doesn't allows this, however what you ask is a simle change in the template.
I'm at work now, but later I'll be able to write exactly what you need to changed.
Hi Rudolf,
I am waiting for the code, if possible, when you have some time, please, post it here.
Thanks for your help.
in Display.template.php search for
// Get all the messages...
while ($message = $context['get_message']())
{
$is_first_post = !isset($is_first_post) ? true : false;
$ignoring = false;
$messageIDs[] = $message['id'];
add after:
if ($context['user']['is_guest'] && !$is_first_post)
{
echo '
<div class="login_message">
To see more of this thread, please <a href="', $scripturl ,'?action=login">login</a> or <a href="', $scripturl ,'?action=register">register</a>.<br />
Registration is quick and easy!
</div>';
break;
}
Obviously you need to style the box to match your theme. This requires some HTML and CSS coding.
I might make a mod out of this, and make it user group based.
Many thanks for the code, however I don't have that code in my Display.template.php, below I posted almost my entire Display.template.php file, I see just a portion of that code, so I don't know where to put the code you gave me.
Can you help me please?
<?php
// Version: 2.0 Beta 4; Display
function template_main()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
//Display ads on the thread page
if (function_exists("show_threadAds"))
{
$ads = show_threadAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}
// Show the anchor for the top and for the first message. If the first message is new, say so.
echo '
<a name="top"></a>
<a name="msg', $context['first_message'], '"></a>', $context['first_new_message'] ? '<a name="new"></a>' : '';
// Is this topic also a poll?
if ($context['is_poll'])
{
echo '
<div class="tborder marginbottom" id="poll">
<h3 class="titlebg headerpadding">
<img src="', $settings['images_url'], '/topic/', $context['poll']['is_locked'] ? 'normal_poll_locked' : 'normal_poll', '.gif" alt="" align="bottom" /> ', $txt['poll'], '
</h3>
<h4 class="windowbg headerpadding">
', $txt['poll_question'], ': <span class="plainstyle">', $context['poll']['question'];
if (!empty($context['poll']['expire_time']))
echo '
(', ($context['poll']['is_expired'] ? $txt['poll_expired_on'] : $txt['poll_expires_on']), ': ', $context['poll']['expire_time'], ')';
echo '
</span>
</h4>
<div class="windowbg clearfix" id="poll_options">';
// Are they not allowed to vote but allowed to view the options?
if ($context['poll']['show_results'] || !$context['allow_vote'])
{
echo '
<ul class="horizlist clearfix">
<li>
<dl class="options">';
// Show each option with its corresponding percentage bar.
foreach ($context['poll']['options'] as $option)
echo '
<dt', $option['voted_this'] ? ' class="voted"' : '', '>', $option['option'], '</dt>
<dd>', $context['allow_poll_view'] ? $option['bar'] . ' ' . $option['votes'] . ' (' . $option['percent'] . '%)' : '', '</dd>';
echo '
</dl>
</li>
<li>';
// If they are allowed to revote - show them a link!
if ($context['allow_change_vote'])
echo '
<a href="', $scripturl, '?action=vote;topic=', $context['current_topic'], '.', $context['start'], ';poll=', $context['poll']['id'], ';sesc=', $context['session_id'], '">', $txt['poll_change_vote'], '</a><br />';
// If we're viewing the results... maybe we want to go back and vote?
if ($context['poll']['show_results'] && $context['allow_vote'])
echo '
<a href="', $scripturl, '?topic=', $context['current_topic'], '.', $context['start'], '">', $txt['poll_return_vote'], '</a><br />';
// If they're allowed to lock the poll, show a link!
if ($context['poll']['lock'])
echo '
<a href="', $scripturl, '?action=lockvoting;topic=', $context['current_topic'], '.', $context['start'], ';sesc=', $context['session_id'], '">', !$context['poll']['is_locked'] ? $txt['poll_lock'] : $txt['poll_unlock'], '</a><br />';
// If they're allowed to edit the poll... guess what... show a link!
if ($context['poll']['edit'])
echo '
<a href="', $scripturl, '?action=editpoll;topic=', $context['current_topic'], '.', $context['start'], '">', $txt['poll_edit'], '</a>';
echo '
</li>
</ul>
<p>', $context['allow_poll_view'] ? '<strong>' . $txt['poll_total_voters'] . ': ' . $context['poll']['total_votes'] . '</strong>' : '', '</p>';
}
// They are allowed to vote! Go to it!
else
{
echo '
<form action="', $scripturl, '?action=vote;topic=', $context['current_topic'], '.', $context['start'], ';poll=', $context['poll']['id'], '" method="post" accept-charset="', $context['character_set'], '">';
// Show a warning if they are allowed more than one option.
if ($context['poll']['allowed_warning'])
echo '
<p class="smallpadding">', $context['poll']['allowed_warning'], '</p>';
echo '
<ul class="horizlist">
<li>
<ul class="options">';
// Show each option with its button - a radio likely.
foreach ($context['poll']['options'] as $option)
echo '
<li>', $option['vote_button'], ' <label for="', $option['id'], '">', $option['option'], '</label></li>';
echo '
</ul>
</li>
<li>
<p class="pollmoderation">';
// Allowed to view the results? (without voting!)
if ($context['allow_poll_view'])
echo '
<a href="', $scripturl, '?topic=', $context['current_topic'], '.', $context['start'], ';viewResults">', $txt['poll_results'], '</a><br />';
// Show a link for locking the poll as well...
if ($context['poll']['lock'])
echo '
<a href="', $scripturl, '?action=lockvoting;topic=', $context['current_topic'], '.', $context['start'], ';sesc=', $context['session_id'], '">', (!$context['poll']['is_locked'] ? $txt['poll_lock'] : $txt['poll_unlock']), '</a><br />';
// Want to edit it? Click right here......
if ($context['poll']['edit'])
echo '
<a href="', $scripturl, '?action=editpoll;topic=', $context['current_topic'], '.', $context['start'], '">', $txt['poll_edit'], '</a><br />';
echo '
</p>
</li>
</ul>
<p class="submitbutton">
<input type="submit" value="', $txt['poll_vote'], '" />
<input type="hidden" name="sc" value="', $context['session_id'], '" />
</p>
</form>';
}
echo '
</div>
</div>';
}
// Does this topic have some events linked to it?
if (!empty($context['linked_calendar_events']))
{
echo '
<div id="events" class="tborder marginbottom">
<h3 class="titlebg headerpadding"> ', $txt['calendar_linked_events'], '</h3>
<ul class="windowbg largepadding">';
foreach ($context['linked_calendar_events'] as $event)
echo '
<li>
', ($event['can_edit'] ? '<a href="' . $event['modify_href'] . '" style="color: red;">*</a> ' : ''), '<strong>', $event['title'], '</strong>: ', $event['start_date'], ($event['start_date'] != $event['end_date'] ? ' - ' . $event['end_date'] : ''), '
</li>';
echo '
</ul>
</div>';
}
// Build the normal button array.
$normal_buttons = array(
'reply' => array('test' => 'can_reply', 'text' => 'reply', 'image' => 'reply.gif', 'lang' => true, 'url' => $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . ';num_replies=' . $context['num_replies']),
'bookmark' => array('test' => 'can_make_bookmarks', 'text' => 'bookmark_add', 'lang' => true, 'url' => $scripturl . '?action=bookmarks;sa=add;topic=' . $context['current_topic']),
'notify' => array('test' => 'can_mark_notify', 'text' => 'notify', 'image' => 'notify.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_topic'] : $txt['notification_enable_topic']) . '\');"', 'url' => $scripturl . '?action=notify;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']),
'custom' => array(),
'send' => array('test' => 'can_send_topic', 'text' => 'send_topic', 'image' => 'sendtopic.gif', 'lang' => true, 'url' => $scripturl . '?action=emailuser;sa=sendtopic;topic=' . $context['current_topic'] . '.0'),
'print' => array('text' => 'print', 'image' => 'print.gif', 'lang' => true, 'custom' => 'rel="new_win nofollow"', 'url' => $scripturl . '?action=printpage;topic=' . $context['current_topic'] . '.0'),
);
// Special case for the custom one.
if ($context['user']['is_logged'] && $settings['show_mark_read'])
$normal_buttons['custom'] = array('text' => 'mark_unread', 'image' => 'markunread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=topic;t=' . $context['mark_unread_time'] . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']);
elseif ($context['can_add_poll'])
$normal_buttons['custom'] = array('text' => 'add_poll', 'image' => 'add_poll.gif', 'lang' => true, 'url' => $scripturl . '?action=editpoll;add;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']);
else
unset($normal_buttons['custom']);
// Show the page index... "Pages: [1]".
echo '
<div class="clearfix margintop" id="postbuttons">
<div class="margintop middletext floatleft">', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . ' <a href="#lastPost"><strong>' . $txt['go_down'] . '</strong></a>' : '', '</div>
<div class="next">', $context['previous_next'], '</div>
<div class="nav floatright">', template_button_strip($normal_buttons, 'bottom'), '</div>
</div>';
// Show the topic information - icon, subject, etc.
echo '
<div id="forumposts" class="tborder">
<h3 class="catbg3">
<img src="', $settings['images_url'], '/topic/', $context['class'], '.gif" align="bottom" alt="" />
<span>', $txt['author'], '</span>
<span id="top_subject">', $txt['topic'], ': ', $context['subject'], ' (', $txt['read'], ' ', $context['num_views'], ' ', $txt['times'], ')</span>
</h3>';
if (!empty($settings['display_who_viewing']))
{
echo '
<div id="whoisviewing" class="smalltext headerpadding windowbg2">';
// Show just numbers...?
if ($settings['display_who_viewing'] == 1)
echo count($context['view_members']), ' ', count($context['view_members']) == 1 ? $txt['who_member'] : $txt['members'];
// Or show the actual people viewing the topic?
else
echo empty($context['view_members_list']) ? '0 ' . $txt['members'] : implode(', ', $context['view_members_list']) . ((empty($context['view_num_hidden']) || $context['can_moderate_forum']) ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')');
// Now show how many guests are here too.
echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_topic'], '
</div>';
}
echo '
<form action="', $scripturl, '?action=quickmod2;topic=', $context['current_topic'], '.', $context['start'], '" method="post" accept-charset="', $context['character_set'], '" name="quickModForm" id="quickModForm" style="margin: 0;" onsubmit="return oQuickModify.bInEditMode ? oQuickModify.modifySave(\'' . $context['session_id'] . '\') : confirm(\'' . $txt['quickmod_confirm'] . '\');">';
// These are some cache image buttons we may want.
$reply_button = create_button('quote.gif', 'reply_quote', 'quote', 'align="middle"');
$modify_button = create_button('modify.gif', 'modify_msg', 'modify', 'align="middle"');
$remove_button = create_button('delete.gif', 'remove_message', 'remove', 'align="middle"');
$split_button = create_button('split.gif', 'split', 'split', 'align="middle"');
$approve_button = create_button('approve.gif', 'approve', 'approve', 'align="middle"');
$restore_message_button = create_button('restore_topic.gif', 'restore_message', 'restore_message', 'align="middle"');
$ignoredMsgs = array();
//Ad Counter
$adcounter =0;
// Get all the messages...
while ($message = $context['get_message']())
{
$adcounter++;
$ignoring = false;
echo '
<div class="bordercolor">';
if (in_array($message['member']['id'], $context['user']['ignoreusers']))
{
$ignoring = true;
$ignoredMsgs[] = $message['id'];
}
// Show the message anchor and a "new" anchor if this message is new.
if ($message['id'] != $context['first_message'])
echo '
<a name="msg', $message['id'], '"></a>', $message['first_new'] ? '<a name="new"></a>' : '';
echo '
<div class="clearfix ', !$message['first_new'] ? 'topborder ' : '', $message['approved'] ? ($message['alternate'] == 0 ? 'windowbg' : 'windowbg2') : 'approvebg', ' largepadding">';
// Show information about the poster of this message.
echo '
<div class="floatleft poster">
<h4>', $message['member']['link'], '</h4>
<ul class="smalltext" id="msg_', $message['id'], '_extra_info">';
// Show the member's custom title, if they have one.
if (isset($message['member']['title']) && $message['member']['title'] != '')
echo '
<li>', $message['member']['title'], '</li>';
// Show the member's primary group (like 'Administrator') if they have one.
if (isset($message['member']['group']) && $message['member']['group'] != '')
echo '
<li>', $message['member']['group'], '</li>';
// Don't show these things for guests.
if (!$message['member']['is_guest'])
{
// Show the post group if and only if they have no other group or the option is on, and they are in a post group.
if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '')
echo '
<li>', $message['member']['post_group'], '</li>';
echo '
<li>', $message['member']['group_stars'], '</li>';
// Is karma display enabled? Total or +/-?
if ($modSettings['karmaMode'] == '1')
echo '
<li class="margintop">', $modSettings['karmaLabel'], ' ', $message['member']['karma']['good'] - $message['member']['karma']['bad'], '</li>';
elseif ($modSettings['karmaMode'] == '2')
echo '
<li class="margintop">', $modSettings['karmaLabel'], ' +', $message['member']['karma']['good'], '/-', $message['member']['karma']['bad'], '</li>';
// Is this user allowed to modify this member's karma?
if ($message['member']['karma']['allow'])
echo '
<li>
<a href="', $scripturl, '?action=modifykarma;sa=applaud;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.' . $context['start'], ';m=', $message['id'], ';sesc=', $context['session_id'], '">', $modSettings['karmaApplaudLabel'], '</a>
<a href="', $scripturl, '?action=modifykarma;sa=smite;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';m=', $message['id'], ';sesc=', $context['session_id'], '">', $modSettings['karmaSmiteLabel'], '</a>
</li>';
// Show online and offline buttons?
if (!empty($modSettings['onlineEnable']) && !$message['member']['is_guest'])
echo '
<li>', $context['can_send_pm'] ? '<a href="' . $message['member']['online']['href'] . '" title="' . $message['member']['online']['label'] . '">' : '', $settings['use_image_buttons'] ? '<img src="' . $message['member']['online']['image_href'] . '" alt="' . $message['member']['online']['text'] . '" border="0" style="margin-top: 2px;" />' : $message['member']['online']['text'], $context['can_send_pm'] ? '</a>' : '', $settings['use_image_buttons'] ? '<span class="smalltext"> ' . $message['member']['online']['text'] . '</span>' : '', '</li>';
// Show the member's gender icon?
if (!empty($settings['show_gender']) && $message['member']['gender']['image'] != '' && !isset($context['disabled_fields']['gender']))
echo '
<li>', $txt['gender'], ': ', $message['member']['gender']['image'], '</li>';
// Show how many posts they have made.
if (!isset($context['disabled_fields']['posts']))
echo '
<li>', $txt['member_postcount'], ': ', $message['member']['posts'], '</li>';
// Any custom fields?
if (!empty($message['member']['custom_fields']))
{
foreach ($message['member']['custom_fields'] as $custom)
echo '
<li>', $custom['title'], ': ', $custom['value'], '</li>';
}
// Show avatars, images, etc.?
if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
echo '
<li class="margintop" style="overflow: auto;">', $message['member']['avatar']['image'], '</li>';
// Show their personal text?
if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '')
echo '
<li>', $message['member']['blurb'], '</li>';
// This shows the popular messaging icons.
if ($message['member']['has_messenger'] && $message['member']['can_view_profile'])
echo '
<li>
<ul class="nolist">
', !isset($context['disabled_fields']['icq']) && !empty($message['member']['icq']['link']) ? '<li>' . $message['member']['icq']['link'] . '</li>' : '', '
', !isset($context['disabled_fields']['msn']) && !empty($message['member']['msn']['link']) ? '<li>' . $message['member']['msn']['link'] . '</li>' : '', '
', !isset($context['disabled_fields']['aim']) && !empty($message['member']['aim']['link']) ? '<li>' . $message['member']['aim']['link'] . '</li>' : '', '
', !isset($context['disabled_fields']['yim']) && !empty($message['member']['yim']['link']) ? '<li>' . $message['member']['yim']['link'] . '</li>' : '', '
</ul>
</li>';
// Show the profile, website, email address, and personal message buttons.
if ($settings['show_profile_buttons'])
{
echo '
<li>
<ul class="nolist">';
// Don't show the profile button if you're not allowed to view the profile.
if ($message['member']['can_view_profile'])
echo '
<li><a href="', $message['member']['href'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/icons/profile_sm.gif" alt="' . $txt['view_profile'] . '" title="' . $txt['view_profile'] . '" border="0" />' : $txt['view_profile']), '</a></li>';
// Don't show an icon if they haven't specified a website.
if ($message['member']['website']['url'] != '' && !isset($context['disabled_fields']['website']))
echo '
<li><a href="', $message['member']['website']['url'], '" title="' . $message['member']['website']['title'] . '" target="_blank" class="new_win">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/www_sm.gif" alt="' . $txt['www'] . '" border="0" />' : $txt['www']), '</a></li>';
// Don't show the email address if they want it hidden.
if (in_array($message['member']['show_email'], array('yes', 'yes_permission_override', 'no_through_forum')))
echo '
<li><a href="', $scripturl, '?action=emailuser;sa=email;msg=', $message['id'], '" rel="nofollow">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/email_sm.gif" alt="' . $txt['email'] . '" title="' . $txt['email'] . '" />' : $txt['email']), '</a></li>';
// Since we know this person isn't a guest, you *can* message them.
if ($context['can_send_pm'])
echo '
<li><a href="', $scripturl, '?action=pm;sa=send;u=', $message['member']['id'], '" title="', $message['member']['online']['label'], '">', $settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/im_' . ($message['member']['online']['is_online'] ? 'on' : 'off') . '.gif" alt="' . $message['member']['online']['label'] . '" border="0" />' : $message['member']['online']['label'], '</a></li>';
}
echo '
</ul>
</li>';
// Are we showing the warning status?
if (!isset($context['disabled_fields']['warning_status']) && $message['member']['warning_status'] && ($context['user']['can_mod'] || !empty($modSettings['warning_show'])))
echo '
<li>', $context['can_issue_warning'] ? '<a href="' . $scripturl . '?action=profile;u=' . $message['member']['id'] . ';sa=issueWarning">' : '', '<img src="', $settings['images_url'], '/warning_', $message['member']['warning_status'], '.gif" alt="', $txt['user_warn_' . $message['member']['warning_status']], '" />', $context['can_issue_warning'] ? '</a>' : '', '<span class="warn_', $message['member']['warning_status'], '">', $txt['warn_' . $message['member']['warning_status']], '</span></li>';
}
// Otherwise, show the guest's email.
elseif (in_array($message['member']['show_email'], array('yes', 'yes_permission_override', 'no_through_forum')))
echo '
<li><a href="', $scripturl, '?action=emailuser;sa=email;msg=', $message['id'], '" rel="nofollow">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/email_sm.gif" alt="' . $txt['email'] . '" title="' . $txt['email'] . '" border="0" />' : $txt['email']), '</a></li>';
// Done with the information about the poster... on to the post itself.
echo '
</ul>
</div>
<div class="postarea">
<div class="keyinfo">
<div class="messageicon floatleft"><img src="', $message['icon_url'] . '" alt="" border="0"', $message['can_modify'] ? ' id="msg_icon_' . $message['id'] . '"' : '', ' /></div>
<h5 id="subject_', $message['id'], '">
<a href="', $message['href'], '" rel="nofollow">', $message['subject'], '</a>
</h5>
<div class="smalltext">&#171; <strong>', !empty($message['counter']) ? $txt['reply'] . ' #' . $message['counter'] : '', ' ', $txt['on'], ':</strong> ', $message['time'], ' &#187;</div>
<div id="msg_', $message['id'], '_quick_mod"></div>
</div>';
// If this is the first post, (#0) just say when it was posted - otherwise give the reply #.
echo '
<ul class="smalltext postingbuttons">';
// Maybe we can approve it, maybe we should?
if ($message['can_approve'])
echo '
<li><a href="', $scripturl, '?action=moderate;area=postmod;sa=approve;topic=', $context['current_topic'], '.', $context['start'], ';msg=', $message['id'], ';sesc=', $context['session_id'], '">', $approve_button, '</a></li>';
// Can they reply? Have they turned on quick reply?
if ($context['can_reply'] && !empty($options['display_quick_reply']))
echo '
<li><a href="', $scripturl, '?action=post;quote=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';num_replies=', $context['num_replies'], ';sesc=', $context['session_id'], '" onclick="return oQuickReply.quote(', $message['id'], ', \'', $context['session_id'], '\', true);">', $reply_button, '</a></li>';
// So... quick reply is off, but they *can* reply?
elseif ($context['can_reply'])
echo '
<li><a href="', $scripturl, '?action=post;quote=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';num_replies=', $context['num_replies'], ';sesc=', $context['session_id'], '">', $reply_button, '</a></li>';
// Can the user modify the contents of this post?
if ($message['can_modify'])
echo '
<li><a href="', $scripturl, '?action=post;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';sesc=', $context['session_id'], '">', $modify_button, '</a></li>';
// How about... even... remove it entirely?!
if ($message['can_remove'])
echo '
<li><a href="', $scripturl, '?action=deletemsg;topic=', $context['current_topic'], '.', $context['start'], ';msg=', $message['id'], ';sesc=', $context['session_id'], '" onclick="return confirm(\'', $txt['remove_message'], '?\');">', $remove_button, '</a></li>';
// What about splitting it off the rest of the topic?
if ($context['can_split'])
echo '
<li><a href="', $scripturl, '?action=splittopics;topic=', $context['current_topic'], '.0;at=', $message['id'], '">', $split_button, '</a></li>';
// Can we restore topics?
if ($context['can_restore_msg'])
echo '
<li><a href="', $scripturl, '?action=restoretopic;msgs=', $message['id'], ';sesc=', $context['session_id'], '">', $restore_message_button, '</a></li>';
// Show a checkbox for quick moderation?
if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $message['can_remove'])
echo '
<li><input type="checkbox" name="msgs[]" value="', $message['id'], '" class="check" ', empty($settings['use_tabs']) ? 'onclick="document.getElementById(\'quickmodSubmit\').style.display = \'\';"' : '', ' /></li>';
// Show the post itself, finally!
echo '
</ul>';
if ($ignoring)
echo '<div id="msg_', $message['id'], '_ignored_prompt" style="display: none;">', $txt['ignoring_user'], ' <a href="#msg', $message['id'], '" onclick="return ignoreToggles[', $message['id'], '].toggle()">', $txt['show_ignore_user_post'], '</a></div>';
echo '
<div class="post" id="msg_', $message['id'], '"', '>';
if (!$message['approved'] && $message['member']['id'] != 0 && $message['member']['id'] == $context['user']['id'])
echo '
<div class="approve_post">
', $txt['post_awaiting_approval'], '
</div>';
echo '
', $message['body'], '
</div>', $message['can_modify'] ? '
<img src="' . $settings['images_url'] . '/icons/modify_inline.gif" alt="" class="modifybutton" id="modify_button_' . $message['id'] . '" style="cursor: ' . ($context['browser']['is_ie5'] || $context['browser']['is_ie5.5'] ? 'hand' : 'pointer') . '; display: none;" onclick="oQuickModify.modifyMsg(\'' . $message['id'] . '\', \'' . $context['session_id'] . '\')" />' : '';
// Now for the attachments, signature, ip logged, etc...
echo '
<div id="msg_', $message['id'], '_footer" class="attachments smalltext">';
// Assuming there are attachments...
if (!empty($message['attachment']))
{
echo '
<hr width="100%" size="1" class="hrcolor" />
<div style="overflow: auto; width: 100%;">';
$last_approved_state = 1;
foreach ($message['attachment'] as $attachment)
{
// Show a special box for unapproved attachments...
if ($attachment['is_approved'] != $last_approved_state)
{
$last_approved_state = 0;
echo '
<fieldset>
<legend>', $txt['attach_awaiting_approve'], ' [<a href="', $scripturl, '?action=attachapprove;sa=all;mid=', $message['id'], ';sesc=', $context['session_id'], '">', $txt['approve_all'], '</a>]</legend>';
}
if ($attachment['is_image'])
{
if ($attachment['thumbnail']['has_thumb'])
echo '
<a href="', $attachment['href'], ';image" id="link_', $attachment['id'], '" onclick="', $attachment['thumbnail']['javascript'], '"><img src="', $attachment['thumbnail']['href'], '" alt="" id="thumb_', $attachment['id'], '" border="0" /></a><br />';
else
echo '
<img src="' . $attachment['href'] . ';image" alt="" width="' . $attachment['width'] . '" height="' . $attachment['height'] . '" border="0" /><br />';
}
echo '
<a href="' . $attachment['href'] . '"><img src="' . $settings['images_url'] . '/icons/clip.gif" align="middle" alt="*" border="0" /> ' . $attachment['name'] . '</a> ';
if (!$attachment['is_approved'])
echo '
[<a href="', $scripturl, '?action=attachapprove;sa=approve;aid=', $attachment['id'], ';sesc=', $context['session_id'], '">', $txt['approve'], '</a>] | [<a href="', $scripturl, '?action=attachapprove;sa=reject;aid=', $attachment['id'], ';sesc=', $context['session_id'], '">', $txt['delete'], '</a>] ';
echo '
(', $attachment['size'], ($attachment['is_image'] ? ', ' . $attachment['real_width'] . 'x' . $attachment['real_height'] . ' - ' . $txt['attach_viewed'] : ' - ' . $txt['attach_downloaded']) . ' ' . $attachment['downloads'] . ' ' . $txt['attach_times'] . '.)<br />';
}
// If we had unapproved attachments clean up.
if ($last_approved_state == 0)
echo '
</fieldset>';
echo '
</div>';
}
echo '
</div>
</div>
<div class="moderatorbar">
<div class="smalltext floatleft" id="modified_', $message['id'], '">';
// Show "« Last Edit: Time by Person »" if this post was edited.
if ($settings['show_modify'] && !empty($message['modified']['name']))
echo '
&#171; <em>', $txt['last_edit'], ': ', $message['modified']['time'], ' ', $txt['by'], ' ', $message['modified']['name'], '</em> &#187;';
echo '
</div>
<div class="smalltext floatright">';
// Maybe they want to report this post to the moderator(s)?
if ($context['can_report_moderator'])
echo '
<a href="', $scripturl, '?action=reporttm;topic=', $context['current_topic'], '.', $message['counter'], ';msg=', $message['id'], '">', $txt['report_to_mod'], '</a> ';
// Can we issue a warning because of this post? Remember, we can't give guests warnings.
if ($context['can_issue_warning'] && !$message['is_message_author'] && !$message['member']['is_guest'])
echo '
<a href="', $scripturl, '?action=profile;u=', $message['member']['id'], ';sa=issueWarning;msg=', $message['id'], '"><img src="', $settings['images_url'], '/warn.gif" alt="', $txt['issue_warning_post'], '" title="', $txt['issue_warning_post'], '" border="0" /></a>';
echo '
<img src="', $settings['images_url'], '/ip.gif" alt="" border="0" />';
// Show the IP to this user for this post - because you can moderate?
if ($context['can_moderate_forum'] && !empty($message['member']['ip']))
echo '
<a href="', $scripturl, '?action=trackip;searchip=', $message['member']['ip'], '">', $message['member']['ip'], '</a> <a href="', $scripturl, '?action=helpadmin;help=see_admin_ip" onclick="return reqWin(this.href);" class="help">(?)</a>';
// Or, should we show it because this is you?
elseif ($message['can_see_ip'])
echo '
<a href="', $scripturl, '?action=helpadmin;help=see_member_ip" onclick="return reqWin(this.href);" class="help">', $message['member']['ip'], '</a>';
// Okay, are you at least logged in? Then we can show something about why IPs are logged...
elseif (!$context['user']['is_guest'])
echo '
<a href="', $scripturl, '?action=helpadmin;help=see_member_ip" onclick="return reqWin(this.href);" class="help">', $txt['logged'], '</a>';
// Otherwise, you see NOTHING!
else
echo '
', $txt['logged'];
echo '
</div>';
// Show the member's signature?
if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled'])
echo '
<hr width="100%" size="1" style="clear: right;" class="margintop hrcolor" />
<div class="signature">', $message['member']['signature'], '</div>';
echo '
</div>
</div>
</div>';
if (function_exists("show_posts"))
{
if ($adpost = show_posts($adcounter))
{
if($modSettings['ads_lookLikePosts'])
{
echo '
<div class="bordercolor">
<div class="clearfix windowbg3 largepadding">';
// Show information about the poster of this message.
echo '
<div class="floatleft poster">
<h4>', $context['forum_name'], '</h4>';
// Done with the information about the poster... on to the post itself.
echo '
</div>
<div class="postarea">
<div class="keyinfo">
<h5 id="subject_', $message['id'], '">
<a href="', $message['href'], '" rel="nofollow">', $message['subject'], '</a>
</h5>
<div class="smalltext">&#171; <strong>', !empty($message['counter']) ? $txt['reply'] . ' #' . $message['counter'] : '', ' ', $txt['on'], ':</strong> ', $message['time'], ' &#187;</div>
<div id="msg_', $message['id'], '_quick_mod"></div>
</div>';
// If this is the first post, (#0) just say when it was posted - otherwise give the reply #.
echo '
<ul class="smalltext postingbuttons">';
// Can they reply? Have they turned on quick reply?
if ($context['can_reply'] && !empty($options['display_quick_reply']))
echo '
<li>', $reply_button, '</li>';
// So... quick reply is off, but they *can* reply?
elseif ($context['can_reply'])
echo '
<li>', $reply_button, '</li>';
// Can the user modify the contents of this post?
if ($message['can_modify'])
echo '
<li>', $modify_button, '</li>';
// How about... even... remove it entirely?!
if ($message['can_remove'])
echo '
<li>', $remove_button, '</li>';
// What about splitting it off the rest of the topic?
if ($context['can_split'])
echo '
<li>', $split_button, '</li>';
// Can we restore topics?
if ($context['can_restore_msg'])
echo '
<li>', $restore_message_button, '</li>';
// Show the post itself, finally!
echo '
</ul>
<div class="post" id="msg_', $message['id'], '"', '>
', $adpost['type'] == 0 ? $adpost['content'] : eval($adpost['content']) ,'
</div>
</div>
</div>
</div>';
}
else
echo '
<div class="bordercolor">
<div class="clearfix windowbg3 largepadding">', $adpost['type'] == 0 ? $adpost['content'] : eval($adpost['content']) ,'</div>
</div>';
}
}
}
if(function_exists("show_lastpostAds") && function_exists("show_posts"))
{
if(($adpost = show_lastpostAds()) && !show_posts($adcounter))
{
if($modSettings['ads_lookLikePosts'])
{
echo '
<div class="bordercolor">
<div class="clearfix windowbg3 largepadding">';
// Show information about the poster of this message.
echo '
<div class="floatleft poster">
<h4>', $context['forum_name'], '</h4>';
// Done with the information about the poster... on to the post itself.
echo '
</div>
<div class="postarea">
<div class="keyinfo">
<div id="msg_', $message['id'], '_quick_mod"> </div>
</div>';
// If this is the first post, (#0) just say when it was posted - otherwise give the reply #.
echo '
<ul class="smalltext postingbuttons">';
// Can they reply? Have they turned on quick reply?
if ($context['can_reply'] && !empty($options['display_quick_reply']))
echo '
<li>', $reply_button, '</li>';
// So... quick reply is off, but they *can* reply?
elseif ($context['can_reply'])
echo '
<li>', $reply_button, '</li>';
// Show the post itself, finally!
echo '
</ul>
<div class="post" id="msg_', $message['id'], '"', '>
', $adpost['type'] == 0 ? $adpost['content'] : eval($adpost['content']) ,'
</div>
</div>
</div>';
}
else
echo '
<div class="bordercolor">
<div class="clearfix windowbg3 largepadding">', $adpost['type'] == 0 ? $adpost['content'] : eval($adpost['content']) ,'</div>
</div>';
}
}
echo '</div>';
if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $context['can_remove_post'])
echo '
<input type="hidden" name="sc" value="', $context['session_id'], '" />';
echo '
</form>';
echo '
</div>
<a name="lastPost"></a>';
// As before, build the custom button right.
if ($context['can_add_poll'])
$normal_buttons['custom'] = array('text' => 'add_poll', 'image' => 'add_poll.gif', 'lang' => true, 'url' => $scripturl . '?action=editpoll;add;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']);
elseif ($context['user']['is_logged'] && $settings['show_mark_read'])
$normal_buttons['custom'] = array('text' => 'mark_unread', 'image' => 'markunread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=topic;t=' . $context['mark_unread_time'] . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']);
echo '
<div class="clearfix marginbottom" id="postbuttons_lower">
<div class="middletext floatleft">', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . ' <a href="#top"><strong>' . $txt['go_up'] . '</strong></a>' : '', '</div>
<div class="nav floatright">', template_button_strip($normal_buttons, 'top'), '</div>
<div style="clear: both;">', $context['previous_next'], '</div>
</div>';
if ($settings['linktree_inline'])
theme_linktree();
$mod_buttons = array(
'move' => array('test' => 'can_move', 'text' => 'move_topic', 'image' => 'admin_move.gif', 'lang' => true, 'url' => $scripturl . '?action=movetopic;topic=' . $context['current_topic'] . '.0'),
'delete' => array('test' => 'can_delete', 'text' => 'remove_topic', 'image' => 'admin_rem.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt['are_sure_remove_topic'] . '\');"', 'url' => $scripturl . '?action=removetopic2;topic=' . $context['current_topic'] . '.0;sesc=' . $context['session_id']),
'lock' => array('test' => 'can_lock', 'text' => empty($context['is_locked']) ? 'set_lock' : 'set_unlock', 'image' => 'admin_lock.gif', 'lang' => true, 'url' => $scripturl . '?action=lock;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']),
'sticky' => array('test' => 'can_sticky', 'text' => empty($context['is_sticky']) ? 'set_sticky' : 'set_nonsticky', 'image' => 'admin_sticky.gif', 'lang' => true, 'url' => $scripturl . '?action=sticky;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']),
'merge' => array('test' => 'can_merge', 'text' => 'merge', 'image' => 'merge.gif', 'lang' => true, 'url' => $scripturl . '?action=mergetopics;board=' . $context['current_board'] . '.0;from=' . $context['current_topic']),
'remove_poll' => array('test' => 'can_remove_poll', 'text' => 'poll_remove', 'image' => 'admin_remove_poll.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt['poll_remove_warn'] . '\');"', 'url' => $scripturl . '?action=removepoll;topic=' . $context['current_topic'] . '.' . $context['start']),
'calendar' => array('test' => 'calendar_post', 'text' => 'calendar_link', 'image' => 'linktocal.gif', 'lang' => true, 'url' => $scripturl . '?action=post;calendar;msg=' . $context['topic_first_message'] . ';topic=' . $context['current_topic'] . '.0;sesc=' . $context['session_id']),
);
if ($context['can_remove_post'] && !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1)
$mod_buttons[] = array('text' => 'quickmod_delete_selected', 'image' => 'delete_selected.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt['quickmod_confirm'] . '\');" id="quickmodSubmit"', 'url' => 'javascript:document.quickModForm.submit();');
// Restore topic. eh? No monkey business.
if ($context['can_restore_topic'])
$mod_buttons[] = array('text' => 'restore_topic', 'image' => '', 'lang' => true, 'url' => $scripturl . '?action=restoretopic;topics=' . $context['current_topic'] . ';sesc=' . $context['session_id']);
// Restore messages?
if ($context['can_restore_msg'])
$mod_buttons[] = array('text' => 'quick_mod_restore', 'image' => '', 'lang' => true, 'url' => 'javascript:document.quickModForm.submit();', 'custom' => ' name="restore_selected" ');
echo '
<div id="moderationbuttons">', template_button_strip($mod_buttons, 'bottom'), '</div>';
// Show the jumpto box, or actually...let Javascript do it.
echo '
<div class="tborder">
// Show the message anchor and a "new" anchor if this message is new.
Add before:
if ($context['user']['is_guest'] && $message['id'] != $context['first_message'])
{
echo '
<div class="login_message">
To see more of this thread, please <a href="', $scripturl ,'?action=login">login</a> or <a href="', $scripturl ,'?action=register">register</a>.<br />
Registration is quick and easy!
</div>';
break;
}
Sorry for bugging you, but do you have any idea what might be wrong with my issue explained some postings before? Would be so great... ;)
Many thanks, it works great, now only needs to look better, I will not make anything because I don't know css, you should really make a MOD of this, it's really a great feature.
Cheers
Quote from: hansdampf on January 21, 2009, 03:24:58 PM
Sorry for bugging you, but do you have any idea what might be wrong with my issue explained some postings before? Would be so great... ;)
Please re-install the mod using the View_Only_Boards_1.2a.zip package. It should temporarily fix the problem of the error logs.
Until I fix the real issue there.
** SECURITY ALERT **
Guys,
Just wondering why the SSI functions don't appear to take any notice of security? I'm using the View_Only_Boards_1.2a.zip mod and although showing the board to Guests, they're not allowed access yet the SMF SSI XML feed is still grabbing the topics that should be hidden and out of view - this is a serious security flaw for anyone else using this mod!!!!
Other users of this mod should be aware of this security flaw!!
How can I resolve this ASAP besides removing the mod?
Cheers, @sh
View_Only_Boards_1.2 is ok.
I don't know for View_Only_Boards_1.2a.
So what is the difference? This is quite a worry is it not?
I use smf 1.1.7 and the mod works fine. The guest are not able to read the topics via rss.
And you've got just the righthand checkbox ticked under that boards permissions for guests?
yes, only the righthand checkbox.
Quote from: searchgr on January 26, 2009, 10:54:18 AM
yes, only the righthand checkbox.
Very strange, hmmmmmm
Several days ago I installed SMF 1.1.7 with no problem, and quickly learned how to change the colors and fonts of the forum using the default theme.
All I need now is to get your great mod working.
On my forum, Under Administration Center/ Packages, I tried to upload the one that says DB_1_x.php.
(I wasn't sure if I should upload the DB_2_x.php since I have 1.1.7, so didn't try.)
I got an error message, "The package manager currently allows only these file types: zip, tgz, tar.gz."
I see that the mod has a .php extension.
I went to the Options tab, "Cleanup Permissions", that says "This interface allows you to reset the permissions for files throughout your installation, so as to increase security or solve any permission problems you may encounter while installing packages."
I selected "Change all file permissions throughout the forum such that: All Files Are Writable".
Then I got a page that said "Some of the files the package manager needs to modify are not writable. This needs to be changed by logging into FTP and using it to chmod or create the files and folders. Your FTP information may be temporarily cached for proper operation of the package manager. "
I had a live chat with my Webhostingpad.com. He was perplexed and said they accept .php extension files.
So I thought I'd try asking you if there's something I need to adjust on my SMF forum control panels, and again, I'm using the default theme, 1.1.7.
Thank you.
Quote from: VLN on February 01, 2009, 11:38:35 PM
Several days ago I installed SMF 1.1.7 with no problem, and quickly learned how to change the colors and fonts of the forum using the default theme.
All I need now is to get your great mod working.
On my forum, Under Administration Center/ Packages, I tried to upload the one that says DB_1_x.php.
(I wasn't sure if I should upload the DB_2_x.php since I have 1.1.7, so didn't try.)
I got an error message, "The package manager currently allows only these file types: zip, tgz, tar.gz."
I see that the mod has a .php extension.
I went to the Options tab, "Cleanup Permissions", that says "This interface allows you to reset the permissions for files throughout your installation, so as to increase security or solve any permission problems you may encounter while installing packages."
I selected "Change all file permissions throughout the forum such that: All Files Are Writable".
Then I got a page that said "Some of the files the package manager needs to modify are not writable. This needs to be changed by logging into FTP and using it to chmod or create the files and folders. Your FTP information may be temporarily cached for proper operation of the package manager. "
I had a live chat with my Webhostingpad.com. He was perplexed and said they accept .php extension files.
So I thought I'd try asking you if there's something I need to adjust on my SMF forum control panels, and
again, I'm using the default theme, 1.1.7.
Thank you.
Dude, you're entirely misunderstanding the mod system!!! You don't upload single files from the package, you upload the ENTIRE Zip/Compressed file - SMF then intelligently picks out the file that it requires.
Try again, using the above...
Thanks, @sh, that really helped. I had extracted the files out of it and put it in a folder in my desktop, thinking I had to select one and upload that to my forum.
Did it your way and it worked like a charm!
Quote from: VLN on February 03, 2009, 01:56:02 AM
Thanks, @sh, that really helped. I had extracted the files out of it and put it in a folder in my desktop, thinking I had to select one and upload that to my forum.
Did it your way and it worked like a charm!
Glad to be of help mate, hehe
Hello it was recommended that I post this here. If someone can help me out I'm receiving the following error ...
Quote
8: Undefined variable: post
Apply Filter: Only show the errors from this file
File: /home/content/c/l/o/clooneyn/html/smf/Sources/Subs-Recent.php
Line: 77
I'm running SMF 2.0 RC1 with the following mods
SMF Gallery Lite 2.0.5
Advanced Contact Form 1.1
View Only Boards 1.2
Profil Moderator Managment 1.0.0
SMF Arcade 2.5 Beta 4.1 Public
Enhanced PM Warning Message 1.0
Top 10 Posters Today And This Week Stats
Here's the Subs-Recent.php
<?php
/**********************************************************************************
* Subs-Recent.php *
***********************************************************************************
* SMF: Simple Machines Forum *
* Open-Source Project Inspired by Zef Hemel ([email protected]) *
* =============================================================================== *
* Software Version: SMF 2.0 RC1 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) *
* 2001-2006 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
***********************************************************************************
* This program is free software; you may redistribute it and/or modify it under *
* the terms of the provided license as published by Simple Machines LLC. *
* *
* This program is distributed in the hope that it is and will be useful, but *
* WITHOUT ANY WARRANTIES; without even any implied warranty of MERCHANTABILITY *
* or FITNESS FOR A PARTICULAR PURPOSE. *
* *
* See the "license.txt" file for details of the Simple Machines license. *
* The latest version can always be found at http://www.simplemachines.org. *
**********************************************************************************/
if (!defined('SMF'))
die('Hacking attempt...');
/* !!!
*/
// Get the latest posts of a forum.
function getLastPosts($latestPostOptions)
{
global $scripturl, $txt, $user_info, $modSettings, $smcFunc, $context;
// Find all the posts. Newer ones will have higher IDs. (assuming the last 20 * number are accessable...)
// !!!SLOW This query is now slow, NEEDS to be fixed. Maybe break into two?
$request = $smcFunc['db_query']('substring', '
SELECT
m.poster_time, m.subject, m.id_topic, m.id_member, m.id_msg,
IFNULL(mem.real_name, m.poster_name) AS poster_name, t.id_board, b.name AS board_name,
SUBSTRING(m.body, 1, 385) AS body, m.smileys_enabled
FROM {db_prefix}messages AS m
INNER JOIN {db_prefix}topics AS t ON (t.id_topic = m.id_topic)
INNER JOIN {db_prefix}boards AS b ON (b.id_board = t.id_board)
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.id_member)
WHERE m.id_msg >= {int:likely_max_msg}' .
(!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? '
AND b.id_board != {int:recycle_board}' : '') . '
AND {query_wanna_see_board}' . ($modSettings['postmod_active'] ? '
AND t.approved = {int:is_approved}
AND m.approved = {int:is_approved}' : '') . '
ORDER BY m.id_msg DESC
LIMIT ' . $latestPostOptions['number_posts'],
array(
'likely_max_msg' => max(0, $modSettings['maxMsgID'] - 50 * $latestPostOptions['number_posts']),
'recycle_board' => $modSettings['recycle_board'],
'is_approved' => 1,
)
);
$posts = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
{
// Censor the subject and post for the preview ;).
censorText($row['subject']);
censorText($row['body']);
$row['body'] = strip_tags(strtr(parse_bbc($row['body'], $row['smileys_enabled'], $row['id_msg']), array('<br />' => '')));
if ($smcFunc['strlen']($row['body']) > 128)
$row['body'] = $smcFunc['substr']($row['body'], 0, 128) . '...';
// Build the array.
$posts[] = array(
'board' => array(
'id' => $row['id_board'],
'protected' => in_array($post['board'], $user_info['view_only_boards']), //- View Only Boards MOD-
'name' => $row['board_name'],
'href' => $scripturl . '?board=' . $row['id_board'] . '.0',
'link' => '<a href="' . $scripturl . '?board=' . $row['id_board'] . '.0">' . $row['board_name'] . '</a>'
),
'topic' => $row['id_topic'],
'poster' => array(
'id' => $row['id_member'],
'name' => $row['poster_name'],
'href' => empty($row['id_member']) ? '' : $scripturl . '?action=profile;u=' . $row['id_member'],
'link' => empty($row['id_member']) ? $row['poster_name'] : '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '">' . $row['poster_name'] . '</a>'
),
'subject' => $row['subject'],
'short_subject' => shorten_subject($row['subject'], 24),
'preview' => $row['body'],
'time' => timeformat($row['poster_time']),
'timestamp' => forum_time(true, $row['poster_time']),
'raw_timestamp' => $row['poster_time'],
'href' => $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['id_msg'] . ';topicseen#msg' . $row['id_msg'],
'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['id_msg'] . ';topicseen#msg' . $row['id_msg'] . '" rel="nofollow">' . $row['subject'] . '</a>'
);
}
$smcFunc['db_free_result']($request);
return $posts;
}
// Callback-function for the cache for getLastPosts().
function cache_getLastPosts($latestPostOptions)
{
return array(
'data' => getLastPosts($latestPostOptions),
'expires' => time() + 60,
'post_retri_eval' => '
foreach ($cache_block[\'data\'] as $k => $post)
{
$cache_block[\'data\'][$k][\'time\'] = timeformat($post[\'raw_timestamp\']);
$cache_block[\'data\'][$k][\'timestamp\'] = forum_time(true, $post[\'raw_timestamp\']);
}',
);
}
?>
I was told the error had to do with this line
Quote
'protected' => in_array($post['board'], $user_info['view_only_boards']), //- View Only Boards MOD-
Because $post doesn't exist.
Hi guys
Can anyone verify that this will work on 1.1.8? after i upgraded to smf 1.1.8, the next day my members reported that one of my board is not accessible anymore. i am using global permission and this board is open to all (including guests and members).
i tried downgrading to 1.1.7 and the problem still exists...
used to be fine
pls help!
Confirmed. It works on 1.1.8.
Rudolf, when will be the next update?
can help me with my problem ?
pls refer to http://www.simplemachines.org/community/index.php?topic=295853.new;topicseen#new
Thanks!
I have this mod installed and all is working properly.
However, many members are confused and jealous constantly seeing view only boards in the recent topics list.
Is there a way to exclude view only boards from recent topics and recent posts lists?
My members cannot see the view only boards recent posts and topics.
Is there something you set to do that? Maybe you have an older version of the mod?
Any help here would be much appreciated.
I don;t know.... Rudolf, are you somewhere around? :)
Rudolf, please fix this for us:
'protected' => in_array($post['board'], $user_info['view_only_boards']), //- View Only Boards MOD-
$post doesn't exist.
Is this mod not supported anymore? We might want to make people aware on the mod page.
Mystery, is that a solution to my query or another problem?
Would greatly appreciate any help on this subject. This is almost the perfect mod.
Quote from: Deju on March 17, 2009, 01:32:35 PM
Is this mod not supported anymore? We might want to make people aware on the mod page.
Mystery, is that a solution to my query or another problem?
Would greatly appreciate any help on this subject. This is almost the perfect mod.
Another problem, lol. I edited the post to make more sense now.
after i install this mod i see in log error many errors like this:
8: Undefined index: memberGroupsView
/hsphere/local/home/ladaatne/ladaat.net/forum/new76/Sources/Load.php
659
the line 659 is:
$board_info['groups_view'] = $row['memberGroupsView'] == '' ? array() : explode(',', $row['memberGroupsView']);//-View Only Boards MOD-
bump!
Staff, you may want to change the status of this mod as it definitely does not seem to be supported any longer.
It's a pity :(
Rudolf, please give signs of life. Can i depend on you for the next smf RC2? Will you update your mod.
Rgds
I thought this was already updated:
Quote from: Rudolf on January 11, 2009, 11:45:55 AM
I uploaded the new package which is compatible with both SMF 1 and SMF 2.
The file is View_Only_Boards_1.2a.zip
Uninstall any previous version before installing, and make sure to backup your database and source files.
Not for SMF RC1
If the changes are small I might update, but in general I don't plan update for every beta and RC1 out there.
I'm sure I will update it for SMF 2.0, though.
Hi all.
In the Portuguese support board, a member is having a problem with this MOD, wich I will try to explain.
He is using 1.1.8 and, of course, View Only Boards. After the forum installation the MOD is working fine. After some time and some more MODs, it is no longer working. He cannot tell at wich point did the MOD stopped working, but maybe his MOD list will help you:
1. Signature Settings Mod 1.1
2. Registered Links 1.0
3. sapovideo_bbc_xhtml_1.0 1.0
4. Posting_Announcement 1.1.2
5. SimplePortal 2.1.1
6. Reason For Editing Mod 1.14
7. View Only Boards 1.2
8. YouTube BBCode 2.4
9. Reg Bar 1.0.1
10. Default Avatar 1.1.1
11. Hide SMF Version 1.0.3b
12. SimplePortal - Portuguese 1
13. Spoiler Tag 0.6
14. Referrals Mod 2.0.1
15. Member Color Link 3.0.6
16. Justify BBCode 2.1
He has tried with default theme and the result is the same: it is possible to enter a board and view the topics list but it is not possible to view the topics content.
Any clues?
Thanks!
Quote from: margarett on April 01, 2009, 10:50:00 AM
Hi all.
In the Portuguese support board, a member is having a problem with this MOD, wich I will try to explain.
He is using 1.1.8 and, of course, View Only Boards. After the forum installation the MOD is working fine. After some time and some more MODs, it is no longer working. He cannot tell at wich point did the MOD stopped working, but maybe his MOD list will help you:
1. Signature Settings Mod 1.1
2. Registered Links 1.0
3. sapovideo_bbc_xhtml_1.0 1.0
4. Posting_Announcement 1.1.2
5. SimplePortal 2.1.1
6. Reason For Editing Mod 1.14
7. View Only Boards 1.2
8. YouTube BBCode 2.4
9. Reg Bar 1.0.1
10. Default Avatar 1.1.1
11. Hide SMF Version 1.0.3b
12. SimplePortal - Portuguese 1
13. Spoiler Tag 0.6
14. Referrals Mod 2.0.1
15. Member Color Link 3.0.6
16. Justify BBCode 2.1
He has tried with default theme and the result is the same: it is possible to enter a board and view the topics list but it is not possible to view the topics content.
Any clues?
Thanks!
Help plz =/
Did he tried to uninstall & reinstall?
Yes =/
There is a problem with this mod and the "last post by:...." on the boardindex !
This causes the error log to fill up with arrours about undefinde: last_post
Please advise on how to fix this ;)
Edit: I finally updated my site so i could use this mod and then i found out it is not working with latest version of smf - SMF 2.0 RC1
Any chance for this mod to be updated ?
Quote from: margarett on April 01, 2009, 10:50:00 AM
Hi all.
In the Portuguese support board, a member is having a problem with this MOD, wich I will try to explain.
He is using 1.1.8 and, of course, View Only Boards. After the forum installation the MOD is working fine. After some time and some more MODs, it is no longer working. He cannot tell at wich point did the MOD stopped working, but maybe his MOD list will help you:
1. Signature Settings Mod 1.1
2. Registered Links 1.0
3. sapovideo_bbc_xhtml_1.0 1.0
4. Posting_Announcement 1.1.2
5. SimplePortal 2.1.1
6. Reason For Editing Mod 1.14
7. View Only Boards 1.2
8. YouTube BBCode 2.4
9. Reg Bar 1.0.1
10. Default Avatar 1.1.1
11. Hide SMF Version 1.0.3b
12. SimplePortal - Portuguese 1
13. Spoiler Tag 0.6
14. Referrals Mod 2.0.1
15. Member Color Link 3.0.6
16. Justify BBCode 2.1
He has tried with default theme and the result is the same: it is possible to enter a board and view the topics list but it is not possible to view the topics content.
Any clues?
Thanks!
help Plz..
Solution :-[
Love You, Rudolf!
Quote from: darklord2 on May 01, 2009, 08:36:24 AM
Love You, Rudolf!
What happened? Any new update? :)
Quote from: Amendoim on April 17, 2009, 06:05:10 AM
Quote from: margarett on April 01, 2009, 10:50:00 AM
Hi all.
In the Portuguese support board, a member is having a problem with this MOD, wich I will try to explain.
He is using 1.1.8 and, of course, View Only Boards. After the forum installation the MOD is working fine. After some time and some more MODs, it is no longer working. He cannot tell at wich point did the MOD stopped working, but maybe his MOD list will help you:
1. Signature Settings Mod 1.1
2. Registered Links 1.0
3. sapovideo_bbc_xhtml_1.0 1.0
4. Posting_Announcement 1.1.2
5. SimplePortal 2.1.1
6. Reason For Editing Mod 1.14
7. View Only Boards 1.2
8. YouTube BBCode 2.4
9. Reg Bar 1.0.1
10. Default Avatar 1.1.1
11. Hide SMF Version 1.0.3b
12. SimplePortal - Portuguese 1
13. Spoiler Tag 0.6
14. Referrals Mod 2.0.1
15. Member Color Link 3.0.6
16. Justify BBCode 2.1
He has tried with default theme and the result is the same: it is possible to enter a board and view the topics list but it is not possible to view the topics content.
Any clues?
Thanks!
help Plz..
Solution :-[
Need help :'(
I wish i could help you. There is no support here. Only some updates :) If i was in your position i would pay someone to fix it.
Please Rudolf,
Would it be very hard for you to update this for 2.0 RC1 ?
I think that many many people would love if you took the time to do it. :)
This mod is, in my point of view, the most important mod for any board that uses paid subscription.
This is the best way to show non-subscribers what they will gain access to if they subscribe.
So please - Don't wait for 2.0 final - We are so many RC1 users out here who are looking every day to see if this mod is updated.
Cheers,
Tanks
And as i said before, this mod should be a part of smf 2.0.
the who page is not protected.
any users can view the subject topic.
Quote from: Amendoim on May 02, 2009, 08:44:14 AM
Quote from: Amendoim on April 17, 2009, 06:05:10 AM
Quote from: margarett on April 01, 2009, 10:50:00 AM
Hi all.
In the Portuguese support board, a member is having a problem with this MOD, wich I will try to explain.
He is using 1.1.8 and, of course, View Only Boards. After the forum installation the MOD is working fine. After some time and some more MODs, it is no longer working. He cannot tell at wich point did the MOD stopped working, but maybe his MOD list will help you:
1. Signature Settings Mod 1.1
2. Registered Links 1.0
3. sapovideo_bbc_xhtml_1.0 1.0
4. Posting_Announcement 1.1.2
5. SimplePortal 2.1.1
6. Reason For Editing Mod 1.14
7. View Only Boards 1.2
8. YouTube BBCode 2.4
9. Reg Bar 1.0.1
10. Default Avatar 1.1.1
11. Hide SMF Version 1.0.3b
12. SimplePortal - Portuguese 1
13. Spoiler Tag 0.6
14. Referrals Mod 2.0.1
15. Member Color Link 3.0.6
16. Justify BBCode 2.1
He has tried with default theme and the result is the same: it is possible to enter a board and view the topics list but it is not possible to view the topics content.
Any clues?
Thanks!
help Plz..
Solution :-[
Need help :'(
Help, :(
Hi, how to make Dilber theme to work with this mod? I tried using the parse code but instead it messed the Dilber theme and the protected board didn't came up.
I'm using SMF 1.19.
I really appreciate your help.
hi thanks for this great great mod. i have installed view only board (http://custom.simplemachines.org/mods/index.php?mod=610) Mod. and make visible the private area to guests and regular members. if somebody post in private area it is appearing in board index like " last post by membername and time etc...i wants to show that written as private to members who are not allowed in the board...is there any possibilities ??
thanks
i want to use this for smf 1.1.10 is this safe?
Yes, I use it on my 1.1.10 board. It works quite well.
Is this compatible for smf 1.1.10?
yes
Is there any way of making this use a diferant language string because as a guest it says what i have changed the string to but it also says "Please login below or register an account with Nylons Post." I dont want it to say "Please login below or register an account with Nylons Post."
wondered if you could help im getting an error caused by this mod in the error log this is the error.
Quoteadmin Today at 04:29 pm
94.193.53.247 add1d35217f16bf1fd27a809ce91abab
Type of error: Undefined
http://www.nylons.uk-giveaway.info/index.php (http://www.nylons.uk-giveaway.info/index.php)?
8: Undefined variable: post
File: /home/fv8hmulg/public_html/nylons/Sources/Subs-Recent.php
Line: 77
and this is the bit of code it relates to.
Quote
'protected' => in_array($post['board'], $user_info['view_only_boards']), //- View Only Boards MOD-
Quote from: nay27uk on August 11, 2009, 11:37:36 AM
wondered if you could help im getting an error caused by this mod in the error log this is the error.
Quoteadmin Today at 04:29 pm
94.193.53.247 add1d35217f16bf1fd27a809ce91abab
Type of error: Undefined
http://www.nylons.uk-giveaway.info/index.php (http://www.nylons.uk-giveaway.info/index.php)?
8: Undefined variable: post
File: /home/fv8hmulg/public_html/nylons/Sources/Subs-Recent.php
Line: 77
and this is the bit of code it relates to.
Quote
'protected' => in_array($post['board'], $user_info['view_only_boards']), //- View Only Boards MOD-
I had a similar problem, not the same. NIBOGO (http://www.simplemachines.org/community/index.php?topic=254051.0)fixed it immediately with a very reasonable price. You can pm me.
Quote from: searchgr on August 12, 2009, 06:28:44 AM
Quote from: nay27uk on August 11, 2009, 11:37:36 AM
wondered if you could help im getting an error caused by this mod in the error log this is the error.
Quoteadmin Today at 04:29 pm
94.193.53.247 add1d35217f16bf1fd27a809ce91abab
Type of error: Undefined
http://www.nylons.uk-giveaway.info/index.php (http://www.nylons.uk-giveaway.info/index.php)?
8: Undefined variable: post
File: /home/fv8hmulg/public_html/nylons/Sources/Subs-Recent.php
Line: 77
and this is the bit of code it relates to.
Quote
'protected' => in_array($post['board'], $user_info['view_only_boards']), //- View Only Boards MOD-
I had a similar problem, not the same. NIBOGO (http://www.simplemachines.org/community/index.php?topic=254051.0)fixed it immediately with a very reasonable price. You can pm me.
Hi thanks for the reply but I cant aford to pay
hi Rudolf
i recently installed your mod
and just changed some boards to shown to the guests without show message index option
but the problem is with recent posts, i set the number of recent posts to 10 but they are fewer for guests 6 or 8 or ...
it seems something wrong
is any way of redirect a guest to the post when he try to acess a topic that dont have acess?
I hope to have an update soon :)
The description for this mod says:
Note: The View_Only_Boards_1.2a.zip package is compatible with both SMF 1.1.x and SMF 2. This package is only for compatibility with SMF, it contains no new features for the 1.1.7 version. (emphsis added) I thought this meant that the mod would work with version 2.
I just upgraded to 2.0 RC2 and tried to use package manager to re-install this mod (1.2a) but get multiple error notices. ??? This mod is very important to my forum and I would not have upgraded to 2.0 RC2 if I had known there would be problems.
There are parsing instructions for RC2. If I install this mod manually (which I dread because I am not a coder and don't know this stuff) will it work with RC2?
The mod was tested for 2.0Beta 4 according to the mod page. Until the mod authors have had a chance to make them work with RC2 you are pretty much on your own getting them to work with the new curve theme. It is completely different.
I just noticed a problem. I'm running the mod fine in 2.0 rc1.2, but when when i just created a new board, the last-post column on the forum index is blank for guests. On the other boards it looks as it should but with "Protected" for the boards that guests aren't allowed to enter, but the new board isn't showing anything whether it's allowed to enter for guests or not.
Update: It's apparently because the board was empty.
Any word on this being updated for RC2 ?
I have a site upgrade scheduled for 3 weeks time and this mod is essential to the core site function.
Gaz
please someone to do the update to version 2.0rc2 .. besides being the last, and these Mods are somewhat old, are very good, and it is a throw everything out so .. I look forward to an answer, thanks ;)
Please update this great mod to SMF 2.0 RC2
Considering that it doesn't include any releases from this year at all in the description, I can't see it being set up very soon.
As has been pointed out elsewhere, this can be achieved (with a little more work and perhaps a little more inconvenience) with the View/Enter Board Permissions mod of mine.
I try to find out what are the differences....
This mod simply allows you to set up whether each group can see a board and whether they can enter it.
Mine additionally allows you to forcibly bar a group from a given board, something not possible any other way.
I use this mod. It gives you the ability to set the visibility (see board/boards & topics but cannot read the posts) or accessibility (see board/boards - topics & read posts) for selected membergroups of the forum.
I don't understand what you mean when you say: 'forcibly bar a group from a given board'.
If i'm off topic please move my post to your mod' topic.
It's not really offtopic, it just clarifies the difference.
Right now, say you have 10 boards, and anyone can go in them. One of them is a board that has heated discussions and you want to be able to prevent someone going into that board.
There is no way you can do that with this mod. In fact there is no easy way you can do it in SMF at all, because any one group that the user has in their list of groups (including post count groups) will allow them in. So you'd have to reassign access to potentially every user so that the group that gave folks access to this one board isn't in their profile.
So, by making it a true permission like I did, you can use the deny permission side. Create a group called Troublemakers, say, and all that group needs to have is the board access set to deny. Then it doesn't matter what other groups those users have, they can't get in.
I edited this to work with RC2 I advise you to try it on a test site first.
The author may request you remove that file; I believe he is planning to look at it in a couple of weeks.
Sorry I wasn't using curve on my test site and wasn't getting any errors but when I switched to curve I did, I updated my post with a fixed version.
Any way to make it look like this?
I want the board to be visible but not the topics.
Quote from: Dismal Shadow on December 28, 2009, 03:59:35 AM
Any way to make it look like this?
I want the board to be visible but not the topics.
As you can see it mark as "Private"
Quote from: Dismal Shadow on December 28, 2009, 03:59:35 AM
Any way to make it look like this?
I want the board to be visible but not the topics.
in » Administration » Features and Options » General
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi49.tinypic.com%2F2mpkdae.jpg&hash=2fa4b216be8978135391bdd3986a063cf1ec6b58)
;)
Quote from: Calcricho on December 28, 2009, 04:07:32 AM
Quote from: Dismal Shadow on December 28, 2009, 03:59:35 AM
Any way to make it look like this?
I want the board to be visible but not the topics.
in » Administration » Features and Options » General
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi49.tinypic.com%2F2mpkdae.jpg&hash=2fa4b216be8978135391bdd3986a063cf1ec6b58)
;)
??? I mean topics unviewable, not viewable.
adm-boards- modify- remove access & visibility
Quote from: searchgr on December 28, 2009, 04:18:09 AM
adm-boards- modify- remove access & visibility
Here's my permission:
Pic 1
But when I click "moderator's hideout" it show this, perfect exactly what I want:
Pic 2
But when the topics and posts is viewable outside the board, it should be invisible or at least 'private"
Quote from: smp420 on December 28, 2009, 02:48:14 AM
Sorry I wasn't using curve on my test site and wasn't getting any errors but when I switched to curve I did, I updated my post with a fixed version.
Thanks good job
;)
Bug?
On board the child can not see the last post
Any suggestions?
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi49.tinypic.com%2F34g1vn9.jpg&hash=a36c1fa4d201c80f0e4b4c2c2e0c531121055cc0)
Dismal Shadow, i'm not sure that i understand what you want. If you want this board to be completely invisible for some membergroups you have to remove the visibility too (second column).
Quote from: searchgr on December 28, 2009, 04:52:43 AM
Dismal Shadow, i'm not sure that i understand what you want. If you want this board to be completely invisible for some membergroups you have to remove the visibility too (second column).
The same image of the invisible topic that Calcricho posted above me.
Quote from: searchgr on August 12, 2009, 06:28:44 AM
Quote from: nay27uk on August 11, 2009, 11:37:36 AM
wondered if you could help im getting an error caused by this mod in the error log this is the error.
Quoteadmin Today at 04:29 pm
94.193.53.247 add1d35217f16bf1fd27a809ce91abab
Type of error: Undefined
http://www.nylons.uk-giveaway.info/index.php (http://www.nylons.uk-giveaway.info/index.php)?
8: Undefined variable: post
File: /home/fv8hmulg/public_html/nylons/Sources/Subs-Recent.php
Line: 77
and this is the bit of code it relates to.
Quote
'protected' => in_array($post['board'], $user_info['view_only_boards']), //- View Only Boards MOD-
I had a similar problem, not the same. NIBOGO (http://www.simplemachines.org/community/index.php?topic=254051.0)fixed it immediately with a very reasonable price. You can pm me.
I too have the same problem with the line 77 error on a v2.0 RC1 site - I have been waiting for this mod to be upgraded for RC2 before upgrading the site itself.
Has anyone got a free bug fix for the line 77 problem?
Does the upgrade package, linked in a post a couple of pages back, work on RC2 and without the line 77 error?
C'mon Rudolph, Christmas is over now, Santa doesn't need you for another 12 months, please get this package sorted out and fix the bugs in it as well.
Gaz
try this
'protected' => in_array($row['id_board'], $user_info['view_only_boards']), //- View Only Boards MOD-
Please, could do update to version 2.0rc2?
I am very grateful .. it makes very geito this Mod!
Thanks :)
could b e intersting
Quote from: Calcricho on December 28, 2009, 04:39:10 AM
Bug?
On board the child can not see the last post
Any suggestions?
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi49.tinypic.com%2F34g1vn9.jpg&hash=a36c1fa4d201c80f0e4b4c2c2e0c531121055cc0)
same problem for me but in all section i cant view ...nothing
Quote from: searchgr on December 30, 2009, 12:17:38 AM
try this
'protected' => in_array($row['id_board'], $user_info['view_only_boards']), //- View Only Boards MOD-
Thanks searchgr - that seems to do the trick.
Now I've got another one related to the same mod (it was there before, not caused by your edit, but occurs less regularly than the line 77 did).
From error log -
Quote
8: Undefined index: last_post
File: /home/serveraccount/public_html/board/Sources/Subs-BoardIndex.php
Line: 272
The function from Subs-BoardIndex.php has been modified by the View-Only Boards mod as follows (I've numbered only the two lines inserted by the mod)-
// Provide the href and link.
if ($row_board['subject'] != '')
{
$this_last_post['href'] = $scripturl . '?topic=' . $row_board['id_topic'] . '.msg' . ($user_info['is_guest'] ? $row_board['id_msg'] : $row_board['new_from']) . (empty($row_board['is_read']) ? ';boardseen' : '') . '#new';
$this_last_post['link'] = '<a href="' . $this_last_post['href'] . '" title="' . $row_board['subject'] . '">' . $row_board['short_subject'] . '</a>';
}
else
{
$this_last_post['href'] = '';
$this_last_post['link'] = $txt['not_applicable'];
}
276 // Set the last post in the parent board. //- View Only Boards MOD- modified condition
277 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'])))
$this_category[$isChild ? $row_board['id_parent'] : $row_board['id_board']]['last_post'] = $this_last_post;
// Just in the child...?
if ($isChild)
{
$this_category[$row_board['id_parent']]['children'][$row_board['id_board']]['last_post'] = $this_last_post;
// If there are no posts in this board, it really can't be new...
$this_category[$row_board['id_parent']]['children'][$row_board['id_board']]['new'] &= $row_board['poster_name'] != '';
}
// No last post for this board? It's not new then, is it..?
elseif ($row_board['poster_name'] == '')
$this_category[$row_board['id_board']]['new'] = false;
There's a lot of "last post"s in there - got me baffled good and proper it has.
Gaz
/ Set the last post in the parent board. //- View Only Boards MOD- modified condition
if ($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'])))
$this_category[$isChild ? $row_board['id_parent'] : $row_board['id_board']]['last_post'] = $this_last_post;
Quote from: searchgr on December 30, 2009, 12:17:38 AM
try this
'protected' => in_array($row['id_board'], $user_info['view_only_boards']), //- View Only Boards MOD-
excellent that bug was removed but another bug created look:
Quote8: Undefined index: board
File: /home/crazyzone/data/www/crazyzone.biz/Sources/Subs-Recent.php
Riga: 78
always in same line
'protected' => in_array($post['board'], $user_info['view_only_boards']), //- View Only Boards MOD-you have solution ?
.
// Build the array.
$posts[] = array(
'board' => array(
'id' => $row['id_board'],
'protected' => in_array($row['id_board'], $user_info['view_only_boards']), //- View Only Boards MOD-
'name' => $row['board_name'],
'href' => $scripturl . '?board=' . $row['id_board'] . '.0',
'link' => '<a href="' . $scripturl . '?board=' . $row['id_board'] . '.0">' . $row['board_name'] . '</a>'
searchgr
Forgot to come back and thank you - both those edits did the trick - no more error log entries from the View Only Boards mod
:D
Many thanks
Gaz
welcome guys
Quote from: searchgr on January 03, 2010, 12:42:06 PM
.
// Build the array.
$posts[] = array(
'board' => array(
'id' => $row['id_board'],
'protected' => in_array($row['id_board'], $user_info['view_only_boards']), //- View Only Boards MOD-
'name' => $row['board_name'],
'href' => $scripturl . '?board=' . $row['id_board'] . '.0',
'link' => '<a href="' . $scripturl . '?board=' . $row['id_board'] . '.0">' . $row['board_name'] . '</a>'
great man, thank you very much
edi67, can you tell me which mod are you using in order to change the profile area of your members (in the left side of the posts). You can pm me. I will remove this off topic message after a while.
Quote from: searchgr on January 03, 2010, 02:55:49 PM
edi67, can you tell me which mod are you using in order to change the profile area of your members (in the left side of the posts). You can pm me. I will remove this off topic message after a while.
no one mod i used, i made one modification with my self
Hi, I have this mod in my SMF and it works fine, but in my site visitors have permissions to use the search, but when thy use it, it does not show any result. Is it caused because this mod ?, Can I fix it in any way ?
Thanks.
I search this Mod for SMF2 RC2..... ! Nothing ? Sorry for my Bad English !
Quote from: Acer1 on January 07, 2010, 03:35:25 PM
I search this Mod for SMF2 RC2..... ! Nothing ? Sorry for my Bad English !
http://www.simplemachines.org/community/index.php?topic=146964.msg2424309#msg2424309 :)
I have a Phase Error !
It is working, can not Update the MOD officially tested?
Thank staff :)
hi thanks for this great mod
i got a question or problem with it since installed and put to work almost all childboards from some groups in my forum apear ni red
http://tinypic.com/r/11sm4r6/6
why and how can i fox this and thanks
Quote from: sombra on January 10, 2010, 04:22:48 PM
hi thanks for this great mod
i got a question or problem with it since installed and put to work almost all childboards from some groups in my forum apear ni red
http://tinypic.com/r/11sm4r6/6
why and how can i fox this and thanks
Scroll to bottom of main forum index and click the button marked "Mark all topics as read" - they'll change back to default colour, and change to red when a new post or topic is added.
(How to use SMF 101 refers)
;)
Gaz
The Phase Error is : style.css not found.
I have the default Theme RC2
Quote from: Acer1 on January 14, 2010, 05:46:23 PM
The Phase Error is : style.css not found.
I have the default Theme RC2
Update to version 2.0 RC2 :-\
Can someone Help ??? Please !!!!! The Mod is not working for RC2
style.css not found ist the Errormessage !
Follow the instructions from here (http://www.simplemachines.org/community/index.php?topic=146964.msg2424309#msg2424309)
Please give the full error message including the full file path stated for style.css
This mod works perfectly on my site with DEFAULT Curve theme for SMF 2.0 RC2
Are you SURE you're using the default theme and not a custom theme, or a copy of the default for customising?
./Themes/default/style.css not found is the Error !
style.css is a 1.1.x file. Might be you're looking at the wrong version of the mod somehow?
I have: View_Only_Boards_2.0RC2.zip from here :http://www.simplemachines.org/community/index.php?topic=146964.msg2424309#msg2424309 (http://www.simplemachines.org/community/index.php?topic=146964.msg2424309#msg2424309)
I fixed it. I wish the mod author would update this mod.
Now the Mod install is ok.. only when i go at guest i can´t see the protected message. whats wrong ? In a testing forum with 1.1.11 the mod ist perfekt work ..... Sorry for my Bad english !
I tried installing View_Only_Boards_2.0RC2.zip and i got error message:
Database Error
Table 'scenenetwork.smf_boards' doesn't exist
File: /home/content/a/l/e/alexp/html/forum/Packages/temp/DB_2_x.php
Line: 18
The changes in the RC2 installer were not done properly.
Substitute the following into DB_2_x.php in the installer zip file.
<?php
/***********************************************************************
View Only Boards MOD - version 1.2
This file makes the necessary changes in the database.
***********************************************************************/
if (!defined('SMF'))
die('<b>Error:</b> Cannot install - please verify you put this in the same place as SMF\'s index.php.');
vob_install();
// Used to avoid collision with variables in the global scope...
function vob_install()
{
global $smcFunc;
db_extend('packages');
$table_columns = $smcFunc['db_list_columns']('{db_prefix}boards');
// The column exists so there's nothing to do here ...
if (in_array('member_groups_view', $table_columns))
return;
$vob_column = array(
'name' => 'member_groups_view',
'type' => 'varchar',
'size' => 255,
);
// Are we upgrading from smf 1.x?
if (in_array('memberGroupsView', $table_columns))
return $smcFunc['db_change_column']('{db_prefix}boards', 'memberGroupsView', $vob_column);
// Add the column the new column
return $smcFunc['db_add_column']('{db_prefix}boards', $vob_column, null, 'skip_if_exists');
}
?>
wow, thank you so much Arantor!! It worked! Attached is the proper working version of the mod.
Many thanks, just what I was looking for, worked a treat :)
Quote from: Dismal Shadow on January 07, 2010, 03:40:32 PM
Quote from: Acer1 on January 07, 2010, 03:35:25 PM
I search this Mod for SMF2 RC2..... ! Nothing ? Sorry for my Bad English !
http://www.simplemachines.org/community/index.php?topic=146964.msg2424309#msg2424309 :)
Some of theme changes are missing in this patch compared to original one.
For example, BoardIndex.template.php is not modified.
RC3 update in the near future? Thanks
It hasn't been updated to even RC1, putting it over a year old... I wouldn't hold your breath for an RC3 update.
Quote from: Arantor on March 11, 2010, 03:05:46 PM
It hasn't been updated to even RC1, putting it over a year old... I wouldn't hold your breath for an RC3 update.
There is an update to RC2 a few posts back which I was using, so there is hope ;)
Not an official one by the author, though...
Hi all,
I'm looking into updating and fixing the mod for SMF2.
Still don't hold your breath. It would take some weeks. :(
Regards,
Rudolf
Thanks a lot for this update!
running in RC3 ;D
How to make it work in RC3 version:
1. Download the attached file
2. Install it you will get error message in ManageBoards.template.php
3. Edit your ManageBoards.template.php
Find: // List all the membergroups so the user can choose who may access this board.
foreach ($context['groups'] as $group)
echo '
<label for="groups_', $group['id'], '">
<input type="checkbox" name="groups[]" value="', $group['id'], '" id="groups_', $group['id'], '"', $group['checked'] ? ' checked="checked"' : '', ' class="input_check" />
<span', $group['is_post_group'] ? ' class="post_group" title="' . $txt['mboards_groups_post_group'] . '"' : '', $group['id'] == 0 ? ' class="regular_members" title="' . $txt['mboards_groups_regular_members'] . '"' : '', '>
', $group['name'], '
</span>
</label><br />';
echo '
<em>', $txt['check_all'], '</em> <input type="checkbox" class="input_check" onclick="invertAll(this, this.form, \'groups[]\');" /><br />
<br />
</dd>';
Replace with: // List all the membergroups so the user can choose who may access this board.
foreach ($context['groups'] as $group)
echo '
<input type="checkbox" name="groups[]" value="', $group['id'], '" id="groups_', $group['id'], '"', $group['checked'] ? ' checked="checked"' : '', ' /> <input type="checkbox" name="groupsView[]" value="', $group['id'], '" id="groupsView_', $group['id'], '"', $group['view'] ? ' checked="checked"' : '', ' /> <label for="groups_', $group['id'], '"><span', $group['is_post_group'] ? ' style="border-bottom: 1px dotted;" title="' . $txt['mboards_groups_post_group'] . '"' : '', '>', $group['name'], '</span></label><br />';
echo '
<em>', $txt['check_all'], '</em> <input type="checkbox" class="input_check" onclick="invertAll(this, this.form, \'groups[]\');" /><br />
<br />
</dd>';
4. Enjoy!
Quote from: scenerip2k on June 28, 2010, 01:51:04 AM
How to make it work in RC3 version:
1. Download the attached file
2. Install it you will get error message in ManageBoards.template.php
3. Edit your ManageBoards.template.php
Thanks
Cal ;)
Quote from: scenerip2k on June 28, 2010, 01:51:04 AM
How to make it work in RC3 version:
1. Download the attached file
2. Install it you will get error message in ManageBoards.template.php
3. Edit your ManageBoards.template.php
Find: // List all the membergroups so the user can choose who may access this board.
foreach ($context['groups'] as $group)
echo '
<label for="groups_', $group['id'], '">
<input type="checkbox" name="groups[]" value="', $group['id'], '" id="groups_', $group['id'], '"', $group['checked'] ? ' checked="checked"' : '', ' class="input_check" />
<span', $group['is_post_group'] ? ' class="post_group" title="' . $txt['mboards_groups_post_group'] . '"' : '', $group['id'] == 0 ? ' class="regular_members" title="' . $txt['mboards_groups_regular_members'] . '"' : '', '>
', $group['name'], '
</span>
</label><br />';
echo '
<em>', $txt['check_all'], '</em> <input type="checkbox" class="input_check" onclick="invertAll(this, this.form, \'groups[]\');" /><br />
<br />
</dd>';
Replace with: // List all the membergroups so the user can choose who may access this board.
foreach ($context['groups'] as $group)
echo '
<input type="checkbox" name="groups[]" value="', $group['id'], '" id="groups_', $group['id'], '"', $group['checked'] ? ' checked="checked"' : '', ' /> <input type="checkbox" name="groupsView[]" value="', $group['id'], '" id="groupsView_', $group['id'], '"', $group['view'] ? ' checked="checked"' : '', ' /> <label for="groups_', $group['id'], '"><span', $group['is_post_group'] ? ' style="border-bottom: 1px dotted;" title="' . $txt['mboards_groups_post_group'] . '"' : '', '>', $group['name'], '</span></label><br />';
echo '
<em>', $txt['check_all'], '</em> <input type="checkbox" class="input_check" onclick="invertAll(this, this.form, \'groups[]\');" /><br />
<br />
</dd>';
4. Enjoy!
it's working or not please reply ....
yeah its working if you follow the steps properly
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi48.tinypic.com%2F14e409d.gif&hash=92da372ac2a0fda2c57b7e99aa72342d2454c0f4)
Quote from: scenerip2k on June 28, 2010, 01:51:04 AM
How to make it work in RC3 version:
1. Download the attached file
2. Install it you will get error message in ManageBoards.template.php
3. Edit your ManageBoards.template.php
Find: // List all the membergroups so the user can choose who may access this board.
foreach ($context['groups'] as $group)
echo '
<label for="groups_', $group['id'], '">
<input type="checkbox" name="groups[]" value="', $group['id'], '" id="groups_', $group['id'], '"', $group['checked'] ? ' checked="checked"' : '', ' class="input_check" />
<span', $group['is_post_group'] ? ' class="post_group" title="' . $txt['mboards_groups_post_group'] . '"' : '', $group['id'] == 0 ? ' class="regular_members" title="' . $txt['mboards_groups_regular_members'] . '"' : '', '>
', $group['name'], '
</span>
</label><br />';
echo '
<em>', $txt['check_all'], '</em> <input type="checkbox" class="input_check" onclick="invertAll(this, this.form, \'groups[]\');" /><br />
<br />
</dd>';
Replace with: // List all the membergroups so the user can choose who may access this board.
foreach ($context['groups'] as $group)
echo '
<input type="checkbox" name="groups[]" value="', $group['id'], '" id="groups_', $group['id'], '"', $group['checked'] ? ' checked="checked"' : '', ' /> <input type="checkbox" name="groupsView[]" value="', $group['id'], '" id="groupsView_', $group['id'], '"', $group['view'] ? ' checked="checked"' : '', ' /> <label for="groups_', $group['id'], '"><span', $group['is_post_group'] ? ' style="border-bottom: 1px dotted;" title="' . $txt['mboards_groups_post_group'] . '"' : '', '>', $group['name'], '</span></label><br />';
echo '
<em>', $txt['check_all'], '</em> <input type="checkbox" class="input_check" onclick="invertAll(this, this.form, \'groups[]\');" /><br />
<br />
</dd>';
4. Enjoy!
this code is not there in my Themes/default/BoardIndex.template.php please check once
Quote from: jaisi on July 06, 2010, 09:03:39 AM
Quote from: scenerip2k on June 28, 2010, 01:51:04 AM
How to make it work in RC3 version:
1. Download the attached file
2. Install it you will get error message in ManageBoards.template.php
3. Edit your ManageBoards.template.php
Find: // List all the membergroups so the user can choose who may access this board.
foreach ($context['groups'] as $group)
echo '
<label for="groups_', $group['id'], '">
<input type="checkbox" name="groups[]" value="', $group['id'], '" id="groups_', $group['id'], '"', $group['checked'] ? ' checked="checked"' : '', ' class="input_check" />
<span', $group['is_post_group'] ? ' class="post_group" title="' . $txt['mboards_groups_post_group'] . '"' : '', $group['id'] == 0 ? ' class="regular_members" title="' . $txt['mboards_groups_regular_members'] . '"' : '', '>
', $group['name'], '
</span>
</label><br />';
echo '
<em>', $txt['check_all'], '</em> <input type="checkbox" class="input_check" onclick="invertAll(this, this.form, \'groups[]\');" /><br />
<br />
</dd>';
Replace with: // List all the membergroups so the user can choose who may access this board.
foreach ($context['groups'] as $group)
echo '
<input type="checkbox" name="groups[]" value="', $group['id'], '" id="groups_', $group['id'], '"', $group['checked'] ? ' checked="checked"' : '', ' /> <input type="checkbox" name="groupsView[]" value="', $group['id'], '" id="groupsView_', $group['id'], '"', $group['view'] ? ' checked="checked"' : '', ' /> <label for="groups_', $group['id'], '"><span', $group['is_post_group'] ? ' style="border-bottom: 1px dotted;" title="' . $txt['mboards_groups_post_group'] . '"' : '', '>', $group['name'], '</span></label><br />';
echo '
<em>', $txt['check_all'], '</em> <input type="checkbox" class="input_check" onclick="invertAll(this, this.form, \'groups[]\');" /><br />
<br />
</dd>';
4. Enjoy!
this code is not there in my Themes/default/BoardIndex.template.php please check once
I edited the code for you.
Here is how i did it. I installed the mod from scenerip2k's attachment above and then i proceeded to install it even thought it gave me an error. I then edited the file after installation. Is that correct?
Also, it would be great if someone could add a "check all" box for the visibility as well. :)
Thanks everyone for the great work!
Quote from: Rudolf on May 20, 2007, 03:47:09 PM
In Errors.english.php
$txt['topic_gone'] = 'The topic or board you are looking for appears to be either missing or off limits to you.';
I love this mod. I also modified the errors.php message pointed out above to what I want it to say. However, I would also like to add a link to this error message that would direct members to a page such as FAQ's or some such to explain more in detail how the mod works and which boards are accessible to which membergroups.
IS this possible? If so, how do I go about doing it?
Good idea!
Does anyone know how to add a link?
Quote from: scenerip2k on June 28, 2010, 01:51:04 AM
3. Edit your ManageBoards.template.php
I have fixed that so you don't need to edit. Modified file is attached.
EDITED: Attachement removed. Please use this one: http://www.simplemachines.org/community/index.php?topic=146964.msg2734095#msg2734095
There is a bug with the 2.0 RC3 version. If the option to list all recent posts is enabled, it will list all the latest posts, even if some of the posts are in boards which have been set to invisible and/or inaccessible to guests.
Quote from: sharks on August 06, 2010, 12:02:08 PM
There is a bug with the 2.0 RC3 version. If the option to list all recent posts is enabled, it will list all the latest posts, even if some of the posts are in boards which have been set to invisible and/or inaccessible to guests.
I agree with you sharks. I have made some effort to check and (I think I had) fixed it. Please try and see how it goes. It is working on my site.
EDITED: Attached mod refixed due the error reported by sharks.
In the boards set to visible only, but not accessible, normally, on the board index, you should see this:
Last post by Protected
in Protected
but instead, i still see the actual last post and the last topic, which should both not be visible.
Quote from: sharks on August 07, 2010, 10:58:37 AM
In the boards set to visible only, but not accessible, normally, on the board index, you should see this:
Last post by Protected
in Protected
but instead, i still see the actual last post and the last topic, which should both not be visible.
What you are saying does not make sense to me. If the board is visible, the topic is also visible but not accessible. If the board is not accessible and not visible then it would not show, at all.
i have also installed it this is very useful thing its works fine in my forum
Quote from: ahrasis on August 07, 2010, 11:17:21 AM
Quote from: sharks on August 07, 2010, 10:58:37 AM
In the boards set to visible only, but not accessible, normally, on the board index, you should see this:
Last post by Protected
in Protected
but instead, i still see the actual last post and the last topic, which should both not be visible.
What you are saying does not make sense to me. If the board is visible, the topic is also visible but not accessible. If the board is not accessible and not visible then it would not show, at all.
But that's the way it works when installed in SMF 1.1.11
I would expect it to behave the same way in SMF 2.0 RC3.
And v2 still does not fix the problem with posts appearing in the recent posts list on the index forum page, when some board has been set to visible only, but not accessible. Try it out on SMF 1.1.11 and you will see the differences of what i mean.
Here is what i see in Features and Options on SMF 1.1.11
Allow guests to browse the forum (checked)
Show the message index for "view only" boards (unchecked)
Both options also exist in SMF 2.0 RC3 but the second option does not work 100%. If unchecked, that second option should "protect" the last topic title and last post in the visible-only board. That's the way it works on SMF 1.1.11
Yes. It doesn't work similarly to 1.1.x. The name is clearly view only board which means the board can be made viewable or otherwise the default accessible (of course viewable) or not.
It does not protect the post access but it protects board access. So it is possible to list all this board topics and posts, recent or otherwise, without users being able to access when it is set to view only.
Bad News:
My 2.0 RC3 forum's error log is flooding like crazy right now, after installing v2. I get these 2 errors repeatedly.
8: Undefined variable: post
Only show the errors from this file
File: /home/user/sharks/Sources/Subs-Recent.php
Line: 84
8: Undefined index: ID_BOARD
Only show the errors from this file
File: /home/user/sharks/Sources/Subs-Recent.php
Line: 76
Quote from: sharks on August 07, 2010, 11:46:59 AM
Bad News:
My 2.0 RC3 forum's error log is flooding like crazy right now, after installing v2. I get these 2 errors repeatedly.
8: Undefined variable: post
Only show the errors from this file
File: /home/user/sharks/Sources/Subs-Recent.php
Line: 84
8: Undefined index: ID_BOARD
Only show the errors from this file
File: /home/user/sharks/Sources/Subs-Recent.php
Line: 76
Can your post from 10 lines before line 76 and 10 lines after line 84 in your Subs-Recent.php so I can check it?
It happens to all members when logged in and when guests are also browsing the boards. Help!
Quote from: sharks on August 07, 2010, 11:52:20 AM
It happens to all members when logged in and when guests are also browsing the boards. Help!
Can your post from 10 lines before line 76 and 10 lines after line 84 in your Subs-Recent.php so I can check it?
Btw, looking from ID_BOARD, you might have old code (not fully have clean uninstall from previous mod) before installing the one above. There is no ID_BOARD in the code.
I just uploaded my Subs-Recent.php. Find it attached to this post.
Quote from: ahrasis on August 07, 2010, 11:54:14 AM
Btw, looking from ID_BOARD, you might have old code (not fully have clean uninstall from previous mod) before installing the one above. There is no ID_BOARD in the code.
What should i edit then? I have tried to execute a clean uninstall, but the previous mod was a forced installation to begin with, so it messed up my code.
Here is the code part you requested:
// Find all the posts. Newer ones will have higher IDs. (assuming the last 20 * number are accessable...)
// !!!SLOW This query is now slow, NEEDS to be fixed. Maybe break into two?
$request = $smcFunc['db_query']('substring', '
SELECT
m.poster_time, m.subject, m.id_topic, m.id_member, m.id_msg,
IFNULL(mem.real_name, m.poster_name) AS poster_name, t.id_board, b.name AS board_name,
SUBSTRING(m.body, 1, 385) AS body, m.smileys_enabled
FROM {db_prefix}messages AS m
INNER JOIN {db_prefix}topics AS t ON (t.id_topic = m.id_topic)
INNER JOIN {db_prefix}boards AS b ON (b.id_board = t.id_board)
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.id_member)
WHERE m.id_msg >= {int:likely_max_msg}' .
(!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? '
AND b.id_board != {int:recycle_board}' : '') . '
AND {query_wanna_see_board}' . ($modSettings['postmod_active'] ? '
AND t.approved = {int:is_approved}
AND m.approved = {int:is_approved}' : '') . '
ORDER BY m.id_msg DESC
LIMIT ' . $latestPostOptions['number_posts'],
array(
'likely_max_msg' => max(0, $modSettings['maxMsgID'] - 50 * $latestPostOptions['number_posts']),
'recycle_board' => $modSettings['recycle_board'],
'is_approved' => 1,
)
);
$posts = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
{
// Censor the subject and post for the preview ;).
censorText($row['subject']);
censorText($row['body']);
$row['body'] = strip_tags(strtr(parse_bbc($row['body'], $row['smileys_enabled'], $row['id_msg']), array('<br />' => '')));
if ($smcFunc['strlen']($row['body']) > 128)
$row['body'] = $smcFunc['substr']($row['body'], 0, 128) . '...';
//- View Only Boards MOD- START
// Do not show protected topics
if (empty($modSettings['vob_allowMessageIndexView']) && in_array($row['ID_BOARD'],$user_info['view_only_boards']))
continue;
//- View Only Boards MOD- END
// Build the array.
$posts[] = array(
'board' => array(
'id' => $row['id_board'],
'protected' => in_array($post['board'], $user_info['view_only_boards']), //- View Only Boards MOD-
'name' => $row['board_name'],
'href' => $scripturl . '?board=' . $row['id_board'] . '.0',
'link' => '<a href="' . $scripturl . '?board=' . $row['id_board'] . '.0">' . $row['board_name'] . '</a>'
),
'topic' => $row['id_topic'],
'poster' => array(
'id' => $row['id_member'],
'name' => $row['poster_name'],
'href' => empty($row['id_member']) ? '' : $scripturl . '?action=profile;u=' . $row['id_member'],
'link' => empty($row['id_member']) ? $row['poster_name'] : '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '">' . $row['poster_name'] . '</a>'
),
'subject' => $row['subject'],
'short_subject' => shorten_subject($row['subject'], 24),
'preview' => $row['body'],
'time' => timeformat($row['poster_time']),
'timestamp' => forum_time(true, $row['poster_time']),
'raw_timestamp' => $row['poster_time'],
'href' => $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['id_msg'] . ';topicseen#msg' . $row['id_msg'],
'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['id_msg'] . ';topicseen#msg' . $row['id_msg'] . '" rel="nofollow">' . $row['subject'] . '</a>'
);
}
$smcFunc['db_free_result']($request);
return $posts;
}
// Callback-function for the cache for getLastPosts().
There is too much error flooding and it is causing some spikes in server load.
I will have to remove your mod until it is stable. Too bad, it looked useful.
I advise everyone to stick to the old code, until this one is properly fixed, otherwise you'll break your forum.
Quote from: sharks on August 07, 2010, 12:07:41 PM
if (empty($modSettings['vob_allowMessageIndexView']) && in_array($row['ID_BOARD'],$user_info['view_only_boards']))
This should be not be in capital ID_BOARD but lower id_board.
if (empty($modSettings['vob_allowMessageIndexView']) && in_array($row['id_board'],$user_info['view_only_boards']))
Sorry, I didn't see this. Do uninstall the mod. I'll try to fix the mod right away.
I've fixed the ID_BOARD to id_board in the mod and already updated the attached mod in that post http://www.simplemachines.org/community/index.php?topic=146964.msg2734095#msg2734095
I have installed your v2 fixed mod, but still getting this error repeatedly.
8: Undefined variable: post
Only show the errors from this file
File: /home/user/sharks/Sources/Subs-Recent.php
Line: 84
Quote from: sharks on August 07, 2010, 12:27:44 PM
I have installed your v2 fixed mod, but still getting this error repeatedly.
8: Undefined variable: post
Only show the errors from this file
File: /home/user/sharks/Sources/Subs-Recent.php
Line: 84
I am actually trying to see what is causing that. I have tested the mod without having the same problem. I am looking at it now.
Alright. Got it. I updated the refixed copy on that post. Sorry, for the trouble. Just merely trying to help.
I tested the v2 re-fixed version and there are no errors. And no need for apologies, your efforts are very much appreciated. :)
Great job!
Unfortunately, i have spoken too soon. :(
I am still using SMF 2.0 RC3 with default theme. Here is the error that keeps showing up when my members use the unread feature:
http://forum.org/index.php?action=unread
8: Undefined index: protected
File: /home/user/sharks/Themes/default/Recent.template.php (unread sub template - eval?)
Line: 159
I use this on my old forum which is running 1.1.11 and have used this mod for a long time, I would like to use it on my RC3, but there doesn't seem to be a compatible version, is there going to be one?
Quote from: sparky33 on August 26, 2010, 10:22:01 AM
I use this on my old forum which is running 1.1.11 and have used this mod for a long time, I would like to use it on my RC3, but there doesn't seem to be a compatible version, is there going to be one?
Download the RC3 version from here, as attachment:
http://www.simplemachines.org/community/index.php?topic=146964.msg2734095#msg2734095
But like i have said in my previous reply above, there is one minor bug yet to be fixed.
Thanks for the quick reply, I had seen that one but wasn't sure if it was safe to use yet
Have you tried this?
Quote from: searchgr on December 30, 2009, 12:17:38 AM
try this
'protected' => in_array($row['id_board'], $user_info['view_only_boards']), //- View Only Boards MOD-
Is that a fix for the error? If so, where does it go?
Hi sparky33
Yes, as far as safety is involved, yes the attachment is OK, but it also generates a few errors as mentioned before. I am already using it on my SMF 2.0 RC3 forum and it works as it should, though missing a few minor options from the SMF 1.1.11 version.
No idea about fixing that error. Have to wait until someone more knowledgeable stops by this thread. :)
One thing I noticed, if guests are allowed to see the forum statistcs, they can see the title of "protected" topics.
Seeing titles of topics but not the content is the point isn't it?
Quote from: sharks on August 18, 2010, 11:48:05 AM
Unfortunately, i have spoken too soon. :(
I am still using SMF 2.0 RC3 with default theme. Here is the error that keeps showing up when my members use the unread feature:
http://forum.org/index.php?action=unread
8: Undefined index: protected
File: /home/user/sharks/Themes/default/Recent.template.php (unread sub template - eval?)
Line: 159
I'll check this soonest.
Quote from: sparky33 on September 11, 2010, 12:38:56 PM
Seeing titles of topics but not the content is the point isn't it?
I have to agree with sparky33 on this. This mod name is view only board if anyone cares.
just booking marking to wait for the fix ;D
I truly wish SMF would implement this mod as an actual feature of SMF.
Though they must have some form of it because of the Charter member section? (Unless that isn't visible to non-Charters.)
the charter board isnt visible to us non-charter folks :)
Quote from: Spoogs on October 01, 2010, 11:43:28 PM
the charter board isnt visible to us non-charter folks :)
Oh. Dang.
TY for the 411, Spoogs. :)
Quote from: Krysia on October 01, 2010, 11:36:49 PM
I truly wish SMF would implement this mod as an actual feature of SMF.
You are not alone.
Quote from: ahrasis on August 06, 2010, 02:21:49 PM
Quote from: sharks on August 06, 2010, 12:02:08 PM
There is a bug with the 2.0 RC3 version. If the option to list all recent posts is enabled, it will list all the latest posts, even if some of the posts are in boards which have been set to invisible and/or inaccessible to guests.
I agree with you sharks. I have made some effort to check and (I think I had) fixed it. Please try and see how it goes. It is working on my site.
EDITED: Attached mod refixed due the error reported by sharks.
hi, i downoad this mod, but dont see last post in my sub forum:
http://gamersite.pl/targowisko/#top
or
http://gamersite.pl/playstation-3/#top
ref...
Wow this is a great MOD, definitely encourages users to join because they can see it is a active forum.
I also have a similar issue that others have reported. If you would mind helping me as well, below is the error and code.
I installed View_Only_Boards_2.0RC3_v2_refixed.zip
8: Undefined index: protected
File: /homepages/7/d162731726/htdocs/forum/Themes/default/Recent.template.php (eval?)
Line: 162
Line 162 is the second line below.
echo '
<tr ', $topic['board']['protected'] ? 'class="vob_protected"' : '' ,'>
<td class="', $color_class, ' icon1 windowbg">
<img src="', $settings['images_url'], '/topic/', $topic['class'], '.gif" alt="" />
</td>
<td class="', $color_class, ' icon2 windowbg">
<img src="', $topic['first_post']['icon_url'], '" alt="" />
</td>
<td class="subject ', $color_class2, ' windowbg2">
<div>
', $topic['is_sticky'] ? '<strong>' : '', '<span id="msg_' . $topic['first_post']['id'] . '">', $topic['first_post']['link'], '</span>', $topic['is_sticky'] ? '</strong>' : '' ,'
<a href="', $topic['new_href'], '" id="newicon', $topic['first_post']['id'], '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a>
<p>
', $txt['in'], ' <em>', $topic['board']['link'], '</em>
<small id="pages', $topic['first_post']['id'], '">', $topic['pages'], '</small>
</p>
</div>
</td>
<td class="stats windowbg ', $color_class, '">
', $topic['first_post']['member']['link'],'
</td>
<td class="', $color_class, ' stats windowbg">
', $topic['replies'], ' ', $txt['replies'], '
<br />
', $topic['views'], ' ', $txt['views'], '
</td>
<td class="', $color_class2, ' lastpost windowbg2">
<a href="', $topic['last_post']['href'], '"><img src="', $settings['images_url'], '/icons/last_post.gif" alt="', $txt['last_post'], '" title="', $txt['last_post'], '" style="float: right;" /></a>
', $topic['last_post']['time'], '<br />
', $txt['by'], ' ', $topic['last_post']['member']['link'], '
</td>';
if ($showCheckboxes)
I can't seem to figure this as yet but if anyone find a solution please feel free to post/share it here.
Quote from: ahrasis on October 23, 2010, 06:03:43 AM
I can't seem to figure this as yet but if anyone find a solution please feel free to post/share it here.
Thanks for trying.
Is there anyone willing to take a crack at this?
Any time someone clicks Show Unread Posts Since Last Visit we get this message in the error log.
http://www.SomeDomain.org/index.php?action=unread8: Undefined index: protectedFile: /homepages/7/d162731726/htdocs/forum/Themes/default/Recent.template.php (eval?)
Line: 162
Line 162 is in previous post.
Thanks
8: Undefined index: protectedFile
The line 162 is correct. The problem is that the 'protected' is undefined.
I have the mod but is slightly different than yours.
Quote from: searchgr on October 31, 2010, 01:39:37 AM
8: Undefined index: protectedFile
The line 162 is correct. The problem is that the 'protected' is undefined.
I have the mod but is slightly different than yours.
Do you know how I could fix that?
Any chance the author of this mod is going to update it for RC4 please?
You can try this one for 2.0 RC4. I only did an update for 2.0 RC4. No update for bug reported by Sharks as I cannot replicate that on my test forum. For 2.0 RC3 and 1.1.x do refer to the previous version as it is not included herein.
Quote from: ahrasis on November 14, 2010, 09:35:16 AM
You can try this one for 2.0 RC4. I only did an update for 2.0 RC4. No update for bug reported by Sharks as I cannot replicate that on my test forum. For 2.0 RC3 and 1.1.x do refer to the previous version as it is not included herein.
Many thanks for that - just tried it and it worked perfectly with no other mods installed.
Glad it works for you.
Quote from: ahrasis on November 14, 2010, 09:35:16 AM
You can try this one for 2.0 RC4. I only did an update for 2.0 RC4. No update for bug reported by Sharks as I cannot replicate that on my test forum. For 2.0 RC3 and 1.1.x do refer to the previous version as it is not included herein.
I have these errors in the error log:
http://...../board/index.php?
2: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument
File: ......./board/Sources/Subs-BoardIndex.php
Line: 244
http://...../board/index.php?
8: Undefined index: view_only_boards
File: ...../Root/board/Sources/Subs-BoardIndex.php
Line: 244
These two errors is repeated through lots of pages.
UpdateThese errors are generated only for admin users, for regular members, mods and global mods are not. I do not understand why. On my RC3 forum it worked fine without these errors. :-\ Is there a solution for this?
I am looking into it but have no solution as yet. It seems that database changes in RC4 might have caused this. I am also able to replicate the bugs reported by Sharks and am trying to remove that problem too. Whichever resolve first will be posted here.
Quote from: sharks on August 18, 2010, 11:48:05 AM
I am still using SMF 2.0 RC3 with default theme. Here is the error that keeps showing up when my members use the unread feature:
http://forum.org/index.php?action=unread
8: Undefined index: protected
File: /home/user/sharks/Themes/default/Recent.template.php (unread sub template - eval?)
Line: 159
Sharks, (I think) I might have refixed the bug for RC3. (however, I am still finding for solutions for bugs in RC4.) I am attaching the fixed for RC3 (v3) here. Please try and see whether you can reproduced the same bugs. If not, if have been properly removed then. I just need time to understand what RC4 database changes are and how to deal with that changes for this mod.
Sorry, didn't fix the problem for me. Not sure if this helps but it only pops there error if there are unread messages on the forum. If the search returns no unread messages then there is no error.
Can you provide some details lazylivin?
hi i got a error in rc4 to loads of them lol
Apply Filter: Only show the error messages of this URL
http://www.r1-yzf1000.co.uk/index.php?
Apply Filter: Only show the errors with the same message
8: Undefined index: view_only_boards
Apply Filter: Only show the errors from this file
File: /homepages/16/d292974422/htdocs/forum/Sources/Subs-BoardIndex.php
Line: 254
==>254:
'protected' => in_array($row_board['id_board'],$user_info['view_only_boards']), //- View Only Boards MOD-
if i knew what it meant lol
I don't recommend this mod on RC4. Too much bugs. I only use it on RC3.
Quote from: searchgr on May 06, 2009, 03:12:27 AM
And as i said before, this mod should be a part of smf 2.0.
By the way, where is the author? So much busy? Is this an abandoned mod? When the smf team will decide to integrate it?
Well, the team aren't going to integrate it for 2.0. I don't know if they have any plans to do so for 2.1 or beyond either.
Mod appears to be abandoned. Author probably has better things to do with his time.
If the author does not appear one month after the release of the final version of smf, i will give you this mod by email.
I don't need this mod updated, thanks ;)
In any case you can't redistribute someone's work without their permission, and I don't see anywhere it says the mod can be redistributed without asking. It's rude, not to mention infringing their copyright.
Of course i will ask the author first.
It has been decided that this mod will not be integrated with SMF. It will stay as a mod. There is another mod similar to this. Look but not read or something. That mod is updated if I'm not mistaken. Do search.
Quote from: ahrasis on December 24, 2010, 10:42:20 PM
It has been decided that this mod will not be integrated with SMF. It will stay as a mod. There is another mod similar to this. Look but not read or something. That mod is updated if I'm not mistaken. Do search.
phpBB has this feature integrated in its core and it has proven to be extremely popular. That's actually one of the reasons why i would have shifted to phpBB if i didn't find this crucial mod among some others.
It doesn't matter what other mods are integrated in other packages. Other packages, for example, come with a method of allowing admins to view user PMs but I can guarantee it'll never be in the core SMF.
The team, last I checked, were not interested in making this part of SMF itself, I don't see any reason for that to change.
I have no further comment on this. Wait till 2.0 gold and we'll see how it goes from there. Many mod authors also is on wait and see too...
Amen (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.katzy.dsl.pipex.com%2FSmileys%2Famen.gif&hash=9f7c7200a6022f41be2c0231547b7cc9cb0ab4af)
Warning :(
Edit: Someone please send me a memory upgrade. The test forum is 2.0
I installed the mod with no errors on install on my test forum.
The sources/subs-boardindex error still occurs.
suggestion - view only boards' "status" (like there's one for No New Posts, New Posts, and Redirect Boards), is "Locked", it looks like either No New Posts or New Posts but has a lock on it. it's like what phpbb3 has, locked forums
I have one question.
Is there someone who get this mod work with 1.1.14?
Can someone to update this mod for 2.0 RC5 ?
I'm stuck without this mod, I must use ban because I can't use this mod !And after ban they email me because they can not post and solve theirs problems, in the last days I reply to many emails instead to USE FORUM(special board for suspend members)!
I must deny access to some boards for a selected membergroup(Ex: suspend member group) but that boards have access regular members too and SMF is so CRAP to understand that sometime you must restrict access to certain membergroup but let regular members(newbie, full member, etc) to access the board.
In SMF is a CRAP because is a anomaly in permissions: You can select a membergroup(Ex: suspend member group) to have not access in some board but if newbie, full member, hero member is selected they(Ex: suspend member group)-> will have access to that board too! I'm I stupid or this is a anomaly?
Because I can't use this function I must use my email in hard way, people mail me instead use their board for resolve the problems....if they have access to all boards they can post some stupidity in the inadequate boards.
In the last years I was proud to use SMF, but I'm forced now to move some of my forums to phpBB where this function is on default core: VIEW BOARD But can not access him.
Transferring everything to phpbb is a waste of time.
The mod works on 2.0
Ok so the error log may fill up but at least the mod works.
Quote from: searchgr on January 11, 2009, 10:52:02 AM
To SMF DEVELOPERS: PLEASE INCLUDE THIS MOD AS A DEFAULT FEATURE IN SMF!
Unfortunately the situation is very bad. For the last 2 yrs we haven't seen any new features except of the so called 'bugs free' improvement codes.
mariusfv, pm to me if you need a help in regards to this mod.
I imagine this has been addressed but I don't have time to read 28 pages, so can anyone tell me how to modify the text of the "error" message when someone who doesn't have permission clicks on a board that they are not allowed to access? It currently reads:
"The topic or board you are looking for appears to be either missing or off limits to you.
Please login below or register an account with (site name)."
I want to change this text. Thanks for your help! This mod rocks!
EDIT: I see it's in errors.english.php? Where do I find this file? I found errors.template.php in the Default Theme folder but the text isn't in there.
EDIT AGAIN: Found it in the languages folder of the default theme file. Stupid me.
Load.php
The mod appear to be compatible with SMF 2.0 RC5 and 2.0 but when you try to install I have alot of errors ...didn't find modification's and some file didn't find.
I'm so stuck without this mod.
I can pay a coder for if made this mod compatible with 2.0 RC5.
Quote from: mariusfv on July 22, 2011, 12:54:53 PM
The mod appear to be compatible with SMF 2.0 RC5 and 2.0 but when you try to install I have alot of errors ...didn't find modification's and some file didn't find.
I'm so stuck without this mod.
I can pay a coder for if made this mod compatible with 2.0 RC5.
Have you tried to manually edit the files?
Quote from: mariusfv on July 22, 2011, 12:54:53 PM
The mod appear to be compatible with SMF 2.0 RC5 and 2.0 but when you try to install I have alot of errors ...didn't find modification's and some file didn't find.
I'm so stuck without this mod.
I can pay a coder for if made this mod compatible with 2.0 RC5.
Me too the same errors when I try to install in the SMF 2.0 Even installing for the first time the SMF forum
Have a lot of errors, and I try to manually edit the files and I can not, mistakes are almost all files and editing many parts not found :-[
This mod for me at least esential but I can't install :'(
To make it installable is one thing, to make it free of error and bugs is another thing. I try to help this mod before but there were too many "unfriendly" comments. Try and see other similar mod too, if they are updated.
I have read through pretty much all 28 pages of this thread. I have SMF 2.0 and I'm desperately trying to get this mod to work.
Obviously, the package installer doesn't work. I tried manually making changes to the files and did the best I could with the ones that weren't exact.
I have no idea what to do with DB_2_x.php. I uploaded it to the root directory and tried to just run it but get the error: Cannot install - please verify you put this in the same place as SMF's index.php. (which I'm pretty sure I did)
After making all other manual changes to files, Admin >> Forum >> Boards gives a db error:
Unknown column 'b.member_groups_view' in 'field list'
File: /home/ebrain/public_html/Sources/Subs-Boards.php
Line: 1055
This is why I assume the DB_2_x.php process is missing but I don't know how to process it.
If anyone could help me resolve this it would be greatly appreciated. I've looked at all other mods and this is the only one I can find to do what I need. I have a new forum but would like one section for paid membership, and I'd like everyone to be able to see that this board is there... just not read its contents.
If you require more info for assistance, please just ask and I'll do my best to provide it. Thanks in advance.
Try searching for look but no read mod. Similar purpose / function.
Quote from: ahrasis on September 05, 2011, 11:07:16 PM
Try searching for look but no read mod. Similar purpose / function.
Forgot to email ya bud.
I had the same errors I told ya about on my newly started test forum.
:(
I'll test it again when I have time as my real life is getting busier. I might have overlook something too. For the meantime I would suggest everyone to try and check look but no read mod which has similar purpose / function.
Thanks for the suggestion, but Look But No Read is only for guests. Once registered, they can see everything. I installed that but there seems to be no way to really make that work with one particular board for paid subscribers. (unless I'm missing something permissions-wise)
and it appears that the mod's author may have entertained working on something similar to my problem at one point, but he hasn't responded to any posts on that thread for a few months. I could work with that mod for sure if there was a way to even modify it to make it do what I want.
Would love to hear thoughts on this...
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 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.
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'];
Hmm yet this is when I go to install.
3. Replace .Themes/default/BoardIndex.template.php Test failed
Line 215. Few lines below "// Has it posts awaiting approval?"
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.
Just noticed.
None of the Child Board topics are showing.
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.
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.
Have since uninstalled the Avatar On Board mod and still have the blank Child boards.
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.
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'])))
All the last posts on the main board went blank.
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.
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.
The childboards haven't changed.
Is strange how the mod is working perfect on the test forum and not the main.
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.
On my test forum I installed this mod before the Vbulletin style Board Index (http://www.simplemachines.org/community/index.php?topic=379307.0) 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.
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.
I haven't tested this mod in full but I think the mod author is the best person to reply on this.
QuoteBUG #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.
The red font is supposed to be this way.
I actually like it.
QuoteBug #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.
I have mentioned this error previously.
The mod author doesn't seem to be interested in this mod now.
Quote from: Brack1 on September 25, 2011, 08:17:24 PM
QuoteBUG #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.
The red font is supposed to be this way.
I actually like it.
QuoteBug #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.
I have mentioned this error previously.
The mod author doesn't seem to be interested in this mod now.
I've changed the default color to grey in the latest version, it matches better with the current theme. The can be customized through the css, by using the "vob_protected" class.
As for the error, unfortunaely I cannot reproduce it.
Hey guys
I use smf 2.0.1 and a default theme, everything worked well, but when I installed "View Only Boards" mod, the the mod settings shows on the board settings, but it doesnt work, with other words, when I mark the visibilty Permission. then no thing happen, and just get this error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OR FIND_IN_SET('17', b.member_groups_view) OR FIND_IN_SET('4', b.member_groups_v' at line 7File: /..../public_html/Sources/Security.php
Line: 951
Any idea
Hi guys,
This mod works great for me with smf 2.0.1 with the default 'Curve' theme, but I am getting lot's of xhtml validation errors.
It looks as if I get two errors for each protected board:
an attribute specification must start with a name or name token
<tr id="board_15" class="windowbg2 vob_protected"">
(vob_protected"">)
and
character data is not allowed here
<tr id="board_15" class="windowbg2 vob_protected"">
(vob_protected"">)
Any help would be appreciated.
Tony
Did I drive everyone away? ???
I'm still hoping for some help with the validation errors, I've spent hours trying to find a way of identifying which files to find the errors in & how to fix them.
Please guys, a newbie is getting desperate. :)
Tony
Mod installed fine but guest can still inter the boards.
I checked "Allow guests to browse the forum" and "Show the message index for "view only" boards."
Quote from: Tonyvic on November 03, 2011, 01:06:22 AM
Hi guys,
This mod works great for me with smf 2.0.1 with the default 'Curve' theme, but I am getting lot's of xhtml validation errors.
It looks as if I get two errors for each protected board:
an attribute specification must start with a name or name token
<tr id="board_15" class="windowbg2 vob_protected"">
(vob_protected"">)
and
character data is not allowed here
<tr id="board_15" class="windowbg2 vob_protected"">
(vob_protected"">)
Any help would be appreciated.
Tony
The mod changes part of BoardIndex.template.php:
Find:
foreach ($category['boards'] as $board)
{
echo '
<tr id="board_', $board['id'], '" class="windowbg2">
Replace with:
foreach ($category['boards'] as $board)
{
echo '
<tr id="board_', $board['id'], '" class="windowbg2' , ($board['protected'] ? ' vob_protected"' : '') , '">
The replace with should be:
foreach ($category['boards'] as $board)
{
echo '
<tr id="board_', $board['id'], '" class="windowbg2' , ($board['protected'] ? ' vob_protected' : '') , '">
:)
Please fix this mod for SMF 1.1.16
I get this error when installing in package manager:
./Themes/default/BoardIndex.template.php Test failed
Any update on this? It would be a great mod if it was working and would bring SMF up to date with likes of ipb, who can show a board but restrict access.
Quote from: sharks on January 18, 2012, 02:35:32 PM
Please fix this mod for SMF 1.1.16
I get this error when installing in package manager:
./Themes/default/BoardIndex.template.php Test failed
Have you looked at the required edits using the mods parser?
A couple of posts above it has been installed fine but users can still enter the protected board.
This is a very useful mod, but the way it's implemented is questionable from a security point of view.
It works by adding all the boards where the user has view-only access to the predefined database query "query_see_boards" which originally just holds the boards where the user has at least read access.
Then at (hopefully) all relevant places an extra check is added to see if the user has view-only access to the board and if so preventing the user from seeing posts etc.
This method of first giving the users more access than they should have and then removing some of it is not so good in principle.
If this extra check is forgotten in any place the user can see posts which should not be seen.
It also means that if any other mod is added where "query_see_boards" is used that mod will give the users access to posts they shouldn't see because in that mod there will be no checks for view-only boards.
In practice I noticed this with the articles system in SimplePortal, which displays complete articles from boards the logged in user (or guest) do not have access to when this mod is installed.
I imagine similar problems could occur with for instance other portals or Tapatalk.
Quote from: ibloomdrop on September 05, 2011, 03:40:33 PM
I have read through pretty much all 28 pages of this thread. I have SMF 2.0 and I'm desperately trying to get this mod to work.
Obviously, the package installer doesn't work. I tried manually making changes to the files and did the best I could with the ones that weren't exact.
I have no idea what to do with DB_2_x.php. I uploaded it to the root directory and tried to just run it but get the error: Cannot install - please verify you put this in the same place as SMF's index.php. (which I'm pretty sure I did)
After making all other manual changes to files, Admin >> Forum >> Boards gives a db error:
Unknown column 'b.member_groups_view' in 'field list'
File: /home/ebrain/public_html/Sources/Subs-Boards.php
Line: 1055
This is why I assume the DB_2_x.php process is missing but I don't know how to process it.
If anyone could help me resolve this it would be greatly appreciated. I've looked at all other mods and this is the only one I can find to do what I need. I have a new forum but would like one section for paid membership, and I'd like everyone to be able to see that this board is there... just not read its contents.
If you require more info for assistance, please just ask and I'll do my best to provide it. Thanks in advance.
Hi,
I've exactly the same problem ....
DB_2_x.php doesn't want to be executed....
i am on 2.0.2 SMF version
so this mod doesn't want to work ...
really disapointed.
Is this normal,
i just installed this mod , and when i set visibility (tick second box only) and access (first box not tick) and Show the message index for "view only" boards (not tick) for guest for a board.
with the above setting, the board when guest click ,it redirect them to login page.
But that board show recent topics to guest at the right side.
How do i not show the recent topic, number of post and number of topics?
most preferred the field replaced with a '-'
I've got a Problem with the Childboards... the 'view-only' ones are not showing :(
Ask NIBOGO to fix the problem for you. But is a paid service.
Update for 2.0.3?
I've just installed it in 2.0.3 and everything is working.
Also, my "view only" childboards are showing as expected and redirecting to login/registration when I click the topics in there.
Make sure you activate Show the message index for "view only" boards' in admin -> Features and Options and make the correct changes in the permissions of each board.
Just installed in on SMF 2.0.4 and seems to be working properly. :)
(There are no child boards to the protected board, so I can't tell if that's working, but everything seems to be working as near as I can tell.)
The forum is at: http://modernwarforum.com/forum/ (http://modernwarforum.com/forum/) if you want to have a look.
I had issues when SMF tried to install this mod, so I didn't install it. It seems to have conflicts with another one of my mods. Would you happen to know which one of these could be the problem?
1. Add Social Media Icons To Profiles 1.0.8
2. AJAXChat 0.8.5 For SMF 2.0.2 3.2.7
3. Age And Location 1.0
4. PM to New Members 1.2
5. Share This Topic 4.1.2
6. Simple Audio Video Embedder 2.0.8
7. SimplePortal 2.3.5
8. Social Login 2.2
9. SMF 2.0.4 Update 1.0
10. BoardHover Mod 1.8.1
First, you need to say what problem that is...
I was hoping to use this and ditch my old mod (look but no read+ lots of loop hole edits) but ...
When just view only checkbox is selected the guest does not see the mouse over and link to open the board. It is gray/black and appears to have no link but opens when clicked.
This gives totally the opposite impression I want to give guests - I want them to see the board (link text) just as others, 'view' the topics only. This is the incentive to register for the club. The way the mod works now makes it appear the board is off limits and no way to see inside (the text has no hyperlink).
Another point - takes 2 pages of replies work out where the settings are. Would be a good idea to give more information on the board settings - 2 columns of checkboxes with no titles. After reading the fine print on the left and trial n error you finally get to work out how to use it.
With no view only board hyperlink, sadly I will have to go back to using the outdated mod instead.
It also appears that the mod removes any board topics from the calendar that set to view only (and view message index).
That basically finishes for me... event calendar is blank.
igirisjin, I solved the first problem you mentioned editing the css to my needs. Its relatively easy.
Thanks for replying so quickly. I guess the lack of titles on the calendar (no access but view board) is not so easy to solve if it follows general permissions.
Its an area SMF doesnt have mods for - log in to read or a read more teaser and login. Some details in our posts are for members only.
I really can't help you there, since I don't use the calendar in my forum.
Let's hope someone with more knowledge then me can help you.
Thanks, I dont mean to be negative - I'm sure it helps a lot of people. The calendar linking has some odd behavior with many posting mods.
That's because the authors don't test it with the calendar - because they don't use it either...
QuoteThat's because the authors don't test it with the calendar - because they don't use it either...
Posting topics impacts on the calendar - at the moment an integral part of SMF. Sadly the effect of posting through the board and through the calendar produce different results as permissions work differently. I know some may not like the calendar but honestly, its a major growth area for groups of people - event management. Unwittingly or not, SMF has everything many other group software perhaps envy - a reliable event management system (not a birthday calendar!).
I chose SMF because no other open source portal or message board comes close to it - posting of topics/events, reply/discussion/sign up, automatic linking to a calendar, reliable topic/event announcement, 'out of the box' user profiles, messaging, subscription. Yet many long time members here talk about it as a nuisance.
QuoteYet many long time members here talk about it as a nuisance.
That's because it's a major performance hog, and most sites have no need or use of such.
Well, if its disentangled but kept as an official mod - 'we' clubs might prove you wrong one day :P
A lot of people here say that - 'performance'... but as our computers still obey Moore's law and bandwidth keeps growing it s hard to believe it is such a big issue as time passes. I can understand if its cutting edge intensive cpu software like graphics (software code grows exponentially also), but not SMF.
And that's what I'm doing in That Which Shall Not Be Named. I already removed it from the core, but I haven't decided how I want to handle the whole posting thing yet.
I'm seriously tempted to handle it the way IPB does, where you don't tie it to an actual topic, but simply have the event have posting text and allow comments to it - but it's not actually a 'topic'. Being done this way, you get to avoid all entanglements with board permissions and you save the query being made every topic page view.
I updated my previous post...
BTW
The IPB way is a pain in the butt - I tested their system. Plugins full of bugs and when I used it 2 years ago the events didn't have comments - whats the point!
That's the great thing about SMF having it as a topic linked, you can reply as sign up and discuss an event as a thread. Good idea.
I would stick with 1 system - post a topic and have a link button. Now it doesnt work uniformly by having post from calendar.
QuoteA lot of people here say that - 'performance'... but but as our computers still obey Morse law and bandwidth keeps growing it s hard to believe it is such a big issue as time passes.
Morse Law? Think you mean Moore's Law. And while that's largely true, it's no excuse for not trying to be mindful of it. This is why vBulletin's developers think 60 queries or more per page is acceptable.
QuoteThe IPB way is a pain in the butt - I tested their system. Plugins full of bugs and when I used it 2 years ago the events didn't have comments - whats the point!
That's the great thing about SMF having it as a topic linked, you can reply as sign up and discuss an event as a thread. Good idea.
Well, events do have comments now, at least in 3.4.
So what's the difference between having an event with comments vs a thread with linked event?
If you have an event with comments, people can sign up and reply to it. In fact, in IPB's case you can do something that you can't in SMF, you can have *multiple* calendars. One for general use, ones for specific uses with their own permissions and access controls.
The real difference then becomes about visibility. Not being in a board means you don't have to run the gamut of mods like this not working properly or not behaving, and decoupling it from board access does mean you have better control over who can see what.
Yes maybe IPB has advantages but SMF does a lot with 1 calendar... for many people that's enough. It would be hard for some groups to justify paying for IPB or VB just for the luxuries. As a free open source software its still the best for events. Nightmare setting up the same deal in Joomla (I did) or Drupal. So it would be a terrible loss if the calendar slipped away.
And I will get told off soon for highjacking this thread :P
As an addition...
The permissions for members work well as it is on SMF - topics and calendar. And why build a separate comment system for the calendar when a good one exists already, with an announcement system.
QuoteAnd why build a separate comment system for the calendar when a good one exists already, with an announcement system.
Because of the problem you originally brought up?
Not if it works as I said ...
Posting from the calendar, some permissions for boards (like announce topic) are not applied until after posted - you mentioned this previously on another topic.
Keep all posting from boards only and just have the link/delink button.
QuoteI would stick with 1 system - post a topic and have a link button. Now it doesnt work uniformly by having post from calendar.
In fact, the best way it couldve been done would have been to have a 'link to calendar' checkbox on the post page (if calendar enabled). If checked it would open with the calendar title and date selection (similar to the way Simple Portal opens up to select pages and actions). Or just keep it really simple - link/delink button.
The permission system works on the basis of checking the topic once it exists. Until that point in time, there's nothing to check. But board access is evaluated even earlier than that, it's pretty much the first thing set up, so without severely altering how SMF works, you can't do it.
Even with the way this mod works, you still can't make it work how you want, without major overhaul. The kind that pretty much can *only* be done as I said. That's kind of why I suggested it, because any alternative is going to be fragile and/or very slow.
Oh, and writing a new 'comment system' needn't take very long. A competent SMF developer should be able to get a basic one working inside a day, probably less.
The sad truth is, SMF's calendar is not actually very good, which is one of the reasons no-one really uses it. It's too limited to be thoroughly useful but just enough that it's not worth ditching entirely.
Point of fact: yes, I broke it into a plugin in my case, but I stopped work on it when I realised it might be better served by ditching it and starting over entirely - though I'd already made a vast number of changes by then, allowing for 'holiday add-on packs' to be produced that were translatable to other languages and stuff like that but would otherwise be optional per holiday/group of related holidays.
Just not enough people use it. I even had several people tell me that I was wasting my time trying to improve it and that I should just integrate Google Calendar instead.
QuoteOh, and writing a new 'comment system' needn't take very long. A competent SMF developer should be able to get a basic one working inside a day, probably less.
Fair enough
There are quite a few groups like mine using it. SMF doesn't really market it well as an addon (event) calendar package. I tested lots of software and it takes a while to realize what you can do with the SMF calendar - using announce topic for example.
However bad it might seem it completes a 'group package' - message board, profiles, private messaging, calendar, subscription, groups. All free open source 'out of the box' set up that isnt possible with anything else. Joomla would require everything done separately and subscription and decent calendar would be paid mods from 100 to 200 dollars each. Add on a proper mailing list to send out, another 100 dollars. Jomsocial $$$ for profiles and messaging. Then spend days every week on support forums figuring out why some plugins between them dont work.
There is a lot worse out there than SMF that people pay a lot of money for, but still get headaches fixing things.
Getting the mods support topic back on track.
I installed the mod with no errors (thankfully).
However as a guest I was taken to the log in page when I clicked on the topic.
However I have seen the mod in use on another forum where both the topic and the last username were protected.
How would I manage to do this?
I am planning a couple boards as teens only and an adult only board.
The mod should do it automatically. If it didn't, that would imply your theme needs a BoardIndex.template.php edit as per the mod's parse page - verify that it is present.
So ya saying there may be an edit missing from that file?
Would appear so.
Well that gives me a bit more work to do tomorrow then lol
Quote from: Old Fossil on April 04, 2013, 12:06:19 AM
Well that gives me a bit more work to do tomorrow then lol
Had a quick look using notepad## and it seems as though everything is as it should be on a clean install.
???
Does your theme have its own board index template?
No.
( blessing in disguise).
Thought it best to check the default one anyways.
Quote from: Rudolf on May 20, 2007, 03:47:09 PM
In Errors.english.php
$txt['topic_gone'] = 'The topic or board you are looking for appears to be either missing or off limits to you.';
Hi All,
I am trying to edit the error messages which Guest get when they try to view a board that they can view but not read.
I have edited the errors.english.php to the following:
$txt['topic_gone'] = 'The topic or board you are looking for appears to be off limits to you. Please Register to be able to view.';
Yet it doesn't change my error message. As my error message shows as:
"ERROR 403
Sorry, but you have no access to this page."
For a non-member (Guest)
Where can I change this message so it can inform Guests that they need to Register?!
The website in question is: www(dot)serifusers(dot)com
Thank you, Charlie
The string is $txt['only_members_can_access'] and you can find it at Themes/default/languages/login.yourlanguage.php.
I would like to know how I can allow my guests to search in the entire forum, not just the visible parts to them, ie, they can see the boards but they cannot see the topics. That's fine, but how can I make them to search and find those topics?
Bump. ::)
hi
how can i change links's colors only for Parents Boards on index.css? (don't change childboards colors)
Using this cool mod with SimplePortal's 'Recent Image Attachments' block causes users with board-index-view-only access to still see (broken) images posted inside such boards.
Attached below is how it looks in various browsers.. basically you'll get broken image icons and/or image filename only displayed. Any idea how to fix that?
It won't be possible to install the modification View Only Boards 1.2c to Core style because during the installation is a inscription "test failed" almost at every files. I noticed it and I wanted to report it.
Screen:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi59.tinypic.com%2F20gjf41.png&hash=820fcf292fcfe99bbdfb11124b92669b1656bf0b)
We only enforce the MODs to install cleanly in default theme. It is impossible for MOD authors to support any theme out there...
There is a similar MOD that doesn't touch theme files.
I didn't know, thanks for information.
Hi, I have such a question, View Only Boards modification don't detecting any bugs in basic template during the installation, but to other templates appearing this bug:
MessageIndex.template.php Test failed (Ignore Errors)
Find code:
$children[] = $child['new'] ? '<strong>' . $child['link'] . '</strong>' : $child['link'];
Replace code:
$children[] = $child['protected'] ? '<span class="vob_protected">' . $child['link'] . '</span>' : ($child['new'] ? '<strong>' . $child['link'] . '</strong>' : $child['link']);
And when I installed this modification without code modification that this mod is work, cause shows only inscription that it possible to ignore a bug. And now I have a question, whether I can ignore this bug or I need to change this code?
That is no bug. That's an installation error.
MODs are only forced to work and install cleanly in default theme. It would be impossible to any mod author to support every theme out there...
If you require the mod to install in other themes, check this
Manual Installation of Mods (http://wiki.simplemachines.org/smf/Manual_installation_of_mods)
Of course, only looking to the files that the mod failed to edit automatically ;)
@margarett I understand this, but when I install this mod without manual edit file it work so it is sense to change it in this file?
I don't know exactly what it consists, I just want to ask.
Look at this:
3. Replace. MessageIndex.template.php Success
Code: (Find)**
$children[] = $child['new'] ? '<b>' . $child['link'] . '</strong>' : $child['link'];
Code: (Replace)
$children[] = $child['protected'] ? '<span class="vob_protected">' . $child['link'] . '</span>' : ($child['new'] ? '<strong>' . $child['link'] . '</strong>' : $child['link']);
And now look at point 4, is appearing almost the same code but with the failed
4. Replace. MessageIndex.template.php Test failed (Ignore Errors)
Code: (Find) (look higher, where are two stars that is the same code, but has a difference in boldface)
$children[] = $child['new'] ? '<strong>' . $child['link'] . '</strong>' : $child['link'];
(almost the same code, I emphasized the difference in the code)
And only in this line is a difference.
That's because it's using code that is known to be broken in some themes and tries to find it anyway.
So what? I need to change this code which is show in point 4 or I don't do this if the modification work, cause can leave out it by ignoring errors?
Is there a variant, version, or alternative that works with 2.0.8?
Quote from: br360 on August 18, 2014, 05:07:47 PM
The view_only_boards_1.2c.zip version of the mod works fine on 2.0.8. Download that one.
I was also helping with this mod last time. But with no authorisation, this mod cannot be upgraded. Ask if you are not sure how to install it properly. Others will definitely help.
This is a nice mod and works on 2.0.11.
However when guest is refused, they are presented with a 403 notice.
Is there a way to have them directed to must login screen?
Exploring this mod a little further....
It was originally written for SMF 1.x.x and did everything it was supposed to do as alluded by earlier comments in this subject "View Only Boards". When a guest would try to enter a blocked area they would be redirected to a login register page.
For SMF 2.0.11 it does work as intended. The settings all are functional. The only difference is that the guest gets redirected to a 403 "Sorry, but you have no access to this page." Search engines pick this up, but it would be better if the guest was redirected to the original intent, that is to a login register page.
In the Configuration - General One may block Guest from complete forum with the resultant effect they are redirected to login register page.
In the change to SMF 2.x.x it appears everything works as intended Except the hook to go to the login register page has changed to a 403 Error page. :(
Anyone Any ideas how to correct this?
In the hope someone knows the answer here goes:
For a few months now Google and Bing Bots have been producing errors from line 832 of load.php
elseif (count(array_intersect($user_info['groups'], $board_info['groups_view'])) == 0 || empty($modSettings['vob_allowMessageIndexView']))
Usually between 40 and 60 errors per day, any help to prevent this will be greatly appreciated.
Installed this Mod ages ago, but then upgrade continuously until 2.0.15 and it mainly still works.
The only error is that it doesnt show the 'new posts' on the 'latest posts' to guests - or did i accidentally change some acces-flags ?
please help me
smf version 2.0.15
I can not this code
foreach ($context['latest_posts'] as $post)
echo '
<dt>
i find this code
foreach ($context['latest_posts'] as $post)
{
echo '
<tr>
then can not replace with this
foreach ($context['latest_posts'] as $post)
echo '
<dt ' , ($post['board']['protected'] ? 'class="vob_protected"' : '') , '>
I just found this mod which should do exactly what my forum needs.
Trying to install in 2.0.15 I receive a lot of test errors.
Before digging deeper into the code it would be interesting to know if anyone has installed this mod in 2.0.9 or higher (as 2.0.8 seems to be OK)?
Edit: I have now looked at the errors anyway and found that at least some of them are because of changes between
Themes/core/...
which was moved to
Themes/default/...
Will post updates if my changes are successful
Partly my fault
Installation under 2.0.15 worked except modifying the core theme.
The installation modified Theme/default correctly but had many errors for Theme/core.
Which is no problem for me because we use a custom theme anyway.
Hi,
Could that be adapted to 2.1?
It needs a complete rewrite ideally for 2.1 since board access is done internally a little bit differently, especially to prevent data leakage by way of alerts and notifications.
Thank you very much for the answer, so that will probably not be implemented, I assume?
Well, the original author hasn't been around for a few years, so you're basically hoping someone will make a new one from scratch :(
Quote from: Maggan22 on January 05, 2022, 02:41:03 PMThank you very much for the answer, so that will probably not be implemented, I assume?
You can put in a request here:
https://www.simplemachines.org/community/index.php?board=79.0
Thank you again :)
I made a request there.