Rusnak PHP Scripts Support Forums

Full Version: [DOWNLOAD] Global Copyright
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
This simple modification allows you to add a global copyright that will appear at the bottom of all your hosted forums from your mybb multiforums host control panel. Also forum owners will not be able to remove your copyright from there forum.

All files i mention in this post are in the .zip attachment, except for global.php

It will output a copyright like this:
Quote:Hosted by Your_Site © Host your free forum now!


The First thing you need to do is in your database run the following query:
Code:
CREATE TABLE IF NOT EXISTS `hosted_copyright` (
  `id` int(11) NOT NULL,
  `copyurl` varchar(30) NOT NULL,
  `copysite` varchar(30) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

Next you will need to upload copyright.php, copyrightexecute.php, and copyright.txt to the following directories:
copyright.php and copyrightexecute.php /path_to_your_forums/create/adm
copyright.txt /path_to_your_forums/create/ads

Next open /path_to_your_forums/global.php

Find the following:
Code:
//Set up our ads
$hads = file_get_contents("create/ads/headers.txt");
$fads = file_get_contents("create/ads/footers.txt");

and add below it the following:
Code:
//Set up our copyright
$hostcopy = file_get_contents("create/ads/copyright.txt");

Next find:
Code:
if ($flag == 1){
eval("\$footer = \"".$templates->get("footer").""\";");
}
else
{
eval("\$footer = \"".$fads."".$templates->get("footer").""\";");
}

and replace it with:
Code:
if ($flag == 1){
eval("\$footer = \"".$templates->get("footer")."".$hostcopy."\";");
}
else
{
eval("\$footer = \"".$fads."".$templates->get("footer")."".$hostcopy."\";");
}

Save and reupload global.php

Next open path_to_your_forums/create/adm/linksbar.php

find the following:
Code:
<p align='left'><a href='ads1.php' target='main'>Manage Ads</a></p>

add below it:
Code:
<p align='left'><a href='copyright.php' target='main'>Manage Copyright</a></p>

Save and reupload linksbar.php

Then login into path_to_your_forums/create/adm, and click on manage copyright, enter your settings and then go to one of your hosted forums and make sure you see your copyright at the bottom.

[attachment=166]
Good job, I will use it in a bit.
I like this. Great idea. Much easier than file edits, and more protected as well.
In global, I can't find the entire footer thing.
Only
PHP Code:
eval("\$footer = \"".$fads."".$templates->get("footer").""";"); 
just search for:

PHP Code:
eval("\$footer 


and you'll find it. I had the same problem. the problem is that is not exactly as it is here, in mine there was more comas dunno why..

by the way, I'd like to move the global copyright to the end of the INDEX template so its with the MyBB copyright, how could I do that?

P.S. great addon Tongue
You could edit the language file where the MyBB copyright is stored, but the problem there is that members can remove that from there admin cp by editing there template.
Hi i have one question:
how to disable copyright for one forum ??
I have this problem:
Code:
Parse error: syntax error, unexpected T_STRING in /home3/okba/public_html/mybb/global.php(458) : eval()'d code on line 26

I have test to delete tje modif but i have this error:
Code:
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home3/okba/public_html/mybb/global.php on line 451

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home3/okba/public_html/mybb/global.php on line 451

In 451, i have:
Code:
if ($flag == 1){
eval("\$footer = \"".$templates->get("footer").""\";");
}
else
{
eval("\$footer = \"".$fads."".$templates->get("footer").""\";");
}

EDIT: RESOLVED, i have upload first global.php

thank's
there is no way to right now. I might can come up with something though
ok, thanks
Pages: 1 2
Reference URL's