collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 655
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

Thanks for having an interest with our portal. If you have any requests for features, have a look at the Feature Requests board.

Author Topic: Need to publish Book on Simple PORTAL  (Read 5218 times)

0 Members and 1 Guest are viewing this topic.

Offline Raji

  • Full Member
  • ***
  • Posts: 102
  • Gender: Female
    • Baaskani Diwwan
  • SMF Version: 2.0.1
  • SP Version: 2.3.4
Need to publish Book on Simple PORTAL
« on: January 08, 2010, 02:27:50 AM »
Hi there,

I need to publish multiple pages books on SIMPLE PORTAL. if this kind of block is already available plz let me know how can I achieve my wish to publish multi pages books.

Looking forward for your prompt response.

with regard
Raji Baloch

« Last Edit: January 08, 2010, 10:14:53 PM by Raji »

Offline ccbtimewiz

  • Hero Member
  • *****
  • Posts: 2185
  • Gender: Male
  • $("div.content:dd").hide();
  • SMF Version: None
  • SP Version: None
  • Elkarte Version: None
  • EhPortal Version: None
Re: Need to publish Book on SMF PORTAL
« Reply #1 on: January 08, 2010, 01:33:42 PM »
What is SMF Portal?

Offline Raji

  • Full Member
  • ***
  • Posts: 102
  • Gender: Female
    • Baaskani Diwwan
  • SMF Version: 2.0.1
  • SP Version: 2.3.4
Re: Need to publish Book on Simple PORTAL
« Reply #2 on: January 08, 2010, 10:12:54 PM »
Sorry I mean to say simple portal.
Here is my site which is based on Simple Portal and SMF form. www.baask.com

Hope to get your prompt and positive response.

« Last Edit: January 08, 2010, 10:15:23 PM by Raji »

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Need to publish Book on Simple PORTAL
« Reply #3 on: January 11, 2010, 11:18:27 PM »
You should be able to do this with a Custom PHP page, although, how exactly do you want to publish it? Could you please describe what you want?
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Offline Raji

  • Full Member
  • ***
  • Posts: 102
  • Gender: Female
    • Baaskani Diwwan
  • SMF Version: 2.0.1
  • SP Version: 2.3.4
Re: Need to publish Book on Simple PORTAL
« Reply #4 on: January 14, 2010, 12:43:32 AM »
Thanks for your response.
At the moment I am publishing all books on SMF forum under a section like this.

http://baask.com/diwwan/index.php?board=28.0

Here are pages of a book.

http://baask.com/diwwan/index.php?topic=4116.0
All pages are in gif format.

Now I want publish them in book format means page wise. like this
http://baask.com/home/index.php?option=com_content&view=article&id=54&Itemid=98

I am not expert of php so I need help to publish all related images page wise.
Hope to hear you soon

With regards
Raji Baloch


Offline Raji

  • Full Member
  • ***
  • Posts: 102
  • Gender: Female
    • Baaskani Diwwan
  • SMF Version: 2.0.1
  • SP Version: 2.3.4
Re: Need to publish Book on Simple PORTAL
« Reply #5 on: January 21, 2010, 07:48:29 AM »
I am still waiting for your response

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Need to publish Book on Simple PORTAL
« Reply #6 on: January 22, 2010, 09:53:10 AM »
This is the most insteresting request I have ever received, I guess. Well, just to show the power of SimplePortal... Create a PHP page with this code:

Code: [Select]
global $scripturl;

$num_pages = 9;
$cover_image_url = 'http://www.baask.com/diwan/index.php?action=dlattach;topic=3072.0;attach=575;image';
$page_image_url = 'http://baask.com/literature/qasum_faraz/kitab/qasum%s.gif';

if (empty($_GET['number']) || $_GET['number'] < 1 || $_GET['number'] > $num_pages)
{
$current_page = 0;
$image_url = $cover_image_url;
}
else
{
$current_page = (int) $_GET['number'];
$image_url = sprintf($page_image_url, $current_page == 1 ? '' : '0' . $current_page);
}

echo '
<div style="text-align: center;">
Page ', $current_page, ' of ', $num_pages, '
<p><img src="', $image_url, '" alt="', $current_page, '" /></p>';

for ($i = 0; $i <= $num_pages; $i++)
echo '
<a href="', $scripturl, '?page=book;number=', $i, '">', ($i == $current_page ? '<strong>[' : ''), ($i == 0 ? 'Cover' : $i), ($i == $current_page ? ']</strong>' : ''), '</a>';

echo '
</div>';

While creating the page, make sure you set "Page ID" as book
And slowly, you come to realize... It's all as it should be...

Offline Raji

  • Full Member
  • ***
  • Posts: 102
  • Gender: Female
    • Baaskani Diwwan
  • SMF Version: 2.0.1
  • SP Version: 2.3.4
Re: Need to publish Book on Simple PORTAL
« Reply #7 on: January 22, 2010, 10:44:15 PM »
You cant imagine "[SiNaN]" how much I am happy to get your response.

Its really a brilliant answer. I am very much thankful to you.

Here is the page of this book:
http://baask.com/diwwan/index.php?page=qasumfaraz

Now I want to managed this book too:
http://baask.com/literature/ishaq_khamosh/Jaar/

Quote
global $scripturl;

   $num_pages = 65;
   $cover_image_url = 'http://baask.com/diwwan/index.php?action=mgallery;sa=media;id=3810';
   $page_image_url = 'http://baask.com/literature/ishaq_khamosh/Jaar/%s.gif';


   if (empty($_GET['number']) || $_GET['number'] < 1 || $_GET['number'] > $num_pages)
   {
      $current_page = 0;
      $image_url = $cover_image_url;
   }
   else
   {
      $current_page = (int) $_GET['number'];
      $image_url = sprintf($page_image_url, $current_page == 1 ? '' : '0' . $current_page);
   }

   echo '
<div style="text-align: center;">
   Page ', $current_page, ' of ', $num_pages, '
   <p><img src="', $image_url, '" alt="', $current_page, '" /></p>';

   for ($i = 0; $i <= $num_pages; $i++)
      echo '
   <a href="', $scripturl, '?page=jaar;number=', $i, '">', ($i == $current_page ? '<strong>[' : ''), ($i == 0 ? 'Cover' : $i), ($i == $current_page ? ']</strong>' : ''), '</a>';

   echo '
</div>';

Plz advice where I am mistaking to retrieve file name.

With thanks and best regards,

Raji Baloch
« Last Edit: January 22, 2010, 11:43:19 PM by Raji »

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Need to publish Book on Simple PORTAL
« Reply #8 on: January 23, 2010, 12:32:29 PM »
Code: (Find) [Select]
$page_image_url = 'http://baask.com/literature/ishaq_khamosh/Jaar/%s.gif';
Code: (Replace) [Select]
$page_image_url = 'http://baask.com/literature/ishaq_khamosh/Jaar/0%s.gif';
Code: (Find) [Select]
$image_url = sprintf($page_image_url, $current_page == 1 ? '' : '0' . $current_page);
Code: (Replace) [Select]
$image_url = sprintf($page_image_url, ($current_page > 9 ? '' : '0') . $current_page);
I'm glad you could figure out how to adapt the code.
And slowly, you come to realize... It's all as it should be...

Offline Raji

  • Full Member
  • ***
  • Posts: 102
  • Gender: Female
    • Baaskani Diwwan
  • SMF Version: 2.0.1
  • SP Version: 2.3.4
Re: Need to publish Book on Simple PORTAL
« Reply #9 on: January 25, 2010, 08:26:31 AM »
I am very much thankful to you for your prompt response and I am sorry for replying late.

I want one more help from you, I hope you would not mind for this.
I have added following code in a new page ( http://baask.com/diwwan/index.php?page=shoben )but its working okay till 99 pages but as I click on page 100 its missing image No. 100th.

Quote
global $scripturl;

   $num_pages = 165;
   $cover_image_url = 'http://baask.com/diwwan/MGalleryItem.php?id=4006';
   $page_image_url = 'http://baask.com/literature/ishaq_khamosh/shoben/shoben%s.gif';

   if (empty($_GET['number']) || $_GET['number'] < 1 || $_GET['number'] > $num_pages)
   {
      $current_page = 0;
      $image_url = $cover_image_url;
   }
   else
   {
      $current_page = (int) $_GET['number'];
      $image_url = sprintf($page_image_url, $current_page == 1 ? '' : '0' . $current_page);
   }

   echo '
<div style="text-align: center;">
   Page ', $current_page, ' of ', $num_pages, '
   <p><img src="', $image_url, '" alt="', $current_page, '" /></p>';

   for ($i = 0; $i <= $num_pages; $i++)
      echo '
   <a href="', $scripturl, '?page=shoben;number=', $i, '">', ($i == $current_page ? '<strong>[' : ''), ($i == 0 ? 'Cover' : $i), ($i == $current_page ? ']</strong>' : ''), '</a>';

   echo '

<a href="http://baask.com/diwwan/index.php?topic=4165">Click for Comments and feedback </a>;

</div>';

It would be so kind of you if you help me out to resolve this issue.

With best regards,

Raji Baloch

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Need to publish Book on Simple PORTAL
« Reply #10 on: January 29, 2010, 11:59:20 AM »
Try this:

Code: (Find) [Select]
sprintf($page_image_url, $current_page == 1 ? '' : '0' . $current_page);
Code: (Replace) [Select]
sprintf($page_image_url, ($current_page < 10 ? '00' : ($current_page < 100 ? '0' : '')) . $current_page);
And slowly, you come to realize... It's all as it should be...