Is there any way to set the default view as the multi-page view available?

Comments

rares’s picture

Status: Active » Fixed

You would need to edit the code that generates the JS and include the 'mode' parameter, as described on http://www.scribd.com/platform/documentation/viewer.
e.g. scribd_doc.addParam('mode', 'slideshow');

If more people want to see this setting in the module configuration, please mark this as active again and make it a feature request.

Rareş

mode => string
The iPaper view mode that should be chosen by default. Can be 'list' (the default), 'book' (two-page spread), 'slideshow' (the default for presentations), or 'tile'.

fang27’s picture

Status: Fixed » Active

I would like to see this added as a feature - I think it would be very useful.

rares’s picture

Right, but I was saying: is there anyone else?

fang27’s picture

Where in the code would I add that parameter to make it default for everything uploaded? Adding it to the javascript does not seem to produce any change or results.

I was thinking in the file scribd.php in the changeSettings function, adding something like:

function changeSettings($doc_ids, $title = null, $description = null, $access = null, $license = null, $parental_advisory = null, $show_ads = null, $tags = null, $link_back_url = null, $mode = 'slideshow'){
$method = "docs.changeSettings";
$params['doc_ids'] = $doc_ids;
$params['title'] = $title;
$params['description'] = $description;
$params['access'] = $access;
$params['license'] = $license;
$params['show_ads'] = $show_ads;
$params['tags'] = $tags;
$params['link_back_url'] = $link_back_url;
$params['mode'] = $mode;

With the last parameter being the change. Seem right?

Thanks!

rares’s picture

You would have to change ipaper.module in the function theme_ipaper_viewer($node)

adding the addparam function in the section:

  <script type=text/javascript>
    var scribd_doc = scribd.Document.getDoc($node->doc_id, '$node->access_key'); 
    scribd_doc.write('embedded_flash_$node->doc_id');  
  </script>";

You would get:

  <script type=text/javascript>
    var scribd_doc = scribd.Document.getDoc($node->doc_id, '$node->access_key'); 
    scribd_doc.addParam('mode', 'slideshow');
    scribd_doc.write('embedded_flash_$node->doc_id');  
  </script>";
fang27’s picture

You know, I put it right there, and it doesn't even show up in the source code for the page (though maybe it wouldn't anyway) - and certainly doesn't change the view of the pdf.

I thought maybe something was caching, but I cleared all caches and checked on a second machine that has never gone to the site I am working on. No change in the view or seeing the additional javascript line in the source. :\

fang27’s picture

Well, this is going to be a lesson for anyone working on too many projects at one time. Here is the solution.

While I made the proper adjustments to the .module file to get the result, it still wasn't showing up. Why? Because I had made a custom template for this particular content type, using contemplate, and completely forgot that was overriding anything the module's output would have been spitting out.

Beautiful! I can sleep now.....and feel both stupid and happy I realized my own mistake. Learn from it, please.

fang27’s picture

Status: Active » Closed (fixed)

I should mention that the solution, in comment #5 above, is the correct one - and very handy.

chrisla’s picture

Category: support » feature
Status: Closed (fixed) » Active

As someone planning on using Scribd a lot, I think this would be great to be able to easily assign a certain view to individual documents. (e.g., Book view for multipage documents, but Scroll view for single-page docs)

rares’s picture

in the 6.x-1.1 version, you can add javascript that will be added to the viewer (e.g. "scribd_doc.addParam("mode", "book"); scribd_doc.addParam("hide_full_screen_button", true);"). However, this is for all the documents on the site.

To change the default setting for individual docs, you can go to scribd.com and work with the document's settings directly. Last time I checked, there was a setting for the document's default display mode.

Please mark as fixed if this works for you.