miniBB Support Forums
|
Forums
|
Register
|
Reply
|
Search
|
Statistics
|
Manual
|
miniBB Support Forums
/
Custom Tutorials and Modifications
/
Related topics
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
Team
#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.
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.
Team
#4
|
Posted: 6 Feb 2006 15:39
Oh well... hopefully, we've got author of these forums in contact, and he will reply here.
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. =)
jcu
Registered
#6
|
Posted: 6 Feb 2006 18:20
Many thanks, I will test and you comment.
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
lime
Registered
#8
|
Posted: 6 Feb 2006 22:32
Don't forget to connect to the database before you try to query it.
jcu
Registered
#9
|
Posted: 6 Feb 2006 23:14
He gathers the Topic_title, then the connection with the database exists.
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");
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
.
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. =)
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
miniBB Support Forums
/
Custom Tutorials and Modifications
/ Related topics
↑
Top
Your Reply
Short link for this topic:
?
You are welcome to post anonymously, by entering a nickname with no password (if the similar Username has not been taken yet), or by leaving both fields empty. If you have a forums account, you can also sign in from this page without posting a message, or sign in and post at once.
Before posting, make sure your message is compliant with our
forum posting rules
. If not, it may be locked or deleted with no explanation.
News & Announcements
FAQ
How To
Bugs
The Other
Official Addons and Solutions
Custom Tutorials and Modifications
Master Class
Specific
Re-cycled
Suggestions
Testimonials
qwerty
Features
Requirements
Demo
Download
Showcase
Gallery of Arts
Compiler
Premium Extensions
Premium Support
License
Contacts
Organize opinions on miniBB-forums,
collecting them with the
Polls & Surveys add-on
!