Anime List

by Tenshi

Tenshi
An angel of the Yuri Goddess.
Kohai
Posts: 503
Threads: 60
Joined: Aug 2016
Reputation: 1
10-07-2016, 10:44 AM (This post was last modified: 10-09-2016, 07:34 AM by Waifu.)
#60860 (1)
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 Code:
<?php

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


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 Code:
<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>  


And your done.

End Result:

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

Spoiler

[Image: 687474703a2f2f692e696d6775722e636f6d2f6e...6d2e706e67]


Credits:

My Onii-chan. <3

"From the perspective of others I am part of the world, but when I observe the world from my perspective I am nowhere to be found. To observe is to create perspective. I can never cease to be the point of origin from my perspective. I observe that which is not myself. This is the first principle to find." - Ergo Proxy
[+] 1 user loves Tenshi's post
Melancholy
すけべ
Admin
Posts: 3,863
Threads: 213
Joined: Jul 2014
Reputation: 60
10-08-2016, 12:07 AM
#60863 (2)
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). 

Quote:
Code:
<center>

https://developer.mozilla.org/en-US/docs...ent/center
[Image: 68747470733a2f2f752e706f6d662e69732f7971...782e706e67]

Tenshi
An angel of the Yuri Goddess.
Kohai
Posts: 503
Threads: 60
Joined: Aug 2016
Reputation: 1
10-09-2016, 07:33 AM
#60864 (3)
(10-08-2016, 12:07 AM)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). 

Quote:
Code:
<center>

https://developer.mozilla.org/en-US/docs...ent/center
[Image: 68747470733a2f2f752e706f6d662e69732f7971...782e706e67]

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.
Melancholy
すけべ
Admin
Posts: 3,863
Threads: 213
Joined: Jul 2014
Reputation: 60
10-11-2016, 03:09 PM
#61014 (4)
(10-09-2016, 07:33 AM)Tenshi Wrote:
(10-08-2016, 12:07 AM)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). 

Quote:
Code:
<center>

https://developer.mozilla.org/en-US/docs...ent/center
[Image: 68747470733a2f2f752e706f6d662e69732f7971...782e706e67]

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

seel
flat is justice
Pumpkin
Posts: 1,232
Threads: 41
Joined: Oct 2015
Reputation: 13
10-11-2016, 03:09 PM
#61016 (5)
(10-11-2016, 03:09 PM)Melancholy Wrote:
(10-09-2016, 07:33 AM)Tenshi Wrote:
(10-08-2016, 12:07 AM)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). 

Quote:
Code:
<center>

https://developer.mozilla.org/en-US/docs...ent/center
[Image: 68747470733a2f2f752e706f6d662e69732f7971...782e706e67]

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.

Tenshi
An angel of the Yuri Goddess.
Kohai
Posts: 503
Threads: 60
Joined: Aug 2016
Reputation: 1
10-12-2016, 01:42 AM
#61193 (6)
(10-11-2016, 03:09 PM)Melancholy Wrote:
(10-09-2016, 07:33 AM)Tenshi Wrote:
(10-08-2016, 12:07 AM)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). 

Quote:
Code:
<center>

https://developer.mozilla.org/en-US/docs...ent/center
[Image: 68747470733a2f2f752e706f6d662e69732f7971...782e706e67]

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.

"From the perspective of others I am part of the world, but when I observe the world from my perspective I am nowhere to be found. To observe is to create perspective. I can never cease to be the point of origin from my perspective. I observe that which is not myself. This is the first principle to find." - Ergo Proxy