Affiliates System

Started by Diego Andrés, December 04, 2008, 07:29:28 AM

Previous topic - Next topic

venex

Quote from: Sleepy Arcade on August 07, 2010, 04:57:47 PM
are you using a custom theme? if so are the edits there? does it work on the default theme?
My situation is weird...

My other admin created a custom theme for my forum. We install every single MOD in that one theme... and he made something so that the theme he created is now the default theme... so we wouldn't have to install in the default theme and our theme...

SA™

i does sound to me like the edit to index.template.php is missing?

is this in index.template.php

//Affiliates Start
echo '
<script type="text/javascript" src="', $settings['theme_url'], '/imageresizer.js"></script>
<script language="JavaScript" type="text/javascript"><!-- // -->
ImageResizer.MAXWIDTH = "', empty($modSettings['imageresizer_max_width']) ? 0 : (int) $modSettings['imageresizer_max_width'], '";
ImageResizer.MAXHEIGHT = "', empty($modSettings['imageresizer_max_height']) ? 0 : (int) $modSettings['imageresizer_max_height'], '";
</script>';
//Affiliates End
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

NoFeaR / NFSMW

I removed that ans still get the same error.

SA™

what did you remove this

if ($modSettings['affiliates_pagerank'] == '0') {$modSettings['affiliates_pagerank'] = '1';   }
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

NoFeaR / NFSMW


SA™

http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

NoFeaR / NFSMW

Hey there. I have a few problems. First is that i cant uninstall the 3.3.5. It gives me errors.
I wanted to install 3.3.5.1

Then my pagerank doesnt work.
And also my totals go off. Image attached.

SA™

ive fixed the totals things in 3.3.5.2 not realsed yet tho

did you install any mods after you installed this? cos you might have to uninstall them first what is the errors anyway?
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

NoFeaR / NFSMW

It gets an error on almost all files it wants to uninstall from.

Kindred

which means that you probably have other mods installed after this one and you will have to manually remove this mod.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

NoFeaR / NFSMW


The Great OZ

Love the mod and  it seems to work great except I cant get it to show the affiliates on the index page,  I have it enabled in the admin panel but it just doesnt show up.  I uninstalled and reinstalled it,  after some work with the file edits,  but it still doesnt work,  any ideas on what I might be missing?

ETA: forgot to say Im running 2.0 RC3 and version 3.3.5

dkharp

Hello I love the mod!  has any one mad a tp block for this?

SA™

@ The Great OZ  are you using a custom theme that has its own boardindex.template.php?

@ dkharp no but there is an affiliate ssi function
ssi_affiliates();
or
ssi_random_affiliate();
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

dkharp

so how do I put that in a php block?

SA™

just make a php block like usal

and add
ssi_affiliates();
function ssi_affiliates()
{
global $scripturl, $smcFunc, $txt, $settings, $modSettings, $context;

loadLanguage('Stats');

$result = $smcFunc['db_query']('', '
SELECT a.id_affiliates, a.image, a.description
FROM {db_prefix}affiliates AS a
WHERE  approved = 1
ORDER BY a.id_affiliates DESC',
      array(
      )
   );
   $context['aff'] = array();
   while ($row = $smcFunc['db_fetch_assoc']($result))
   {
      $context['aff'][] = array(
        'id' => $row['id_affiliates'],
'image' => $row['image'],
'description' => $row['description'],
      );
   }
   $smcFunc['db_free_result']($result);
   
echo'<table border="0" width="100%" align="center" class="smfNews">
<tr><td><marquee direction="', empty($modSettings['scrolldirection']) ? 'left' : 'right', '" onmouseover="scrollAmount=', $modSettings['How_Fast_To_Scrollmo'],'" onmouseout="scrollAmount=', $modSettings['How_Fast_To_Scroll'],'">';

foreach ( $context['aff'] as $aff)
echo '
<a href="', $scripturl, '?action=affiliates;sa=out;idaff=', $aff['id'],'" target="_blank">
<img src="', $aff['image'],'"  width="88" height="31" alt="', $aff['description'],'" />';

echo'</marquee></td>
</tr>
</table>';
}

or

ssi_random_affiliate();
//random affiliates
function ssi_random_affiliate()
{
   global $scripturl, $smcFunc;

$request = $smcFunc['db_query']('', "
SELECT
title, approved, id_affiliates, image
FROM {db_prefix}affiliates
WHERE  approved = 1
ORDER BY RAND()
");

$random = array();
$row = $smcFunc['db_fetch_assoc']($request);
censorText($row['title']);

$random[] = array(
'title' => '<a href="' . $scripturl . '?action=affiliates;sa=out;idaff=', $row['id_affiliates'],'">'.$row['title'].'</a>',
);
$smcFunc['db_free_result']($request);

foreach ($random as $affiliate)
echo' <a href="' . $scripturl . '?action=affiliates;sa=out;idaff=', $row['id_affiliates'],'"><img src="'.$row['image'].'" width="88" height="31" alt="'.$row['title'].'"></a>';
}
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Deaks

Sleepy Arcade are you ever gonna make this mod generate proper coding right now the img tags of code your mod creates isnt closed
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

SA™

yes i know i got a new version in  the works but havent had a great deal of time to code
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

SA™

3.3.5.2 realsed

fixed image resizer problems
now there is no edits for custom themes
fixed being able to see affiliates button of no permission
fixed img tags not closed
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

EL GATO

#539
 :) :) :)

Hola que tal les tengo una excelente traducción
Del mod

SA Afifiliates   en Español!!!  8)

http://teveo.net/internet-y-computadores/sa-affiliates-espanol-smf/?action=dlattach;attach=18
también esta adjunto en este post

Saludos y disfrútenlo!!


EL GATO
TEVEO.NET

Advertisement: