WordPress Plugin: MyComic Browser

Contents:

While creating the Uber-Geeks Web Comic, I wanted to keep WordPress as the backend for all my comic posting needs...which was fine. In doing so, I lacked the appropriate browsing features that seem common amongst many web comics (like Penny Arcade and RealLife).

Description

This plugin places a comic browser in a comic post (along with the comic name) providing navigation to First, Previous, Next, and Last comics.

Installation

  • Download and unzip mycomic.zip
  • Place mycomic.php in your wp-content/plugins directory
  • Log in to your WordPress admin panel and activate the plugin, then visit the new mycomic submenu of the plugins tab. This will allow mycomic to create its database tables.
  • Once installed, be sure to enable the options and consider customizing the look by adding the mycomic CSS to your theme’s CSS.
  • Edit Your Post/Page Tempates

Editing Your Post & Page Templates

Place the following line of code above the output of the content of a post/page:

PHP:
  1. <?php if($comic=mycomic_is_comic($id)) mycomic_navigator($comic,$id); ?>

Here's what the Uber-Geeks index.php looks like (line 14 has the code you want to insert):

PHP:
  1. <?php get_header(); ?>
  2.  
  3.     <div id="content" class="narrowcolumn">
  4.  
  5.     <?php if (have_posts()) : ?>
  6.  
  7.     <?php while (have_posts()) : the_post(); ?>
  8.  
  9.             <div class="post top" id="post-<?php the_ID(); ?>">
  10.                 <h2 class="first"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
  11.                 <div class="postmetadata">Posted in <?php the_category(', ') ?> by <?php the_author() ?> | <?php edit_post_link('Edit', '', ' | '); ?>  <?php comments_popup_link('No Comments &#187;', '1 Comment &#187;', '% Comments &#187;'); ?></div>
  12.  
  13.                 <div class="entry">
  14.                     <?php if($comic=mycomic_is_comic($id)) mycomic_navigator($comic,$id); ?>
  15.                     <?php the_content("<span class=\"continue\">" . __('Continue reading','') . " '" . the_title('', '', false) . "'"); ?>
  16.                 </div>
  17.             </div>
  18.  
  19.         <?php endwhile; ?>
  20.  
  21.     <?php else : ?>
  22.  
  23.         <h2 class="center">Not Found</h2>
  24.         <p class="center">Sorry, but you are looking for something that isn't here.</p>
  25.         <?php include (TEMPLATEPATH . "/searchform.php"); ?>
  26.     <?php endif; ?>
  27.     </div>
  28. <?php get_sidebar(); ?>
  29. <?php get_footer(); ?>

Place that line of code in similar fashion in any template file that you wish to display the MyComic Browser.

Adding A Comic

Once fully installed, you are free to mark your comic posts as comics (in order to add them to the comic browser table). While editing/adding a post, simply create a custom field:

  • Key: comic
  • Value: 1

Save your post and the browser will appear!

Tags: , ,

Discuss This Article


22 Responses to “WordPress Plugin: MyComic Browser”

  1. pingback pingback:
    WordPress Plugins Feature for August | blogHelper

    [...] My Comic BrowserFrom the plugin’s name alone, I’m sure you’d have noticed that it’s an extremely niche plugin. What it does is to create a navigation system that you’d normally see on a webcomic (e.g. first, previous, next, last comic). My first thought was that it is an easy way to augment WP to act as a webcomic-centric CMS. After all, it’s really only up to your imagination how to use WP as a CMS. [...]

    Reply to this comment.
    1
  2. AvatarSkit

    Was toying with code last night to try and do this. Glad to see someone has whipped up a plugin.

    Have been thinkin however, perhaps basing the inclusion of the navigation bassed on category? Might have a play with the plugin and see what I can break come up with. :)

    Reply to this comment.
    2
  3. Avatarc2h5oh

    Well.. it doesn’t work with 2.0.5 -> I can’t activate it since all the code of the plugin is displayed in admin panel..

    Reply to this comment.
    3
  4. AvatarSam

    Been looking a long time for something like this to try and help get my web comic(s) started up. Thanks for the plugin! :) Just wondering..Does it support multiple comics? Because I will be supporting two different ones on the same page..

    Reply to this comment.
    4
  5. AvatarJake

    Doesn’t work with 2.0.5. Damn.

    Reply to this comment.
    5
  6. AvatarKisakookoo

    Hi! Why I can’t fill my info in profile? Can somebody help me?
    My login is Kisakookoo!

    Reply to this comment.
    6
  7. AvatarMattisdada

    Doesnt work with wordpress 2.0.4 and it shows everything in the plugin panel

    Reply to this comment.
    7
  8. AvatarRemy Overkempe

    Works perfect for me with 2.1

    But I’ve got a question. Is there a possibility to let the plugin check “id” instead of “post_id”, because my post_id’s aren’t in the right order, but my id’s are.

    Thnx.

    Reply to this comment.
    8
  9. AvatarMike Lin

    Jake, Mattisdada etc. It’s breaking because the file is in mac format, with \r’s instead of \n’s. You can fix this on linux like this:

    tr ‘\r’ ‘\n’ mycomic.php.bak
    mv mycomic.php.bak mycomic.php

    Reply to this comment.
    9
  10. AvatarMike Lin

    gah! it lost the angle brackets. That should be
    tr ‘\r’ ‘\n’ &lt mycomic.php &gt mycomic.php.bak

    Reply to this comment.
    10
  11. AvatarMike Lin

    sigh… well that didn’t work either. whatever. I hope you know what I mean.

    Reply to this comment.
    11
  12. AvatarMosey

    For people having issues with the plugin showing *everywhere* on the Plugins page - its a MAC format issue as explained by Mike Lin.

    However, not all of us know how to use the command line and such (I certainly don’t! :P) so for those on e.g. WindowsXP - once you’ve downloaded the file to your hard drive, I suggest donwloading Notepad++ here, loading up the file and clicking on ‘Format’ -> ‘Convert to Unix Format’ before uploading it to your webhost (usually unix/linux)

    Reply to this comment.
    12
  13. AvatarMosey

    During Activation - the plugin warns you that tables will have to be manually deleted if the plugin is removed. It also gave a header error… which I didn’t manage to copy down.

    Reply to this comment.
    13
  14. AvatarMosey

    I haven’t been able to make this work on 2.11 yet… although the posts have the key ‘comic’ and value ‘1′, for some reason they’re not being written to the wp_comic table. Some suggestions would be appreciated :) Thanks!

    Reply to this comment.
    14
  15. AvatarMosey

    This plugin now works in 2.12. The author (Matthew Batchelder) has updated the plugin so all the errors (that I can find anyway) have disappeared. Thanks Matt! :)

    Reply to this comment.
    15
  16. AvatarTekchip

    I’m having some issues getting it working. I created a page template and included the php line above. Tag is set to dncomic and I set the comic title. I get the error message

    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1]
    SELECT comic FROM wp_comic WHERE post_id=;

    Kind of stuck as to what to do. I know how to admin MySQL and I can decipher php and css enough to modify things but I’m not so hot on trouble shooting and I definitely can’t write from scratch. tekchip at yahoo dot com

    Reply to this comment.
    16
  17. pingback pingback:
    Katana Blues » renovated for the 6th time

    [...] Mycomic what to do Thanks if you could help me with this one wordpress-bobo heheh Filed under: Geekiness [...]

    Reply to this comment.
    17
  18. pingback pingback:
    WP Plugins DB » Plugin Details » MyComic Browser

    [...] Visit [...]

    Reply to this comment.
    18
  19. Avatarlancelot

    Hello, i dont fully understand where i add your code so it can be displayed in the theme i use. Can i email you somehow, to give you my comments.php and add it? If yes, please do email me:)

    Reply to this comment.
    19
  20. AvatarRyan

    Will there be any demo?

    Reply to this comment.
    20
  21. AvatarRyan

    Is there any demo?

    Reply to this comment.
    21
  22. AvatarMosey

    Long time no see! In the end my previous project petered out, but I’m back again! Just wondering if the plugin works with 2.3.3 and/or 2.5 (Wordpress versions)? :) Thanks!

    Reply to this comment.
    22

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Comment Preview:

 (3415) - mycomic (75) - wordpress comic (23) - comic browser (16) - comic wordpress (15) - webcomic wordpress (9) - wordpress comic plugin (9) - wordpress comics (7) - wordpress comics plugin (6) - comic wordpress theme (6) - comic theme wordpress (5) - wordpress theme comic (5) - comic (5) - wordpress webcomic (5) - wordpress comic template (4) - wordpress comic plug in (3) - using wordpress for comics (3) - comics wordpress (3) - php webcomic previous next (2) - template wordpress comic (2) - wordpress webcomics theme (2) - wordpress templates comic (2) - wordpress webcomic template (2) - cartoon wordpress themes (2) - wordpress for comics (2) - wordpress webcomic plugin (2) - wordpress for webcomic (2) - wordpress comic theme (2) - post browser wordpress plugin (1) - templates comic wordpress (1) - notepad wordpress plugin (1) - wordpress comics templates (1) - comics theme wordpress (1) - cartoonist webpress template (1) - addon comic wordpress (1) - comics templates wordpress (1) - webcomic previous next code php (1) - comic browser linux (1) - comics template wordpress (1) - free wordpress comic templates (1) - cartoon plugins for linux (1) - blogger comic templates (1) - blogger webcomic template (1) - wp comic template (1) - comic blog wordpress (1) - wordpress comic rate plugin (1) - multiple Panel Cartoon Template (1) - blogger comic template (1) - webcomic template for blogger (1) - story wordpress (1) - wordpress comic themes for blogs (1) - webcomic add on for wordpress (1) - wordpress plugin for news story (1) - comic wordpress themes (1) - cartoon wordpress theme (1) - What is my comic wordpress plugin (1) - login wordpress plugin (1) - wordpress templates cartoon (1) - Multiple Navigation WordPress Plugin (1) - using wordpress for webcomic (1) - multiple comics wordpress (1) - webcomic plugins (1) - arcade plugin wordpress (1) - webcomics on wordpress (1) - wordpress comic blog (1) - comic browsing php (1) - wordpress themes comic (1) - wordpress file browser (1) - wordpress plugin comic (1) - webcomic php template (1) - random news wordpress plugin (1) - wordpress plugins comic (1) - US comic plugin (1) - Comic Plugin for Wordpress (1) - comic plugin wordpress (1) - wordpress comics theme (1) - webcomic plugin (1) - comic wordpress template (1) - wordpress theme comics (1) - wordpress webcomic plugins (1) - wordpress cartoon template (1) - theme wordpress comic (1) - wordpress comics viewer (1) - creating a multiple page comic wordpress (1) - blogger comic plugin (1) - php my comic (1) - cartoon plugin wordpress (1) - wordpress plugins (1) - web comic plugin (1) - comic browser wordpress plugin (1) - wordpress plugin random news (1) - linux comics browser (1) - wordpress comics themes (1) - wordpress comic themes (1) - comics template (1) - penny arcade wordpress plugin (1) -