News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Similar Topics

Started by Bugo, November 04, 2012, 02:07:37 PM

Previous topic - Next topic

Realinfo

any way to have similar topic by Simple Portal Block like SSI method?

Adrek

From some time in logs I have this errors:

http://**.info/forum/simtopics.php
Wrong value type sent to the database. Integer expected. (current_board)
File: simtopics.php
Line: 70


but on line 70 I see only this:
);
SMF 2.0.6
Similar Topics 0.6
how to fix this?
Polskie wsparcie SMF na simplemachines.org

the simplest solution is most likely the right one

Arantor

What's on lines 60-70?

(The error is flagged up as the last line of a query.)

Adrek

there's this database query before it:

$result = $smcFunc['db_query']('', "
SELECT DISTINCT t.id_topic, t.id_board, t.is_sticky, t.locked, t.id_member_started as id_author, t.num_replies, t.num_views, b.name as bname,
mf.icon, mf.poster_name as author, mf.subject
FROM {db_prefix}messages AS m
LEFT JOIN {db_prefix}topics AS t ON t.id_topic = m.id_topic
LEFT JOIN {db_prefix}boards AS b ON b.id_board = t.id_board
LEFT JOIN {db_prefix}messages AS mf ON mf.id_msg = t.id_first_msg
WHERE m.approved = {int:is_active}" . (!empty($modSettings['simtopics_only_cur_board']) ? '
AND t.id_board = {int:current_board}' : '') . (!empty($ignore_boards) ? '
AND b.id_board NOT IN ({array_int:ignore_boards})' : '') . "
AND {query_wanna_see_board}
AND {query_see_board}
AND (" . $where . ")
LIMIT {int:limit}",
array(
'is_active' => 1,
'current_board' => $board,
'ignore_boards' => !empty($ignore_boards) ? $ignore_boards : null,
'limit' => !empty($modSettings['simtopics_num_topics']) ? $modSettings['simtopics_num_topics'] : 5
)
);

$topics = array();
while ($topic = $smcFunc['db_fetch_assoc']($result))
$topics[$topic['id_topic']] = $topic;

$smcFunc['db_free_result']($result);

$output['topics'] = count($topics) == 0 ? false : $topics;
}

echo json_encode($output);

?>
Polskie wsparcie SMF na simplemachines.org

the simplest solution is most likely the right one

Yoss

1) My forum language is spanish, so we use áéíóú etc, in topic display there is no problem, but when I start a new topic I get "null" on those topics using special chars.

Attached you can find an image.
[/quote]

i love this mod but i have same problem here  :'( Can we expect for a new release soon?

Thank you Bugo!

Kimmie

Will this be updated for 2.07?

Shambles

Quote
Will this be updated for 2.07?

Works fine on that version.

Kimmie

I am seeing a problem. it isn't looking though the thread titles correctly. Example:

2 threads with similar titles = the 1st two words of the title are the same but the rest is different. I go into one of those threads, but it doesn't show the other one under similar topics.

It appears to be looking for the words in a random order and only looking for individual words. Having it look from left to right would be the solution. It would also be helpfu if it looks for the entire title first - possibly.


Another issue I found: When creating a new thread, I tried a word that was the first word in several topics and it didn't show any of those. It shows 5 that are unrelated.

What do I need to do to fix this? Thanks.

Bob Perry of Web Presence Consulting

I want to use this for 2.1... and as an encouraging side note to the author, I'm guessing that it's only going to take just minor tweaking to be 100% with 2.1, just attempted to install on 2.1 production site and the pre-test had 0 errors! Unusual for this point in the transition process... Watching the logs for a minute reveals only one error thus far, though it is a show stopper should be easy to fix...

error= "The callable simtopics_actions could not be called."  I get this on another module too and I'll track down the author on that too later... heads up man you could be ahead of the competition a bit by fixing this asap

[edit]
Duh, just looked again, the reason there's no errors is that there is very little editing happening... open mouth insert foot yet again... never the less, only one minor little glitch is still VERY cool
Best Regards,
Bob Perry



"The world is moving so fast these days that the man who says it can't be done is generally interrupted by someone doing it." Elbert Hubbard

Portugal

That MOD works on 2.0.11?? Its reliable and dont use lots of resources of database (if dont slow down my forum)??

Thanks in advance

MULITRI

I have the same problem as ScrumpyJack, it doesn't load in my themed forum, with v2.0.13 version and Anecdota Theme.

I neither can find that line of code, and after clear the cache and follow all Bugo's instructions, still doesn't appears the Similar Topics block anywhere, so after reading others with the same problem and no solution, i'm guessing is realted with the Theme we're using.

I've had the same load problem with a similar Mod, so it can assure me the issue is related with our Theme, and as i can't change theme after the long modding work unfortunately i will have to dessist to use this feature. It's a big shame because Bugo's Mod is awesome, and install perfectly, so maybe in based default themes.

Thanks anyway for your work with this great feature Bugo... Regards

Seyit replikacep.com

#171
The used table type doesn't support FULLTEXT indexes
Dosya: /home/retr/public_html/Packages/temp/install.php
Satır: 20

table  species   MyISAM  supports

table  species  InnoDB   does not support

smf_messages  does not support   
smf 2.1 beta 3 

beta 3 table type  InnoDB  mod is actually incompatible   mod must be updated

if ($smcFunc['db_num_rows']($request) == 0)
$smcFunc['db_query']('', '
ALTER TABLE {db_prefix}messages
ADD FULLTEXT st_idx_subject (subject)',
array()
);

jack208

Just installed this mod on my ver 2.0.15 board, and it works fine as intended. I can see the list of similar topics under the message page. However some strange issues for Bugo's attention. The mod is actually working ok in my board; just need to workaround the issues below.

1) The permission settings within the Mod's Configure Page (ie under Admin > Configuration > Similar Topics) do not work. I can change the settings to "Allow", save the changes.. and the mod is still not switched on for the membergroup.

When I go into the Membergroup's Permission page, under the section "Similar Topics", I noticed both permission items are still set to "Disallow". If I now make the changes - in Membergroup Permission - for these two items to "Allow", ah.. the mod is now switched on for this membergroup and I can see the list of similar topics underneath the message.

so this seems to indicate updating permissions from the Mod Config Page is not working on my board. The workaround is to use the Membergroup Permission page itself to do this.

2) Now a strange issue. After making the changes via Membergroup Permission page (above) and getting the mod to work, if I look at the Mod Config Page, the permissions for the updated membergroups are strangely changed to "Disallow" (X). But the mod is working (ie showing the list of similar topics) for these membergroups. It's just the page showing "X" instead of "A".

See attached file - Config Page Perm
- I've just updated both Similar Topics permission items for these two group (Regular Members, BGC Members) via Membergroup Permission to "Allow", save the changes and in the Mod Config Page, they are marked as "X". The mod is working for these two membergroups so that tells me the permission settings are correct but somehow not displaying correctly in the Mod Config Page?
- note Guests is left as default "X"; didn't make any change to this membergroup since installing this mod

3) The last issue is regarding the list of two new permission items under Membergroup Permission page
- see attached screenshot "MemberGroup Perm"
- you can see under the section "Similar Topics", there are two permission line items but with empty description? I presume they are "Permission to view" and "Access to list on new post" but somehow my board lost the description
- they still work.. I can set them to Allow (or Disallow) and the mod works accordingly

If Bugo is still active here and wants to look closer at the issues, I can arrange test acct and access etc.

Bugo

It's a very good bug, thank you :)
I have updated the mod.

jack208

Thanks Bugo. Ver 0.8.1 have fixed all the issues I mentioned above.

8)

mattizzy

Please What determines the similar topics position. I want to change the position to after the first message
I am only an SMF Addict. I think I took overdose.

EthanR

#176
Working nicely thanks  :) Is there any use in options for tweaking the matching options? For example match 1, 2 or more words in the topic?

mattizzy

Nice Mod Bro, Please how can I manually change the similar topics position. I don't like where it appears both top and button. I prefer it appears after the first post.
I am only an SMF Addict. I think I took overdose.

spiros

I am testing it on Sphinx on a big board (0,5 m. topics) and it seems to have trouble to get the right topic titles. I.e. i may try a topic title that exists, but it will not be displayed (unless it is getting its data from the old full text search index). Any ideas about that?

Bugo

Sorry, I did not work with Sphinx and such large boards.

Advertisement: