OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



subscribe particular issues

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

subscribe particular issues

Postby manson_soup » Wed Mar 11, 2009 2:28 am

Dear,

Can OJS control the subscriber only allow to subscribe and read issues published before 2009 but the payment is made in Mar. 2009?
Also payment is in March 2009 and the subscriber wishes to subscribe to 2006 or 2007 only?

Manson
manson_soup
 
Posts: 29
Joined: Mon May 19, 2008 8:06 pm

Re: subscribe particular issues

Postby michael » Wed Mar 11, 2009 9:13 am

Hi Manson,

Yes, this should be possible provided that you enable the "Partial subscription expiry" option under Subscription Options and then set the subscription end dates for these subscriptions to cover the last issue that you want the users to have access to. For example, to provide access to all 2007 issues, the subscription end date could be Dec. 31, 2007.

This will give the subscriber access to all content up to the subscription end date. That is, if the subscription end date is 2007, the subscriber will have access to content up to and including that published in 2007, including the 2006, 2005, etc. issues.

Please note that you'll need OJS 2.2.1 or above for the partial expiry option.

Cheers,
Michael
michael
 
Posts: 405
Joined: Thu Mar 29, 2007 2:09 pm

Re: subscribe particular issues

Postby manson_soup » Wed Mar 11, 2009 8:37 pm

Dear Michael,

Case 1 :
Time line
1st issue-------------------------------------------------current issue
|<-----------------------------read--->|-----------can't read-----------|paid time OJS can do it
Case 2 :
Time line
1st issue-------------------------------------------------current issue
|-----------can't read-------------|<---read--->|-------can't read-----|paid time OJS can't do it
Case 3 :
Time line
1st issue-------------------------------------------------current issue
|-------------can't read-------------------------------------|<--read-->|paid time OJS can't do it

Am I right? Would you please tell me is there any method can fulfill the Case 2 and Case 3?

Manson
manson_soup
 
Posts: 29
Joined: Mon May 19, 2008 8:06 pm

Re: subscribe particular issues

Postby michael » Fri Mar 13, 2009 10:41 am

Hi Manson,

Yes, that's correct. If you require subscription access for single issues you can enable partial subscription expiry as suggested above and modify classes/issue/IssueAction.inc.php in your OJS install. About midway in that file, you'll find a function called subscribedUser that includes the following code:

Code: Select all
            if (!$result && $journal->getSetting('subscriptionExpiryPartial')) {
                if (isset($articleId)) {
                    if (isset($publishedArticle)) {
                        import('subscription.SubscriptionDAO');
                        $result = $subscriptionDao->isValidSubscription(null, null, $user->getUserId(), $journal->getJournalId(), SUBSCRIPTION_DATE_END, $publishedArticle->getDatePublished());
                    }
                } else if (isset($issueId)) {
                    $issueDao = &DAORegistry::getDAO('IssueDAO');
                    $issue = &$issueDao->getIssueById($issueId);
                    if (isset($issue) && $issue->getPublished()) {
                        import('subscription.SubscriptionDAO');
                        $result = $subscriptionDao->isValidSubscription(null, null, $user->getUserId(), $journal->getJournalId(), SUBSCRIPTION_DATE_END, $issue->getDatePublished());
                    }
                }
            }


If you change SUBSCRIPTION_DATE_END to SUBSCRIPTION_DATE_BOTH in the two places above, you should be able to achieve what you're looking for. With these changes, subscribers would have access only to the content that was published during their subscription period (start and end date).

If you require something similar for domain and IP authenticated subscriptions, you can also make similar changes to the subscribedDomain function in the same file.

Cheers,
Michael
michael
 
Posts: 405
Joined: Thu Mar 29, 2007 2:09 pm

Re: subscribe particular issues

Postby manson_soup » Sun Mar 15, 2009 7:29 pm

Dear Michael,

I'm really appreciate your help.
How about case 4 ?
Case 4 :
User paid the subscription time : at the current issue
User the subscribe only 1st issue , 5th issue , 7th issue, and current issue.
Time line : 1st issue--------------------------------------------------------------------------------|current issue
Time line : |<--read-->|--------readable-------|<--read-->|-----can't read-----|<--read-->|now

Case 5:
User only buy serveral articles from different issues.

Can I change to code to fulfill case 4 and case 5 requirement?

Manson
manson_soup
 
Posts: 29
Joined: Mon May 19, 2008 8:06 pm

Re: subscribe particular issues

Postby michael » Mon Mar 16, 2009 9:22 pm

Hi Manson,

For Case 5, you can currently enable payments and setup article purchase via Paypal.

Case 4 is more complicated and there's no current support for something like this in OJS. What you're describing is effectively some form of support for the purchase of entire issues.

I'll file your use scenario in our bug tracking system as an enhancement that we can try to add to a future release of OJS. If you do go ahead and code something on your end in the meantime, please feel free to post your code to the forum as other users may find this useful as well.

Cheers,
Michael
michael
 
Posts: 405
Joined: Thu Mar 29, 2007 2:09 pm

Re: subscribe particular issues

Postby Roelf » Fri Sep 04, 2009 4:46 am

I am a user of OJS since December 2008, and have version 2.2.2.0.

I have created back issues, and changed their dates of creation back into their original date of publication. For example, I created a back issue issue in OJS on 1 July 2009, and changed its date of publication into 1 January 2005, the original date of publication of the print version.The I uploaded a number of articles for these back issues manually via the so-called Expedited Submission method.

I then enabled Partial subscription expiry, and expected that a subscriber until 1 January 2006 would get access to the example issue mentioned above.

Not so. No access was granted.

Now, I uploaded the articles for the abovementioned back issue within a period of several months. I noticed that a subscriber until 1 August 2009 can read a back issue article uploaded on 1 July 2009, but cannot read a back issue article uploaded on September 1. So, it is the article dates that count, and not the issue date!

My question is whether I am correct or not? And if so, what can I do about it, because the publication date of the articles cannot be manipulated?

Roelf
Roelf
 
Posts: 5
Joined: Mon Dec 01, 2008 4:02 am

Re: subscribe particular issues

Postby michael » Fri Sep 04, 2009 12:43 pm

Hi Roelf,

Yes, that's correct. Currently OJS will check the article publication date first and then the issue publication date.

I've filed this issue in our bug tracking system here, which also includes some additional explanation. Please feel free to add yourself to the bug to comment or to track its progress.

I've included an OJS 2.2.2 patch below that you can use for your installation that will ensure that only the issue publication date is used in the subscription check.

Code: Select all
--- classes/issue/IssueAction.orig.inc.php   2009-09-04 11:57:41.000000000 -0700
+++ classes/issue/IssueAction.inc.php   2009-09-04 12:00:13.000000000 -0700
@@ -117,14 +117,7 @@
          // If no valid subscription, check if there is an expired subscription
          // that was valid during publication date of requested content
          if (!$result && $journal->getSetting('subscriptionExpiryPartial')) {
-            if (isset($articleId)) {
-               $publishedArticleDao = &DAORegistry::getDAO('PublishedArticleDAO');
-               $publishedArticle = &$publishedArticleDao->getPublishedArticleByArticleId($articleId);
-               if (isset($publishedArticle)) {
-                  import('subscription.SubscriptionDAO');
-                  $result = $subscriptionDao->isValidSubscription(null, null, $user->getUserId(), $journal->getJournalId(), SUBSCRIPTION_DATE_END, $publishedArticle->getDatePublished());
-               }
-            } else if (isset($issueId)) {
+            if (isset($issueId)) {
                $issueDao = &DAORegistry::getDAO('IssueDAO');
                $issue = &$issueDao->getIssueById($issueId);
                if (isset($issue) && $issue->getPublished()) {
@@ -151,14 +144,7 @@
          // If no valid subscription, check if there is an expired subscription
          // that was valid during publication date of requested content
          if (!$result && $journal->getSetting('subscriptionExpiryPartial')) {
-            if (isset($articleId)) {
-               $publishedArticleDao = &DAORegistry::getDAO('PublishedArticleDAO');
-               $publishedArticle = &$publishedArticleDao->getPublishedArticleByArticleId($articleId);
-               if (isset($publishedArticle)) {
-                  import('subscription.SubscriptionDAO');
-                  $result = $subscriptionDao->isValidSubscription(Request::getRemoteDomain(), Request::getRemoteAddr(), null, $journal->getJournalId(), SUBSCRIPTION_DATE_END, $publishedArticle->getDatePublished());
-               }
-            } else if (isset($issueId)) {
+            if (isset($issueId)) {
                $issueDao = &DAORegistry::getDAO('IssueDAO');
                $issue = &$issueDao->getIssueById($issueId);
                if (isset($issue) && $issue->getPublished()) {

Cheers,
Michael
michael
 
Posts: 405
Joined: Thu Mar 29, 2007 2:09 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Bing [Bot] and 7 guests