Current time: 05-18-2012, 12:36 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Forced Ads - Force Header and Footer Ads on Your Users
08-13-2009, 02:14 PM (This post was last modified: 09-24-2009 03:06 PM by Nick.)
Post: #1
Forced Ads - Force Header and Footer Ads on Your Users
Hi everyone, I know you are all waiting patiently for 1.2 to be finished, so in the meantime I have this for you Smile.

This plugin allows admins with root access to their server to force ads on accounts created with THT. This is not for the average user, but I have made the instructions as easy as possible.

Thanks go To KrakJoe @ http://krakjoe.com for writing this wonderful script.

Installation Instructions:
  1. Install mod_layout

    Okay, first thing is first, we need mod_layout for this to work. To install mod_layout, pop open SSH as root and enter this code:
    Code:
    wget http://download.tangent.org/mod_layout-5.1.tar.gz
    tar xzf mod_layout-5.1.tar.gz
    cd mod_layout*
    make
    make install
  2. Restart Apache
    Run this from terminal to restart your apache. Alternitively, use WHM Root to restart.
    Code:
    apachectl restart
  3. Upload the files to your server.
    get the files from here: http://thehostingtool.com/forum/attachment.php?aid=87
    now, upload the files from the scripts folder to /scripts on your server, and the files from the tht folder to your tht includes directory.
  4. Edit the files
    open up mod-layout.conf.php and edit the values according to your details.
    save postwwwacct.php as postwwwacct and chmodd to 755
    open up the header and footer ads files and put in your desired ads.
  5. Restart Apache Again

Congratulations! All new accounts created with the plans listed will have your forced ads in them.

Enjoy!


Attached File(s)
.zip  ForcedAds.zip (Size: 2.42 KB / Downloads: 595)

Nick - TheHostingTool Staff Coordinator

[Image: standard.png]

Visit this user's website Find all posts by this user
Quote this message in a reply
08-13-2009, 02:54 PM
Post: #2
RE: Forced Ads - Force Header and Footer Ads on Your Users
Isnt httpd restart like so:
Code:
service httpd restart

And very nice work mate.
Find all posts by this user
Quote this message in a reply
08-13-2009, 03:20 PM
Post: #3
RE: Forced Ads - Force Header and Footer Ads on Your Users
It depends on your Linux distribution.

These are some ways to restart apache. At least one of them will probably work on your distro. Make sure to run this with sudo or directly as root.
Code:
/usr/sbin/apachectl graceful
Code:
apachectl graceful
Code:
/usr/sbin/apache2ctl graceful
Code:
apache2ctl graceful
Code:
/etc/init.d/apache2 reload|graceful

Kevin Mark - TheHostingTool Lead Developer
Visit this user's website Find all posts by this user
Quote this message in a reply
08-13-2009, 07:22 PM
Post: #4
RE: Forced Ads - Force Header and Footer Ads on Your Users
Thanks Nick! Is there any way this could work without root at all?
Find all posts by this user
Quote this message in a reply
08-14-2009, 06:13 AM
Post: #5
RE: Forced Ads - Force Header and Footer Ads on Your Users
This cant work without root because you need to edit the httpd file
Find all posts by this user
Quote this message in a reply
08-14-2009, 09:03 AM
Post: #6
RE: Forced Ads - Force Header and Footer Ads on Your Users
(08-14-2009 06:13 AM)umarsa Wrote:  This cant work without root because you need to edit the httpd file

If you're root, you can edit the .httpd file. Wink

Kevin Mark - TheHostingTool Lead Developer
Visit this user's website Find all posts by this user
Quote this message in a reply
08-14-2009, 10:18 AM
Post: #7
RE: Forced Ads - Force Header and Footer Ads on Your Users
um... duh. thats why he said it won't work without root.

Nick - TheHostingTool Staff Coordinator

[Image: standard.png]

Visit this user's website Find all posts by this user
Quote this message in a reply
08-14-2009, 11:19 PM
Post: #8
RE: Forced Ads - Force Header and Footer Ads on Your Users
(08-14-2009 10:18 AM)Nick Wrote:  um... duh. thats why he said it won't work without root.

Sorry. I missed the "without" in his post.

Kevin Mark - TheHostingTool Lead Developer
Visit this user's website Find all posts by this user
Quote this message in a reply
08-25-2009, 12:48 PM
Post: #9
RE: Forced Ads - Force Header and Footer Ads on Your Users
For all users or can u select the users you want this option enabled to?
Find all posts by this user
Quote this message in a reply
08-25-2009, 03:07 PM
Post: #10
RE: Forced Ads - Force Header and Footer Ads on Your Users
(08-25-2009 12:48 PM)Guy Wrote:  For all users or can u select the users you want this option enabled to?

I believe this is for all accounts created after the edit.

Kevin Mark - TheHostingTool Lead Developer
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: