News:

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

Main Menu

Ad Management mod

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

Previous topic - Next topic

riker

K fine but I thought it was an easy thing to do

riker

#2921
I've got a fresh upgrade of SMF 2.0 Beta 3.1 but I'm having problems installing the Ad Management Mod.  I've got screenshots here so you can see first hand whats happening




ccbtimewiz

Quote from: riker on August 14, 2008, 09:47:30 AM
I've got a fresh upgrade of SMF 2.0 Beta 3.1 but I'm having problems installing the Ad Management Mod.  I've got screenshots here so you can see first hand whats happening





Did you install the 2.0 BETA version of the mod?

Quote from: tuguex on August 13, 2008, 06:26:53 PM
Quote from: F.L.A.M.E.R on August 13, 2008, 11:11:05 AM
actually it is proper when you go in the drop down type admin panel... but dunno why it happens like this when its in normal mode...


Finally i do it!

I trie to edit some codes, and i "discovered" ( XD ) a file that we need edit, to activate ads for all members  :P

Simply go to :

Quote/Sources/ManagePermissions.php

find:
'pm' => array(


And Replace With:
'ad_manage' => array( 'ad_manageperm' => false, ), 'pm' => array(

;D

Bad idea. Doing this will make the entire permission system for the mod faulty and useless. You can edit the permissions screen to enable for other groups.

riker

Quote from: ccbtimewiz on August 14, 2008, 11:51:40 AM
Quote from: riker on August 14, 2008, 09:47:30 AM
I've got a fresh upgrade of SMF 2.0 Beta 3.1 but I'm having problems installing the Ad Management Mod.  I've got screenshots here so you can see first hand whats happening





Did you install the 2.0 BETA version of the mod?

Yep as the screenshots show and I've tried to FRESH upgrades to SMF 2.0 and keep getting the same problem

symon

Has anyone worked out how to register clicks per ad yet? :)

Sudhakar Arjunan

Hi i want to hide ads for global moderators and moderators also.

could anyone give me a help on this code.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

riker

Quote from: asudhakar on August 14, 2008, 02:51:56 PM
Hi i want to hide ads for global moderators and moderators also.

could anyone give me a help on this code.

Permissions

hawking

Hi,
I am trying to post but donot know how to do it. What i am looking for  is:
I have installed "Ad Maagment Mod" , it does show it has been installed but  I CAN NOT SEE THE "AD MANAGEMENT" Button under configuration Tab.
Please help me
thanks

ccbtimewiz

Quote from: hawking on August 14, 2008, 10:02:41 PM
Hi,
I am trying to post but donot know how to do it. What i am looking for  is:
I have installed "Ad Maagment Mod" , it does show it has been installed but  I CAN NOT SEE THE "AD MANAGEMENT" Button under configuration Tab.
Please help me
thanks

Make sure your forum is set to english under Admin > Server Settings

Sudhakar Arjunan

Quote from: asudhakar on August 14, 2008, 02:51:56 PM
Hi i want to hide ads for global moderators and moderators also.

could anyone give me a help on this code.

Hey ccbtimewiz,

      Why could not you give a try.
Hope we are already helping me to complete this.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

ccbtimewiz

Quote from: asudhakar on August 15, 2008, 12:01:40 AM
Quote from: asudhakar on August 14, 2008, 02:51:56 PM
Hi i want to hide ads for global moderators and moderators also.

could anyone give me a help on this code.

Hey ccbtimewiz,

      Why could not you give a try.
Hope we are already helping me to complete this.

Permissions. You need to edit the permissions of the membergroups. In this case, groups 2 and 3.

Sudhakar Arjunan

Yes you are right. But i could not do it for my group 2 and group 3. Even if i add permisson and update it , it is not saving that particular box.

You remember what we have tried.

Quote from: ccbtimewiz on July 29, 2008, 02:38:58 PM
Alright, I made the changes for you.

I modified the code into your template_main_above() function to this:

Code (Line 253) Select
<body>';

Code (Line 256 (What I added)) Select

$x = array(2, 3);
$y = false;

foreach ($x as $group) {
if( in_array( $group, $user_info['groups'] ) )
        $y = true; }

if( $y == false ) {
if( function_exists("show_topofpageAds") ) {
$ads = show_topofpageAds();   
if( !empty($ads))
if( $ads['type'] == 0 )
echo $ads['content'];
else
eval( $ads['content'] );   
unset($ads); }
}


Code (Line 255) Select
echo '

Quote from: asudhakar
And this is the error generate with in 2 minutes i hope

Guest    Today at 11:12:27
Apply Filter: Only show the error messages of this IP address 122.164.123.32    Apply Filter: Only show the error messages of this session b5a1717d24586f803af2e22e6b2868e6
Apply Filter: Only show the error messages of this URL http://forum.itacumens.com/index.php?/topic,11353.0.html
Apply Filter: Only show the errors with the same message
2: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument
File: /home/itacumen/public_html/forum/Themes/default/Display.template.php (main_above sub template - eval?)
Line: 241

Apply Filter: Only show the error messages of this member Guest Today at 11:12:27
Apply Filter: Only show the error messages of this IP address 122.164.123.32    Apply Filter: Only show the error messages of this session b5a1717d24586f803af2e22e6b2868e6
Apply Filter: Only show the error messages of this URL http://forum.itacumens.com/index.php?/topic,11353.0.html
Apply Filter: Only show the errors with the same message
8: Undefined variable: user_info
File: /home/itacumen/public_html/forum/Themes/default/Display.template.php (main_above sub template - eval?)
Line: 241

Apply Filter: Only show the error messages of this member Guest Today at 11:12:27
Apply Filter: Only show the error messages of this IP address 122.164.123.32    Apply Filter: Only show the error messages of this session b5a1717d24586f803af2e22e6b2868e6
Apply Filter: Only show the error messages of this URL http://forum.itacumens.com/index.php?/topic,11353.0.html
Apply Filter: Only show the errors with the same message
2: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument
File: /home/itacumen/public_html/forum/Themes/default/Display.template.php (main_above sub template - eval?)
Line: 241

Apply Filter: Only show the error messages of this member Guest Today at 11:12:27
Apply Filter: Only show the error messages of this IP address 122.164.123.32    Apply Filter: Only show the error messages of this session b5a1717d24586f803af2e22e6b2868e6
Apply Filter: Only show the error messages of this URL http://forum.itacumens.com/index.php?/topic,11353.0.html
Apply Filter: Only show the errors with the same message
8: Undefined variable: user_info
File: /home/itacumen/public_html/forum/Themes/default/Display.template.php (main_above sub template - eval?)
Line: 241

Apply Filter: Only show the error messages of this member Guest Today at 11:12:27
Apply Filter: Only show the error messages of this IP address 122.164.58.134    Apply Filter: Only show the error messages of this session 37e8e69d17ced825deccb931bea5587d
Apply Filter: Only show the error messages of this URL http://forum.itacumens.com/index.php
Apply Filter: Only show the errors with the same message
2: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument
File: /home/itacumen/public_html/forum/Themes/default/SPortal.template.php (main_above sub template - eval?)
Line: 241



Kindly check out, atpresent i have changed my old index backup file Safely.

Quote from: ccbtimewiz on July 30, 2008, 01:59:47 PM
Look in the template_main_above() function. You'll see the word global, followed by words with $ in front of them and comma's.

Simply add $user_info to this list.

Like so:

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

To

global $context, $settings, $options, $scripturl, $txt, $modSettings, $user_info;

Quote from: ccbtimewiz on July 30, 2008, 03:07:52 PM
The $x variable that I defined is the array that contains the member group IDs that you want to exclude from seeing top ads.

In basic SMF, the moderator ID is 3, global moderator is 2, and admin is 1. If you have different ID's as your membergroups, please alter the variable like so:

$x = array(2, 3);
$x = array(#, #, #, #, #);

With "#" as a numerical value that corresponds to the group ID and separating using a ",".

So you are already right.

I saw my member group . It shows 2 as global moderator and 3 as moderator.

But still i could see adds on the moderated board.

I would like to complete this and make this work today. Hope you will help me.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

riker

Sod it I think I'll try the new Mybb 1.4

bonkerspr

i have installed ad managment v2.3 now how to use it for place my google ads ?

Sudhakar Arjunan

Quote from: bonkerspr on August 15, 2008, 08:44:02 PM
i have installed ad managment v2.3 now how to use it for place my google ads ?

Hi Bonkerspr,

go to admin panel, select Ad Management from left side menu.
Create Ads and past the code from google. And make sure if you want the add to be center use this sample.

<center>
Google Ads
</center>

configure or select boards , and locations to place ad tc.

Click submit and enjoy using the Ad Mod.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

learjet45

I would like to say that this seems like a wonderful mod, thank you for making it!
Now, I am having an issue. I have uploaded the correct package (I am on SMF 1.1.5), and it says that I passed all tests. Now, I install it and apply the mod, but I dont see anything I should be seeing. I dont see the Ad Management in the ACP, and none of the text shows up where it should be modifying permissions for groups to see the ads. I really would like to get this up and running, but it doesnt seem to want to work. I dont want to try manually installing it, because I am new to all of this and I dont want to risk messing up any files. Anyone know how to fix this?

Urbanite

Quote from: symon on August 14, 2008, 01:46:53 PM
Has anyone worked out how to register clicks per ad yet? :)

Yep, use OpenX

Full ad placement management, many variables such as, ad rotation, show on particular day, time of day, geographic location etc etc. full click reporting to you and your advertisers.

Free software, http://www.openx.org/products
Just when you finally get it idiot proof ...along comes a bigger idiot!

Sudhakar Arjunan

Hi,

Any updates to my previous post.

Its a simple one, i have to stop ads for Global Moderators and Moderators.

http://www.simplemachines.org/community/index.php?topic=68632.msg1661473#msg1661473
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

alex30

Hi everyone!

Having a problem.

I will use a few ads on forum and when I log in as user not as admin, ads don't show up. I checked already ad management section, checked - Display ads in the welcome user area- but sill just admin can see them.

Can't figure how to make them visible for users?

ccbtimewiz

Quote from: ccbtimewiz on August 11, 2008, 07:29:55 PM
Quote from: tuggaming on August 11, 2008, 07:28:49 PM
Hello,
finally, i aplly this mod, but only i (admin ) can see the ads..
What i need do to members also see ?

Admin > Member > Permissions

Enable "view ads" for the groups you want.

Advertisement: