Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Solved unable to add php to template
#1
Not Solved
I have the template conditionals plugin installed. This is the content of a php file that works if you go to it. I want to add this output to one of my templates. When i add this code to where i want it within the template...i jsut get a blank page. So i think i am doing it wrong? 

<?php
$tlimit = 50; // How many titles you want
$query = $db->query("SELECT * FROM ".TABLE_PREFIX."threads ORDER BY `tid` DESC LIMIT $tlimit");
while($fetch = $db->fetch_array($query)){
echo =  '<a href="./showthread.php?tid='.$fetch['tid'].'">'.$fetch['subject'].'</a><br />' . "\n";
}
?>
I dont mind editing core files either.
I would like to add this output to the moderation_inline_moveposts template
Reply
#2
Not Solved
echo =  

This is not how you echo, you don't need the =
MyReactions - All Plugins

Can you still feel the butterflies?

Free never tasted like pudding.
Reply
#3
Not Solved
<?php
$tlimit = 50; // How many titles you want
$query = $db->query("SELECT * FROM ".TABLE_PREFIX."threads ORDER BY `tid` DESC LIMIT $tlimit");
while($fetch = $db->fetch_array($query)){
echo '<a href="./showthread.php?tid='.$fetch['tid'].'">'.$fetch['subject'].'</a><br />' . "\n";
}
?>
whoops that was leftover from trying things....and i forgot to remove it...the original post code was suposse to be
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)