www.clan-themes.co.uk :: View topic - Forums center block question
Welcome To Clan Themes
As the board grows please remember the Search Option and we hope you find our community useful.
We also monitor Private Messages to stop members from abusing our sites system. If you are asking for assistance please provide your site link and nuke version, Thanks.
Hi was wandering if it is possible to code the top 5 post from forums center block using PHPbb3.0
I have phpbb forums in a seperate database due to my website getting hacked tired of losing my forums. Floppy is this something you could code for me. Its the block that shows 5 post and has the users avatars underneath with top posters on the forum thx
Are you using the same database or a different one?
Oh btw bro. I don't really code anything for anyone unless you plan on paying me for my time spent. I would rather teach you something that you can possibly teach someone else or use in the future.
Its honestly not that hard in concept. If you can figure out how to change the table names to match the new tables in your phpbb3 database you should be ok with my instructions.
Here is an example
Find
Code:
".$prefix."_users
Change To
Code:
mybbtable_users
Ok lets get started. Yeah all excited I know. Keep in mind I have not looked at this code once ever Just gonna wing it.
This is kinda tricky so try to stay with me. Nuke uses the string value $db to connect to the database.
So for every instance of
Code:
$db->sql_query
You need to replace with the mysql equivalent
Code:
mysql_query
And so on
Another example
Code:
$db->sql_numrows
Replace with mysql equivalent
Code:
mysql_num_rows
Then after all is said and done at the bottom of the file close to ?> you need to close the db connection
Code:
mysql_close($link);
Lets review the steps
1.Close to the top of the file replace globals with the new connect string to the phpbb3 database
2.Find the old table names (".$prefix."_bbtopics <--or whatever they may be) and replace with the new table names from the phpbb3 database.
3.Replace $db->sql_query with the equvalent mysql_query and so on
4. Close out the database.
In theory thats the steps. Lets see how far you can get without my help.
floppy
Reputation: 2235.6 votes: 10
Local time: 12:41 AM Location: Jackson Mississippi
Status: Offline
3.21 posts per day Medals: 1 (View more...)
Clan Themes Scripts/Coder Joined: Nov 14, 2006
Last Visit: 08 Jul 2008
Posts: 1938 Points: 23496
Forums center block questionPosted:
Mon Jul 30, 2007 6:04 pm
Lose it. $prefix is a nuke global. If you look in config.php you will see that
Code:
$prefix = 'nuke';
They did this so that if you wanted your tables to be named something else. If you look at your nuke database you will see that all tables are prefixed so to speak with nuke_whatever.