THT Community

Full Version: Forced Ads - Force Header and Footer Ads on Your Users
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
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!
Isnt httpd restart like so:
Code:
service httpd restart

And very nice work mate.
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
Thanks Nick! Is there any way this could work without root at all?
This cant work without root because you need to edit the httpd file
(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
um... duh. thats why he said it won't work without root.
(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.
For all users or can u select the users you want this option enabled to?
(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.
Pages: 1 2 3 4