Home arrow Forum Mod Recent Topics - Choose boards/categories?
  Welcome, Guest. Please login or register.
Did you miss your activation email?
November 22, 2008, 09:09:19 AM
Home New Posts Search Calendar


Login with username, password and session length
+  Joomla Forum
|-+  Joomla Addon Discussion
| |-+  Joomla Modules
| | |-+  Mod Recent Topics - Choose boards/categories?
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] 2 Go Down Print
Author Topic: Mod Recent Topics - Choose boards/categories?  (Read 4597 times)
Jonathan Sherwin
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 5



View Profile WWW
Mod Recent Topics - Choose boards/categories?
« on: June 30, 2005, 07:45:21 AM »

Hi,

Has anyone figured out a way to customise the output of the SMF Recent Topics module to display posts only from selected categories or boards?

J
Logged
twin
Joomla Newbie
*

Karma: +0/-1
Offline Offline

Posts: 2


View Profile
Re: Mod Recent Topics - Choose boards/categories?
« Reply #1 on: July 27, 2005, 04:32:01 AM »

up!
I'm looking for how to manage this too..
Logged
Luke Thomas
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 18


View Profile
Re: Mod Recent Topics - Choose boards/categories?
« Reply #2 on: July 27, 2005, 12:03:01 PM »

If you guys are good with SQL, edit the SQL statement on that module code. It's all in there.
Logged
cleeds
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 1


View Profile
Re: Mod Recent Topics - Choose boards/categories?
« Reply #3 on: September 10, 2005, 11:30:05 AM »

Has anyone managed to get this to work? And if so, would anyone be so kind to post it in here?
Logged
vibez
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 5


View Profile
Re: Mod Recent Topics - Choose boards/categories?
« Reply #4 on: November 06, 2006, 04:18:50 PM »

bump. Still looking for an answer to this one
Logged
GlingGlo
Joomla Pro
**

Karma: +1/-1
Offline Offline

Posts: 99


View Profile
Re: Mod Recent Topics - Choose boards/categories?
« Reply #5 on: November 08, 2006, 02:26:08 PM »

a)In case you want to restrict the posts of one specific category, look at its ID_CAT value in table [smfprefix]_categories and write it down.

- backup any file you are about to modify before doing so  Wink

-In mod_smf_recenttopics(i tested it on 2.0) where it says:
Code:
WHERE t.ID_LAST_MSG >= " . ($modSettings['maxMsgID'] - 35 * min($int_num_topics, 5)) . "
change it to:
Code:
WHERE b.ID_CAT = thecategorynumberyouwrotedown
        AND t.ID_LAST_MSG >= " . ($modSettings['maxMsgID'] - 35 * min($int_num_topics, 5)) . "


b) If you want to show post of a specific board, donīt do the former modification. Just look for the ID_BOARD value in the [smfprefix]_boards and write it down.

- backup any file you are about to modify before doing so  Wink

-In mod_smf_recenttopics(i tested it on 2.0) where it says:
Code:
WHERE t.ID_LAST_MSG >= " . ($modSettings['maxMsgID'] - 35 * min($int_num_topics, 5)) . "
change it to:
Code:
WHERE b.ID_BOARD = theboardnumberyouwrotedown
        AND t.ID_LAST_MSG >= " . ($modSettings['maxMsgID'] - 35 * min($int_num_topics, 5)) . "


I find this can be specially helpful if you are running a bilingual site and have a separate forum category for each language. Then, you can guess what else you have to do to display the latest topics in the forum in the language chosen by the user  Wink

Note to Wolverine: It would be very cool to be able to have this as 2 parameters in the moduleīs backend  Wink

Cheers,
NiCo
Logged
vibez
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 5


View Profile
Re: Mod Recent Topics - Choose boards/categories?
« Reply #6 on: November 09, 2006, 03:21:22 PM »

Fantastic! Worked a treat  Kiss Kiss Kiss Kiss
Logged
eNoyx
Joomla Newbie
*

Karma: +0/-5
Offline Offline

Posts: 9


View Profile
Re: Mod Recent Topics - Choose boards/categories?
« Reply #7 on: December 29, 2006, 10:49:43 AM »

I think that showing posts from an specific category works, but not exluding one of them. At least, from my poor knowledge, both codes are identical. Please, I'm interested A LOT in excluding a category, help me^^ Thanks in advance!
Logged
GlingGlo
Joomla Pro
**

Karma: +1/-1
Offline Offline

Posts: 99


View Profile
Re: Mod Recent Topics - Choose boards/categories?
« Reply #8 on: January 12, 2007, 10:29:57 PM »

I think that showing posts from an specific category works, but not exluding one of them. At least, from my poor knowledge, both codes are identical. Please, I'm interested A LOT in excluding a category, help me^^ Thanks in advance!

eNoyx: To exclude specifica boards, at the start of mod_smf_recenttopics.php look for this line:
Code:
$exclude_boards = array();

If you would want to esclude boards 3, 7 and 9 for example, you should change that to:
Code:
$exclude_boards = array(3,7,9);

and so on.

Cheers,
NiCo
Logged
Livebox
Guest
Re: Mod Recent Topics - Choose boards/categories?
« Reply #9 on: January 13, 2007, 03:29:33 AM »

I treid this but it is nog working here for me. Some one got any tips?
Logged
GlingGlo
Joomla Pro
**

Karma: +1/-1
Offline Offline

Posts: 99


View Profile
Re: Mod Recent Topics - Choose boards/categories?
« Reply #10 on: January 13, 2007, 09:13:26 AM »

I treid this but it is nog working here for me. Some one got any tips?

Livebox, in this thread i have mentioned 3 different mods. Which one exactly have you tried? The one exactly before your message?($exclude_boards)

Also, specify what you mean by "not working". Thanks.
NiCo Wink

P.D: Also, could you see if you can answer my other thread. The one about mod_smf_recenttopics showing topics to guests?
Logged
Livebox
Guest
Re: Mod Recent Topics - Choose boards/categories?
« Reply #11 on: January 13, 2007, 09:38:31 AM »

Oeps sorry for got to mention  Cry I mean the above solution. I want to exclude some board in the recent topics. So that the post that in that board are not shown in the module.

I changed this but it seems not to exclude these boards
$exclude_boards = array(3,7,9);

Yes I used my own board numbers

About your question Wolverine has answered that question all ready
Logged
GlingGlo
Joomla Pro
**

Karma: +1/-1
Offline Offline

Posts: 99


View Profile
Re: Mod Recent Topics - Choose boards/categories?
« Reply #12 on: January 13, 2007, 10:04:42 AM »

Livebox.

I just tried it again and it works for me. The topics that are shown in the module, stop showing when i include the board they belong to in that array.

I asume that you didnīt add that line yourself. If you had to, it means that you are using a different version of the module.

Also, in my module i have modified the sql query to query the topics from category 1 or category 2, depending on the Joomla Language selected with Joomfish. I am not sure if this could be affecting the behaviour of that exclude array.

Cheers,
NiCo
Logged
Livebox
Guest
Re: Mod Recent Topics - Choose boards/categories?
« Reply #13 on: January 13, 2007, 10:32:28 AM »

I had installed the latest version. I removed it and reinstalled it and it works.

Thanks for the help Wink
Logged
Avar
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 1


View Profile
Re: Mod Recent Topics - Choose boards/categories?
« Reply #14 on: February 01, 2007, 10:22:05 AM »

NiCo,

Thank you so much, I was looking for this. Worked right away. I needed to restrict access to certain forums that are meant from moderators only.

-Avar
Logged
Pages: [1] 2 Go Up Print 
« previous next »
Jump to:  



Login with username, password and session length

Powered by MySQL Powered by PHP Joomla Forum | Powered by SMF 1.1 RC1.
© 2001-2005, Lewis Media. All Rights Reserved.
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!

Joomla Hacks is a Joomla Components, Joomla Modules, Joomla Templates, & Joomla Mambots resource portal. None of the text or images in this public website may be copied without the expressed written consent of the authors. Copyright 2005 by JoomlaHacks.com. Powered by Joomla. All rights reserved.
Terms of Use
Joomla Hacks



Joomla Hacks
German Lang French Lang Italian Lang Spanish Lang Japanese Lang Chinese Lang
Search Contact About Advertise Blogs Topsites Submit News Register Login