Twitter SMFHacks Facebook SMFHacks SMFHacks.com
** Home Forum Index Hacks Products Login Register Search
Welcome, Guest. Please login or register.
May 24, 2013, 06:43:08 am

Login with username, password and session length
Members
Total Members: 10768
Latest: CayoTTe
Stats
Total Posts: 32395
Total Topics: 5480
Online Today: 57
Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Users: 0
Guests: 50
Total: 50
+ 
|-+ 
| |-+ 
| | |-+ 
| | | |-+ 
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] 2 Go Down Print
Author Topic: SSI Implementation  (Read 3549 times)
Black Viper
Jr. Member
**
Offline Offline

Posts: 50


View Profile
« 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:
<?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). Tongue

By the way, your mods rock. Smiley
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 11003


View Profile
« 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:
<?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:
if ($adSellerAdData != false)

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

Hope that helps



Logged
Black Viper
Jr. Member
**
Offline Offline

Posts: 50


View Profile
« Reply #2 on: January 25, 2010, 10:03:04 am »

OK great!
That looks good. I know where I went wrong now. Tongue
Will try it with your recommendation while substituting the proper information.
Thanks!
Logged
Black Viper
Jr. Member
**
Offline Offline

Posts: 50


View Profile
« 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.
Logged
stledm
Inline PM Customer
*****
Offline Offline

Posts: 2


View Profile
« 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:
require("C:\[path]\[root path]\Forums\ssi.php");

and i still get the error: 
Code:
Call to undefined function cache_get_data() in C:\[path]\[root path]\Forums\Sources\adseller2.php on line 2293

so i added
Code:
include_once "/Forums/sources/load.php";

fixed that error however now i get
Code:
Function name must be a string in C:\[path]\[root path]\Forums\Sources\adseller2.php on line 2295


... i'm stumped. :-/
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 11003


View Profile
« 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?
Logged
stledm
Inline PM Customer
*****
Offline Offline

Posts: 2


View Profile
« Reply #6 on: April 06, 2012, 01:09:23 pm »

yes to both.
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 11003


View Profile
« 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.
Logged
amwebby
Community Suite Customer
Full Member
******
Offline Offline

Posts: 181


View Profile
« 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 » Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 11003


View Profile
« Reply #9 on: January 24, 2013, 07:56:06 am »

This is solved right?
Logged
amwebby
Community Suite Customer
Full Member
******
Offline Offline

Posts: 181


View Profile
« Reply #10 on: January 24, 2013, 08:24:40 am »

Yep, problem solved. My bad!
Logged
amwebby
Community Suite Customer
Full Member
******
Offline Offline

Posts: 181


View Profile
« 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?
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 11003


View Profile
« 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
Logged
amwebby
Community Suite Customer
Full Member
******
Offline Offline

Posts: 181


View Profile
« 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?
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 11003


View Profile
« Reply #14 on: February 01, 2013, 10:35:21 am »

Show what function?
Logged
Pages: [1] 2 Go Up Print 
« previous next »
Jump to:  

Recent
[May 23, 2013, 08:29:56 pm]

[May 23, 2013, 04:50:21 am]

[May 22, 2013, 10:03:30 pm]

[May 22, 2013, 03:00:09 pm]

[May 22, 2013, 03:03:31 am]

[May 21, 2013, 03:27:16 pm]

[May 21, 2013, 02:11:10 pm]

[May 21, 2013, 01:18:58 pm]

[May 21, 2013, 12:22:02 am]

[May 21, 2013, 12:20:41 am]
Random Picture
Donate to SMFHacks.com
Help Support the SMFHacks.com mod making.
Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
TinyPortal v0.9.7 © Bloc
SMF and SimpleMachines are registered trademarks of Simple Machines. SMFHacks.com is not affiliated with nor endorsed by Simple Machines.
Page created in 1.422 seconds with 19 queries.