Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4255
Latest: andreios
New This Month: 3
New This Week: 1
New Today: 0
Stats
Total Posts: 43261
Total Topics: 7519
Most Online Today: 297
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 287
Total: 287

Author Topic: How to put Ad Seller Pro in SSL mode  (Read 12824 times)

0 Members and 1 Guest are viewing this topic.

Offline amwebby

  • Community Suite Customer
  • Sr. Member
  • ******
  • Posts: 306
    • View Profile
How to put Ad Seller Pro in SSL mode
« on: January 26, 2013, 04:12:05 am »
I've got an ad running on the front page of my Joomla site using SSI.php

All is well until the user switches to https to fill in a secure form. Then the secure icon shows as broken and the Javascript console reports "The page at https://www.amoc.org displayed insecure content from http://www.amoc.org/forum/index.php?action=adpro;sa=v&id=2&l=1000&m=0&t=1359194613.".

How can I make Adseller Pro switch to https or run Adseller Pro in https all the time?
« Last Edit: January 26, 2013, 09:19:04 am by amwebby »

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: How to put Ad Seller Pro in SSL mode
« Reply #1 on: January 26, 2013, 08:16:22 am »
I don't have anything built in to change the urls to https the system uses the default url that the forum uses for all the content.
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 amwebby

  • Community Suite Customer
  • Sr. Member
  • ******
  • Posts: 306
    • View Profile
Re: How to put Ad Seller Pro in SSL mode
« Reply #2 on: January 26, 2013, 08:19:15 am »
Hmm, I'm sure I have the forum set to use https. I'll have to check.

Offline amwebby

  • Community Suite Customer
  • Sr. Member
  • ******
  • Posts: 306
    • View Profile
Re: How to put Ad Seller Pro in SSL mode
« Reply #3 on: January 26, 2013, 09:18:29 am »
Curiouser and couriouser... The forum wasn't set to use https (I'm sure it was..).

However, when I did set it to https everything works fine, until the Joomla site that wraps the forum goes into https. Then the ads don't appear, only the "Advertise Here" link below them.

Can't work that one out, unless the variable I've added to Google Adsense code to switch to https if the site url is secure is somehow getting confused by two secure urls?
« Last Edit: January 26, 2013, 09:21:49 am by amwebby »

Offline amwebby

  • Community Suite Customer
  • Sr. Member
  • ******
  • Posts: 306
    • View Profile
Re: How to put Ad Seller Pro in SSL mode
« Reply #4 on: February 01, 2013, 09:32:20 am »
My workaround to this is similar to the one I use for Adsense where I've used javascript to not show the ad if the site is in https mode.

I applied the same thinking to php and this is what I came up with:
Code: [Select]
<?php
if  ($_SERVER["SERVER_PORT"] == 443
{ echo 
'';} 
else 
{
// Begin Ad Seller Pro Location - Web site bottom
global $sourcedir;
include_once (
$sourcedir '/adseller.php');
$adSellerAdData =  ShowAdLocation(1000);
// Check if any ads where found
if ($adSellerAdData != false)
{
// Display the advertising code
echo $adSellerAdData;
}
// End Ad Seller Pro Location - Web site bottom
}
?>


Now the ad shows in regular mode and when the site switches to secure mode for transactions the ads disappear and hence the insecure content warnings.

I had to adopt this approach as putting my forum in secure mode all the time meant that Chrome simply blocked Adsense content as insecure and other browsers showed an insecure content warning all the time.
« Last Edit: February 01, 2013, 09:36:17 am by amwebby »

 

Related Topics

  Subject / Started by Replies Last post
6 Replies
8156 Views
Last post January 22, 2010, 04:26:17 pm
by SMFHacks
Ad Seller Pro

Started by bulldog71169 « 1 2 » Support

16 Replies
9146 Views
Last post December 30, 2010, 05:18:11 pm
by bulldog71169
1 Replies
12652 Views
Last post October 14, 2014, 09:35:43 am
by Labradoodle-360
7 Replies
13899 Views
Last post March 05, 2020, 11:19:05 am
by Plus
4 Replies
25656 Views
Last post September 15, 2023, 08:42:24 am
by Ghost

+- Recent Topics

Problems SMF 2.0.19 > 2.1.4 SMF Gallery Pro - Recents Images to overall header by Michel68
Today at 08:27:36 am

No thumbnails on new uploads by Tonyvic
Today at 06:26:18 am

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

[Mod] RSS Feed Poster by SMFHacks
February 27, 2024, 11:57:18 am

find duplicate pictures by fvlog19
February 14, 2024, 02:22:40 pm

Error uploading video. by SMFHacks
February 08, 2024, 02:04:16 pm

Powered by EzPortal