News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Affiliates System

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

Previous topic - Next topic

Kindred

looks like you pasted something into the english file incorrectly...     get rid of the n's around that
Сл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."

FlashUK1983

I really didn't see how that would work, seeing as I didn't paste anything, I just installed the mod, but I tried it anyway.

All that did was change the arror to:
8: Undefined index: affiliates
File: MY SITE URL/Themes/default/languages/index.english.php (eval?)
Line: 132

Kindred

please display your lines 125-135 from that file?
Сл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."

FlashUK1983

Is there an easier way tpo get those lines, without attempting to sit and count them all?

Kindred

get a real text editor with line numbering?

UltraEdit, TextEdit Plus, notpad++, ConText
Сл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."

FlashUK1983

#265
Thanks

$txt['affiliatesid'] = 'ID';
$txt['affiliatesname'] = 'Website Name';
$txt['affiliatesurl'] = 'Website URL';
$txt['affiliatesurldesc'] = 'Description:';
$txt['affiliatesurlbann'] = 'URL of Banner:';
$txt['affiliatesemail'] = 'Contact EMAIL';
$txt['affiliatesconfir'] = 'Confirmed';
for ($cnum = 1; $cnum < ($modSettings['naffiliatessn'] + 1); $cnum++)
{
$txt['affiliatesname'.$cnum.''] = $txt['affiliatesname'].':';
$txt['affiliatesid'.$cnum.''] = $txt['affiliatesid'].':';

SA™

that is correct the way it is you will get errors like that cos it not configard proply

Undefined index: naffiliatessn  mean you havent set  number of affiliates you want propaly so if you have 2 affiliates you put 2 in the box
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 -___-

FlashUK1983

Thanks,
It seems to have brought on a few more errors, but I'm thinking that they might iron out when I get my affiliates on board.

I'll come back if the problem persists.

SA™

yeah thats the proplem with the 118 version if its not configard right or at all you get errors i dont use 118 i use smf 2 version wich is different but if fi rember correctly if you add an affiliate the error should go?
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 -___-

Chit-Chat ChatterBox Boss

Quote from: dwd2000 on December 05, 2008, 12:00:42 AM
For those who wish to use the code on SimplePortal:

Using a "php" block:

global $context, $settings, $options, $txt, $scripturl, $modSettings;
   if (!empty($modSettings['enable_marquee']) && (!empty($modSettings['affiliates'])))
                     echo '<marquee behavior="scroll" onmouseover="this.stop()" onmouseout="this.start()"><span style="text-align:center;" class="smalltext">' . parse_bbc($modSettings['affiliates']) . '</span></marquee>';



It will use whatever code you have in the "Board" box.
You can use this with the board enabled or not.

I tried using this and I have affiliates but when I enable this on SP it shows the Affiliates box but it doesn't have the affiliates in it. Why?
Chit-Chat ChatterBox

Our site is open to everyone. It is a resource for anyone and everyone to talk about anything and everything you could possibly think of. It's a great place to come and talk, ask questions, or just simply hang out. We offer many great features. All we ask is that you follow by the site rules. Hope to see you around!
www.chitchatchatterbox.com
Remember in the "Referral" box to put "Caleb" while registering.

TheListener

I tried the affiliates in an html block.

:D Didn't realise there were so many on the forum.

TheListener

Quote from: Chit-Chat ChatterBox Boss on May 28, 2009, 03:47:18 PM
Quote from: dwd2000 on December 05, 2008, 12:00:42 AM
For those who wish to use the code on SimplePortal:

Using a "php" block:

global $context, $settings, $options, $txt, $scripturl, $modSettings;
   if (!empty($modSettings['enable_marquee']) && (!empty($modSettings['affiliates'])))
                     echo '<marquee behavior="scroll" onmouseover="this.stop()" onmouseout="this.start()"><span style="text-align:center;" class="smalltext">' . parse_bbc($modSettings['affiliates']) . '</span></marquee>';



It will use whatever code you have in the "Board" box.
You can use this with the board enabled or not.

I tried using this and I have affiliates but when I enable this on SP it shows the Affiliates box but it doesn't have the affiliates in it. Why?

I should imagine we have to add the affiliates ourselves. Ok if theres only a few otherwise......

Chit-Chat ChatterBox Boss

So what should I do to get the affiliates to show in the SP? (I already have affiliates in the normal affiliate section)
Chit-Chat ChatterBox

Our site is open to everyone. It is a resource for anyone and everyone to talk about anything and everything you could possibly think of. It's a great place to come and talk, ask questions, or just simply hang out. We offer many great features. All we ask is that you follow by the site rules. Hope to see you around!
www.chitchatchatterbox.com
Remember in the "Referral" box to put "Caleb" while registering.

SA™

tyhe code you tryed using is for ealyer versions will not work with the latest version if sp alowes you to use ssi the you can use

ssi_affiliates()

or

ssi_random_affiliate()

id odnt know sp well so i dont know if you can use ssi in block ill have a look at the week end


or you can just try use thi code in a phpox maybe

global $smcFunc, $context, $settings, $modSettings, $txt, $scripturl;

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

$affiliates = array();
while ($row = $smcFunc['db_fetch_assoc']($result))
{
$affiliates[] = array(
'id' => $row['id_affiliates'],
'image' => $row['image'],
'description' => $row['description'],
);
}
$smcFunc['db_free_result']($result);

echo '
<marquee scrollamount="', $modSettings['How_Fast_To_Scroll'],'" onmouseover="scrollAmount=', $modSettings['How_Fast_To_Scrollmo'],'" onmouseout="scrollAmount=', $modSettings['How_Fast_To_Scroll'],'">';

foreach ($affiliates as $item)
echo '
<a href="', $scripturl, '?action=affiliates;sa=out;idaff=', $item['id'],'" target="_blank">
<img src="', $item['image'],'"  onload="ImageResizer.createOn(this);"  title="', $item['description'],'" alt="', $item['description'],'" /></a>';

echo '
</marquee>';


works with portamx
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 -___-

Chit-Chat ChatterBox Boss

Ok that code works but can we get it to scroll like the SA Affiliates does?
Chit-Chat ChatterBox

Our site is open to everyone. It is a resource for anyone and everyone to talk about anything and everything you could possibly think of. It's a great place to come and talk, ask questions, or just simply hang out. We offer many great features. All we ask is that you follow by the site rules. Hope to see you around!
www.chitchatchatterbox.com
Remember in the "Referral" box to put "Caleb" while registering.

SA™

it allrady should if you set up the scroll ammount and that in admin
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 -___-

Chit-Chat ChatterBox Boss

Ok I see where to set it. But when I set the numbers like I have setup for the SA Affiliates in the admin panel 3 for scroll without mouse over and 1 for scroll with mose over. I set that for this and 3 is super fast and 1 is the speed of like 3 in the admin panel. How can this be adjusted, also how can I change it to scroll in the other direction?

Here is my code I set it up for the scroll part.

   echo '   
<marquee scrollamount="', $modSettings['How_Fast_To_Scroll'],'" onmouseover="scrollAmount=1', $modSettings['How_Fast_To_Scrollmo'],'" onmouseout="scrollAmount=3', $modSettings['How_Fast_To_Scroll'],'">';
Chit-Chat ChatterBox

Our site is open to everyone. It is a resource for anyone and everyone to talk about anything and everything you could possibly think of. It's a great place to come and talk, ask questions, or just simply hang out. We offer many great features. All we ask is that you follow by the site rules. Hope to see you around!
www.chitchatchatterbox.com
Remember in the "Referral" box to put "Caleb" while registering.

SA™

ok setting from my site

Marque Scroll Speed =10
Marque Scroll Speed On Mouse Over =1

Marque Scroll Direction = default is set to left you can switch it scroll right
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 -___-

Chit-Chat ChatterBox Boss

If I set it to 10 that would be so fast you couldn't read it my 2 is about your 10 speed (for the SP). I set onmouseover = 0 and that still scrolls at about the mouse over speed I want. But with my notmouseover speed set to 1 it still is half as fast as I want.

And I don't see where to change this
QuoteMarque Scroll Direction = default is set to left you can switch it scroll right
Chit-Chat ChatterBox

Our site is open to everyone. It is a resource for anyone and everyone to talk about anything and everything you could possibly think of. It's a great place to come and talk, ask questions, or just simply hang out. We offer many great features. All we ask is that you follow by the site rules. Hope to see you around!
www.chitchatchatterbox.com
Remember in the "Referral" box to put "Caleb" while registering.

SA™

hmm i dont fully understand what you are saying i have my setting like i showed you and it doesnt go fast see at my site


Quote
And I don't see where to change this

it in affiliates admin under Marque Scroll Speed On Mouse Over

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 -___-

Advertisement: