miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /  
 

Related topics

 
Author jcu
Partaker
#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
Partaker
#3 | Posted: 6 Feb 2006 12:25 
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
Partaker
#5 | Posted: 6 Feb 2006 15:46 
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
Partaker
#6 | Posted: 6 Feb 2006 18:20 
Many thanks, I will test and you comment.

Author jcu
Partaker
#7 | Posted: 6 Feb 2006 19:11 
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
Partaker
#8 | Posted: 6 Feb 2006 22:32 
Don't forget to connect to the database before you try to query it.

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

Author lime
Partaker
#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
Partaker
#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
Partaker
#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
Partaker
#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
 Share Topic's Link

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


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Try the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑