Support Forums - Classified Ads Script Osclass

Osclass theme support => Stela Osclass Theme => Topic started by: oneloveb on March 06, 2021, 08:55:36 AM

Title: Share listing with your friend
Post by: oneloveb on March 06, 2021, 08:55:36 AM
Hi,

I want to stop my whole site to STOP generating item/send-friend/ I DONT want this page item/send-friend/ to be created at ALL whenever I posted ads

I have WhatsApp and Facebook share plugin so please How can I delete the code that use to create this page item/send-friend/123


Thanks
Title: Re: Share listing with your friend
Post by: oneloveb on March 06, 2021, 12:56:26 PM
Hi

I don't know the exact exit; tag to comment to stop the generating of send- friend in item-send-friend.php

Thanks
Title: Re: Share listing with your friend
Post by: MB Themes on March 06, 2021, 02:10:20 PM
@oneloveb
At start of  item-send-friend.php file, add:
Code: [Select]
<?php exit; ?>
This will like shut-down this file and anytime you open it, you will only see white page.
Title: Re: Share listing with your friend
Post by: oneloveb on March 06, 2021, 03:04:15 PM
Thanks you so much I have add the code to the page and the page work as white page - that fine

But I posted new items now and the new URL still generated like this site.item/send-friend/6223

How can I delete the code that generates this site.item/send-friend/6223

Thanks
Title: Re: Share listing with your friend
Post by: oneloveb on March 06, 2021, 05:36:50 PM
Hi,
I Found the below code in hDfines.php

Gets url of send a friend (current item)
     *
     * @return string
     */
    function osc_item_send_friend_url() {
        if ( osc_rewrite_enabled() ) {
            return osc_base_url() . osc_get_preference('rewrite_item_send_friend') . '/' . osc_item_id();
        } else {
            return osc_base_url(true)."?page=item&action=send_friend&id=".osc_item_id();

What can I change to STOP my site to be generating Site/item/send-friend/182

Thanks
Title: Re: Share listing with your friend
Post by: MB Themes on March 07, 2021, 01:48:41 PM
@oneloveb
Edit item.php and remove those links.
If you are trying to achieve something different and expects that removing of function that generate URL will resolve something, then answer is that it will not.