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

jerm

Quote from: Col on February 21, 2006, 04:30:00 PM
Quote from: Col on February 17, 2006, 11:18:57 AM
How would you make it dispay random ads?

Is it possible to display ads outside of the forum?

Thanks.

Anyone?

Thanks.

i haven't added the ability to display random ads, but if you know some javascript, you can get it to display random ads.. i dont know how though, sorry

Quote from: jfigura on February 23, 2006, 09:43:07 AM
Not being a coder, I did figure out how to change the paths in the install script. I have it working now.
im surprised it worked properly on another theme.. i didn't test it at all on another theme.

observ

I am not one of the people that knows the best to work with this stuff. I would like some help in installing this mod. I tryied to search for what i needed on the posts made before but i didn't find anything.
I would like some installing tutorial like:
You upload the files in this directory http/smf/etc..(where? exactly)
You go to this url: http://smf/etc/install.php
And so on, this is what i would like to see. For newbies like me that don't know much of it.

Col

Quote from: electrohome88 on February 23, 2006, 12:54:45 PM
i haven't added the ability to display random ads, but if you know some javascript, you can get it to display random ads.. i dont know how though, sorry

Thanks,

And can it display ads outside of the forum?

dieselv2

outside the forum as on a website?

You'd have to code it in manually on the website

dieselv2

can anyone help with installing this on skins other than default...not sure what to change in install.xml file

Col

Quote from: dieselv2 on February 25, 2006, 08:02:05 AM
outside the forum as on a website?

You'd have to code it in manually on the website

I thought there might be a PHP include, or similar.

jerm

Quote from: observ on February 24, 2006, 06:31:41 AM
I am not one of the people that knows the best to work with this stuff. I would like some help in installing this mod. I tryied to search for what i needed on the posts made before but i didn't find anything.
I would like some installing tutorial like:
You upload the files in this directory http/smf/etc..(where? exactly)
You go to this url: http://smf/etc/install.php
And so on, this is what i would like to see. For newbies like me that don't know much of it.
you have to use the package manager to install this mod, you dont upload it directly to any folder.. you upload it with the package manager, that can be found in the admin section

Quote from: Col on February 24, 2006, 01:36:07 PM
Quote from: electrohome88 on February 23, 2006, 12:54:45 PM
i haven't added the ability to display random ads, but if you know some javascript, you can get it to display random ads.. i dont know how though, sorry

Thanks,

And can it display ads outside of the forum?

no sorry.. it only displays ads on the board. if your really crazy, you might get it to work on your webpages, but that would require you to know php..

jerm

Quote from: dieselv2 on February 25, 2006, 09:31:14 AM
can anyone help with installing this on skins other than default...not sure what to change in install.xml file


you will have to edit the following files

index.template.php
Add:

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

This is for display ads on the top. You might find a function call called template_menu();. Place the add code under that.

Add:

global $modSettings;

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

This code will display ads on the bottom of the page. You might find a function called function template_main_below() in the file.. that is the bottom of the page

BoardIndex.template.php

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

This should probably go near the top of the page.. below any global variables though (the same follows for the rest of the files)

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


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


This is all assuming you are using RC2
To display the ads after the first post might be very tricky and you will have to look into install.xml and try and figure it out yourself. If i just post code, you might screw up your boards

Also be sure to actually install this mod, then make modifications to those files. If you dont install the mod, you will get lots of errors on your board

thetzfreak

Wow... what a useful mod... thanks! Now here's a feature I would REALLY like to see:
How about a side bar with tower ads? Kinda like a menu type side bar on every page, except it's got ads.

Thanks.

jerm

Quote from: thetzfreak on February 25, 2006, 02:24:46 PM
Wow... what a useful mod... thanks! Now here's a feature I would REALLY like to see:
How about a side bar with tower ads? Kinda like a menu type side bar on every page, except it's got ads.

Thanks.

Thanks

I have thought of that and intend to include it in the next release

Col

Quote from: electrohome88 on February 25, 2006, 02:17:36 PM
Quote from: Col on February 24, 2006, 01:36:07 PM
Quote from: electrohome88 on February 23, 2006, 12:54:45 PM
i haven't added the ability to display random ads, but if you know some javascript, you can get it to display random ads.. i dont know how though, sorry

Thanks,

And can it display ads outside of the forum?

no sorry.. it only displays ads on the board. if your really crazy, you might get it to work on your webpages, but that would require you to know php..

I'm not that crazy! :P

I thought it might be a nice way to manage ads across a site.

Thanks anyway.

thetzfreak

Is it possible to use different ad codes for all the different places to display the ads?

Thanks.

jerm

Quote from: thetzfreak on February 28, 2006, 06:17:54 PM
Is it possible to use different ad codes for all the different places to display the ads?

Thanks.
not now, but in the future, yes

Prasad007

Thanks. The new version with the TP works like a charm! :)

idahojoe

I read that it only works in the "default" themes. I'm currently using classic because I've modified the theme a bit and it doesn't work with "classic" theme. Is this mod going to work with the classic theme anytime soon?????? ???

jerm

Quote from: idahojoe on March 04, 2006, 12:23:44 PM
I read that it only works in the "default" themes. I'm currently using classic because I've modified the theme a bit and it doesn't work with "classic" theme. Is this mod going to work with the classic theme anytime soon?????? ???
its not that it doesn't work on the classic theme, it's that it doesn't install on the classic theme.
I dont think i will make this mod install on the classic theme, because there are just way too many themes out there, and everyone would ask me to make it install on their theme.
Your best bet would be to look into the install.xml file, and see what i edited, and replace it in your files
Sorry..
~jeremy

idahojoe

Can you tell me at least what I need to edit in the install.xml file so that I can get it working on the classic theme? Would be nice if it could install to all themes, old and new. Please help me out a little here as I'm not a computer coder. :D

Prasad007

Quote from: thetzfreak on February 28, 2006, 06:17:54 PM
Is it possible to use different ad codes for all the different places to display the ads?

Thanks.
thats an awesome idea.
that way i could place my chitika ads on top and google below :)

jerm

Quote from: idahojoe on March 05, 2006, 10:59:21 AM
Can you tell me at least what I need to edit in the install.xml file so that I can get it working on the classic theme? Would be nice if it could install to all themes, old and new. Please help me out a little here as I'm not a computer coder. :D
http://www.simplemachines.org/community/index.php?topic=68632.msg496149#msg496149
hope that post helps you out some..

idahojoe

actually that didn't help at all, I am using version. 1.0.6 and I added your code and got parse errors. I figure this would be a good mod but does no good for users that can't just add it to any theme. Nice try but in order for a user that doesn't have code skills to use it needs to be easier to modify.

Advertisement: