how to add MPAA (ratings) to movies and series
ie pg, pg-13, r, tv-14, tv-ma, etc (now if only I can figure out how to pull it from tmdb when getting movies/series)
in your phpadmin
for your watchamovie/woovie database
run this sql
i've attached a zip file with a text file in it with the sql to run since I can't post it here nor attach the text file
in app/controller
in the following files
Category.php, Collection.php, Discovery.php, Episode.php, Movie.php, Movies.php, Serie.php, and Series.php
find
after add
(there's 2 in Episode.php and Movie.php)
in app/controller/admin
Movie.php and Serie.php
find
Code:
'create_year' => Input::cleaner($_POST['create_year']),
after add
Code:
'mpaa' => Input::cleaner($_POST['mpaa']),
(there's 2 of them in both files)
in app/locale/en.php
find
after add
in app/theme/assets/css/app.css
find
Code:
/*# sourceMappingURL=app.css.map */
before add
Code:
.mpaa {
border: 1px solid #b5b5be;
font-size:10px;
display: inline-flex;
white-space: nowrap;
align-items: center;
align-content: center;
padding: 0.06em 4px 0.15em 4px !important;
line-height: 1;
border-radius: 2px;
margin-right: 7px;}
in app/theme/view/module
home.movies.php and home.series.php
find
after add
find
Code:
<a href="<?php echo post($Newest['id'],$Newest['self'],$Newest['type']);?>" class="list-title">
<?php echo $Newest['title'];?></a>
after add
Code:
<?php if($Newest['mpaa']) { ?><div class="mpaa"><?php echo $Newest['mpaa'];?></div><?php } ?>
home.slider.php
find
after add
find
Code:
<div class="category text-12">
<?php echo ($Slide['type'] == 'movie' ? __('Movie') : __('Serie'));?>
</div>
after add
Code:
<?php if($Slide['mpaa']) { ?><div class="mpaa"><?php echo $Slide['mpaa'];?></div><?php } ?>
in app/theme/view
category.php, discovery.php, movies.php, and series.php
find
Code:
<a href="<?php echo post($Listing['id'],$Listing['self'],$Listing['type']);?>" class="list-title">
<?php echo $Listing['title'];?>
</a>
after add
Code:
<?php if($Listing['mpaa']) { ?><div class="mpaa"><?php echo $Listing['mpaa'];?></div><?php } ?>
collection.php
find
Code:
<a href="<?php echo post($Collection['content_id'],$Collection['self'],$Collection['type']);?>" class="list-title">
<?php echo $Collection['title'];?>
</a>
after add
Code:
<?php if($Collection['mpaa']) { ?><div class="mpaa"><?php echo $Collection['mpaa'];?></div><?php } ?>
episode.php, movie.php and serie.php
find
Code:
<?php if($Listing['country_name']) { ?>
<div class="video-attr">
<div class="attr">
<?php echo __('Country');?>
</div>
<div class="text">
<?php echo $Listing['country_name'];?>
</div>
</div>
<?php } ?>
before add
Code:
<?php if($Listing['mpaa']) { ?>
<div class="video-attr">
<div class="attr">
<?php echo __('MPAA');?>
</div>
<div class="text">
<?php echo $Listing['mpaa'];?>
</div>
</div>
<?php } ?>
find
Code:
<a href="<?php echo post($Similar['id'],$Similar['self'],$Similar['type']);?>" class="list-title">
<?php echo $Similar['title'];?>
</a>
after add
Code:
<?php if($Similar['mpaa']) { ?><div class="mpaa"><?php echo $Similar['mpaa'];?></div><?php } ?>
in app/view/common/post.tab.content.php
find
Code:
<div class="col-md-3">
<div class="form-group">
<label class="custom-label"><?php echo __('Duration');?></label>
<input type="text" name="duration" class="form-control" placeholder="<?php echo __('Duration');?>" value="<?php echo $Listing['duration']; ?>">
</div>
</div>
after add
Code:
<div class="col-md-3">
<div class="form-group">
<label class="custom-label"><?php echo __('MPAA');?></label>
<input type="text" name="mpaa" class="form-control" placeholder="<?php echo __('MPAA');?>" value="<?php echo $Listing['mpaa']; ?>">
</div>
</div>