miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /   

Related topics

Author jcu
Registered
#1 | Posted: 3 Feb 2006 18:01 
Hola

First of all to ask them for excuses for which my English one is very bad.

I have seen a forum of developed in minibb URL at the end of this page, that topics can be related.
Someone knows since it is done?
Thank you very much

Author Team
8-)
#2 | Posted: 6 Feb 2006 08:05 
It's a custom implementation of the authors of this community, so it's better to ask them.

Author jcu
Registered
#3 | Posted: 6 Feb 2006 12:25 | Edited by: jcu 
Ok.
thank you very much.

It is a sorrow, because they do not have any Email of contact.

Author Team
8-)
#4 | Posted: 6 Feb 2006 15:39 
Oh well... hopefully, we've got author of these forums in contact, and he will reply here.

Author Samuel Vignoli
Registered
#5 | Posted: 6 Feb 2006 15:46 | Edited by: Samuel Vignoli 
Hi!

* you need to make a FULLTEXT index to your topic_title column.

alter table minibbtable_topics add fulltext topic_title_ft (topic_title);

Here goes the code (put in bb_func_vthread.php, after echo load_header(); echo ParseTpl(makeUp('main_posts'));).

echo "<br />
<table class=forums align=center>
<tr>
<td class=caption3>
<p>Tópicos relacionados a <b>".$topicName."</b></p>
<ul>";
$dados=mysql_query("SELECT DISTINCT topic_title,topic_id FROM topics WHERE forum_id=".$forum." AND topic_id!=".$topic." and match(topic_title) against('".addslashes($topicName)."') LIMIT 5");
while($res=mysql_fetch_assoc($dados)) echo "<li><a href='/forum/".$forum."/".$res['topic_id']."/'>".$res['topic_title']." </a></li>";
echo "</ul>
</td>
</tr>
</table>

";


Good luck. =)

Author jcu
Registered
#6 | Posted: 6 Feb 2006 18:20 
Many thanks, I will test and you comment.

Author jcu
Registered
#7 | Posted: 6 Feb 2006 19:11 | Edited by: jcu 
Hola
I Have given the code that you say to me in to the file bb_func_vthread.php, on the page of the messages I salted below the text "Tópicos relacionados a Título del mensaje", But do not salt related topics... Have to do anything more?

Also I have created the index in the database
topic_title FULLTEXT 1426 topic_title

Gracias

Author lime
Registered
#8 | Posted: 6 Feb 2006 22:32 
Don't forget to connect to the database before you try to query it.

Author jcu
Registered
#9 | Posted: 6 Feb 2006 23:14 
He gathers the Topic_title, then the connection with the database exists.

Author lime
Registered
#10 | Posted: 6 Feb 2006 23:35 
You need to add something like this:
-----
$link = mysql_connect("$DBhost", "$DBusr", "$DBpwd")
or die("Could not connect to database.");

mysql_select_db("$DBname") or die("Could not select database");
-----
before this line:
$dados=mysql_query("SELECT DISTINCT topic_title,topic_id FROM topics WHERE forum_id=".$forum." AND topic_id!=".$topic." and match(topic_title) against('".addslashes($topicName)."') LIMIT 5");

Author jcu
Registered
#11 | Posted: 6 Feb 2006 23:43 
Solved the problem. Really the name of the table was badly, it was not topics but minibbphp_topics.

Thank you very much to all.

Author Samuel Vignoli
Registered
#12 | Posted: 7 Feb 2006 12:39 
jcu
No problem.

lime
Don't forget to connect to the database before you try to query it.

It isnt needed. In that point the php script is already connected to the database. =)

Author Jaime
Registered
#13 | Posted: 21 Nov 2010 08:50 
jcu:
Really the name of the table was badly, it was not topics but minibbphp_topics.

Here the same problem ;-) And although I have read this post here again and again ... If I only now realized my mistake, after several days =:), and everything works as described.

Like I always say: The greatest source of error is usually found in front of the screen :)

All a good Sunday

Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications / Related topics Top

Your Reply Click this icon to move up to the quoted message

 Short link for this topic:

 ?
Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.
 
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Proceed with the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB