Advertisement:

Author Topic: Item Expiration  (Read 14464 times)

ingo

  • Full Member
  • ***
  • Posts: 216
Re: Item Expiration
« Reply #15 on: January 04, 2012, 01:11:02 am »
still nothing

I trayed several times Dis/Enable and  login/out


trains58554

  • Osclass contributor
  • Hero Member
  • *****
  • Posts: 3642
  • osCanyon, the class of Osclass
Re: Item Expiration
« Reply #16 on: January 04, 2012, 02:47:26 am »
Does it work if you disable the premalinks?

Jay

ingo

  • Full Member
  • ***
  • Posts: 216
Re: Item Expiration
« Reply #17 on: January 04, 2012, 02:54:00 am »
Yes  ;D

trains58554

  • Osclass contributor
  • Hero Member
  • *****
  • Posts: 3642
  • osCanyon, the class of Osclass
Re: Item Expiration
« Reply #18 on: January 04, 2012, 02:58:39 am »
That is good that it works. I think the reason it is not working with permalinks enabled is because in the function that got added to the hDefines.php I had a typo it should be like so


function osc_item_deactivate_url($id '') {
        if (
$id == ''$id osc_item_id();
        if ( 
osc_rewrite_enabled() ) {
 
the line below is the line that had activate instead of saying deactivate
    
-->   return osc_base_url() . 'item/deactivate/' $id ;
        } else {
            return 
osc_base_url(true) . '?page=item&action=deactivate&id=' $id  ;
        }
    }


Check that and then I think it should work with permalinks enabled.

Jay

ingo

  • Full Member
  • ***
  • Posts: 216
Re: Item Expiration
« Reply #19 on: January 04, 2012, 03:59:16 am »
yes in deed, I  de / activate more than 10 times to make a sure

Jay you're  8)

Regards

Jesse

  • Hero Member
  • *****
  • Posts: 631
  • Out of my mind, back in 5 minutes
Re: Item Expiration
« Reply #20 on: January 04, 2012, 05:38:54 am »
As for "Allow users to re-publish an item after it has expired."..... basically all you need to do is update the "Published" date (dt_pub_date) in the database table os_t_item.

Although, not sure how to do that with OSClass functions, yet. It's essentially a simple php/sql function though.

ingo

  • Full Member
  • ***
  • Posts: 216
Re: Item Expiration
« Reply #21 on: January 04, 2012, 10:35:11 pm »
today the same problems with permalinks as yesterday + lots of bugs

1. displays  - Deactivate / expired at same time. It means you have to disable at first after you can  Activate  >>after activating >> redirect to item page (not comfortable)

2. displays - 4 pages with items in user manager - actually there are 3 pages with items >> if you click on fourth page it displays  = you dont have any items.

3. if you deactivate item on third page you will be redirect to first page in user manager

4. it does not display at all on wich page you are at the moment.

5. if you click on image you will be redirect to upload page -- /oc-content/uploads/16.jpg  - not to item

6. if you deactivate -- flash massage -- your item has been published successfully :(

sorry, that's the life

regards

trains58554

  • Osclass contributor
  • Hero Member
  • *****
  • Posts: 3642
  • osCanyon, the class of Osclass
Re: Item Expiration
« Reply #22 on: January 05, 2012, 04:55:38 am »
1. that can be changed in the root item.php file. Look for this line $this->redirectTo( osc_item_url( ) ); and change it like so $this->redirectTo( $_SERVER['HTTP_REFERER'] );

2. I am not sure as to why it is showing 4 pages instead of 3.

3. do the same as number 1 except you are looking for this line $this->redirectTo( osc_user_list_items_url( ) );

4. I do not quite follow are you talking about the pagination page numbers?

5. Look for this line around the image <a href="<?php echo osc_resource_url(); ?>" rel="image_group"> and change it like so <a href="<?php echo osc_item_url(); ?>" rel="image_group">

6. That is strange it should be showing this item has been deactivated.

Jay

ingo

  • Full Member
  • ***
  • Posts: 216
Re: Item Expiration
« Reply #23 on: January 05, 2012, 11:18:40 am »
Quote
4. I do not quite follow are you talking about the pagination page numbers?


obaut this:   1   2  [ 3 ]   4     >  marking of the current page

i will try with new changes - Thanks


ingo

trains58554

  • Osclass contributor
  • Hero Member
  • *****
  • Posts: 3642
  • osCanyon, the class of Osclass
Re: Item Expiration
« Reply #24 on: January 05, 2012, 06:42:13 pm »
Hi ingo,

Add this rule to your style.css of your theme. This will change the color of the text of the current page you are one so if you are on page 3 the letter 3 will be the color red or what ever color you want it to be.


.paginate .searchPaginationSelected colorred; }


Jay

ingo

  • Full Member
  • ***
  • Posts: 216
Re: Item Expiration
« Reply #25 on: January 05, 2012, 07:44:29 pm »
Thanks  :)

Dude

  • Newbie
  • *
  • Posts: 48
Re: Item Expiration
« Reply #26 on: December 13, 2012, 12:27:33 pm »
Just a quick update due to some file name changes probably
The last step here https://github.com/osclass/OSClass/issues/102 must now be made in oc-admin/settings.php instead of generate_rules.php, which does not exist anymore apparently
You can place the code on line 679 for example
Make sure to deactivate and reactivate the permalinks option in OSClass admin to make it work

By the way, even though this Deactivate / Activate function perfectly works, it does not make Expired disappear after an ad has been reactivated, wondering why
« Last Edit: December 13, 2012, 01:41:02 pm by Dude »