THT Community
Forced Ads - Force Header and Footer Ads on Your Users - Printable Version

+- THT Community (https://thehostingtool.com/forum)
+-- Forum: THT Resource Center (https://thehostingtool.com/forum/forum-13.html)
+--- Forum: Plugin Center (https://thehostingtool.com/forum/forum-15.html)
+--- Thread: Forced Ads - Force Header and Footer Ads on Your Users (/thread-335.html)

Pages: 1 2 3 4


Forced Ads - Force Header and Footer Ads on Your Users - Nick - 08-13-2009

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!


RE: Forced Ads - Force Header and Footer Ads on Your Users - umarsa - 08-13-2009

Isnt httpd restart like so:
Code:
service httpd restart

And very nice work mate.


RE: Forced Ads - Force Header and Footer Ads on Your Users - Kevin - 08-13-2009

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



RE: Forced Ads - Force Header and Footer Ads on Your Users - David - 08-13-2009

Thanks Nick! Is there any way this could work without root at all?


RE: Forced Ads - Force Header and Footer Ads on Your Users - umarsa - 08-14-2009

This cant work without root because you need to edit the httpd file


RE: Forced Ads - Force Header and Footer Ads on Your Users - Kevin - 08-14-2009

(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


RE: Forced Ads - Force Header and Footer Ads on Your Users - Nick - 08-14-2009

um... duh. thats why he said it won't work without root.


RE: Forced Ads - Force Header and Footer Ads on Your Users - Kevin - 08-14-2009

(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.


RE: Forced Ads - Force Header and Footer Ads on Your Users - Guy - 08-25-2009

For all users or can u select the users you want this option enabled to?


RE: Forced Ads - Force Header and Footer Ads on Your Users - Kevin - 08-25-2009

(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.