News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Ad Management mod

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

Previous topic - Next topic

boogiedown

Quote from: boogiedown on March 21, 2006, 03:34:54 PM
How about adding next to the forum logo, top right. to replace or go next to the logo. i will have my logo turned off though. that what im looking for :)



Can anyone help me code it to where ill get an ad in the top right of the default theme? Thanx

jerm

Quote from: carlatf on April 05, 2006, 06:03:47 PM
Hi,

I got a rare "Incorrect table name ''
Archivo: /var/www/users/escuela/acidobase.com.ar/public_html/foros/Packages/temp/install.php
Línea: 3


sorry.. i dont know that error. best try to post it in the support board

Quote from: boogiedown on April 05, 2006, 07:13:08 PM

Can anyone help me code it to where ill get an ad in the top right of the default theme? Thanx

index.template.php
look for this line
               <img src="', $settings['header_logo_url'], '" style="margin: 4px;" alt="', $context['forum_name'], '" />';

yerg

I'm using Epsilon and modified it to suit my needs.

I'm at a total loss here as to what to include where.

It appears I can't use any php includes statement to grab images and their respective links.

I'm no rocket scientist but I'm no idiot either and can't find any logical isntructions as to what code I can use to call these ads.

Assistance greatful  :-[

jerm


//Ad management code to display ads on the bottom of the memubar

if ($modSettings['ad_management_index_below'] && allowedTo('ad_manageperm'))
echo '<div align="',$modSettings['ad_management_align'],'">',$modSettings['ad_management_content'],'</div>';



this is activated when you check "Display ads below the menu on all pages"

yerg

so where is it grabbing the ads from?

The admin panel says "Any valid html code may be written here."

May be I've got the bull by the horns here but is this for those Google ad things only. Cos if so I best remove the code and stop wasting my time.

I have 25 businesses wishing to advertise on my forum and I've got images and links. I used to use, on another forum,  a simple php rotation script which I normally insert using a simple includes, may be I'm best hardcoding this into the template some way and forget this Mod.  :(


Yana

#285
Quote from: electrohome88 on April 06, 2006, 12:25:51 AM
Quote from: carlatf on April 05, 2006, 06:03:47 PM
Hi,

I got a rare "Incorrect table name ''
Archivo: /var/www/users/escuela/acidobase.com.ar/public_html/foros/Packages/temp/install.php
Línea: 3


sorry.. i dont know that error. best try to post it in the support board

I am sorry, I have got the same error
It's only way to solve. Replace {$db_prefix} with smf_ in install.php

L.G.S

Can somebody tell me what I need to edit and add to change the background colour of it please?
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


jerm

try putting the add code inside a <div style="color:#FF0000;">... </div> tag

replace #FF0000 with the colour you want.

L.G.S

I tried and it hasnt changed anything
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


jerm


L.G.S

FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


jerm

assuming you've checked off "display ads on index..."

index.template.php, look for
if ($modSettings['ad_management_index'] && allowedTo('ad_manageperm'))
echo '<br /><div align="center">',$modSettings['ad_management_content'],'</div>';

and put
if ($modSettings['ad_management_index'] && allowedTo('ad_manageperm'))
echo '<table><tr><td><div align="center">',$modSettings['ad_management_content'],'</div></td></tr></table>';


put the color code inside the <td>.. i trust you know how to do that


be aware now.. that when you go to uninstall my mod, it will cause an error and you will have to manually uninstall it yourself (just for the pages where you'ved edited my code)

L.G.S

all it did was left align the ads
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


snider

Has anyone gotton this to work with the classic theme?
I have updated the install.xml to look in to the /classic folder and actually get a solid 1st round try at the install after that but now I am stuck.
Just doesn't want to install or work at all for me.
I get

1.     Execute Code     install.php     
2.    Execute Modification    ./Sources/ModSettings.php    Failure
3.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Failure
4.    Execute Modification    ./Themes/classic/index.template.php    Failure
5.    Execute Modification    ./Themes/classic/BoardIndex.template.php    Success
6.    Execute Modification    ./Themes/classic/Display.template.php    Success
7.    Execute Modification    ./Themes/classic/MessageIndex.template.php    Success

If its something as easy as sending me the files please do . I tried adding the code as stated around page 11 but it doesn't work , it says there are errors (not specific ) and make me resort back to the default theme.

Bigguy

What other mods do you have installed. ? Is one conflicting with this one. ???

jerm

2.    Execute Modification    ./Sources/ModSettings.php    Failure
there is am another mod conflicting with this one..

3.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Failure
this file can easily be edited.. its only copy pasting code

i would highly suggest installing this on a test forum first as i have NOT tested this on the classic theme

Saipan_Jon

I haven't read this entire thread, so this might have been posted above.  A great new feature for this mod would be to have the option of incorporating multiple ads and having a random generator (or assigned values) decide which ad is displayed.  I am running a phpbb forum on another site and installed a similar mod that gives you an unlimited number of ads.  It is very handy becuase I can use differnent sizes and shapes and determine their effectiveness by using google ad channels.

Anyway, thanks for the mod.  It is a lot easier than coding it into the templates, which is what I was doing before.

geezmo

Hello. Does this work with Bloc's Amber theme?

houston

It works in other TP themes that I have loaded. So it should work in his amber theme as well.

matt l

#299
what a great mod.......I just stuck it in and I think it was the best one so far that i have put in.

Is there a way to place different ads in different postions with this? (i.e. Ad one at the bottom, Ad 2 at the top, Ad 3 on board #1, and so on)

Is there a way to make the ad rotate without having to code it? (like the news fader)

I am using it with the default theme and was wonderning if there is a way to place an ad in the big empty space to the right of the text that shows the unread post and time logged in and so on at the top of the page above the search bar?

so far I see that I can just place one single ad or a group of ads........I think.....I might be missing something...

Advertisement: