MyBB Hacks

Full Version: PHP doesn't work... D:
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi everyone

first of all forgive me for my bad english.

Then... 2 days ago our forum was hackered and I had to redo all.

So I take this chance for put the new version of mybb, at the begin all it was good but when I re-installed the "PHP TEMPLATES PLUGIN" (that make you able to use php in templates) it doesn't work and in the members profiles (where I used it) appears:

[attachment=454]

Before that I installed mybb it worked, but after the hacker it didn't

what can be the problem?
(03-03-2011 03:08 PM)jonathan.95. Wrote: [ -> ]what can be the problem?
Code you put in the templates is bad.
(03-03-2011 04:40 PM)ZiNgA BuRgA Wrote: [ -> ]
(03-03-2011 03:08 PM)jonathan.95. Wrote: [ -> ]what can be the problem?
Code you put in the templates is bad.

It is the same code that was before, before it works.
What is the code?
(03-04-2011 01:39 AM)RateU Wrote: [ -> ]What is the code?


This:

PHP Code:
<?php
$groups = $db->query("SELECT usergroup,displaygroup FROM mybb_users WHERE uid='{$memprofile['uid']}'");
while($group = mysql_fetch_array($groups))
if($group['usergroup'] == 42 OR $group['displaygroup'] == 42){
echo '<div style="position: absolute; top: 165px;left: -3px; background: transparent url(http://img1.cdn1.habbo.com/c_images/stickers/summer_swim_trunk.gif); width: 83px; height:53px;">';
}
?>


And this:

PHP Code:
<?php  $getcomments=$db->query("SELECT * FROM mybb_profilecomments WHERE user='{$memprofile['uid']}'");
 $numcomments = mysql_num_rows($getcomments); ?><div style="float: right;"> Totale commenti: <?php echo $numcomments; ?>

And why are you mixing the MyBB DB abstraction layer with mysql_* functions?

Replace mysql_fetch_array with $db->fetch_array and mysql_num_rows with $db->num_rows
Thanks D:

I love you!

Last thing...

PHP Code:
if ($i==1)
{
$i=2;
}
else
{
$i=1;
}


I usually use it for make 2 tr with different color, now it doesn't works... can you help me please?

Nope, cause I don't really understand you... >_>
(03-05-2011 08:53 AM)ZiNgA BuRgA Wrote: [ -> ]Nope, cause I don't really understand you... >_>

ç__ç

I use that code for make:

<tr class="trow1">
<tr class="trow2">


Because of :

<tr class="trow$i">

ç_ç

Hope that you understand *-*

Just wanna make an if that makes 2 different number for the "tr" *-*
You haven't said what template it is in, but anyway, maybe this:

HTML Code
<tr class="trow<?php echo 1+($x=($x?0:1)); ?>">

I'm using $x because $i may be used elsewhere.

Pages: 1 2
Reference URL's