PDA

View Full Version : Display forum threads on WP


Inna
02-03-2017, 12:25 PM
Hi, I've downloaded some files to show my vB threads and posts in my WP, but it seems when I upload MTForumsBlock.php which is the main file, WP is not shown anymore!
Can you please see if there's something wrong with the codes and files?
Thank all

HM666
02-06-2017, 11:26 AM
How do you want to show them on your Wordpress install? There are a couple of widgets that will show them in your sidebar without this type of hassle.

Inna
02-06-2017, 11:31 AM
Thanks for your response
I know there are some widgets, but I my WP theme does not support widgets and also I prefer using no widget

HM666
02-06-2017, 11:51 AM
When you uploaded the files did you include your database name, database pass, and url. Here is the code in that file you need to make changes to or else it will not work.

$db_name = 'HERE';
$db_username = 'HERE';
$db_password = 'HERE';
$forumurl = 'http://YourSite.com/forum/';


Replace the red HERE with the details it is requesting.

This is what these lines of code mean and what you need to put between the two single quote marks 'some nice stuff here, blah blah blah'. What information you need to put is in bold red.

$db_name = Your database name
$db_username = Your database username
$db_password = Your database password
$forumurl - Your forum URL

If you do not know your database, username & password just navigate using a FTP or your File Manager in your web host to your forums directory and then find includes/config.php and download it. Open it in notebook or a HTML text editor and look for the info that I've marked in red...

// ****** DATABASE NAME ******
// This is the name of the database where your vBulletin will be located.
// This must be created by your webhost.
$config['Database']['dbname'] = 'vbulletin';


// ****** MASTER DATABASE USERNAME & PASSWORD ******
// This is the username and password you use to access MySQL.
// These must be obtained through your webhost.
$config['MasterServer']['username'] = 'username';
$config['MasterServer']['password'] = 'password';

Input those values into the script you have and try it again. Your script, using the example above would like like this:

$db_name = 'vbulletin';
$db_username = 'username';
$db_password = 'password';
$forumurl = 'http://www.myforum.com';

Also make sure that you include this code in your theme, I think where you want it to display although I'm not completely sure. You may need to check with the developer of the plugin for that info.

<script type="text/javascript">
setInterval(function(){ChangeForumPage('Current'); }, 30 * 1000);</script>
<div id="MTForumBlock">
<?php include('MTForumsBlock.php'); ?>
</div>
<div id="MTForumBlockControl">
<table cellpadding="0" cellspacing="0">
<tr>
<td class="MTForumButton"><a href="javascript:ChangeForumPage('Prev')"><img border="0" src="MTForumBlock_buttonParrow.png" />&nbsp;???</a></td>
<td id="MTFloader"></td>
<td class="MTForumButton"><a href="javascript:ChangeForumPage('Next')">???&nbsp;<img border="0" src="MTForumBlock_buttonNarrow.png" /></a></td>
</tr>
</table>
</div>

Inna
02-06-2017, 11:55 AM
I know these information sir, and they're fulfilled correctly.
It seems there are something wrong with the whole codes of the mail file (not the info of DB I wrote in)

HM666
02-06-2017, 12:52 PM
I know these information sir, and they're fulfilled correctly.
It seems there are something wrong with the whole codes of the mail file (not the info of DB I wrote in)

Ok then I do not know what the issue is. Have you tried contacting the original developer for the plugin? That maybe you only safe bet as they should know how to fix the issue.

Inna
02-06-2017, 12:56 PM
Original dev is not accessible unfortunately

HM666
02-06-2017, 01:01 PM
That sucks :( Hopefully someone will have an answer for you soon.