Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 11845
Latest: SamoanOnion
New This Month: 0
New This Week: 0
New Today: 0
Stats
Total Posts: 42481
Total Topics: 7409
Most Online Today: 33
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 34
Total: 34

Author Topic: Exclude Actions  (Read 3126 times)

0 Members and 1 Guest are viewing this topic.

Offline Stanyy

  • Bad Emails DO NOT EMAIL
  • Member
  • *
  • Posts: 2
    • View Profile
Exclude Actions
« on: August 25, 2015, 04:50:04 pm »
How do I prevent ads from showing up on certain actions?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16112
    • View Profile
Re: Exclude Actions
« Reply #1 on: August 25, 2015, 05:03:57 pm »
You would need to modify the code to to do that.
Source/Adseller2.php

Find
Code: [Select]
if (isset($_SESSION['login_url']))
unset($_SESSION['login_url']);

if (isset($_SESSION['old_url']))
unset($_SESSION['old_url']);

Add after
Code: [Select]
if (isset($_REQUEST['action']))
{
    if ($_REQUEST['action'] == 'youractionheretoskip')
      return false;

}
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Stanyy

  • Bad Emails DO NOT EMAIL
  • Member
  • *
  • Posts: 2
    • View Profile
Re: Exclude Actions
« Reply #2 on: August 28, 2015, 07:09:12 am »
Hi, thanks for the quick reply.

I tried the code but it didnt work.

I slightly changed it to this one and it seemed to work:

Code: [Select]
if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'youractionheretoskip')
        return false;

Is the above code safe to use?
Also, how do i exclude multiple actions?

Thank you.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16112
    • View Profile
Re: Exclude Actions
« Reply #3 on: August 28, 2015, 04:59:34 pm »
Should be safe
Multiple you can either copy and paste it or do something like
Code: [Select]
$skipActionList = array('action1','action2','action3');
if (isset($_REQUEST['action']) && in_array($_REQUEST['action'],$skipActionList) == true)
        return false;
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

 

Related Topics

  Subject / Started by Replies Last post
1 Replies
2717 Views
Last post March 11, 2010, 04:03:20 pm
by SMFHacks
10 Replies
5538 Views
Last post April 07, 2011, 06:49:16 am
by Wickedgood
0 Replies
2616 Views
Last post February 08, 2014, 04:22:38 am
by Cmely
4 Replies
4667 Views
Last post February 14, 2014, 11:54:34 pm
by Diego Andrés
2 Replies
2052 Views
Last post January 30, 2017, 12:27:48 pm
by shuban

+- Recent Topics

Delete old file by SMFHacks
October 05, 2022, 08:11:13 am

[Feature Request] Thumbnail on topic list by Shades
October 04, 2022, 11:40:26 am

Undefined index: class_ad_seller by SMFHacks
October 04, 2022, 09:33:36 am

"Custom title" badge by Hatshepsut
September 27, 2022, 10:11:27 pm

Category Selection by Anmer
September 18, 2022, 02:40:06 am

Setting a single free download. by Zaphod
September 12, 2022, 10:18:45 pm

Error message "Data too long for column 'ipaddress' at row 1" by SMFHacks
September 12, 2022, 08:49:02 am

SMF to SMF bridge via WP by SMFHacks
September 11, 2022, 09:44:30 am

Video player included by SMFHacks
September 06, 2022, 10:26:27 pm

Upload hangs / doesn't complete by SMFHacks
August 28, 2022, 08:36:21 am

Powered by EzPortal