Reply To: Convert WP-Manga DB for my Manga Reader CMS

Works Forums Plugins my Manga Reader Convert WP-Manga DB for my Manga Reader CMS Reply To: Convert WP-Manga DB for my Manga Reader CMS

#538

owari
Participant

While it may be easier to do.

1) in MySQL table manga add scanlator

2) in /mymangacms_base/app/models/Manga.php

public $fillable = [

Add to

scanlator

3)

in mymangacms_base/app/controllers/FrontController.php

find

Show Manga list page

after
} else if ($type == “author”){
$mangaList = Manga::where(‘manga.author’, ‘like’, “%$archive%”)
->orderBy(‘name’, ‘asc’)
->with(‘categories’)->paginate($limit);

insert

} else if ($type == “scanlator”){
$mangaList = Manga::where(‘manga.scanlator’, ‘like’, “%$archive%”)
->orderBy(‘name’, ‘asc’)
->with(‘categories’)->paginate($limit);

4) in app\views\admin\manga\create.blade.php

Insert
after the shape of the artist

<div class=”form-group”>
{{Form::label(‘scanlator’, Lang::get(‘messages.admin.manga.create.scanlator’))}}
{{Form::text(‘scanlator’, ”, array(‘class’ => ‘form-control’, ‘placeholder’ => Lang::get(‘messages.admin.manga.create.comma-separated’)))}}
</div>
5) in app\views\admin\manga\edit.blade.php

Insert
after the shape of the artist

<div class=”form-group”>
{{Form::label(‘scanlator’, Lang::get(‘messages.admin.manga.create.scanlator’))}}
{{Form::text(‘scanlator’, $manga->artist, array(‘class’ => ‘form-control’, ‘placeholder’ => Lang::get(‘messages.admin.manga.create.comma-separated’)))}}
</div>

6) in app\views\front\themes\default\blocs\manga\show.blade.php

After the artist
insert

@if(!is_null($manga->scanlator) && $manga->scanlator != “”)
<dt>{{ Lang::get(‘messages.front.manga.scanlator’) }}</dt>
<dd>
<?php $authors=explode(‘,’, $manga->scanlator);?>
@foreach($scanlators as $index=>$scanlator)
{{ link_to(“/manga-list/author/”.trim($scanlator), trim($scanlator)) }}
@if($index!=count($scanlator)-1)

@endif
@endforeach
</dd>
@endif

Hope I didn’t miss anything.