Prev Previous Post   Next Post Next
  #1  
Old 19th September 2010, 21:35
miooodek miooodek is offline
Junior Member
 
Join Date: Aug 2010
Posts: 23
Thanks: 2
Thanked 0 Times in 0 Posts
Lightbulb Forced Ads on ISPC 3

Hi, I red some examples of forcing ads with ISPC 2, one of them interested me much but I'm having problem with getting it work with ISPC 3. Maybe some of you have working solutions for that. I'm interested in forcing ads at every site on my server except some my projects, and server primary site

I think this topic can be helpful for many users
Thanks for reply,


Quote:
I worked on this code some so here i have some good stuff for you

Ok first code i will give you is to not auto add it to every account but FORCE it on every account no matter what before they could just edit out the ad's part of the .htaccess file so.

Go to: /root/ispconfig/isp/conf/
Edit File: vhost.conf.master

Go to the bottom
you will see this
Quote:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]
</IfModule>
Right Below that add
Quote:
php_value output_buffering 4098
php_value auto_prepend_file '/var/www/ads/header.php'
AddType application/x-httpd-php htm
AddType application/x-httpd-php html
That is the code for your ad replace header.php with your ad file name
Also if you want your ad on the top or the bottom of the page

Top of page: php_value auto_prepend_file '/var/www/ads/header.php'
Bottom of page: php_value auto_append_file '/var/www/ads/header.php'

This code can not be removed from any site so i made a mod for the ad file you will not need blank.php anymore so you can delete it.

So in your ad file right now you have your ad code thats it, Change your file so its like this.
Quote:
<?
$adfrees = '/var/www/web1/web'; //Change this to the web you want without ad's
$dir = getcwd();
if ($dir == $adfrees) {
echo '';
} else {
echo '
AD CODE HERE
'; }
?>
It works great!
Reply With Quote
Sponsored Links
 

Bookmarks

Tags
forcing ads

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
forced ads jac General 1 16th July 2009 10:36
Problem woth forced ads how-to Gimly Installation/Configuration 5 27th January 2009 11:44
forced ads for the admin grandpagenocide Feature Requests 6 22nd November 2008 03:20
Forced ADs for users web only kextra1 Tips/Tricks/Mods 3 21st November 2008 13:17
Forced ads on ISPConfig server grandpagenocide Tips/Tricks/Mods 13 4th September 2008 19:31


All times are GMT +2. The time now is 01:28.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.