MyBB Community Forums

Full Version: [Page Manager] Share your custom pages
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(2010-07-10, 02:33 PM)reneg Wrote: [ -> ]Is it possible to compile a page that create a List of all Threads starting from a forum ID ?

Of course. No problem with the help of PHP. Smile
Nice ! .. I'll start to study PHP Toungue

Thx for your reply Smile
I tryed to make my own page, Its just a test:

<?php
$lista = $db->query ("SELECT mybb_threads.`subject` FROM mybb_threads WHERE mybb_threads.fid = 2 GROUP BY mybb_threads.`subject` ORDER BY mybb_threads.`subject` ASC LIMIT 0 , 30");

echo "<table border='1'>
<tr>
<th>Titolo</th>
</tr>";

while($row = mysql_fetch_array($lista))
  {
  echo "<tr>";
  echo "<td>" . $row['subject'] . "</td>";
  echo "</tr>";
  }
echo "</table>";

?>

I tested this page in local and its work but when i try to use it online, it doesn't works. Any ideas ? .. It is my first time of PHP Smile...so I am sure thats my fault Big Grin

thx
It's better to use the MyBB database layer. This should work:

<?php
$lista = $db->simple_select('threads', 'subject', 'fid = 2');

echo "<table border='1'>
<tr>
<th>Titolo</th>
</tr>";

while($row = $db->fetch_array($lista))
  {
  echo "<tr>";
  echo "<td>" . $row['subject'] . "</td>";
  echo "</tr>";
  }
echo "</table>";

?>
Thank You Smile
Hello

I'd like to write some PHP code to my custom page. Which template I must get and where i should start the code ?

Greets

/e I found he way how to start the coding but I'm facing problems now...

<?php

global $headerinclude, $header, $theme, $footer, $lang;

if(!$mybb->user['uid']) error_no_permission();

$lang->load('modcp');
$id = $mybb->user['uid'];
$andmed = $db->simple_select("userfields", "ufid, fid5", "$id");

if ($db->num_rows($andmed) > 0)
{

     $tabel .=' <tr><td> <b>Nimi: </b></td><td>'. $row->fid5 .'</tr></td>';
}  			
$template='<html>
<head>
<title>'.$pages['name'].'</title>
{$headerinclude}
</head>
<body>
{$header}
<table border="0" cellspacing="1" cellpadding="4" class="tborder">
<tr><td class="thead" colspan="5"><strong>UCP</strong></td></tr>

{$tabel}

</table>
{$footer}
</body>
</html>';

$template=str_replace("\'", "'", addslashes($template));

add_breadcrumb($pages['name']);

eval("\$page=\"".$template."\";");

output_page($page);

?>

So it must take the entries from custom fields and insert them THEIR information.
Please give me a plugin for Chat Box i can't find it dude please Sad Confused
has Google changed their implementation of the UserMap? I have anAPI key and the newpage will generate the cache, but nothing is displayed, regardless of browser/OS I use.

It may take 2 or more days before it show any new user on the map
never mind. it took a week before it showed up. i had not checked the page since last week when i first built the page.