Uutiset:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu
Advertisement:

Affilates Box

Aloittaja Fanta, tammikuu 16, 2005, 08:31:36 AP

« edellinen - seuraava »

Fanta

Does anyone have a code to create a affilates box like this:



And it will attach to my info centre.

Justyne

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.
Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better.

Fanta

// 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?

Tristan Perry

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>';


:)

Fanta

Tried that and I still get the Template Parse Error.

Tristan Perry

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.

Fanta

That made a huge brown rectangle down the right side of my forum and made a tiny affilates box. ;)

Fanta


AGMR_Rhino


mennou

where can i get the affiliate  box?

Fanta

How can I tweak the code for the affilates box to fit my forum?

Fanta

I think I am allowed to bump this...

Advertisement: