Advertisement:

Author Topic: after publish...  (Read 4757 times)

design

  • Hero Member
  • *****
  • Posts: 2619
  • Osclass 3.5 MAC/PC w/ Modern Browsers
after publish...
« on: October 03, 2013, 10:13:00 pm »
I would like the user to be taken to the /payment/menu but I do not know what hook to use and where to use it. I'm assuming
 
<button type="submit" class="ui-button ui-button-middle ui-button-main"><?php if($edit) { _e("Update", 'bender'); } else { _e("Publish", 'bender'); } ?></button>

and/or this

    $action = 'item_add_post';
    $edit = false;
    if(Params::getParam('action') == 'item_edit'){
        $action = 'item_edit_post';
        $edit = true;

in the item-post.php

or in Item.php
                    $this->doView('item-post.php');
                break;
                case 'item_add_post': //post_item
                    osc_csrf_check();
                    if( osc_reg_user_post() && $this->user == null ) {
                        osc_add_flash_warning_message( _m('Only registered users are allowed to post listings') );
                        $this->redirectTo( osc_base_url(true) );
                    }

I think it's the item.php in red, but I haven't figured out how to speak in OSClass yet?!  osc_base_url = /payments/menu.php



design

  • Hero Member
  • *****
  • Posts: 2619
  • Osclass 3.5 MAC/PC w/ Modern Browsers
Re: after publish...
« Reply #1 on: October 03, 2013, 11:04:08 pm »
noope, not those...
trying this one in item.php


                    // POST ITEM ( ADD ITEM )
                    $success = $mItems->add();

                    if($success!=1 && $success!=2) {
                        osc_add_flash_error_message( $success);
                        $this->redirectTo( osc_item_post_url() );

design

  • Hero Member
  • *****
  • Posts: 2619
  • Osclass 3.5 MAC/PC w/ Modern Browsers
Re: after publish...
« Reply #2 on: October 04, 2013, 09:24:24 pm »
another easy fix from teseo---

replaced the flash message with this. I'm using the more edit plugin

Your ad needs to be <a href="/payment/menu">paid for</a> and then approved by the administrator, it could take a while until it appears on the website

cartagena68

  • issues
  • Hero Member
  • *
  • Posts: 1198
Re: after publish...
« Reply #3 on: October 04, 2013, 10:09:52 pm »

AeroFX

  • Newbie
  • *
  • Posts: 9
Re: after publish...
« Reply #4 on: October 06, 2013, 03:39:12 pm »
In the Premium 'Landing Page' I added this bit of code so that if members chose not to use premium there was a link away from the premium page, which just helps keep things tidy and simple.

Quote
<h1>Make your Ad premium?</h1> <h2><a href="http://www.insertyourdomain.com">No Thanks</a></h2>

Work in progress at moment but this is the idea


design

  • Hero Member
  • *****
  • Posts: 2619
  • Osclass 3.5 MAC/PC w/ Modern Browsers
Re: after publish...
« Reply #5 on: October 07, 2013, 11:04:10 pm »
thanks for the tips. though I think that having this option should be "out-of-the-box" or we should not have to create a new page. which is why I wanted to redirect them to their account page where the can do so much more i.e. edit, delete old, make other ads premium. While having the new post go straight to the live ad is not very productive, even if a free ad. Common business sense would have them go to make it premium!

nootkan

  • Sr. Member
  • ****
  • Posts: 259
Re: after publish...
« Reply #6 on: December 02, 2013, 04:27:43 am »
another easy fix from teseo---

replaced the flash message with this. I'm using the more edit plugin

Your ad needs to be <a href="/payment/menu">paid for</a> and then approved by the administrator, it could take a while until it appears on the website

Where exactly did you place this?  I cannot seem to find the file in which it should reside.

design

  • Hero Member
  • *****
  • Posts: 2619
  • Osclass 3.5 MAC/PC w/ Modern Browsers
Re: after publish...
« Reply #7 on: December 02, 2013, 07:05:45 pm »
If you are comfortable changing core codes, here is something careylist was kind enough to figure out for us.

http://forums.osclass.org/general-help/bender-1-0-theme-how-to-add-publish-or-premium-ad-option/15/?topicseen