News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Ad Revenue Sharing Mod 1.3

Started by brianjw, June 14, 2008, 08:19:46 PM

Previous topic - Next topic

karlbenson

What is the ACTUAL adsense channel value that you are attempting to use?

Sickthing

#61
Quote from: brianjw on August 12, 2008, 08:39:13 AM
Hmmm, what theme are you using? I remember your theme was rather hard to edit.

I have just the standard default theme installed.  You asked me to send you a file.  I sent it to you, you did something to it and gave it back to me.  I uploaded it but I don't see any change.

http://expat.heyjoe.ph


Thanks for the help.

brianjw

Hmmm, could you upload it again. I understand that you posted it already but can I have the latest one on your server. Do you have any other mods installed?

NOTE: I realized that the ads don't show up for admins and only for regular users and guests.

Neol

Can I use this mod and the Ad Management mod too?

brianjw

You cannot use this mod with the Ad Management Mod. However when we release 2.0, I plan to add a feature that will work LIKE the ad management mod for you as well.

Neol

When plan you to release the 2.0 version?

ellion

Quote from: karlbenson on August 14, 2008, 10:39:03 AM
What is the ACTUAL adsense channel value that you are attempting to use?
was this to me?

well i have tries with different values.

first i set up a channel when i set up my ads. the channel was called "psycho" as using it on a psychology forum. when i tried to save this in channel id in the ars menu the channel id would not save. the field stayed bank, i put the id in > save > blank.  nothing.

so i went and had a look at my adsense code to see if there was an indication of something that i might need to use other than "psycho"

i found this random number for my adsense slot in the ad code.

i put that in the channel id field in the asr menu and it saved.  so i have this random number as my channel id.

however this did not help cause it was not the same as the id i set up in adsense.

i then set up a new ad with the new channel id of numbers (taken from my adsense slot)

any way this still does not work.

karlbenson

The adsense channel is currently setup to ONLY support numbers and must be 10 in length
      $a['adsensechannel'] = '^[0-9]{10}$';
Thats the validation.
(Bear in mind when i originally created the mod, adsense only channels were random numbers).

If other characters can now be used, Brian will have to modify the database fields (which are set to int(10)) AND alter the regex to support other characters.

brianjw

Thanks Karlbenson for letting us all know. This had me stumped but until I get a 2.0 version out, everyone will need to make the channels using numbers.

The 2.0 versions base is only created at this time and the base is what Karlbenson had made. Now I just have to make the base work for the other parts of the site. I don't have a set release date as of yet. When it's ready it will be ready. And I will let you know when it's close to being ready and it's not close yet.

Sickthing

Quote from: brianjw on August 14, 2008, 11:29:39 AM
Hmmm, could you upload it again. I understand that you posted it already but can I have the latest one on your server. Do you have any other mods installed?

NOTE: I realized that the ads don't show up for admins and only for regular users and guests.

Yea I'll get you the one that I installed last just to make sure I got the write one up there.  I've held off on installing anything so that I can get this working first.

Sickthing

#70
Brian, here is my file again.  perhaps I don't know where to look for the change.  I'll go read the download page again to see if I can find anything I'm  missing.  I may be missing a lot as I don't remember there being much there.  I know you just took this over, I'm only trying to figure out if I missing something right under my nose.  I know your extremely busy, help when you can.

I uploaded your file again.  To the default theme  Themes/default  looked around and I don't see any changes.

Thanks.

brianjw

I see all the edits I made in the template file last time lol... Here I'll show you.

I added

// AD REVENUE SHARING - PLACEMENT OF ARS ADS AT TOP OF THE PAGE (CENTERED)
if ($modSettings['ars_enabled']) {
// START COUNTING THE NUMBER OF ADS
$context['arsadscount'] = 0;
showArsAds("top");
showArsMessage("top");
}
// END OF ARS PLACEMENT OF ARS ADS

after

</head>
<body>';

I replaced

function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;

echo '
</div>';

with

function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;

echo '</div>';

// AD REVENUE SHARING - PLACEMENT OF ARS ADS
if ($modSettings['ars_enabled']) {
// ADS IN RIGHT TOWER/COLUMN
if ($modSettings['ars_adsetup_right_enabled']) {
echo '</td><td valign="top">';
showArsAds("right");
}
// CLOSE THE TABLE WE CREATED IF LEFT OR RIGHT TOWER ADS ARE ENABLED
if (($modSettings['ars_adsetup_left_enabled']) || ($modSettings['ars_adsetup_right_enabled'])) {
echo '</td></tr></table>';
}
// ARS ADS AT BOTTOM OF THE PAGE (CENTERED)
showArsAds("bottom");

// LOG/RECORD ADS IMPRESSIONS
logImpressions();
}
// END OF ARS PLACEMENT OF ARS ADS

I Added

// AD REVENUE SHARING - PLACEMENT OF ARS ADS IN THE WELCOME AREA BOX (CENTERED)
if (($modSettings['ars_enabled']) && ($modSettings['ars_adsetup_welcome_enabled'])) {
echo '</td>
<td class="windowbg2">';
showArsAds("welcome");
showArsMessage("top");
}
// END OF ARS PLACEMENT OF ARS ADS

before

echo '
</td>
</tr>
</table>
</td>
</tr>
</table>';

I added

// AD REVENUE SHARING - PLACEMENT OF ARS ADS
if ($modSettings['ars_enabled']) {
// PLACEMENT OF ARS ADS UNDER LINKS
showArsAds("links");

// CREATE TABLE IF LEFT OR RIGHT TOWER ADS ARE ENABLED, ALSO WRITE LEFT TOWER/COLUMN ADS
if (($modSettings['ars_adsetup_left_enabled']) || ($modSettings['ars_adsetup_right_enabled'])) {
echo '<table cellspacing="3" cellpadding="0" width="100%"><tr><td valign="top">';
}
// PLACEMENT OF ARS ADS IN A LEFT COLUMN (CENTERED)
if ($modSettings['ars_adsetup_left_enabled']) {
showArsAds("left");
echo '</td><td valign="top">';
}
}
// END OF ARS PLACEMENT OF ARS ADS

After

// Show the menu here, according to the menu sub template.
template_menu();


Here are the instructions with the new index.template.php:

Go to the package manager and go to the install screen for this mod. You'll will probably still notice an error. Just install with the index.template.php error. Then take the index.template.php attached and upload it to /Themes/default/. Make sure the mod is enabled in the admin panel and you're all set. The admin panel for it is at ?action=managears

Sickthing

It is defiantly a user error Brian. :)  I'm very green to SMF, I've been trying for the last two years to get a WOWbb converted and that's finally very close to being done.  I've had an SMF board up about four years ago I think but I forget what little I learned it appears.

I wasn't clear.  I didn't see any changes in the forum but I was too green to know where to look.  Sorry, I need the basics.  Things are a bit different than what I'm use too.  But there is some progress now, thanks to your help.

Okay I found and installed the mod in the packages now.

When I try to go too ?actions=manger I get a screen with four check boxes that are check and 50% selected but no text.

Hmmm, I upgraded to 1.1.5.  Did I foul something up when I did that.

I found the error log this time I was in and there are about 130 pages of errors all dealing with ars.

When I go to ?actions=managers I get this:

   
QuoteExpat       Today at 10:43:55 PM
Apply Filter: Only show the error messages of this IP address 203.177.xxx.xxx
Apply Filter: Only show the error messages of this session [removed]
Apply Filter: Only show the error messages of this URL http://expat.heyjoe.ph/index.php?action=managears
Apply Filter: Only show the errors with the same message
8: Undefined index: ars_save
File: /home/heyjoe/public_html/philippine-expat-community/Themes/default/ManageArs.template.php (settings sub template - eval?)
Line: 125

I don't see where to activate it in the admin panel other than installing.

Sorry to be so behind here.  I promise I'll go read. :)  I thought I knew what I was doing but I'm beginning to understand why nothing is making sense to me. It is all different from what I'm use too.  LOL

I'm use to uploading a script, running it answering the questions and wala, it's done.   Thanks for the hand holding. 

What am I missing now?

Sickthing

i thought I'd try to uninstall and re-install but I'm getting this error:

QuoteType     Action     Description
1.    Execute Modification    ./index.php    Test successful
2.    Execute Modification    ./Themes/default/Display.template.php    Test successful
<b>3.    Execute Modification    ./Themes/default/index.template.php    Test failed</b>
4.    Execute Modification    ./Themes/default/BoardIndex.template.php    Test successful
5.    Execute Modification    ./Themes/default/MessageIndex.template.php    Test successful
6.    Execute Modification    ./Themes/default/PersonalMessage.template.php    Test successful
7.    Execute Modification    ./Themes/default/Profile.template.php    Test successful
8.    Execute Modification    ./Themes/default/Help.template.php    Test successful
9.    Execute Modification    ./Sources/Subs.php    Test successful
10.    Execute Modification    ./Sources/Post.php    Test successful
11.    Execute Modification    ./Sources/Profile.php    Test successful
12.    Execute Modification    ./Sources/Display.php    Test successful
13.    Execute Modification    ./Sources/Help.php    Test successful
14.    Execute Modification    ./Themes/default/languages/Admin.english.php    Test successful
<b>15.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test failed</b>
16.    Execute Modification    ./Themes/default/languages/Profile.english.php    Test successful
17.    Execute Modification    ./Themes/default/languages/Manual.english.php    Test successful

Sickthing

I've installed it on another forum now and I'm getting the same thing.  Just installed and seven pages of errors like those above.  I'm going uninstall it and wait.  I do not understand the purpose of the parser at all.  :(


Sickthing

When I try to install I get this:

15.     Execute Modification     ./Themes/default/languages/Modifications.english.php     Test failed

So I didn't uninstall it.  i have installed the Skype Intergration module too.  Everything else is default.

brianjw

Just install the mod. The errors in the error log will not affect the performance of the mod.

Just open Modifications.english.php which is in /Themes/default/languages/ and add the code:

//ARS ADS TXT STRINGS
$txt['ars_ads_mod'] = 'Ad Revenue Sharing Mod';
$txt['ars_ads_message_1'] = 'This is an Ad Revenue Sharing Forum';
$txt['ars_ads_message_2'] = 'Revenue Sharing Forum';
$txt['ars_ads_message_adsense'] = 'Adsense';
$txt['ars_ads_message_ypn'] = 'YPN';
$txt['ars_ads_message_and'] = 'and';
$txt['ars_ads_participate'] = 'Participate';
$txt['ars_ads_questionmark'] = '[?]';

right before

?>


Thanks,
Brian

Sickthing

That appears to already be there BUT

It looks like the skype plugin is fouled it up.  I have moved the code for ARS to the bottom where I found ?>:

<?php
// Version: 1.1; Modifications


//ARS ADS TXT STRINGS
$txt['ars_ads_mod'] = 'Ad Revenue Sharing Mod';
$txt['ars_ads_message_1'] = 'This is an Ad Revenue Sharing Forum';
$txt['ars_ads_message_2'] = 'Revenue Sharing Forum';
$txt['ars_ads_message_adsense'] = 'Adsense';
$txt['ars_ads_message_ypn'] = 'YPN';
$txt['ars_ads_message_and'] = 'and';
$txt['ars_ads_participate'] = 'Participate';
$txt['ars_ads_questionmark'] = '[?]';$txt['skype'] = 'Skype';
  $txt['skype_in'] = 'This is your Skype username.';
 
$txt['arcade'] = 'Arcade';
$txt['arcade_admin'] = 'Arcade Admin';
$txt['arcade_manage_games'] = 'Games';
$txt['arcade_manage_category'] = 'Categories';
$txt['arcade_settings'] = 'Settings';

Sickthing

After making the changes, my ?actions=managers is still blank :(

here is the entire contents of the file.  I tried to uninstall the skype plugin and it is giving an error in the english file style.  This is what I get for changing two things at once.

I'm not getting the managers screen at all now.

Perhaps the skype module broke yours becaue I can't uninstall anything?

<?php
// Version: 1.1; Modifications

$txt['skype'] = 'Skype';
$txt['skype_in'] = 'This is your Skype username.';
 
$txt['arcade'] = 'Arcade';
$txt['arcade_admin'] = 'Arcade Admin';
$txt['arcade_manage_games'] = 'Games';
$txt['arcade_manage_category'] = 'Categories';
$txt['arcade_settings'] = 'Settings';

// Permission names and help
$txt['permissiongroup_arcade'] = 'Arcade';
$txt['permissionname_arcade_view'] = 'View Arcade';
$txt['permissionhelp_arcade_view'] = 'May access Arcade and use basic features like search and view highscores';
$txt['permissionname_arcade_play'] = 'Play on Arcade';
$txt['permissionhelp_arcade_play'] = 'Allows member to play on arcade, in games which he/she has rights to';
$txt['permissionname_arcade_admin'] = 'Administrate arcade';
$txt['permissionhelp_arcade_admin'] = 'Arcade Administarator can Install/Edit/Delete game, Delete scores and edit settings for arcade';
$txt['permissionname_arcade_view'] = 'View Arcade';
$txt['permissionhelp_arcade_view'] = 'May access Arcade and use basic features like search and view highscores';
$txt['permissionname_arcade_favorite'] = 'Use Favorites feature';
$txt['permissionhelp_arcade_favorite'] = 'Allows member to favorite and unfavorite games';
$txt['permissionname_arcade_submit'] = 'Save scores';
$txt['permissionhelp_arcade_submit'] = 'Allows users to save their scores.';
$txt['permissionname_arcade_rate'] = 'Rate games';
$txt['permissionhelp_arcade_rate'] = 'Allows users to rate games.';
$txt['permissionname_arcade_comment'] = 'Allow to comment/edit comment';
$txt['permissionhelp_arcade_comment'] = 'Allows user to edit comments, own or any';
$txt['permissionname_arcade_comment_any'] = 'Any';
$txt['permissionname_arcade_comment_own'] = 'Own';

// Errors if they can't do something
$txt['cannot_arcade_play'] = 'You are not allowed to play games!';
$txt['cannot_arcade_view'] = 'You are not allowed to access arcade.';
$txt['cannot_arcade_favorite'] = 'You are not allowed to favorite games';
$txt['cannot_arcade_rate'] = 'You are not allowed to rate games';
$txt['cannot_arcade_comment_own'] = 'You are not allowed to comment';

// Who's online
$txt['who_arcade'] = 'Viewing Arcade index';
$txt['who_arcade_play'] = 'Playing <a href="' . $scripturl . '?action=arcade;sa=play;game=%d">%s</a> on Arcade';
$txt['who_arcade_highscore'] = 'Viewing highscores of <a href="' . $scripturl . '?action=arcade;sa=play;game=%d">%s</a> on Arcade';

// Help
$txt['arcade_max_scores_help'] = 'Maximum scores that will be stored per member. (0 means unlimited)';
$txt['arcade_membergroups_help'] = 'These groups will be allowed to play and view highscores. Others will not see this game, only used if permission mode will use game permissions.';

//ARS ADS TXT STRINGS
$txt['ars_ads_mod'] = 'Ad Revenue Sharing Mod';
$txt['ars_ads_message_1'] = 'This is an Ad Revenue Sharing Forum';
$txt['ars_ads_message_2'] = 'Revenue Sharing Forum';
$txt['ars_ads_message_adsense'] = 'Adsense';
$txt['ars_ads_message_ypn'] = 'YPN';
$txt['ars_ads_message_and'] = 'and';
$txt['ars_ads_participate'] = 'Participate';
$txt['ars_ads_questionmark'] = '[?]';?>

Sickthing

Okay, I found the problem.  Well actually TE did.  Or Thor, as I like to call him. What a cool name.

I am lucky enough to have him using me for the guinie pig for the WOWbb converter.  I mentioned to him I was having issues so he wouldn't go wasting his time if he saw the errors in the log.  But he fixed it for me. 

He explained that I had changed to UTF-8.  I'll have to take his word on that.  LOL

He advised that I install "Load Standard Language Modification" on my other board and that did it.  It works great now.


He advised that I install Load Standard Language Modification

Advertisement: