News:

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

Main Menu

Ad Management mod

Started by SMFHacks.com Team, January 30, 2006, 08:41:19 PM

Previous topic - Next topic

Bigguy

Thanks quiteperplexed. :)

ccbtimewiz

Quote from: kolt on April 25, 2008, 03:44:15 PM
Quote from: ccbtimewiz on April 25, 2008, 01:25:03 PM
Quote from: kolt on April 25, 2008, 07:22:16 AM
Bump, help please

Find the avatar display, add an statement that checks if its an ad, then put your own image.

where can I find the avatar display please? please can you tell me all the instructions what to do?

thanks in andvance?

I've edited mine quite a bit actually, but I guess that doesn't really matter. Do this:

Find:
Code (display.template.php) Select
if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
            {
            if ($context['user']['is_logged'])
               echo '<a href="'.$scripturl.'?action=profile;u='.$message['member']['id'].'">', $message['member']['avatar']['image'], '</a><br />';
            elseif ($context['user']['is_guest'])
               echo '<a href="'.$scripturl.'?action=register">', $message['member']['avatar']['image'], '</a><br />';
               echo '<br />';
            }


Replace with:
Code (display.template.php) Select
if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
            {
            if ($context['user']['is_logged'])
               echo '<a href="'.$scripturl.'?action=profile;u='.$message['member']['id'].'">', $message['member']['avatar']['image'], '</a><br />';
            elseif ($context['user']['is_guest'])
               echo '<a href="'.$scripturl.'?action=register">', $message['member']['avatar']['image'], '</a><br />';
               echo '<br />';
            }
                if ($context['user']['is_logged']) {
            echo 'whatever code for the ad'; }


Input the check ad-function in the "whatever html code for the ad".

kolt

#2582
Thank you ccbtimewiz for the reply,

I edited the code now but I don't understand what to do after!

I'm really sorry but I will ask you to help me what can I do specifically?


Bigguy

Put your ad code here:

echo 'whatever code for the ad'; }

found at the bottom of the edit.

EDIT:

Change this:

whatever code for the ad

with your ad code.

kolt

#2584
The code is not the same
This is the code that I  have in Display.template.php

Quoteif (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
            echo '
                        <div style="overflow: auto; width: 100%;">', $message['member']['avatar']['image'], '</div><br />';

         // Show their personal text?
         if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '')
            echo '
                        ', $message['member']['blurb'], '<br />
                        <br />';

         // This shows the popular messaging icons.
         echo '


And "ad code" you mean image like below?

Quoteecho '<img src="http://image.gif"border="">'; }

Bigguy

Did you do the code changes that ccbtimewiz said to do. ???

kolt

No the Code that ccbtimewiz said to me to change, does not exist in the display.template.php

Is only the code that I quote! I think is right, I have smf 1.1.4

Any idea

Bigguy

Your using a custom theme then am I right. That edit must have been for the default theme. Can you find any of the code he posted. ???

ccbtimewiz

That edit was indeed for the default theme.

If you have a custom theme that uses its own display.template.php, then attach it to your next post.

FastMoneyMonitor

Hello everyone.  I just tried to install the ad mod for version 1.1.4 and i get the following error when trying to run install.php.  can anyone offer advice?  Im brand new at this.  Thank you in advance.

Fatal error: Call to undefined function: db_query() in /home/content/m/s/h/mshirley007/html/forum/install.php on line 6
hxxp:www.fastmoneymonitor.com [nonactive]

kolt

I'm using the default theme!

Bigguy

@ FastMoneyMonitor: A few pages back I think it is Jerm posted the code that is needed to do the database queries manually. If you back up your database first you should be able to use that to do the database install.

ccbtimewiz

Quote from: kolt on April 30, 2008, 05:08:34 PM
I'm using the default theme!

... are you using SMF 1.1.x or 2.x BETA? If you're using SMF 1.1.4, then the code I posted SHOULD relate to your templates quite a bit. I admit I hacked it a bit (mostly getting avatars to link back to the profiles) so you wouldn't find every piece of the code in there. Search for:

if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))

Ikhsan4488

can i use this mod for smf 1.1.5?

babjusi

Quote from: Ikhsan4488 on May 01, 2008, 03:06:33 PM
can i use this mod for smf 1.1.5?

Yes. This mod can be use with all the versions of the 1.1. series

kolt

Hello ccbtimewiz, I'm attaching the file of "Display.template.php"

Can you please modify for me?

I'm using the "Dafault Theme, version 1.1.5" and the version of Ad Managment is 2.3

I will really thank you!

maxx+

Hello!
I try to install this mod ;and others but i cant install them because it's appear a message with"must file must be writable".
I try to do update and i recive error message with "the file it,s corupted ".
Can someone help me?

Bigguy

Check permissions on all your SMF files. THey should be set to at least 755; some may have to be 777. If you have ftp then ftp into your account and right click on the folder or file and go to properties, there is where you can change the permissions.

ge master

Just to verify...I will need to modify manually this mod to use on a different theme. However, when SMF version 2 becomes non beta, do I have to redo all the manual changes? Even moving from 1.1.4 to 1.1.5 means redoing the changes? Sorry to sound like a newb, but I am what I am. Thanks.

maxx+

Quote from: Bigguy on May 04, 2008, 11:26:48 AM
Check permissions on all your SMF files. THey should be set to at least 755; some may have to be 777. If you have ftp then ftp into your account and right click on the folder or file and go to properties, there is where you can change the permissions.

I do with success the update ,but manually.
Can  you tell me witch wiles neds to be writable ?

 
Advertisement: