Anime List

Posts

Yes I know this is horribly done code but ah well I really could not be fucked with fixing/optimizing/whatever. Use this if you want, I don't really care. I mainly made it just to see if I could.

Requirements:

php in templates plugin

Step 1:

make a new file with the following code and upload it to your forums root directory.

[php]<?php

define('IN_MYBB', 1); require "./global.php";
add_breadcrumb("Page Title", "File Name.php");
eval("\$html = \"".$templates->get("Template name")."\";");
output_page($html);
?>[/php]

Step 2:

After you've done that go to Templates & Style -> Templates -> Global Templates -> Add Template

Enter this code and name the template whatever you set the template name to be in the first file.

[php]<html>

<head>
    <title>Anime List.</title>
    {$headerinclude}
</head>
<body>
    {$header}

<center>

<table>
    <tr>
      <td class="thead" colspan="1" style="text-align:center;">Image</td>
      <td class="thead" colspan="1" style="text-align:center;">Anime Title</td>
      <td class="thead" colspan="1" style="text-align:center;">Status<br></td>
      <td class="thead" colspan="1" style="text-align:center;">Episodes Out</strong><br></td>
      <td class="thead" colspan="1" style="text-align:center;">Episodes Watched<br></td>
      <td class="thead" colspan="1" style="text-align:center;">Score<br></td>
    </tr>
    
<?php 

$user= $_GET["u"];
$mypix = simplexml_load_file('http://myanimelist.net/malappinfo.php?u=' . $user . '&status=all&type=anime');

    foreach ($mypix->anime as $pixinfo):
        
        echo "<tr>";
        
        $title = $pixinfo->series_title;
                $image = $pixinfo->series_image;
                $episodes = $pixinfo->series_episodes;
                $status = $pixinfo->series_status;

    if ($status == "1") {
      $status = "Watching";
    } elseif ($status == "2") {
      $status = "Completed";
    } elseif ($status == "3") {
      $status = "On-Hold";
    } elseif ($status == "4") {
      $status = "Dropped";
    } elseif ($status == "5") {
      $status = "Plan to Watch";
    }else {
      $status = "No idea.";
  }

                $score = $pixinfo->my_score;
                $watch = $pixinfo->my_watched_episodes;
        
        echo "
              <td><center>{$image}</center></td>
              <td><center>{$title}</center></td>
              <td><center>{$status}</center></td>
              <td><center>{$episodes}</center></td>
              <td><center>{$watch}</center></td>
              <td><center>{$score}/10</center></td>";
        
        echo "</tr>";
        
    endforeach;
?>
</table>
</center>

    {$footer}
</body>

</html> [/php]

And your done.

End Result:

https://example.com/pagename.php?u=example2 will display below image.

[spoiler][/spoiler]

Credits:

My Onii-chan. <3

Clickbait wrote

might be worth mentioning that you need the php in templates plugin for this to work (which we don't use cuz it's slow af). 

<center>

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/center
Image no longer available

I know <center> is deprecated but like I said "this is horribly done code but ah well I really could not be fucked with fixing/optimizing/whatever". And thanks, I knew I was forgetting to include something in my copy and pasterino.

Tenshi wrote
Clickbait wrote

might be worth mentioning that you need the php in templates plugin for this to work (which we don't use cuz it's slow af). 

<center>

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/center
Image no longer available

I know <center> is deprecated but like I said "this is horribly done code but ah well I really could not be fucked with fixing/optimizing/whatever". And thanks, I knew I was forgetting to include something in my copy and pasterino.

html isn't code

Melancholy wrote
Tenshi wrote
Clickbait wrote

might be worth mentioning that you need the php in templates plugin for this to work (which we don't use cuz it's slow af). 

<center>

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/center
Image no longer available

I know <center> is deprecated but like I said "this is horribly done code but ah well I really could not be fucked with fixing/optimizing/whatever". And thanks, I knew I was forgetting to include something in my copy and pasterino.

html isn't code

It is in my heart.

Melancholy wrote
Tenshi wrote
Clickbait wrote

might be worth mentioning that you need the php in templates plugin for this to work (which we don't use cuz it's slow af). 

<center>

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/center
Image no longer available

I know <center> is deprecated but like I said "this is horribly done code but ah well I really could not be fucked with fixing/optimizing/whatever". And thanks, I knew I was forgetting to include something in my copy and pasterino.

html isn't code

Lol.

2 months later

Technically HTML is a markup language, not a programming language.