Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Aiheen aloitti: Fanta - tammikuu 16, 2005, 08:31:36 AP

Otsikko: Affilates Box
Kirjoitti: Fanta - tammikuu 16, 2005, 08:31:36 AP
Does anyone have a code to create a affilates box like this:

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fmembers.lycos.co.uk%2Fmenacessd%2Faffillates.gif&hash=61b88b1e6e93b2935a6f31a977aa2252767f71ed)

And it will attach to my info centre.
Otsikko: Re: Affilates Box
Kirjoitti: Justyne - tammikuu 16, 2005, 08:55:48 AP
You can simply add a tiny table to your index template. Something similar to this:

<table>
<tr class="catbg">
      <td>Affiliates</td>
   </tr>
   <tr>
      <td class="windowbg" >"your affiliates"</td>
   </tr></table>

You will need to tweak with the attributes though to make it match your theme.
Otsikko: Re: Affilates Box
Kirjoitti: Fanta - tammikuu 16, 2005, 10:18:54 AP
// Load the users online today.

$midnight = ((date("U") - (date("H") * 3600)) - (date("i") * 60));

<table>
<tr class="catbg">
      <td>Affiliates</td>
   </tr>
   <tr>
      <td class="windowbg" >"your affiliates"</td>
   </tr></table>


// Chat Stats
echo '
<tr>
<td class="catbg" colspan="2">', $txt['chatStats'], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="', $scripturl, '?action=chat">
<img src="', $settings['images_url'], '/chatIcon.gif" alt="', $txt['chatAlt'], '" border="0" /></a>
</td>
<td class="windowbg2" width="100%">
There are currently <script src="http://www.everywherechat.com/users.asp?room=', $modSettings['chatRoomName'], '"></script> people talking in the chat room.<BR>
<script src="http://www.everywherechat.com/members.asp?room=', $modSettings['chatRoomName'], '"></script>
<span class="smalltext">';

//ShoutBox
echo '
<tr>
<td colspan="2" class="catbg">ShoutBox</td>
</tr>
<tr>
<td colspan="2" class="windowbg2">',smfshout(),'</td>
</tr>';


And I get Template Parse Error?
Otsikko: Re: Affilates Box
Kirjoitti: Tristan Perry - tammikuu 16, 2005, 10:22:17 AP
Lainaus käyttäjältä: Fanta - tammikuu 16, 2005, 10:18:54 AP
// Load the users online today.

$midnight = ((date("U") - (date("H") * 3600)) - (date("i") * 60));

<table>
<tr class="catbg">
      <td>Affiliates</td>
   </tr>
   <tr>
      <td class="windowbg" >"your affiliates"</td>
   </tr></table>


// Chat Stats
echo '
<tr>
<td class="catbg" colspan="2">', $txt['chatStats'], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="', $scripturl, '?action=chat">
<img src="', $settings['images_url'], '/chatIcon.gif" alt="', $txt['chatAlt'], '" border="0" /></a>
</td>
<td class="windowbg2" width="100%">
There are currently <script src="http://www.everywherechat.com/users.asp?room=', $modSettings['chatRoomName'], '"></script> people talking in the chat room.<BR>
<script src="http://www.everywherechat.com/members.asp?room=', $modSettings['chatRoomName'], '"></script>
<span class="smalltext">';

//ShoutBox
echo '
<tr>
<td colspan="2" class="catbg">ShoutBox</td>
</tr>
<tr>
<td colspan="2" class="windowbg2">',smfshout(),'</td>
</tr>';


And I get Template Parse Error?
Try:


// Load the users online today.

$midnight = ((date("U") - (date("H") * 3600)) - (date("i") * 60));

echo '<table>
<tr class="catbg">
      <td>Affiliates</td>
   </tr>
   <tr>
      <td class="windowbg" >"your affiliates"</td>
   </tr></table>';


// Chat Stats
echo '
<tr>
<td class="catbg" colspan="2">', $txt['chatStats'], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="', $scripturl, '?action=chat">
<img src="', $settings['images_url'], '/chatIcon.gif" alt="', $txt['chatAlt'], '" border="0" /></a>
</td>
<td class="windowbg2" width="100%">
There are currently <script src="http://www.everywherechat.com/users.asp?room=', $modSettings['chatRoomName'], '"></script> people talking in the chat room.<BR>
<script src="http://www.everywherechat.com/members.asp?room=', $modSettings['chatRoomName'], '"></script>
<span class="smalltext">';

//ShoutBox
echo '
<tr>
<td colspan="2" class="catbg">ShoutBox</td>
</tr>
<tr>
<td colspan="2" class="windowbg2">',smfshout(),'</td>
</tr>';


:)
Otsikko: Re: Affilates Box
Kirjoitti: Fanta - tammikuu 16, 2005, 10:28:52 AP
Tried that and I still get the Template Parse Error.
Otsikko: Re: Affilates Box
Kirjoitti: Tristan Perry - tammikuu 16, 2005, 10:45:29 AP
Lainaus käyttäjältä: Fanta - tammikuu 16, 2005, 10:28:52 AP
Tried that and I still get the Template Parse Error.
$midnight = ((date("U") - (date("H") * 3600)) - (date("i") * 60));

It might be a problem with that... There's too many brackets I think.

$midnight = ( date("U") - date("H") * 3600 ) - ( date("i") * 60 );

Try that.
Otsikko: Re: Affilates Box
Kirjoitti: Fanta - tammikuu 16, 2005, 11:13:10 AP
That made a huge brown rectangle down the right side of my forum and made a tiny affilates box. ;)
Otsikko: Re: Affilates Box
Kirjoitti: Fanta - tammikuu 17, 2005, 02:54:00 IP
Any other ideas?
Otsikko: Re: Affilates Box
Kirjoitti: AGMR_Rhino - helmikuu 05, 2005, 05:24:22 IP
the first 1 worked 4 me
Otsikko: Re: Affilates Box
Kirjoitti: mennou - helmikuu 11, 2005, 03:46:36 IP
where can i get the affiliate  box?
Otsikko: Re: Affilates Box
Kirjoitti: Fanta - helmikuu 13, 2005, 06:55:24 AP
How can I tweak the code for the affilates box to fit my forum? (http://www.habbohood.co.uk/harrypotter/)
Otsikko: Re: Affilates Box
Kirjoitti: Fanta - helmikuu 16, 2005, 05:58:31 AP
I think I am allowed to bump this...