Coinbase

Author Topic: Ad Placement Between Categories  (Read 5619 times)

0 Members and 1 Guest are viewing this topic.

Offline jgwise

  • Jr. Member
  • **
  • Posts: 21
Ad Placement Between Categories
« on: July 31, 2017, 10:53:43 am »
Is there a way to create an ad placement between categories?

Offline vbgamer45

  • Owner
  • Full Member
  • *
  • Posts: 132
Re: Ad Placement Between Categories
« Reply #1 on: July 31, 2017, 11:15:38 am »
Yes when you add adds
Under "Display ads after categories" click the help icon for more information

Offline jgwise

  • Jr. Member
  • **
  • Posts: 21
Re: Ad Placement Between Categories
« Reply #2 on: July 31, 2017, 11:37:00 am »
I added the new ad and in the "Display ads after categories" box I added "1,2" in order to place between the two categories, but nothing shows up.

Offline jgwise

  • Jr. Member
  • **
  • Posts: 21
Re: Ad Placement Between Categories
« Reply #3 on: August 01, 2017, 08:32:30 am »
Any idea on why this is not working? I put the "1,2" as instructed in the box...but the ad is not showing...I am using the Core Theme, so no mods or anything that should conflict. Any ideas?

Offline jgwise

  • Jr. Member
  • **
  • Posts: 21
Re: Ad Placement Between Categories
« Reply #4 on: August 01, 2017, 11:39:30 am »
Here is screenshot

Offline vbgamer45

  • Owner
  • Full Member
  • *
  • Posts: 132
Re: Ad Placement Between Categories
« Reply #5 on: August 01, 2017, 03:52:06 pm »
Check that you made the edits to your theme. For that to work it edits the boardindex.template.php file.

To find the edits upload the mod to http://www.smfhacks.com/smf-package-parser.html

Offline jgwise

  • Jr. Member
  • **
  • Posts: 21
Re: Ad Placement Between Categories
« Reply #6 on: August 01, 2017, 04:45:56 pm »
What file am I uploading to the parser? Sorry new to this...

Offline vbgamer45

  • Owner
  • Full Member
  • *
  • Posts: 132
Re: Ad Placement Between Categories
« Reply #7 on: August 01, 2017, 04:47:35 pm »
The .zip file for ad management

Offline jgwise

  • Jr. Member
  • **
  • Posts: 21
Re: Ad Placement Between Categories
« Reply #8 on: August 01, 2017, 10:57:51 pm »
When I run the PARSER...it says in the file $themedir/BoardIndex.template.php to edit two codes...

I found the first one and added it...but the second one, I can't find the line of code that I am supposed to paste after (the DIVIDER CLASS). It says...

FIND:

<tbody class="divider">
            <tr>
               <td colspan="4"></td>
            </tr>
         </tbody>';

THEN PASTE AFTER:

   echo '<tbody><tr><td colspan="4">';
   //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);
   }
   echo '         </td></tr></tbody>';

Offline jgwise

  • Jr. Member
  • **
  • Posts: 21
Re: Ad Placement Between Categories
« Reply #9 on: August 01, 2017, 10:58:14 pm »
So I did a fresh install of SMF 2.0.14 on my test server and modified the files according to the Parser.

The ad that I wanted between the Categories is showing up on top of the Categories. But I still could not find the <tbody class="divider"> section to add the code under.

I also need to have the QueryString.php edited to fix the overlap on the bottom since I have done the fresh install.

Sorry...not trying to be a pain...just trying to get the ad setup so I can move this out to live server. Thank you for your help. Once I get this live will make donation for all the trouble.   :)
« Last Edit: August 02, 2017, 03:25:18 am by jgwise »

Offline jgwise

  • Jr. Member
  • **
  • Posts: 21
Re: Ad Placement Between Categories
« Reply #10 on: August 02, 2017, 02:13:40 pm »
Any insight on my issue?

Offline vbgamer45

  • Owner
  • Full Member
  • *
  • Posts: 132
Re: Ad Placement Between Categories
« Reply #11 on: August 02, 2017, 02:22:11 pm »
Try these files

Offline jgwise

  • Jr. Member
  • **
  • Posts: 21
Re: Ad Placement Between Categories
« Reply #12 on: August 02, 2017, 02:40:21 pm »
I uploaded and got this error when I tried to open forum:

Template Parse Error!
There was a problem loading the /Themes/core/BoardIndex.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.


Parse error: syntax error, unexpected end of file in .../Themes/core/BoardIndex.template.php on line 420


411:          <div class="infocenter_section">
412:             <h4 class="titlebg">', $txt['online_users'], '</h4>
413:             <div class="windowbg">
414:                <p class="section">
415:                   ', $context['show_who'] ? '<a href="' . $scripturl . '?action=who' . '">' : '', '<img src="', $settings['images_url'], '/icons/online.gif', '" alt="', $txt['online_users'], '" />', $context['show_who'] ? '</a>' : '', '
416:                </p>
417:                <div class="windowbg2 sectionbody">
418:                   ', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', comma_format($context['num_guests']), ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . comma_format($context['num_users_online']), ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];
419:
420:    // H

Offline vbgamer45

  • Owner
  • Full Member
  • *
  • Posts: 132
Re: Ad Placement Between Categories
« Reply #13 on: August 02, 2017, 02:49:59 pm »
Try this

Offline jgwise

  • Jr. Member
  • **
  • Posts: 21
Re: Ad Placement Between Categories
« Reply #14 on: August 02, 2017, 02:51:13 pm »
I figured it out...well part of it...the end code was missing on the files.

Thank you the banner is now showing between the categories...awesome.

The bottom footer still has the SMFADS link over the top of the Simple Machine copyright. Is that a quick fix?

Offline vbgamer45

  • Owner
  • Full Member
  • *
  • Posts: 132
Re: Ad Placement Between Categories
« Reply #15 on: August 02, 2017, 02:53:12 pm »
that querystring file should fix it.

Offline jgwise

  • Jr. Member
  • **
  • Posts: 21
Re: Ad Placement Between Categories
« Reply #16 on: August 02, 2017, 02:58:21 pm »
The last part of the two files were missing...so I copied the tail end from where your code off from the orig files...and the banner is working...but I am missing something from the footer section.

Offline jgwise

  • Jr. Member
  • **
  • Posts: 21
Re: Ad Placement Between Categories
« Reply #17 on: August 02, 2017, 03:00:56 pm »
This is a screenshot

Offline vbgamer45

  • Owner
  • Full Member
  • *
  • Posts: 132
Re: Ad Placement Between Categories
« Reply #18 on: August 02, 2017, 03:10:49 pm »
try

Offline jgwise

  • Jr. Member
  • **
  • Posts: 21
Re: Ad Placement Between Categories
« Reply #19 on: August 03, 2017, 04:06:38 pm »
Not trying to be a pest...but at closer look the add is not between the categories...it is at the end of the first category in like a grey box...is the a way to actually have it between the categories so the top and bottom categories look like they are in their own tables and the ad is in between with just the page background behind it?

Offline vbgamer45

  • Owner
  • Full Member
  • *
  • Posts: 132
Re: Ad Placement Between Categories
« Reply #20 on: August 03, 2017, 05:47:15 pm »
Try

Offline jgwise

  • Jr. Member
  • **
  • Posts: 21
Re: Ad Placement Between Categories
« Reply #21 on: August 03, 2017, 09:28:15 pm »
Still shows at end of Category #1 and not between them...

Offline vbgamer45

  • Owner
  • Full Member
  • *
  • Posts: 132
Re: Ad Placement Between Categories
« Reply #22 on: August 03, 2017, 09:29:52 pm »
Hmm ok I guess it does not support that feature. i tried two spots and doesn't seem to work with these theme

Offline jgwise

  • Jr. Member
  • **
  • Posts: 21
Re: Ad Placement Between Categories
« Reply #23 on: August 03, 2017, 10:44:15 pm »
I am using the standard Core theme...not mod...

Offline jgwise

  • Jr. Member
  • **
  • Posts: 21
Re: Ad Placement Between Categories
« Reply #24 on: August 03, 2017, 10:45:10 pm »
If I put "1,2" it puts one at end of each category (in grey box at bottom of category)...but not in between the categories...

« Last Edit: August 04, 2017, 01:34:46 pm by jgwise »

Offline jgwise

  • Jr. Member
  • **
  • Posts: 21
Re: Ad Placement Between Categories
« Reply #25 on: August 08, 2017, 09:38:25 am »
Is there a theme I should use that this works with? I thought the Core theme was a standard theme...which is why I was using it. Because it was a simple and clean look. Not using any other mods than the SMF Ads. Any thoughts?

Offline vbgamer45

  • Owner
  • Full Member
  • *
  • Posts: 132
Re: Ad Placement Between Categories
« Reply #26 on: August 08, 2017, 09:53:18 am »
The default theme works well. but won't change your category issue i belive.

Offline jgwise

  • Jr. Member
  • **
  • Posts: 21
Re: Ad Placement Between Categories
« Reply #27 on: August 08, 2017, 10:54:53 am »
I am not that great at PHP and customizing the forum board page template...but if the SMF Ads Mod won't place the ad between the category, is there a way to insert the link in the board page (ie http://domain.com/banners) so that is appears between the categories? Sorry new to the whole forum thing.

SMF Ads Support Forum

Re: Ad Placement Between Categories
« Reply #27 on: August 08, 2017, 10:54:53 am »
.