Skip to content

Commit

Permalink
0.8.4 : Comment out code in default archive.php, changed 404.php to s…
Browse files Browse the repository at this point in the history
…how welcome post,

comment out code in tags.php, taxonomies.php, make sure arrow to right does not show, filled
out documentation a bit more,
  • Loading branch information
Ayal Pinkus committed Jun 29, 2018
1 parent 78ef9e2 commit 92c7881
Show file tree
Hide file tree
Showing 12 changed files with 127 additions and 21 deletions.
6 changes: 4 additions & 2 deletions 404.php
Expand Up @@ -9,9 +9,11 @@
get_header(); ?>

<main role="main">

<?php inkblot_welcome_to_archive(); ?>

<?php get_template_part('content', 'none'); ?>
<?php /*@@@TODO remove? get_template_part('content', 'none'); */ ?>

</main>

<?php get_sidebar(); get_footer();
<?php get_sidebar(); get_footer();
22 changes: 15 additions & 7 deletions _/php/tags.php
Expand Up @@ -106,10 +106,17 @@ function inkblot_post_nav($class = '', $previous = '&laquo; %title', $next = '%t

function inkblot_posts_nav($args = array(), $paged = false) {

/* __('&laquo; Previous Page', 'inkblot') &laquo; */
/* __('Next Page &raquo;', 'inkblot') &raquo; */

/*
$max_page = 0;
if (array_key_exists('max_page', $args)) {
$max_page = intval($args['max_page']);
}





/*@@@TODO remove?
get_the_posts_pagination(array_merge(array(
'prev_text' => '<div class="inkblot-ace-arrow-button" ><div class="arrow-left"></div> <div class="arrow-left"></div></div>' ,
'next_text' => '<div class="inkblot-ace-arrow-button" ><div class="arrow-right"></div> <div class="arrow-right"></div></div>' ,
Expand All @@ -119,7 +126,7 @@ function inkblot_posts_nav($args = array(), $paged = false) {

$prevstr = inkblot_get_previous_posts_link('<div class="inkblot-ace-arrow-button" ><div class="arrow-left"></div><div class="arrow-left"></div></div>');

$nextstr = inkblot_get_next_posts_link('<div class="inkblot-ace-arrow-button" ><div class="arrow-right"></div><div class="arrow-right"></div></div>');
$nextstr = inkblot_get_next_posts_link('<div class="inkblot-ace-arrow-button" ><div class="arrow-right"></div><div class="arrow-right"></div></div>', $max_page);

if ($prevstr == "") {
$prevstr = '<a class="inkblot-ace-arrow-container">' . '<div class="inkblot-ace-arrow-button-disabled" ><div class="arrow-left"></div><div class="arrow-left"></div></div>' . '</a>';
Expand All @@ -128,11 +135,12 @@ function inkblot_posts_nav($args = array(), $paged = false) {
$nextstr = '<a class="inkblot-ace-arrow-container">' . '<div class="inkblot-ace-arrow-button-disabled" ><div class="arrow-right"></div><div class="arrow-right"></div></div>' . '</a>';
}

//@@@HIER
//
//'<a class="inkblot-ace-arrow-container" href="' . next_posts( 0, false ) . inkblot_default_query_parameters(__FILE__,__LINE__) . '" >' . '<div class="inkblot-ace-arrow-button" ><div class="arrow-right"></div> <div class="arrow-right"></div></div>' . '</a>'

/*@@@TODO remove?
//'<a class="inkblot-ace-arrow-container" href="' . next_posts( 0, false ) . inkblot_default_query_parameters(__FILE__,__LINE__) . '" >' . '<div class="inkblot-ace-arrow-button" ><div class="arrow-right"></div> <div class="arrow-right"></div></div>' . '</a>'
//'<div class="inkblot-ace-arrow-container">'
*/


return $paged
? '<nav class="navigation pagination" role="navigation"><h2 class="screen-reader-text">Posts navigation</h2>' .
Expand Down
11 changes: 10 additions & 1 deletion archive.php
Expand Up @@ -11,6 +11,13 @@
get_header(); ?>

<main role="main">


<?php echo '<p style="font-size:60pt; font-weight:900;">You should not be able to see this!</p>'; ?>

<?php /*TODO remove? AYAL. Default archive, not used for this theme
@@@
<?php if (have_posts()) : ?>
Expand Down Expand Up @@ -44,7 +51,9 @@
get_template_part('content', 'none');
endif;
?>
*/ ?>

</main>

<?php get_sidebar(); get_footer();
<?php get_sidebar(); get_footer();
11 changes: 10 additions & 1 deletion author.php
Expand Up @@ -50,6 +50,7 @@

$canshow=true;

$postnav = array();

$lastid = inkblot_lastpost_id();

Expand All @@ -71,8 +72,16 @@
: get_template_part('content', get_post_format());
echo "</a>";
}

if (!($renderall) && $post->ID >= $lastid) {
global $paged, $wp_query;
if ( !$paged ) $paged = 1;
$postnav['max_page'] = $paged;
}


endwhile;
print inkblot_posts_nav(false, get_theme_mod('paged_navigation', true));
print inkblot_posts_nav($postnav, get_theme_mod('paged_navigation', true));
}


Expand Down
12 changes: 11 additions & 1 deletion category.php
Expand Up @@ -54,6 +54,9 @@
else
{
$canshow=true;

$postnav = array();


/*@@@TODO remove?
$lastid = 0;
Expand Down Expand Up @@ -94,9 +97,16 @@

echo "</a>";
}

if (!($renderall) && $post->ID >= $lastid) {
global $paged, $wp_query;
if ( !$paged ) $paged = 1;
$postnav['max_page'] = $paged;
}

endwhile;

print inkblot_posts_nav(false, get_theme_mod('paged_navigation', true));
print inkblot_posts_nav($postnav, get_theme_mod('paged_navigation', true));
}

else:
Expand Down
2 changes: 1 addition & 1 deletion functions.php
Expand Up @@ -354,7 +354,7 @@ function inkblot_welcome_to_archive() {
endwhile;
//print inkblot_posts_nav(false, get_theme_mod('paged_navigation', true));
else :
echo "<h1>Welcome!</h1>To the maintainer of this site: you can create posts filed under the category 'welcome' and they will show here instead of this text.<p>You can also file posts under the category 'afterword' to specify a call to action to be placed below lists of posts.<p>Posts filed under the category 'story' will be included in the lists of posts.<p>Visitors can not see posts by default. If you go to the admin area, and click on the permalink of a post, you can share the url in the url bar of the browser, and people will be able to see all posts upto that post.<p>This theme is meant to be used as an archive for a newsletter, allowing people to see all posts upto a specified point.<p>";
echo "<h1>Welcome!</h1>To the maintainer of this site: you can create posts filed under the category 'welcome' and they will show here instead of this text.<p>You can also file posts under the category 'afterword' to specify a call to action to be placed below lists of posts.<p>Posts filed under the category 'story' will be included in the lists of posts. You can, of you want, also add these posts to categories that are sub-categories of the 'story' category. These sub-categories could represent chapters.<p>Visitors can not see posts by default. If you go to the admin area, and click on the permalink of a post, you can share the url in the url bar of the browser, and people will be able to see all posts upto that post.<p>This theme is meant to be used as an archive for a newsletter, allowing people to see all posts upto a specified point.<p>";
endif;
}
else
Expand Down
11 changes: 10 additions & 1 deletion index.php
Expand Up @@ -65,6 +65,8 @@
else
{
$canshow=true;

$postnav = array();


if (have_posts()) :
Expand All @@ -82,8 +84,15 @@
get_template_part('content', get_post_format());
echo "</a>";
}

if (!($renderall) && $post->ID >= $lastid) {
global $paged, $wp_query;
if ( !$paged ) $paged = 1;
$postnav['max_page'] = $paged;
}

endwhile;
print inkblot_posts_nav(false, get_theme_mod('paged_navigation', true));
print inkblot_posts_nav($postnav, get_theme_mod('paged_navigation', true));
else :
get_template_part('content', 'none');
endif;
Expand Down
37 changes: 34 additions & 3 deletions readme.md
@@ -1,3 +1,10 @@
## About Inkblot ACE

Inkblot ACE is a Wordpress theme that was derived from the Inkblot theme.

Inkblot ACE modifies the theme so that it can be used effectively as an archive for comics sent by email. If you share a link to a post, the link also gives access to the archive upto that post. With the link, you will never be able to read past that post, unless you get a new link from the creator.


Inkblot is an elegant, [fully responsive](https://en.wikipedia.org/wiki/Responsive_web_design), [highly customizable](https://codex.wordpress.org/Appearance_Customize_Screen) [Webcomic](https://github.com/mgsisk/webcomic)-ready [WordPress](https://wordpress.org) theme, named in honor of Rorschach from the Watchmen graphic novel.

## Installation
Expand All @@ -11,11 +18,35 @@ You can install Inkblot from the **Themes > Add New** page in the administrative
3. Activate Inkblot through the **Appearance > Themes** page in the administrative dashboard.


## About This Fork
## How Inkblot ACE differs from Inkblot

Additional modifications in this fork of Inkblot were made by Ayal Pinkus with help from Jason Brubaker. This forked version is designed to act as an archive for use with a comics mailing list: it shows posts from oldest to newest for a better reading experience, and a 'lastpost' query parameter is required, being the name (slug) of the last post to be shown.

Create story posts under the 'story' category, and under the 'afterword' category for a call to action. Posts filed under the category 'afterword' will be appended below the list of posts. You could add a call to action in that post, to join a mailing list for example.

You can create posts filed under the category 'welcome' and they will show when someone lands on your website without having a link to a specific post. You can use this post to redirect visitors to your Patreon or mailing list, where they can get links to your posts after they subscribe to your mailing list or become a Patron.

The main index page shows all posts filed under the category 'story'. You can only see the posts upto and including the post you had the link to. You basically have an archive of posts up to that point. If there are newer posts, you can not see them unless you have a link to them.

You can, of you want, also add these posts to categories that are sub-categories of the 'story' category. These sub-categories could for example represent chapters. Below the main list of posts is a list with these sub-categories. This would allow the visitor to jump to one of these chapters.

<p>You can also file a post under the category 'afterword' to specify a call to action to be placed below lists of posts.<p>

## How To Share Posts

Visitors can not see posts by default. If you go to the admin area, and click on the permalink of a post, you can share the url in the url bar of the browser, and people will be able to see all posts upto that post.

This theme is meant to be used as an archive for a newsletter, allowing people to see all posts upto a specified point.

## How It Works

You will notice that the url ends with ?lastpost=(post-slug) . post-slug is the slug of the post you are sharing, and is effectively used as the password that allows people access to the archive of posts upto and including that post.

<u><b>So it is important that you use slugs for your posts that people can not guess easily!</b></u>

You can for example use the title of a post to create the slug. Numbers or dates for example are not well-suited as slugs, because they can be easily guessed, allowing people access to your posts. The slug should be descriptive so people reading the url know what to expect, but at the same time you should also consider the slug of each post to be a password allowing access to your content. So make it long and surprising and unguessable.

Additional modifications in this fork of Inkblot were made by Ayal Pinkus and Jason Brubaker. This forked version is designed to act as an archive for use with a comics mailing list: it shows posts from oldest to newest for a better reading experience, and a 'lastpost' query parameter is required, being the name (slug) of the last post to be shown.

Create story posts under the 'story' category, and under the 'afterword' category for a call to action. Posts filed under the category 'afterword' will be appended below the list of posts. You could add a call to action in that post, to join a mailing list for example.


## Frequently Asked Questions
Expand Down
12 changes: 11 additions & 1 deletion search.php
Expand Up @@ -9,6 +9,13 @@
get_header(); ?>

<main role="main">

<?php echo '<p style="font-size:60pt; font-weight:900;">You should not be able to see this!</p>'; ?>

<?php /*TODO remove? AYAL. Default archive, not used for this theme
@@@
<?php if (have_posts()) : ?>
Expand All @@ -28,7 +35,10 @@
get_template_part('content', 'none');
endif;
?>
*/ ?>


</main>

<?php get_sidebar(); get_footer();
<?php get_sidebar(); get_footer();
2 changes: 1 addition & 1 deletion style.css
Expand Up @@ -5,7 +5,7 @@ Author: Original work Michael Sisk, with modifications by Ayal Pinkus
Author URI: http://mgsisk.com , https://www.ayalpinkus.nl/
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl.html
Version: 0.8.3
Version: 0.8.4
Description: Elegant, fully responsive, highly customizable Webcomic-ready theme named in honor of Rorschach from the Watchmen graphic novel.
Tags: black, blue, brown, gray, green, orange, pink, purple, red, silver, tan, white, yellow, dark, light, one-column, two-columns, three-columns, four-columns, left-sidebar, right-sidebar, fixed-layout, fluid-layout, flexible-header, responsive-layout, accessibility-ready, blavatar, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-image-header, featured-images, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready
Text Domain: inkblot
Expand Down
11 changes: 10 additions & 1 deletion tag.php
Expand Up @@ -11,6 +11,13 @@
get_header(); ?>

<main role="main">

<?php echo '<p style="font-size:60pt; font-weight:900;">You should not be able to see this!</p>'; ?>

<?php /*TODO remove? AYAL. Default archive, not used for this theme
@@@
<?php if (have_posts()) : ?>
Expand All @@ -36,7 +43,9 @@
get_template_part('content', 'none');
endif;
?>
*/ ?>

</main>

<?php get_sidebar(); get_footer();
<?php get_sidebar(); get_footer();
11 changes: 10 additions & 1 deletion taxonomy.php
Expand Up @@ -12,6 +12,13 @@

<main role="main">

<?php echo '<p style="font-size:60pt; font-weight:900;">You should not be able to see this!</p>'; ?>

<?php /*TODO remove? AYAL. Default archive, not used for this theme
@@@
<?php if (have_posts()) : ?>
<header class="page-header">
Expand All @@ -37,6 +44,8 @@
endif;
?>
*/ ?>

</main>

<?php get_sidebar(); get_footer();
<?php get_sidebar(); get_footer();

0 comments on commit 92c7881

Please sign in to comment.