Pnuts CC's Blog Flower & World, Life & Paradise.

MO : Manga Online

Notice: The old “php my Manga” project have renamed as “MO”.

Introduce

So, what’s MO? Of cause, MO is the name of the cutest robot in movie “wall.e”.

mo1

But I’ll not talk about him/her. The “MO” here is short for “Manga Online”, which a simple php project that allow people people view manga online. I say it simple, because There is no database needed, so you can put it everywhere as you like, also you call setup a apache server and put it on your localhost server. ( Believe me, this is a good idea, considering the browser speed. )

Sample Sites

http://mo.pnuts.cc or http://manga.pnuts.cc

If you are so lazy to download the source code and setup. You can always just visit the foregoing urls.

Screen slots & User Manual

image

*The Chinese on index says :

*1 “贴吧” do NOT support search, you need type the full name.

For example : “初音”.

*2 OneManga is a websites that provider English Manga, you need type the English name of manga.

For example : “bokura”.

image

Next : Show next image.

Prev : Show previous image.

[-] : Min the number in the textbox by 1.

[+] : Add the number in the textbox by 1.

GO : Show the page whose page number in the textbox.

Chapters : Back to the Chapter List page. You can pick another chapter of this book.

Index : Back to Index.

Keyboard

There are two ways to move the page.

[w], [a], [s], [d] : For game player.

[h], [j], [k], [l] : For Vim User.

If the page is already at bottom, [s] or [j] will show next image.

[<] : Previous Image.

[>] : Next Image.


The following is for developer.

Setup

If you know what’s php, you’ll know how to set it up. And the follow mods may need :

GD, Curl, the mods I forget.

Download

I have already set up a project on Codeplex. The project index is :

http://manga.codeplex.com/

If you ask me why Codeplex, not sourceforge. That’s because the username “pnuts” of sourceforge has been taken by someone else. So I haaaaaate it. I like Microsoft’s products may be another reason.

A Example Of Provider

I put it here because I am dying for someone who can help me add new providers. It’s very easy, if you have interest, just try.

// Every Provider shoulds implements IProvider
class TestProvider implements IProvider {
	// The name of the provider, this will be show at index.
	function getName() {
		return "Test Provider";
	}

	// The http ref of the provider's website.
	// This is needed when download a image.
	// Because most websites prevent links from a different site.
	function getRef() {
		return "127.0.0.1";
	}

	// The encode of provider.
	function getEncode() {
		return "utf-8";
	}

	// Wether the provider's website prevent Hotlink.
	function preventHotlink() {
		return true;
	}

	// Search a key word.
	// Params :
	//     $keyword		 :     string
	//         The keywords to search.
	//     $pageNo       :     int
	//         The page number which to deal with.
	//         Because the search result may not in one page.
	// Return :
	// [] represent array.
	//     [
	//         'books'          =>     [ Book ... ], 
	//         'pageCount'      =>     int
	//     ]
	function search($keyword, $pageNo) {
		return array(
			'books' => array( new Book($pageNo, "TestBook ".$pageNo) ),
			'pageCount' => 2
		);
	}

	// Get the book with the given id.
	// Search a key word.
	// Params :
	//     $bookId       :     string
	//         Id of the book.
	// Return : Book
	function getBook($bookId) {
		return new Book($bookId, "TestBook ".$bookId);
	}

	// Get the Chapters of the book.
	// Params :
	//     $bookid       :     string
	//         Id of the book.
	//     $pageNo       :     int
	//         You can split chapters into pages,
	//         and the $pageNo is the page number.
	// Return :
	// [] represent array.
	//     [
	//         'chapters'       =>     [ Chapter ... ], 
	//         'pageCount'      =>     int
	//     ]
	function getChapters($bookId, $pageNo) {
		return array(
			'chapters' => array(
				new Chapter(1, "TestChapter 1"),
				new Chapter(2, "TestChapter 2")
			),
			'pageCount' => 2
		);
	}

	// Get the book with the given id.
	// Search a key word.
	// Params :
	//     $bookId       :     string
	//         Id of the book.
	//     $chapterId    :     string
	//         Id of the chapter.
	// Return : Chapter
	function getChapter($bookId, $chapterId) {
		return new Chapter($chapterId, "TestChapter ".$chapterId);
	}

	// Get the url of the image.
	// Params :
	//     $bookId       :     string
	//         Id of the book.
	//     $providerId   :     string
	//         Id of the chapter.
	//     $imgNo        :     int
	// Return : [ string ]
	//
	//               !!!! IMPORTANT !!!!
	//     The return is a array of the image url.
	function getImageUrl($bookId, $chapterId, $imgNo) {
		return array("http://www.google.com/intl/en_ALL/images/srpr/logo1w.png");
	}

	//Get the count of image.
	// Params :
	//     $bookId       :      string
	//     $chapter      :      string
	// Return : int
	function getImageCount($bookId, $chapterId) {
		return 20;
	}
}

License

Apache License Version 2.0

Comments (12) Trackbacks (2)
  1. Awesome I’ve seen on this in awhile. Thanks for sharing.

  2. Bossier City, Louisiana, this would be a great choice for those training their
    pups to be AKC Champion Dogs, with the specific classes they offer as well as their basic training for puppies.
    A canine’s name really should just be applied when positively interacting with the animal.

    This elite centre, after having proved its training mettle, has started getting requests from
    many organisations to allot seats in explosive detection,
    tracking, infantry patrol, narcotics detection and search & rescue.

  3. Another is the Finch Bay Eco Resort, an award winning hotel with its own beach.
    Where can you look for reliable and honest
    information. Again, consider the present value of future earnings
    for parity.

  4. Great blog right here! Additionally your web site
    a loot up very fast! What host are youu the use of? Can I get
    your associate link for your host? I desire my site loaded up ass quickly as yours lol

  5. It’s going to be end of mine day, however before end
    I am reading this fantastic post to increase my know-how.

  6. Tapaso provides full range of how to increase mobile app downloads apple app store search optimization (ASO): App title, description,how to increase mobile app downloads, logo, screenshots, category, KEYWORDS. We will help you attract a great number of potential clients and promote your apps more efficiently and smartly!

  7. King’s Empire Hack for Android,game of war pac game of war packs ks, iPhone, iPad. King’s Empire Hack generates unlimited Gold, Gems, Stone, Iron and Energy! Fins the most practical kings empire gem cheat online and become a top player!

  8. The specific quitefundamentals about cris-crossing. In order to toperfor wow mounts for sale cheap m the totally free cease, you must apply the specific stored égal keep to inside purchase toposition any kind of spin and rewrite as well as spinner round the footballing. After you press the specific stored égal

  9. I needed to thank you for this good read!! I definitely loved every tiny amount of it.
    I actually have got you saved as being a favorite to consider
    new stuff you post

  10. Hi I am so grateful I found your weblog, I really found you
    by error, while I was searching on Askjeeve for something else, Anyways I am here now and would just
    like to say cheers for a fantastic post and a all round exciting blog (I also
    love the theme/design), I dont have time to browse it all at the moment but I have book-marked it and also added in your RSS feeds, so when I have time I will be back
    to read a great deal more, Please do keep up the fantastic work.

  11. Getting to purchase mens shavers guarantee that clean shaven guise.

    It is quite the cutting edge choice in electric razors.
    Electric razor infomercial If you would like your kids away
    in the TV and out playing inside the park then your razor E100
    electric scooter might be the answer you have been looking for.

    Let your husband educate you on how to shave provided, needless
    to say, his face hasn’t been ruined by a razor blade. The Panasonic electric shaver ES8249S Nanotech comes having a lithium-ion battery, travel case
    and a trimmer.

  12. After I initially commented I seem to have clicked on the -Notify me when new comments are added-
    checkbox and from now on whenever a comment is added I receive 4 emails with exactly the same comment.
    Perhaps there may be a means you can actually remove me from that service?

    Thanks a lot!


Leave a comment