Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4267
Latest: ramiroelliot
New This Month: 2
New This Week: 0
New Today: 0
Stats
Total Posts: 43538
Total Topics: 7565
Most Online Today: 40
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 47
Total: 47

Author Topic: SSI Implementation  (Read 13149 times)

0 Members and 1 Guest are viewing this topic.

Offline Black Viper

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
SSI Implementation
« on: January 25, 2010, 03:07:10 am »
I understand that I can copy the "code" in the location to place it whereever in the forums, but I wish to include the ad space on my main site, of which, is in a different directory and sub domain. Could you give an example of said SSI implementation?

My current SSI code is the following (slightly edited for content):

Code: [Select]
<?php
require("r:\Public\my\forum\subdomain\SSI.php");
if (
in_array(11$user_info['groups']))
{echo 
' ';}
else{
echo 
'<div class="ads"><script type="text/javascript"><!--
ad code is here
//-->
</script>
more ad code is here
</div>'
;
}
?>

The previous is so a single group members do not see the ads, but all others do. With Ad Seller Pro, I can see that what I wish to do may be able to be done with one shot and configuration area... but cannot make it work (after creating a new ad location, unchecking all forum areas, etc). :P

By the way, your mods rock. :)

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16561
    • View Profile
Re: SSI Implementation
« Reply #1 on: January 25, 2010, 08:04:44 am »
Your close make sure the SSI include is at the very top of all your php code on your website

Next you would create a new location in Ad Seller Pro. Give a title, description. Then after it is created click on the "Get Code" link to get the code

Posted an example using the overall header ad location code
Code: [Select]
<?php
require("pathtossihere\SSI.php");

// Begin Ad Seller Pro Location - Overall Header

global $sourcedir;
include_once 
$sourcedir "/adseller.php";

$adSellerAdData =  ShowAdLocation(1);
if (
$adSellerAdData != false)
{
echo $adSellerAdData;
}

// End Ad Seller Pro Location - Overall Header

?>



This line is checking to see if we need to show ad's or not.
Code: [Select]
if ($adSellerAdData != false)

To style the Ad location such as adding table's etc put  your style around this line
Code: [Select]
echo $adSellerAdData;

Hope that helps



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 Black Viper

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Re: SSI Implementation
« Reply #2 on: January 25, 2010, 10:03:04 am »
OK great!
That looks good. I know where I went wrong now. :P
Will try it with your recommendation while substituting the proper information.
Thanks!

Offline Black Viper

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Re: SSI Implementation
« Reply #3 on: January 26, 2010, 10:56:01 am »
Works exactly as intended with even a couple more member groups (such as admin) not displaying the ads on the main web site!
However, I do have an issue to ask about, but will start a new thread.

Offline stledm

  • Member
  • *
  • Posts: 2
    • View Profile
Re: SSI Implementation
« Reply #4 on: April 06, 2012, 12:54:22 pm »
ok, i'm baffled... i've been trying to use this (want to place an add on my drupal homepage which my forums are a subdirectory of) and am getting nothing but errors.

i added
Code: [Select]
require("C:\[path]\[root path]\Forums\ssi.php");
and i still get the error: 
Code: [Select]
Call to undefined function cache_get_data() in C:\[path]\[root path]\Forums\Sources\adseller2.php on line 2293
so i added
Code: [Select]
include_once "/Forums/sources/load.php";
fixed that error however now i get
Code: [Select]
Function name must be a string in C:\[path]\[root path]\Forums\Sources\adseller2.php on line 2295

... i'm stumped. :-/

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16561
    • View Profile
Re: SSI Implementation
« Reply #5 on: April 06, 2012, 12:57:32 pm »
Are you loading SSI as the very first line of code in the file that you are calling from?
Also making sure you are using SMF 2.0 right?
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 stledm

  • Member
  • *
  • Posts: 2
    • View Profile
Re: SSI Implementation
« Reply #6 on: April 06, 2012, 01:09:23 pm »
yes to both.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16561
    • View Profile
Re: SSI Implementation
« Reply #7 on: April 06, 2012, 01:15:49 pm »
That should do it then hmm. Try changing \ to / in the paths
If not just make a script with that code and we can try to do an insert via an iframe.
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: SSI Implementation
« Reply #8 on: January 24, 2013, 05:39:30 am »
I've got SSI.php up and running on my Joomla site, using it to show items form the forum and from Aeva quite successfully.

I followed the instructions above, created a custom location, assigned an add to that location and placed the custom location code in a Joomla Module, which I installed via the installation manager.

The module installed successfully but no ads show. Have I done something stupid or is there another reason it doesn't work?

I'm using SMF 1.1.17

Edit: The problem was mine. I'd included a parameter for section ID in the installer which of course was not applicable.
« Last Edit: January 24, 2013, 06:03:25 am by amwebby »

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16561
    • View Profile
Re: SSI Implementation
« Reply #9 on: January 24, 2013, 07:56:06 am »
This is solved right?
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: SSI Implementation
« Reply #10 on: January 24, 2013, 08:24:40 am »
Yep, problem solved. My bad!

Offline amwebby

  • Community Suite Customer
  • Sr. Member
  • ******
  • Posts: 306
    • View Profile
Re: SSI Implementation
« Reply #11 on: February 01, 2013, 10:16:11 am »
I'd like to create a view of the management console for my ads so that I can view that item on its own on a mobile phone. It should be possible with SSI but I need pointing to the code please?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16561
    • View Profile
Re: SSI Implementation
« Reply #12 on: February 01, 2013, 10:30:33 am »
Not possible with SSI you would need to create a whole interface for the phone
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: SSI Implementation
« Reply #13 on: February 01, 2013, 10:33:30 am »
I'm not talking about creating a phone app but a php web page that I could view on my mobile. Surely it is possible to create a php page that only shows that one function?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16561
    • View Profile
Re: SSI Implementation
« Reply #14 on: February 01, 2013, 10:35:21 am »
Show what function?
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
7 Replies
2989 Views
Last post August 31, 2018, 03:21:44 pm
by SMFHacks

+- Recent Topics

Gallery Pro reinstalation by Lirorobert
October 06, 2024, 04:16:25 pm

quoting part of message by Lirorobert
October 04, 2024, 03:21:40 pm

Does SMF Gallery support by SMFHacks
October 02, 2024, 06:14:26 am

Restoring a deleted photo by Monocero
September 28, 2024, 04:12:20 am

Item count on Gallery Tab shows double by SMFHacks
September 26, 2024, 12:59:20 pm

Forum post missing when image over 4000x pixels is uploaded to gallery by Michel68
September 24, 2024, 01:37:17 pm

Setting a photo as invisible by Monocero
September 17, 2024, 02:11:56 pm

Two gallery names by SMFHacks
September 15, 2024, 02:17:49 pm

Bar during the regeneration of miniatures by Monocero
September 15, 2024, 12:35:08 pm

Error on upgrade by SMFHacks
September 14, 2024, 09:54:07 pm

Powered by EzPortal