MyBB Community Forums

Full Version: Where to add own queries?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I'm totally new in MyBB Modification.

I wrote this test.php

<?php


mysql_connect("localhost","root","");
mysql_select_db("mybb");


$qry_basarsig = "SELECT mybb_forums.name, mybb_threads.tid
FROM mybb_forums
INNER JOIN mybb_threads ON mybb_forums.fid = mybb_threads.fid
INNER JOIN mybb_users ON mybb_threads.uid = mybb_users.uid
WHERE mybb_forums.name LIKE 'HF%'
AND mybb_threads.uid =1
AND mybb_threads.closed =0";
$result_basarsig = mysql_query($qry_basarsig);


while($sig_row = mysql_fetch_object($result_basarsig))
{
  echo " | <a href=\"http://localhost/showthread.php?tid=$sig_row->tid\"> $sig_row->name </a>" ;
}


?>

I want to show the echo-output in the Postbit-Signature.

Where do I have do add the code?
That isn't the way to write MyBB plugins.

Read the MyBB wiki to get started with plugin development.
http://wiki.mybb.com/index.php/Authoring_Plugins