Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4257
Latest: Alex998.
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 43295
Total Topics: 7523
Most Online Today: 175
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 162
Total: 162

Author Topic: SSI Implementation  (Read 12888 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: 16452
    • 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: 16452
    • 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: 16452
    • 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: 16452
    • 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: 16452
    • 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: 16452
    • 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
2856 Views
Last post August 31, 2018, 03:21:44 pm
by SMFHacks

+- Recent Topics

Please Help! by SMFHacks
April 17, 2024, 08:04:55 am

Rate own images by fvlog19
April 11, 2024, 10:56:53 am

Tidy Child Boards on 2.1.4 by SMFHacks
April 04, 2024, 03:54:12 pm

Problems SMF 2.0.19 > 2.1.4 SMF Gallery Pro - Recents Images to overall header by Michel68
March 30, 2024, 12:41:08 pm

Can't DROP 'id_member'; check that column/key exists Datei: by SMFHacks
March 30, 2024, 11:58:20 am

No thumbnails on new uploads by Tonyvic
March 29, 2024, 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

Powered by EzPortal