News:

Version 3.5 has been released. Visit https://custom.simplemachines.org/mods/index.php?mod=255 to get the most up to date version.

Main Menu
Coinbase

Corporate America Theme Not Compatible with SMF Ads?

Started by Craw, July 29, 2008, 11:38:06 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Craw

Hi,

I'm using the Corporate America theme  :P ::) :D but it seems SMF Ads don't work well with it by default. What do I need to edit and which files so this mod will work?

Thanks.

ccbtimewiz

You'll be needing to edit the theme you're using by editing the core templates via FTP. How do I use FTP? / What is FTP?

The location of the files is %root%/%smf_root%/Themes/*name of theme*/

If you want, attach your index.template.php file here and I'll take you through it step by step.

Craw

Thanks for the quick reply, ccbtimewiz  :)

I'm familiar with FTP, so I'm attaching the index.template.php file.


Craw

Thanks again. I'll try it out :)

EDIT: It still won't work :(

ccbtimewiz

Strange, are you sure that is the theme you're set to using?

Are you sure that index.template.php file is from %smf_root%/Themes/*your_theme*/?

Craw

Yes sir.

Hold on, lemme try to attach it again. I'll do it again slowly to be sure :D


Craw

Hi ccbtimewiz,

It's still not working. I made sure admins can see ads and I tested it with AdSense but it's still not showing. I've refreshed a few times already but the ads still don't appear.

:'(

ccbtimewiz

The edits I made only make the top ads appear. Make certain you're putting ads into the top of your forum at the moment.

Craw

Oh, OK. The slot I was testing was the one after the last post.

I edited it and it's now showing at the topmost part of the page (above the main header & nav).

I guess we still need more editing?

Thank you, now we're getting somewhere  :) :)

riversen

#11
Just use the SMF Packet Parser to see where you need to do your edits:

http://sleepycode.com/PackageParser/index.php

Craw

Quote from: riversen on July 31, 2008, 01:31:13 AM
Just use the SMF Packet Parser to see where you need to do your edits:
I'm using SMF 1.1.5 and the highest option is 1.1.3... will it work?

riversen

Quote from: Craw on July 31, 2008, 07:26:24 AM
Quote from: riversen on July 31, 2008, 01:31:13 AM
Just use the SMF Packet Parser to see where you need to do your edits:
I'm using SMF 1.1.5 and the highest option is 1.1.3... will it work?

Sorry... wrong link.. I've edited it.

Craw

Thanks. I'm trying it out now but I got stuck as the parser was telling me to look for:


echo '
</div>';


in BoardIndex.template.php but that snippet of code does not exist... I need to add:


//Display ads Between cats
if (function_exists("show_category"))
{
$ads = show_category($category['id']);
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}


after... any idea where I should add this? Thanks.

riversen

try comparing with the same file in the default theme (check where the ad code has been inserted).  Not all theme have the same code thus the search might be unsuccessful.

Craw

Quote from: riversen on July 31, 2008, 08:15:44 AM
Not all theme have the same code thus the search might be unsuccessful.
Yeah, I've thought of that. Thanks for the quick reply :) Back to work for me  :o

ccbtimewiz

Quote from: Craw on July 31, 2008, 08:21:07 AM
Quote from: riversen on July 31, 2008, 08:15:44 AM
Not all theme have the same code thus the search might be unsuccessful.
Yeah, I've thought of that. Thanks for the quick reply :) Back to work for me  :o

How are you doing with that so far?

Craw

Hi ccbtimewiz,

I finished editing but I wasn't able to upload the files just yet as I had to go, and now I just arrived so I'll upload the files in a few mins :)

EDIT: Hi ccbtimewiz, I uploaded the edited files and I seem to have made a mistake in where I placed some of the codes as they don't appear where they should appear. Another thing is maybe it's also because of the way the theme is presented/displayed.

I listed the options that I think are displaying wrongly:

  • Within boards - my test ad didn't show
  • Within posts
  • After categories - my test ad didn't show
  • Welcome User Area - it's creating a new column on the left side, it doesn't blend. It looks like a left tower ;D
  • Left & Right towers - not displaying properly. It doesn't look anything like tower ads

Thanks :)

Craw

Ideas, anyone? About how I can fix this? I'm sorry, I'm not good with PHP  :'(

ccbtimewiz



Craw


ccbtimewiz

Alright, I'll look over them when I have time.  :)

Craw