Advertisement:

Author Topic: Repost an expired ad  (Read 27889 times)

Jesse

  • Hero Member
  • *****
  • Posts: 631
  • Out of my mind, back in 5 minutes
Re: Repost an expired ad
« Reply #30 on: January 08, 2012, 04:37:42 am »
Glad to hear it's working for you as well Jay! It would be nice if we could get some kind of flash message to work.  :)

trains58554

  • Osclass contributor
  • Hero Member
  • *****
  • Posts: 3642
  • osCanyon, the class of Osclass
Re: Repost an expired ad
« Reply #31 on: January 09, 2012, 09:22:18 am »
Hi Jesse,

I have added email functionality to this plugin. Currently I have it set up so when you republish an ad it will send you the email notice that your ad is about to expire just to test to make sure it works. Next I guess will be adding a hook to the cron to check if an ad is about to expire and if it is send them an email. Anyways check it out.

Please if you download this file only use it on test sites as this plugin is not done.

Thanks

Jay
« Last Edit: January 13, 2012, 06:59:41 am by trains58554 »

Jesse

  • Hero Member
  • *****
  • Posts: 631
  • Out of my mind, back in 5 minutes
Re: Repost an expired ad
« Reply #32 on: January 09, 2012, 09:27:54 am »
Great! I'll check it out now! The cron job and email would be the perfect complement to this plugin feature.

Jesse

  • Hero Member
  • *****
  • Posts: 631
  • Out of my mind, back in 5 minutes
Re: Repost an expired ad
« Reply #33 on: January 09, 2012, 09:49:06 am »
Ok, that all seemed to work! I'm having some server issues I'm working out with my server admins, so it took me a bit longer than expected! (not related to OSclass... at least I don't think!)

I can't even remember how the first version of the plugin worked... that is, I can't remember what page I had the user redirected to, but I like how it directs you to the payment page if the ad needs to be paid for again. And the email function works great! I'd definitely say put that into a cron job!  :D

trains58554

  • Osclass contributor
  • Hero Member
  • *****
  • Posts: 3642
  • osCanyon, the class of Osclass
Re: Repost an expired ad
« Reply #34 on: January 09, 2012, 09:57:04 am »
That is great news about the plugin working. Not so great news about your server at the moment.

You had it set to redirect the user to the paypal if the payperpost was enabled if not it redirected to the item. I will work on getting the cron setup.

Jay

Jesse

  • Hero Member
  • *****
  • Posts: 631
  • Out of my mind, back in 5 minutes
Re: Repost an expired ad
« Reply #35 on: January 09, 2012, 10:01:02 am »
Ah, ok thanks! It's funny how much I forget being way for just a day! I spent the entire day/night yesterday launching a new SMF forum, including having to port an existing database and all users over to the new forum (the old forum is over 7 years old... which I launched back in 2003). It worked! Now trying to get my mind back on this stuff, where my own interests are.

Do you think there should be an admin panel where the user can set the desired number of days before an ad expires to send the warning email? Or just skip all that and hard-code it?

trains58554

  • Osclass contributor
  • Hero Member
  • *****
  • Posts: 3642
  • osCanyon, the class of Osclass
Re: Repost an expired ad
« Reply #36 on: January 09, 2012, 10:16:26 am »
I am glad you hear you say that I thought I was the only one who forgot stuff after being gone only one day.  :)
That must of been a large database to transfer 7 years of data and it was successful which is always a plus.

I do think there should be an admin panel so the admin can change the number of days to notify the user.
I also think we should add an option to let the admin choose if they want to recharge users to republish their ads.

Jay

Jesse

  • Hero Member
  • *****
  • Posts: 631
  • Out of my mind, back in 5 minutes
Re: Repost an expired ad
« Reply #37 on: January 09, 2012, 10:23:42 am »
I never thought about that second option... giving users the choice of charging or not for extensions. You could then also implement your other idea of limiting number of republishes.

There could be a check box to enable the "republish without fees" option. If checked, they could set the number of "free" publishes (0=unlimited). After which, subsequent republished ads must be paid for (all this assuming PayPal is enabled). Just one idea.

trains58554

  • Osclass contributor
  • Hero Member
  • *****
  • Posts: 3642
  • osCanyon, the class of Osclass
Re: Repost an expired ad
« Reply #38 on: January 09, 2012, 11:46:40 am »
I got it working. But I just noticed that we may have have to add a table to mark which ads we sent an ad to but maybe not?

Try it out to over ride the cron you can call this function item_republish_cron() other wise you will have to wait a day before the cron hook is called.

I will implement some of the above features tomorrow or if you want to add them that is fine as well.

Good night,

Jay

EDIT zip removed as this is an old version.
« Last Edit: January 13, 2012, 01:54:08 am by trains58554 »

Jesse

  • Hero Member
  • *****
  • Posts: 631
  • Out of my mind, back in 5 minutes
Re: Repost an expired ad
« Reply #39 on: January 09, 2012, 11:56:54 am »
Great! I'll check this latest version out.

SuperAtic

  • Full Member
  • ***
  • Posts: 196
Re: Repost an expired ad
« Reply #40 on: January 09, 2012, 02:24:01 pm »
Hi guys!

I have installed the plugin and cause a crash in the installation!
After installation i see a white page, in admin area and in the fronend!

I have to delete the folder plugins/item_republish and all re-work!

 :(
« Last Edit: January 09, 2012, 02:30:40 pm by SuperAtic »

Jesse

  • Hero Member
  • *****
  • Posts: 631
  • Out of my mind, back in 5 minutes
Re: Repost an expired ad
« Reply #41 on: January 09, 2012, 02:39:25 pm »
I just tested it out, works just fine for me!  :D


SuperAtic: Sorry to hear about that.... just some questions... what version of OSClass are you using? What theme? And, do you have permalinks enabled? Not sure if any of those are factors, but they could be.
« Last Edit: January 09, 2012, 02:42:11 pm by Jesse »

SuperAtic

  • Full Member
  • ***
  • Posts: 196
Re: Repost an expired ad
« Reply #42 on: January 09, 2012, 06:52:28 pm »
Hi Jesse,

Yes II have pearmlink enabled! I use OSClass 2.3.4 (lates update)
My theme is a tuning version of modern theme

I have tested the first version of plugin and it work.. but the last update crash!  :-\

trains58554

  • Osclass contributor
  • Hero Member
  • *****
  • Posts: 3642
  • osCanyon, the class of Osclass
Re: Repost an expired ad
« Reply #43 on: January 09, 2012, 07:04:09 pm »
@SuperAtic,

Did it give you any error messages?

Thanks

Jay

SuperAtic

  • Full Member
  • ***
  • Posts: 196
Re: Repost an expired ad
« Reply #44 on: January 09, 2012, 07:21:03 pm »
Hi Jay!

No any error message in the webpage!

I have reset the setting of the latest search and the problem ss solved!

No bad words in the Most Searched Items!

 ;)