SMF Ads Support Forum

Themes/Language => Theme Support => Topic started by: Craw on July 29, 2008, 10:38:06 pm

Title: Corporate America Theme Not Compatible with SMF Ads?
Post by: Craw on July 29, 2008, 10:38:06 pm
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.
Title: Re: Corporate America Theme Not Compatible with SMF Ads?
Post by: ccbtimewiz on July 29, 2008, 10:44:22 pm
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? (http://docs.simplemachines.org/index.php?topic=480)

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.
Title: Re: Corporate America Theme Not Compatible with SMF Ads?
Post by: Craw on July 29, 2008, 10:51:11 pm
Thanks for the quick reply, ccbtimewiz  :)

I'm familiar with FTP, so I'm attaching the index.template.php file.
Title: Re: Corporate America Theme Not Compatible with SMF Ads?
Post by: ccbtimewiz on July 29, 2008, 11:02:01 pm
Here you are.
Title: Re: Corporate America Theme Not Compatible with SMF Ads?
Post by: Craw on July 29, 2008, 11:05:50 pm
Thanks again. I'll try it out :)

EDIT: It still won't work :(
Title: Re: Corporate America Theme Not Compatible with SMF Ads?
Post by: ccbtimewiz on July 30, 2008, 08:49:18 am
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*/?
Title: Re: Corporate America Theme Not Compatible with SMF Ads?
Post by: Craw on July 30, 2008, 09:20:09 am
Yes sir.

Hold on, lemme try to attach it again. I'll do it again slowly to be sure :D
Title: Re: Corporate America Theme Not Compatible with SMF Ads?
Post by: ccbtimewiz on July 30, 2008, 10:19:58 am
Alright, try this out..
Title: Re: Corporate America Theme Not Compatible with SMF Ads?
Post by: Craw on July 30, 2008, 07:12:36 pm
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.

 :'(
Title: Re: Corporate America Theme Not Compatible with SMF Ads?
Post by: ccbtimewiz on July 30, 2008, 09:15:48 pm
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.
Title: Re: Corporate America Theme Not Compatible with SMF Ads?
Post by: Craw on July 30, 2008, 09:27:23 pm
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  :) :)
Title: Re: Corporate America Theme Not Compatible with SMF Ads?
Post by: riversen on July 31, 2008, 12:31:13 am
Just use the SMF Packet Parser to see where you need to do your edits:

http://sleepycode.com/PackageParser/index.php
Title: Re: Corporate America Theme Not Compatible with SMF Ads?
Post by: Craw on July 31, 2008, 06:26:24 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?
Title: Re: Corporate America Theme Not Compatible with SMF Ads?
Post by: riversen on July 31, 2008, 06:28:32 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.
Title: Re: Corporate America Theme Not Compatible with SMF Ads?
Post by: Craw on July 31, 2008, 07:12:56 am
Thanks. I'm trying it out now but I got stuck as the parser was telling me to look for:

Code: [Select]
echo '
</div>';

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

Code: [Select]
//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.
Title: Re: Corporate America Theme Not Compatible with SMF Ads?
Post by: riversen on July 31, 2008, 07:15:44 am
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.
Title: Re: Corporate America Theme Not Compatible with SMF Ads?
Post by: Craw on July 31, 2008, 07:21:07 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
Title: Re: Corporate America Theme Not Compatible with SMF Ads?
Post by: ccbtimewiz on July 31, 2008, 10:08:32 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?
Title: Re: Corporate America Theme Not Compatible with SMF Ads?
Post by: Craw on August 01, 2008, 07:04:12 am
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:

Thanks :)
Title: Re: Corporate America Theme Not Compatible with SMF Ads?
Post by: Craw on August 02, 2008, 07:59:05 am
Ideas, anyone? About how I can fix this? I'm sorry, I'm not good with PHP  :'(
Title: Re: Corporate America Theme Not Compatible with SMF Ads?
Post by: ccbtimewiz on August 04, 2008, 09:40:08 am
Can you attach the files you edited?
Title: Re: Corporate America Theme Not Compatible with SMF Ads?
Post by: Craw on August 04, 2008, 05:49:05 pm
Sure. Here they are.
Title: Re: Corporate America Theme Not Compatible with SMF Ads?
Post by: Craw on August 04, 2008, 05:50:52 pm
More (only 4 attachments per post).
Title: Re: Corporate America Theme Not Compatible with SMF Ads?
Post by: ccbtimewiz on August 04, 2008, 08:35:37 pm
Alright, I'll look over them when I have time.  :)
Title: Re: Corporate America Theme Not Compatible with SMF Ads?
Post by: Craw on August 04, 2008, 08:37:00 pm
Thanks ccbtimewiz, I really appreciate it :)