PDF file page numbering consist with PDF document

I’m looking at a PDF file I have. (A textbook from my prof. in PDF version).

When I’m on page “vii” in the textbook, then every PDF Viewer software will tell me that I’m on page 7.

Is it possible to use Adobe Acrobat DC such that these two things a consistent with each other?
If Adobe Acrobat DC can’t be used then what can I else do ?
I have PDF Inspector by PSPDFKIT. But I do not know any PDF syntax, so I would need some help with that.

blog page – Display latest posts from a specific categories

I am trying to get latest from specific categories (3 posts), but the code does not seem working. Instead of displaying posts from the mentioned categories, it is displaying posts from the first category.

Here is my code:

<?php do_action( 'hitmag_before_content' ); ?>

<div id="primary" class="content-area">
    <main id="main" class="site-main" role="main">
       <h1>Latest News</h1>
        <?php do_action( 'hitmag_before_blog_posts' ); ?>
              <?php $args = array(
                        'post_type' => 'post' ,
                        'orderby' => 'date' ,
                        'order' => 'DESC' ,
                        'posts_per_page' => 3,
                        'category'         => '30','33','1',
                        'paged' => get_query_var('paged'),
                        'post_parent' => $parent
                   ); ?>
                   <?php query_posts($args); ?>
        <?php

            if ( have_posts() ) :

                if ( is_home() && ! is_front_page() ) : ?>
                    <header>
                        <h1 class="page-title screen-reader-text"><?php single_post_title(); ?></h1>
                    </header>

                <?php
                endif;

                $archive_content_layout = get_option( 'archive_content_layout', 'th-grid-2' );
                echo '<div class="posts-wrap ' . esc_attr( $archive_content_layout ) . '">';

                    /* Start the Loop */
                    while ( have_posts() ) : the_post();

                        /*
                        * Include the Post-Format-specific template for the content.
                        * If you want to override this in a child theme, then include a file
                        * called content-___.php (where ___ is the Post Format name) and that will be used instead.
                        */
                        get_template_part( 'template-parts/content', get_post_format() );

                    endwhile;

                echo '</div><!-- .posts-wrap -->';

                

            else :

                get_template_part( 'template-parts/content', 'none' );

            endif; ?>

        <?php do_action( 'hitmag_after_blog_posts' ); ?>

    </main><!-- #main -->
</div><!-- #primary -->

how to show summary on checkout page for multiple orders?

I am working on the Checkout flow (system) for the tablet device and it has 3 steps:

  1. A list with existing orders (which were previously saved from another flow). The User should be able to select multiple orders from the list to proceed to the next step
  2. Next step is Order Details. Here we can see the products(items) of each selected order.
    And my question is for this step. Can we show a summary for each order separately? Since it is important for us that at the step with Payment(3rd step) we can pay a different amount for each of them and choose different types of payment
    In terms of best practices and UI patterns..
  3. Pay

Thanks!

Home page is not loading, where in other pages are displaying on the site

My home page is not displaying on the site, but it is showing that the page is loading.
and I have checked all other pages. Everything is working except the home page. Even the posts are also getting published.

gui design – How to indicate that specific sections of a page can be swiped

I suppose the first point to make is that you shouldn’t depend on invisible interactions to accomplish anything.

The example made in virtualnobi’s comment of iOS’s swipe-to-delete gesture is a good example; Mail items etc. can be deleted the long way by choosing Edit, then checking the items you wish to delete, then choosing “Trash”https://ux.stackexchange.com/”Archive” at the bottom of the screen, or they can be deleted by swiping the item to the side until the “Trash”https://ux.stackexchange.com/”Archive” state is visible. In this way, the swipe gesture is a useful pro tip, but never a requirement for normal users.

When a swipe action is required by the interface (e.g. to prevent accidental activation), the behaviour should be simply indicated. Animation is a great choice for this. For example, the little shine effect over the “slide to unlock” text on iOS provides a useful hint of the kind of motion required (horizontal slide):

iOS 7 "slide to unlock" animation
Image taken from this Stack Overflow question

Where such an obnoxious animation is not feasible, putting an icon on the screen that indicates that there is an alternative interaction can provide a useful cue. Again, iOS has an example with the camera button on the lock screen—tapping it once can’t launch the camera immediately since that would be constantly activated by accident, but expecting users to know that grabbing the icon and swiping up is how to activate the camera is another invisible interaction. So Apple adds a tiny indication of the affordance of that button when tapped once; quickly bouncing the lock screen vertically and briefly showing the camera interface beneath it. The user learns quickly that swiping up a little further reveals a little more of the camera interface, until swiping up in one go unlocks the interface and prevents the lock screen coming back down:

iOS 6 lock screen camera affordance
Animation taken from UI Animations tumblr

This is very similar to the lock screen affordance on Windows Phone, as mentioned in this highly relevant article about animations as affordance:

Windows Phone lock screen affordance

Animation is a great way to provide affordance of content overflowing. In Windows Phone, the transition animations tilt the content being viewed about the y axis so that (for a split second) more than a screenful of content is visible. This is a helpful indication that there’s more off to the side of the screen than what is immediately visible. This is a huge pain to find a good example of online (this is the best I can find and it’s a real blink-and-you-miss-it example), but it’s very apparent when using the device in person. In Windows Phone they also show a tiny sliver of the content on the next screen across horizontally (as a hint that there’s more than meets the eye).

This technique (especially the animation example) is an example of what Edward C. Tolman calls “latent learning” (learning through passive observation rather than being told explicitly). There’s a good article on the Microsoft website that gives another example:

In the following image, the list box’s contents slide in when the
control is initiated, which conveys a lot of information quickly. This
transition suggests that users can scroll through this list and that
it contains more content beyond the current display, which helps
encourage user interaction.

Visuals - Content transition example

If the list box appears empty for just a moment, and then its content
slides in, the user sees this movement and can infer that the list box
contains more options than what currently appears. Likewise, the
sliding movement acts as a clue that users can manipulate the content
that appears.

8 – Add custom access check to user page

I would like to add an additional access condition to viewing user pages like user/1.

I looked at the following guidelines, but have not succeeded in coming up with a solution.

https://www.drupal.org/docs/drupal-apis/routing-system/altering-existing-routes-and-adding-new-routes-based-on-dynamic-ones

and

https://www.drupal.org/docs/8/api/routing-system/access-checking-on-routes#access-custom

The module code I have come up with this far – I can restrict all access to user profiles fine.
But I fail at my attempt to get the account id of the page being requested. Once I have the account I can load the field I need to check.

my_module.services.yml

services:
  my_module.route_subscriber:
    class: Drupalmy_moduleRoutingRouteSubscriber
    tags:
      - { name: event_subscriber }

my_module/src/Routing/RouteSubscriber.php

<?php

namespace Drupalmy_moduleRouting;

use DrupalCoreRoutingRouteSubscriberBase;
use SymfonyComponentRoutingRouteCollection;

/**
 * Listens to the dynamic route events.
 * 
 * We deny access to profiles, if the user has not accepted the terms.
 * 
 * See https://www.drupal.org/node/2187643
 * 
 */
class RouteSubscriber extends RouteSubscriberBase {

  /**
   * {@inheritdoc}
   */
  protected function alterRoutes(RouteCollection $collection) {
    $path = Drupal::service('path.current')->getPath();
    $path_args = explode("https://drupal.stackexchange.com/", $path);
    // @todo: the right path does not seem to be accessible here - how do we get the user account id?
    // Always deny access to '/user/{uid}'.
    // Note that the second parameter of setRequirement() is a string.
    if ($route = $collection->get('entity.user.canonical')) {

      //$account = DrupaluserEntityUser::load($account_uid);
      // This effectively denies all access to user profiles
      $route->setRequirement('_access', 'FALSE');
    }
  }

}

usability – Is it right to use horizontal scroll to show information related to the same content in details page

I have a Mobile app for recipes, the user can click on recipe to see its details, in details page we have image, title, tags, ingredients, and steps for preparation.

So my question is, is it right to make ingredients as horizontal scroll instead of put it in vertical scroll?

This is an example for horizontal scroll
enter image description here

And this is another example for vertical scroll
enter image description here

in this case what is better to use, horizontally or vertically?

magento2 – How to exclude defer js extension in special page?

How to exclude extension in special page?

like it don’t loading to onestep checkout page.
Because i’m using defer js extension no admin backend just auto enable but it affect onestep checkout page.

i just want to exclude checkout page.

    public function execute(MagentoFrameworkEventObserver $observer)
{
    $response = $observer->getEvent()->getResponse();
    $htmlContent = $response->getBody();

    if (stripos($htmlContent, '<!DOCTYPE html') !== false) {
        $headers = $response->getHeaders()->toArray();
        if (array_key_exists('Content-Type', $headers)
            && $headers('Content-Type') == 'application/json'
        ) {
            return false;
        }

        $htmlContent = $this->moveJavascriptToFooter($htmlContent);

        // Set the body with the new HTML content
        $response->setBody($htmlContent);
    }
}

Thank you

google analytics – Best way to track page views in a multi-tenant application?

Assuming here that you don’t need help with GA/GTM installation and you’ve got your tenants’ permission to do so, here’s my take on GA-side setup to get the analytics you want. There’s no way to avoid some individual GA setup per domain, but for a relatively small number of sites you can share a Property but have separate GA data using View filters. There’s a limit of 25 Views per Property, which is why the number of tenant sites mattered to my answer.

Each domain will use the tracking ID of the shared Property, and you’ll create a View for each domain that has a filter of the Predefined type that includes only traffic to the correct hostname.

screenshot of View filter setup

The result will be a View that only knows about data to the appropriate domain.

(If you would like a commingled View in which you can still tell the difference between sites, you could use a Custom Advanced filter to extract the Hostname (request field A, Hostname (.*)) and the Request URI (request field B, Request URI (.*)), and output the concatenation (/$A1$B1, since GA likes things that look like directories).)

You can’t share goals exactly – they are View-specific – or removed URL parameters, site search settings, or bot filtration, but you can set up a “template” View with the shared definitions and copy it for each site-specific View, adding the domain-specific filter after copying. If you want to add other filters or goals after the fact, you can pull in filters from other Views in the Add Filter screen, and use the View-level “Share Assets” screen to generate a link that will allow you to import specific goals to other Views.

If you install Google Tag Manager on the sites instead of GA directly (which is recommended in any case), you can share event definitions as well. They will get sent to the Property and your filters will have them show up in the appropriate Views. Your ability to share triggers will be limited by how alike the markup of the various tenant sites is, but the fact that you can have multiple triggers for the same tag will allow you to send the same event data to GA even if the details of the event happening vary from site to site.

Unable to invite people who like my business page to join my group

Hi Greenhorn,

I got the same message, trying to set up a group and link my page with 1600 followers to it. My page though has recently been shadow-banned. Could that be the reason? I am apparently in FB jail. 🙁 I searched the internet for a solution but apart from you, I found noone experiencing the same kind of problem. One can get shadowbanned because one posts too much in too little time, but also for political content. This can last a day, two days, a week up to six weeks, I read. FB won’t tell you. I think this is the reason our groups can’t invite our fans, because our posts are hidden to them. Our entire fanbase is locked off from our page, as it were. Only people visiting our page can see and like our posts. Did you in the meantime, find a solution? All the best Nilufar