Ok I didn't have luck with this http://www.simplemachines.org/community/index.php?topic=239990.0 – now I am thinking about some new way of solving problem
Can I remove some categories from show recent posts list? – I want to remove whole category from show recent list which is on bottom of my forum - if you read this topic mentioned above – you will understood whole story
If it is possible – I will be very thankful
Spel
Possibility to add several different forum will be also be ok – In one category I have several forums and because of that I have ask for category removal and not forum removal – but ok – whatever – whatever I get and if it works – I will be satisfied
Spel
Let me understand this, you want posts from certain boards of your choosing to not appear on recent template?
These templates include the "Recent Posts", "Recent Replies", and "Unread Posts"?
http://www.simplemachines.org/community/index.php?topic=239990.msg1547684#msg1547684
YES I want to remove all things from specific category or boards from recent posts
We are talking only about removing some specific categories of several forums in it from showing in that list - Recent Posts
Nothing else
If you read briefly that above mentioned topic, you will be much more learned how I get there.
In short – I have boot which catch rss news from several different places and post on forum – every rss source is different forum – there is lots of those rss topics which is good because all those are information's – but look http://img357.imageshack.us/img357/6315/adminpostsmt4.jpg
Very often all other people can't see nothing than administrator (boot) and its posts – which can be annoying
I want to remove them – I didn't succeed that – now I want to remove places where he posts – category or forums – whatever – I know numbers of forums and even of that will not be a problem – Using category I will kill it by one shot :)
I have make monster :) – Some jokes are not bad – but I am in serious problem :(
Spel
I must be clear – I want to remove all those notifications but only in recent posts – I want that people when go to some specific board get "those" new posts notifications (little new beside name of topic)
I mean this "new" notification – for new posts etc
http://img514.imageshack.us/img514/9108/newnotificationbesidenage4.jpg
Those RSS boards are only for looking – noting to reply, discuss etc
Spel
Find:
AND b.ID_BOARD = t.ID_BOARD" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? "
AND b.ID_BOARD != $modSettings[recycle_board]" : '') . "
AND $user_info[query_see_board]
Replace with:
AND b.ID_BOARD = t.ID_BOARD" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? "
AND b.ID_BOARD != $modSettings[recycle_board]" : '') . "
AND b.ID_BOARD != #
AND $user_info[query_see_board]
You'll need to do this about 5 times in the recent.php file.
Replace "#" with the ID of the board, without the .0 tag. So for board 86, you'd put:
AND b.ID_BOARD != 86
To stop more boards, just keep adding more lines. So, for boards 86, 28, and 27:
AND b.ID_BOARD != 86
AND b.ID_BOARD != 28
AND b.ID_BOARD != 27
Make sure to do this on ALL instances you see $modSettings[recycle_board].
Hope this helps.
I have only 3 of those $modSettings[recycle_board]
but only one of
AND b.ID_BOARD = t.ID_BOARD" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? "
After part which consist from both of those codes I have add
AND b.ID_BOARD != 166
AND b.ID_BOARD != 167
AND b.ID_BOARD != 168
AND b.ID_BOARD != 169
AND b.ID_BOARD != 170
AND b.ID_BOARD != 171
AND b.ID_BOARD != 172
AND b.ID_BOARD != 173
AND b.ID_BOARD != 174
AND b.ID_BOARD != 175
AND b.ID_BOARD != 176
AND b.ID_BOARD != 177
AND b.ID_BOARD != 178
AND b.ID_BOARD != 179
AND b.ID_BOARD != 180
AND b.ID_BOARD != 181
AND b.ID_BOARD != 182
AND b.ID_BOARD != 183
AND b.ID_BOARD != 184
AND b.ID_BOARD != 185
AND b.ID_BOARD != 186
AND b.ID_BOARD != 187
AND b.ID_BOARD != 188
AND b.ID_BOARD != 189
AND b.ID_BOARD != 190
And everything works just like a charm - without any glitch - THANKS :)
Spel
Well, at least it works. :P
Glad to help. :D
Could this be written into a package?
Something that allows the admin to select what boards not to show in recent posts from the admin menus.
How about limiting specific topics? I don't want to take the whole board out just on section of it. Thanks for any help.
Topic?
How you will limit topic? By name or?
If you put some topics in some board - that is a solution, but if you want to limit by some topic – I think it is impossible – You need some script which will read topic and check to see is it right or no - that is impossible - I mean too much problems.
That idea can be implemented for "censuring" – for instance – talk about sex, or terrorism but – it is long story and I don't know did you mean on something like that. If you can limit by topic that mean you can even move those topics to some board or delete them – it is same – only action on the end is different.
For you problem -
It will be much better that some topics with specific area of interest goes into some specific board and this solution is already implemented and working great.
If you want to limit some member from showing on that list you can use solution from other topic – you have link in my first post –
Spel
Which area of the code do i place the boards if i simply don't want it to show in the Ten recent posts but want it to show everywhere else. I have multiple areas that have the above code. I know some of them are for the replies etc. I only want to take them from the Top ten recent posts.
Quote from: DrizzetPheonix on June 05, 2008, 01:19:02 PM
How about limiting specific topics? I don't want to take the whole board out just on section of it. Thanks for any help.
Find:AND t.ID_TOPIC = m.ID_TOPIC
Add After:AND t.ID_TOPIC != #
And replace "#" with the ID of the topic without the trailing .0
Quote from: DrizzetPheonix on June 05, 2008, 02:42:57 PM
Which area of the code do i place the boards if i simply don't want it to show in the Ten recent posts but want it to show everywhere else. I have multiple areas that have the above code. I know some of them are for the replies etc. I only want to take them from the Top ten recent posts.
Is there a specific section just for the ten recent post display? I have more than one area with the code being the same....like i stated above I want it to only be taken away in that one area.
// Find the ten most recent posts.
function RecentPosts()
{
global $txt, $scripturl, $db_prefix, $user_info, $context, $ID_MEMBER, $modSettings, $sourcedir, $board;
That is what i find for the top ten recent. Is there a way to make certain boards not show in this?
Of course.
Find:
// Find the 10 most recent messages they can *view*.
// !!!SLOW This query is really slow still, probably?
$request = db_query("
SELECT m.ID_MSG
FROM ({$db_prefix}messages AS m, {$db_prefix}boards AS b)
WHERE b.ID_BOARD = m.ID_BOARD
AND $query_this_board
ORDER BY m.ID_MSG DESC
LIMIT $_REQUEST[start], 10", __FILE__, __LINE__);
$messages = array();
while ($row = mysql_fetch_assoc($request))
$messages[] = $row['ID_MSG'];
mysql_free_result($request);
Replace with:
// Find the 10 most recent messages they can *view*.
// !!!SLOW This query is really slow still, probably?
$request = db_query("
SELECT m.ID_MSG
FROM ({$db_prefix}messages AS m, {$db_prefix}boards AS b)
WHERE b.ID_BOARD = m.ID_BOARD
AND m.ID_MSG != x
AND b.ID_BOARD != y
AND $query_this_board
ORDER BY m.ID_MSG DESC
LIMIT $_REQUEST[start], 10", __FILE__, __LINE__);
$messages = array();
while ($row = mysql_fetch_assoc($request))
$messages[] = $row['ID_MSG'];
mysql_free_result($request);
Replace "x" with the ID of a topic you don't want showing, and replace "y" with the ID of a board you don't want showing.
Didn't work they are still showing up.
Strange. Any errors in the error log?
I did it just for boards, do i have to put the topic ones in also....? I have triple checked the code...
http://www.dravensportal.com/drvpforum/index.php
that is my site.... at the bottom in the info center for recent 10 posts, that is the only area i don't want them to be seen. Would i have to edit boardindex for this? I don't know much about php, so I'm not sure why the above suggestion didn't work.
Does this remove them from the unread posts?
if not can it? without removing from recent?
Thanks
It does what you are asking about what it does. :)
No it doesnt seem to for the RSS feed poster bots.
They still show in unread posts (?action=unread)
It does remove from Recent (?action=recent)
Cheers.
... well. That has to do with the RSS feed. I dunno about that. =T
Disable your RSS feed. That's all I can suggest. I'll look into it further.
I'm not about to disable the feeds.
I'm happy with them, I just want to exclude them from the unread posts.
Maybe it can be done by excluding guests posts from unread?
Maybe something along the lines of...
AND $user_info[groups] != 0
I dunno, give it a whirl! =D
Thanks...
But i'm not sure where to add this. Adding it to Recent.php i'm assuming will work for the recent posts, but again not the unread.
Do you know where the Unread posts string is created?
Find:
AND b.ID_BOARD = t.ID_BOARD" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? "
AND b.ID_BOARD != $modSettings[recycle_board]" : '') . "
AND $user_info[query_see_board]
Replace with:
AND b.ID_BOARD = t.ID_BOARD" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? "
AND $user_info['groups'] != 0
AND b.ID_BOARD != $modSettings[recycle_board]" : '') . "
AND $user_info[query_see_board]
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING
Would it be here somewhere?
// Don't bother to show deleted posts!
$request = db_query("
SELECT b.ID_BOARD
FROM {$db_prefix}boards AS b
WHERE $user_info[query_see_board]" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? "
AND b.ID_BOARD != " . (int) $modSettings['recycle_board'] : ''), __FILE__, __LINE__);
$boards = array();
Or maybe another way..
I know we can use.. --> action=unread;board=120
Is there a way to use --> action=unread;board (is not =) 120 ??
I can simply change the link then.
I worked it out... much trial and error though.
// Don't bother to show deleted posts!
$request = db_query("
SELECT b.ID_BOARD
FROM {$db_prefix}boards AS b
WHERE $user_info[query_see_board]" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? "
AND b.ID_BOARD != " . (int) $modSettings['recycle_board'] : ''), __FILE__, __LINE__);
$boards = array();
changed it to:
// Don't bother to show deleted posts!
$request = db_query("
SELECT b.ID_BOARD
FROM {$db_prefix}boards AS b
WHERE $user_info[query_see_board]" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? " AND b.ID_BOARD != 120
AND b.ID_BOARD != " . (int) $modSettings['recycle_board'] : ''), __FILE__, __LINE__);
$boards = array();
:D
120 is my board to be ignored. i'd much prefer this to be done as a usergroup though.. so the replies are flagged as unread.
Quote from: Johno69 on June 23, 2008, 07:50:40 PM
Or maybe another way..
I know we can use.. --> action=unread;board=120
Is there a way to use --> action=unread;board (is not =) 120 ??
I can simply change the link then.
Use:
AND b.ID_BOARD != #
So..
// Don't bother to show deleted posts!
$request = db_query("
SELECT b.ID_BOARD
FROM {$db_prefix}boards AS b
WHERE $user_info[query_see_board]" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? "
AND b.ID_BOARD != 120
AND b.ID_BOARD != " . (int) $modSettings['recycle_board'] : ''), __FILE__, __LINE__);
$boards = array();