*

oneloveb

  • ****
  • 112 posts
Share listing with your friend
« 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

*

oneloveb

  • ****
  • 112 posts
Re: Share listing with your friend
« Reply #1 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

*

MB Themes

Re: Share listing with your friend
« Reply #2 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.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

oneloveb

  • ****
  • 112 posts
Re: Share listing with your friend
« Reply #3 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

*

oneloveb

  • ****
  • 112 posts
Re: Share listing with your friend
« Reply #4 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

*

MB Themes

Re: Share listing with your friend
« Reply #5 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.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots