Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6966919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:15:16+00:00 2026-05-27T16:15:16+00:00

I Integrated a Book reader tool Monoscle written in javascript to get the node.tpl

  • 0

I Integrated a Book reader tool Monoscle written in javascript to get the node.tpl content in the book reader format. I tested it on my php document and it was working great, i am able to get the content from the database in the monoscle tool.

However, im unable to do the same in Drupal i.e., i want the content of node.tpl in the TOOL!

I followed these steps to itegrate the tool.

  1. I added JavaScripts and css in Bartic.info file under themes
  2. Initiated some JavaScript in node.tpl [Because its not initiating/working when placed in Bartic.info]
  3. Placed the rendered content inside the div in node.tpl, which is initiated by JavaScript

    <div id="rabbit"><?php print render($content); ?></div>

    Now the thing is am getting the Monoscle framework but not the content – neither from $content nor any paragraph.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T16:15:16+00:00Added an answer on May 27, 2026 at 4:15 pm

    I have gone through book flipping tool Monoscle and Also implemented this tool successfully on drupal system..

    1] copy all files css and javascripts in seperate directory

    2] Now Initilize some javascript path on you theme.info and as you mention its bartik.info file and these paths should be in order

    3] First create a directory in scripts of bartik theme directory with book where you can place all file on monoscle file into seperate.. and even for CSS file.

    4] below is the order

    stylesheets[all][] = css/book/styles/monocore.css
    stylesheets[all][] = css/book/styles/monoctrl.css
    stylesheets[all][] = css/book/styles/rabbit_css.css
    
        scripts[] = scripts/jquery.js
        `this is the jquery library you need to added up`
    
    scripts[] = scripts/book/scripts/monocore.js
    scripts[] = scripts/book/scripts/core/monocle.js
    scripts[] = scripts/book/scripts/compat/env.js
    scripts[] = scripts/book/scripts/compat/css.js
    scripts[] = scripts/book/scripts/compat/stubs.js
    scripts[] = scripts/book/scripts/compat/browser.js
    
    scripts[] = scripts/book/scripts/core/events.js
    scripts[] = scripts/book/scripts/core/factory.js
    scripts[] = scripts/book/scripts/core/styles.js
    scripts[] = scripts/book/scripts/core/reader.js
    scripts[] = scripts/book/scripts/core/book.js
    scripts[] = scripts/book/scripts/core/component.js
    scripts[] = scripts/book/scripts/core/place.js
    
    scripts[] = scripts/book/scripts/controls/panel.js
    scripts[] = scripts/book/scripts/panels/twopane.js
    scripts[] = scripts/book/scripts/panels/eink.js
    
    scripts[] = scripts/book/scripts/dimensions/columns.js
    scripts[] = scripts/book/scripts/flippers/slider.js
    scripts[] = scripts/book/scripts/flippers/instant.js
    scripts[] = scripts/book/scripts/dimensions/vert.js
    scripts[] = scripts/book/scripts/flippers/legacy.js
    
    scripts[] = scripts/book/rabbit_start.js
    

    And this scripts[] = scripts/book/rabbit_start.js is custom made script file where it contains the monoscle code

       Monocle.DEBUG = true;
    
          // Initialize the reader element.
          Monocle.Events.listen(
            window,
            'load',
            function () { window.reader = Monocle.Reader('rabbit'); }
          );
    

    And also with stylesheets[all][] = css/book/styles/rabbit_css.css

    We need to add #rabbit infront of every selector style in rabbit_css.css and below is the css code

    #rabbit {
            width: 300px;
            height: 420px;
            border: 1px solid #000;
            background-color: #CCC;
            overflow: hidden;
    }
    
    #rabbit p {
            line-height: 130%;
          }
    #rabbit      img {
            max-width: 98%;
            max-height: 98%;
            -webkit-column-break-before: always;
          }
    #rabbit      .dedication {
            text-align: center;
            font-style: italic;
            margin: 16em 0 10em;
          }
     #rabbit    .center {
            text-align: center;
          }
    #rabbit      h1, h2, h3 {
            text-align: center;
          }
    #rabbit      h1 small {
            font-size: 85%;
            font-variant: small-caps;
          }
     #rabbit     h2 {
            margin-bottom: 3em;
            font-weight: normal;
          }
     #rabbit     h2 small {
            font-size: 85%;
            font-style: italic;
          }
    

    5] Select which content type need to work with for example, you have articles as content type… then copy a node.tpl.php and paste it & rename with node--articles.tpl.php

    6] Open node--articles.tpl.php and search for <?php print render($content); ?>.. this code display the content of article type.

    7] Now edit that code… with your desired fileds in content type

    <div id="rabbit"><?php print render($content); ?></div>
    

    or

    <div id="rabbit"><?php print render($content['field_name']); ?></div>
    

    8] Save all file and go Configuration->Performance->Clear cache

    9] Now open your desired article and it will display in monoscle book reader format..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Do you know an integrated tool that will generate the call graph of a
I successfully integrate the face-book API and able to get all user profile but
I integrated multiple comment boxes to my site. I have setup: <meta property=fb:admins content=xxx/>
I was reading the book Extending and Embedding PHP and came across this line
I was reading the book Apress Pro LINQ: Language Integrated Query in C# and
Having integrated merb_auth_password_slice as per the README, I can successfully login as redirect_after_login is
With integrated pipeline, all requests are passed through ASP.NET, including images, CSS. Whereas, in
Language Integrated Query. Now I know that the acronyms are. I have seen C#
I integrated my vBulletin with custom front page. I'm wondering, how could I use
Why is the integrated vs debugger so... barely functional? I cannot see the contents

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.