Advertisement:

Author Topic: How to add RENEW / REFRESH / REPOST feature to OSCLASS  (Read 20671 times)

Aficionado

  • Guest
Re: How to add RENEW / REFRESH / REPOST feature to OSCLASS
« Reply #15 on: December 27, 2013, 02:12:45 am »
so many core files to change, will _conejo add this to a new version? It seems like it is something a lot of people want.

They have promised that for 3.4 but not sure about it. I wish they do.

And you are WRONG. Not A Lot Of People Want That in USERSVOICE. Our voice here in  the Forums doesn't count.


design

  • Hero Member
  • *****
  • Posts: 2619
  • Osclass 3.5 MAC/PC w/ Modern Browsers
Re: How to add RENEW / REFRESH / REPOST feature to OSCLASS
« Reply #16 on: December 27, 2013, 02:27:46 am »
ouch  :-X

byteGator

  • Osclass Hero
  • Sr. Member
  • *
  • Posts: 346
  • Simple Mind is a Beautiful Mind
Re: How to add RENEW / REFRESH / REPOST feature to OSCLASS
« Reply #17 on: December 27, 2013, 02:55:00 am »
so many core files to change, will _conejo add this to a new version? It seems like it is something a lot of people want.

I think RENEW / REPOST is esential to Classified ads. I Agree with aficionado that every classified ads need this feature. Thats why I put it in core. I hope we can have it in 3.4.

byteGator

  • Osclass Hero
  • Sr. Member
  • *
  • Posts: 346
  • Simple Mind is a Beautiful Mind
Re: How to add RENEW / REFRESH / REPOST feature to OSCLASS
« Reply #18 on: December 27, 2013, 03:15:56 am »
it is ok to put this link in email templates

 <a href="<?php echo osc_item_renew_url(); ?>"><?php _e('Repost ads', 'modern'); ?></a>

??
in email teplates i have 2 templates:
email_ad_expire ({CONTACT_NAME} {REPUBLISH_URL}) keywords accepted
email_ad_expired ({CONTACT_NAME} {REPUBLISH_URL}) keywords accepted
thx
                                         

for email link, you have to put $secret and $id !

for example:
Code: [Select]
<a href="<?php echo osc_item_renew_url$item['s_secret'], $item['pk_i_id']); ?>">RENEW</a>



serjuc11111

  • Hero Member
  • *****
  • Posts: 814
Re: How to add RENEW / REFRESH / REPOST feature to OSCLASS
« Reply #19 on: December 27, 2013, 06:36:15 pm »
it is ok to put this link in email templates

 <a href="<?php echo osc_item_renew_url(); ?>"><?php _e('Repost ads', 'modern'); ?></a>

??
in email teplates i have 2 templates:
email_ad_expire ({CONTACT_NAME} {REPUBLISH_URL}) keywords accepted
email_ad_expired ({CONTACT_NAME} {REPUBLISH_URL}) keywords accepted
thx
                                         

for email link, you have to put $secret and $id !

for example:
Code: [Select]
<a href="<?php echo osc_item_renew_url$item['s_secret'], $item['pk_i_id']); ?>">RENEW</a>
i try to put that code but is not working...in email received i see something like:
code used: <a href="<?php echo osc_item_renew_url( $item['s_secret'], $item['pk_i_id']); ?>">RENEW</a>
email received:
echo osc_item_renew_url( $item['s_secret'], $item['pk_i_id']); ?>">renew
i put that code in this email templates: email_ad_expire and email_ad_expired!can we put this in another place to work?
thx again!

byteGator

  • Osclass Hero
  • Sr. Member
  • *
  • Posts: 346
  • Simple Mind is a Beautiful Mind
Re: How to add RENEW / REFRESH / REPOST feature to OSCLASS
« Reply #20 on: December 27, 2013, 07:50:55 pm »
hi Serjuc11111....

Sorry, my fault. the renew link for email is:
Code: [Select]
$renew_link = osc_item_renew_url( $item['s_secret'], $item['pk_i_id']);
put this $renew_link at your email.

If you use HTML at your email, then you put <a href="........

Regards

serjuc11111

  • Hero Member
  • *****
  • Posts: 814
Re: How to add RENEW / REFRESH / REPOST feature to OSCLASS
« Reply #21 on: December 27, 2013, 07:54:56 pm »
it's not working sire!
with or without <a href=   received email send me exactly what im writing in email templates!
« Last Edit: December 27, 2013, 08:12:01 pm by serjuc11111 »

byteGator

  • Osclass Hero
  • Sr. Member
  • *
  • Posts: 346
  • Simple Mind is a Beautiful Mind
Re: How to add RENEW / REFRESH / REPOST feature to OSCLASS
« Reply #22 on: December 29, 2013, 05:44:25 am »
Hi serjuc111111

That is PHP basic programming.
Come on, find a way to do it...

Regards

serjuc11111

  • Hero Member
  • *****
  • Posts: 814
Re: How to add RENEW / REFRESH / REPOST feature to OSCLASS
« Reply #23 on: December 29, 2013, 11:53:46 am »
im not new on this kind of programming but sometimes we meet some strange problem and ask for a solution, and in that email templates whatever i put,a link,a php code, a href etc.....will be send exactly word by word!
p.s sorry for i  waste your time but this is a forum anyway!if u have a problem with this just "log out" and let the "amateur" to fix their own bugs/problems!

byteGator

  • Osclass Hero
  • Sr. Member
  • *
  • Posts: 346
  • Simple Mind is a Beautiful Mind
Re: How to add RENEW / REFRESH / REPOST feature to OSCLASS
« Reply #24 on: December 31, 2013, 03:49:20 am »
Hi serjuc11111

look at osclass/emails.php.

$body = 'Hi, click this link <a href="http://domain.tld/renewurl">Renew link</a> to renew you ads';

regards

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: How to add RENEW / REFRESH / REPOST feature to OSCLASS
« Reply #25 on: December 31, 2013, 03:59:14 am »
Hi byteGator!

Just to say BIG THANK YOU  :D for the nice present for New Year from you to Osc community! ;)
Will test it soon as the craze pass and I grab some rest and time :D

Regards and all the nice wishes & good healt to you and your family in 2014!
dev101

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Re: How to add RENEW / REFRESH / REPOST feature to OSCLASS
« Reply #26 on: January 20, 2014, 03:41:36 am »
Eurmmzzz byteGator why don't you join the devs of OsClass and just discuss this solution which only needs to be implemented in the core? :)

I do think the team does not mind extra help and seems to me you know what you are doing ::)


Thanks as well,
Eric

byteGator

  • Osclass Hero
  • Sr. Member
  • *
  • Posts: 346
  • Simple Mind is a Beautiful Mind
Re: How to add RENEW / REFRESH / REPOST feature to OSCLASS
« Reply #27 on: January 25, 2014, 08:15:04 am »
im not new on this kind of programming but sometimes we meet some strange problem and ask for a solution, and in that email templates whatever i put,a link,a php code, a href etc.....will be send exactly word by word!
p.s sorry for i  waste your time but this is a forum anyway!if u have a problem with this just "log out" and let the "amateur" to fix their own bugs/problems!


hi serjuc11111,

This is my code at osclass/emails.php. May be this can give you some idea about warn_expiration email

Code: [Select]
    function fn_email_warn_expiration($aItem) {
        $itemId      = $aItem['pk_i_id'];
        $admin_email = osc_contact_email();

        View::newInstance()->_exportVariableToView('item', $aItem);
        $itemURL = osc_item_url();
        $itemURL = '<a href="'.$itemURL.'" >'.$itemURL.'</a>';
        $renew_url = osc_item_renew_url( $aItem['s_secret'], $aItem['pk_i_id'] );
        $renew_url = '<a href="'.$renew_url.'" >'.$renew_url.'</a>';

        $mPages = new Page();
        $aPage = $mPages->findByInternalName('email_warn_expiration');
        $locale = osc_current_user_locale();

        $content = array();
        if(isset($aPage['locale'][$locale]['s_title'])) {
            $content = $aPage['locale'][$locale];
        } else {
            $content = current($aPage['locale']);
        }

        $words   = array();
        $words[] = array(
            '{USER_NAME}',
            '{ITEM_TITLE}',
            '{ITEM_ID}',
            '{ITEM_EXPIRATION_DATE}',
            '{ITEM_URL}',
            '{ITEM_LINK}',
            '{RENEW_LINK}',
            '{SELLER_NAME}',
            '{SELLER_EMAIL}'
        );
        $words[] = array(
            $aItem['s_contact_name'],
            $aItem['s_title'],
            $itemId,
            $aItem['dt_expiration'],
            osc_item_url(),
            $itemURL,
            $renew_url,
            $aItem['s_contact_name'],
            $aItem['s_contact_email']
        );
        $title_email = osc_apply_filter('email_warn_expiration_title_after', osc_mailBeauty(osc_apply_filter('email_title', osc_apply_filter('email_warn_expiration_title', $content['s_title'])), $words));
        $body_email = osc_apply_filter('email_warn_expiration_description_after', osc_mailBeauty(osc_apply_filter('email_description', osc_apply_filter('email_warn_expiration_description', $content['s_text'])), $words));

        $emailParams = array(
            'from'      => $admin_email,
            'subject'   => $title_email,
            'to'        => $aItem['s_contact_email'],
            'to_name'   => $aItem['s_contact_name'],
            'body'      => $body_email,
            'alt_body'  => $body_email
        );
        osc_sendMail($emailParams);
    }
    osc_add_hook('hook_email_warn_expiration', 'fn_email_warn_expiration');

byteGator

  • Osclass Hero
  • Sr. Member
  • *
  • Posts: 346
  • Simple Mind is a Beautiful Mind
Re: How to add RENEW / REFRESH / REPOST feature to OSCLASS
« Reply #28 on: January 25, 2014, 08:41:17 am »
plz attach all the working files of this function..
my site show problem in this function case 'item_renew': in osclass/controller/item.php
please help me...

Hi inclass.in

Please read this tutorial and do it step by step. I can't give you my files because it already mixed with other mods.

Regards.

byteGator

  • Osclass Hero
  • Sr. Member
  • *
  • Posts: 346
  • Simple Mind is a Beautiful Mind
Re: How to add RENEW / REFRESH / REPOST feature to OSCLASS
« Reply #29 on: January 25, 2014, 08:44:05 am »
Eurmmzzz byteGator why don't you join the devs of OsClass and just discuss this solution which only needs to be implemented in the core? :)

I do think the team does not mind extra help and seems to me you know what you are doing ::)


Thanks as well,
Eric

I already send pull request on github. But looks like the devs are not active since mid december.