News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Topics list support

Started by T@by, November 08, 2008, 05:34:22 AM

Previous topic - Next topic

sgsharetalk

I also interested to set up Topics list on two different board but just couldn't understand the step.  anyone can elaborate on .... ps I am not programing savvy

Quote from: T@by on February 17, 2009, 03:27:25 PM
Quote from: Özgür´ on February 17, 2009, 01:22:18 PM
Im using this mod.
I add to topic list in 2 topic. (Different board.)
But first topic and second topic are same. How do fix it ?

Look : http://www.rockayseri.net/rk/turk-rock-and-metal/rockayseride-bulunan-tum-yerli-gruplar/
And :  http://www.rockayseri.net/rk/yabanci-rock-and-metal/rockayseride-bulunan-tum-yabanci-gruplar/

Is very simple. You used 'dirty' bbcode.
Edit the incorrect topic. You will see something like '[tlist=2]' where '2' is the ID of the board (automatically added by the mod).
Delete the '=2' part OR substitute all copying the code in this post : http://www.simplemachines.org/community/index.php?topic=272959.msg1790809#msg1790809. All will be fine

sgsharetalk

Anyone can explain to me on how to set up Topics list on two different board ? also if possible to add the date (good to indicate Today,  yesterday ) and time and the last post name. hope I am not asking too much. Topic list is a great mod and could be further develop to provide multi-board Topic listing and even to list author name. just like organise a sub forum for author's homepage. Hope to see a complete mod soon.   :)

ŦώεαЖзяŁ

This is indeed an awesome mod, I do seem to have a problem in RC2 though... it seems that if a topic starts with a lowercase letter, it does not get added to the topic list.

Is this a normal behavior that can be changed or something I might have messed up?

Link Sharing Community - Share links and earn cash in the process!
APPS | GAMES | MUSIC | MOVIES | TV SHOWS | E-BOOKS

T@by

cut from MySQL manual comes these enlightening facts:

Quote21.15 Case Sensitivity in Searches

By default, MySQL searches are case-insensitive (although there are some character sets that are never case insensitive, such as czech). That means that if you search with col_name LIKE 'a%', you will get all column values that start with A or a. If you want to make this search case-sensitive, use something like INDEX(col_name, "A")=0 to check a prefix. Or use STRCMP(col_name, "A") = 0 if the column value must be exactly "A".

Simple comparison operations (>=, >, = , < , <=, sorting and grouping) are based on each character's ``sort value''. Characters with the same sort value (like E, e and é) are treated as the same character!

ŦώεαЖзяŁ

I'm using utf_bin character set... could that be the cause?

Link Sharing Community - Share links and earn cash in the process!
APPS | GAMES | MUSIC | MOVIES | TV SHOWS | E-BOOKS

ŦώεαЖзяŁ

just an update, using utf8_bin caused the problem, switching to utf8_general_ci solved it

Link Sharing Community - Share links and earn cash in the process!
APPS | GAMES | MUSIC | MOVIES | TV SHOWS | E-BOOKS

Bijan641

Hey, I was wondering if you could tell me how to list topics from just one board. I don't mean using the mod, because I don't need it listed on the forums, I just need a list to be output to a file that I can read from. Also, how would you list it chronologically?

I know this is kind of a specific question not exactly related to the mod. Any help you could give me would be greatly appreciated. Thanks.

PalmBeachPreps

Great mod!  Installed flawlessly on RC2 forum.  Thanks!!!

farao25

Hi!!!
SMF 2.0 RC2 : Is it possible to put next to the title of the post the name of the user who has posted ?
In this topic you've posted the fix for SMF 2.0 RC1. Will it work for SMF 2.0 RC2 too ?

davidhs

#169
The spanish_es translation for Topics list support 1.05 is


<?php

$txt
['limitTListQuery'] = 'Número máximo de temas listados por Topics List<div class="smalltext">(0 indica sin límite)</div>';

?>


rocknroller

thank you for this mod, I have a problem.
Links in Topic title list are broken, all title topic link go on my index forum page.

Need help, what i can do?

over here: http://www.logooff.net/smf2/index.php?topic=54.msg112#msg112



waruna

Quote from: T@by on February 18, 2009, 04:06:42 AM
Quote from: NIBOGO on February 17, 2009, 05:59:03 PM
The child-boards support will be a nice addon for this mod and yep is useful to me :)

This is the solution NOT for child-boards but for an extended and more flexible concept: multiboard. It may include boards and/or child-boards.

Edit sources/subs.php

Find
WHERE t.ID_BOARD = $board AND

Replace with
WHERE t.ID_BOARD IN ($board) AND

Save

Edit your TList topics and add to each TLIST tag the ID of each desired board, comma separed
Something like [TLIST=2,4,5]A|[/TLIST]

Thanks for this. One quick question. Is it possible to put in which board that topic belongs to in bracket?? For example like this:

A
A Man From the Moon (General Discussion)
Amphibian Photos (Animal Planet)
Anecdote collection (Poetry Room)

B
Basketball Club! (Sports)
Be a man (Poetry)
Best of the best (Film & TV Series)

... and so on..

Thanks in advance
Trust of Lust

davidhs

Quote from: rocknroller on March 03, 2010, 01:32:04 PM
thank you for this mod, I have a problem.
Links in Topic title list are broken, all title topic link go on my index forum page.

Need help, what i can do?

over here: http://www.logooff.net/smf2/index.php?topic=54.msg112#msg112

You must write [tlist] tags without number of board (default board is current board, 61 in your example):

[tlist]0|9[/tlist]
[tlist]A|[/tlist]
[tlist]B|[/tlist]
...
[tlist]X|[/tlist]
[tlist]Y|[/tlist]
[tlist]Z|[/tlist]


or with number of board:

[tlist=61]0|9[/tlist]
[tlist=61]A|[/tlist]
[tlist=61]B|[/tlist]
...
[tlist=61]X|[/tlist]
[tlist=61]Y|[/tlist]
[tlist=61]Z|[/tlist]


rocknroller

#173
EDIT: MY BAD, I was erase $tmp = str_replace("{TOPIC_ID}", $row['tid'], $tmp); from subs.php
Work NOW!


Quote
You must write [tlist] tags without number of board (default board is current board, 61 in your example):

[tlist]0|9[/tlist]
[tlist]A|[/tlist]
[tlist]B|[/tlist]
...
[tlist]X|[/tlist]
[tlist]Y|[/tlist]
[tlist]Z|[/tlist]


or with number of board:

[tlist=61]0|9[/tlist]
[tlist=61]A|[/tlist]
[tlist=61]B|[/tlist]
...
[tlist=61]X|[/tlist]
[tlist=61]Y|[/tlist]
[tlist=61]Z|[/tlist]


I dont get it.

Here is my code now, and i can see all boards, but all links go on index page.
Links look like this http://forumfolder/index.php?topic={TOPIC_ID}

[tlist=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61]D|[/tlist]


When I put code like that, I can not see all boards.


[tlist]Y|[/tlist]
OR
[tlist=61]Z|[/tlist]




davidhs

#174
Quote from: rocknroller on March 05, 2010, 06:42:13 AM
Here is my code now, and i can see all boards, but all links go on index page.
Links look like this http://forumfolder/index.php?topic={TOPIC_ID}

[tlist=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61]D|[/tlist]


When I put code like that, I can not see all boards.


[tlist]Y|[/tlist]
OR
[tlist=61]Z|[/tlist]


This MOD only shows one board. This do not work:
[tlist=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61]D|[/tlist]


For show index of two or more boards, you need modify this MOD (see http://www.simplemachines.org/community/index.php?topic=272959.msg1938771#msg1938771 )

davidhs

Quote from: waruna on March 03, 2010, 02:52:25 PM
One quick question. Is it possible to put in which board that topic belongs to in bracket?? For example like this:

A
A Man From the Moon (General Discussion)
Amphibian Photos (Animal Planet)
Anecdote collection (Poetry Room)

B
Basketball Club! (Sports)
Be a man (Poetry)
Best of the best (Film & TV Series)

... and so on..

Thanks in advance
I have not tried it, but I think that works:

Edit sources/Subs.php

Find:

t.ID_TOPIC, t.ID_FIRST_MSG, m.subject, m.ID_MSG, m.icon

Replace with:

t.ID_TOPIC, t.ID_FIRST_MSG, m.subject, m.ID_MSG, m.icon, b.name


Find:

LEFT JOIN {$db_prefix}messages AS m ON (m.ID_MSG = t.ID_FIRST_MSG)

Add after:

LEFT JOIN {$db_prefix}boards AS b ON (b.ID_BOARD = t.ID_BOARD)


Find:

$data[] = array('cleantitle' => $ctitle,'title' => $th_row['subject'], 'tid' => $th_row['ID_TOPIC'],'icon_id' => $th_row['icon']);

Replace with:

$data[] = array('cleantitle' => $ctitle,'title' => $th_row['subject'], 'tid' => $th_row['ID_TOPIC'],'icon_id' => $th_row['icon'], 'board' => $th_row['name']);


Find:

$answ .= str_replace("{TOPIC_TITLE}", $row['title'], $tmp);

Replace with:

$answ .= str_replace("{TOPIC_TITLE}", $row['title'] . " (" . $row['board'] . ")", $tmp);

waruna

@ davidhs: It works like a charm!. Thanks buddy. Really appreciates your help.!
Trust of Lust

farao25

Quote from: davidhs on March 05, 2010, 01:38:10 PM
Quote from: waruna on March 03, 2010, 02:52:25 PM
One quick question. Is it possible to put in which board that topic belongs to in bracket?? For example like this:

A
A Man From the Moon (General Discussion)
Amphibian Photos (Animal Planet)
Anecdote collection (Poetry Room)

B
Basketball Club! (Sports)
Be a man (Poetry)
Best of the best (Film & TV Series)

... and so on..

Thanks in advance
I have not tried it, but I think that works:

Edit sources/Subs.php

Find:

t.ID_TOPIC, t.ID_FIRST_MSG, m.subject, m.ID_MSG, m.icon

Replace with:

t.ID_TOPIC, t.ID_FIRST_MSG, m.subject, m.ID_MSG, m.icon, b.name


Find:

LEFT JOIN {$db_prefix}messages AS m ON (m.ID_MSG = t.ID_FIRST_MSG)

Add after:

LEFT JOIN {$db_prefix}boards AS b ON (b.ID_BOARD = t.ID_BOARD)


Find:

$data[] = array('cleantitle' => $ctitle,'title' => $th_row['subject'], 'tid' => $th_row['ID_TOPIC'],'icon_id' => $th_row['icon']);

Replace with:

$data[] = array('cleantitle' => $ctitle,'title' => $th_row['subject'], 'tid' => $th_row['ID_TOPIC'],'icon_id' => $th_row['icon'], 'board' => $th_row['name']);


Find:

$answ .= str_replace("{TOPIC_TITLE}", $row['title'], $tmp);

Replace with:

$answ .= str_replace("{TOPIC_TITLE}", $row['title'] . " (" . $row['board'] . ")", $tmp);


Hello again!!!
Excellent support. Is there any way to put after  the board that topic belongs to in bracket, the post author ? (General Discussion) by farao25 for example.
Thanks in advance.

davidhs

Quote from: farao25 on March 05, 2010, 04:25:59 PM
Is there any way to put after  the board that topic belongs to in bracket, the post author ? (General Discussion) by farao25 for example.
See http://www.simplemachines.org/community/index.php?topic=272959.msg2173884#msg2173884

farao25

Hi m8s !!!
Is this superb mod compatible with 2.0 RC3 ?

Advertisement: