News:

Wondering if this will always be free?  See why free is better.

Main Menu

Affilates Page

Started by Patman504, December 20, 2004, 11:01:42 PM

Previous topic - Next topic

Patman504

Is there a way you could make a button saying affilates and when the users click on it a whole new page comes up with all of the sites affilates? Please let me know.

I hope I wasnt to brief.

Jerry

it is actually very easy ;)

Here is one way to do it:

Open /index.php
Find
'admin' => array('Admin.php', 'Admin'),
Add After
'affiliates' => array('Affiliates.php', 'Affiliates'),
Create /Sources/Affiliates.php
contents:
<?php
if (!defined('SMF'))
die(
'Hacking attempt...');

function
Affiliates() {
global
$context;
// This is gonna be needed...
$context['page_title'] = "Affiliats";
loadTemplate('Affiliates');
}
?>

Create /Themes/default/Affiliates.template.php
contents:
<?php
function template_main()
{
       global
$context, $settings, $options, $scripturl, $txt;

       
// Show the link tree.
       
echo '
               <table width="100%" cellpadding="3" cellspacing="0">
                       <tr>
                               <td>'
, theme_linktree(), '</td>
                       </tr>
               </table>'
;
       
// The content
       
echo 'CONTENT HERE, html, anything really. . .';

}
?>

after all that you can access your new page by index.php?action=affiliates


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

Patman504

Ok thanks very much, I will let you know if it works.

DoW Kid Rock

this works, but was wondering if a mod could be made that you could access from the admin panel and add affiliates and links etc......I guess a link exchange would be good, where people could submit links and then the admin could approve them or not

AGMR_Rhino

i did every thing it said to do here but how do i get to the affilates page it doesnt show up any were please help

Jerry

if you do that, it would be
http://yourforums/index.php?action=affiliates


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

AGMR_Rhino

thanx now i no its there how do you add the button ive never done that before?

Jerry

if you search the forums you can find a post on how to add a button to the menu :)


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

AGMR_Rhino

Thanx got it  now i have a Affiliates page

Advertisement: