SMF Ads Support Forum

Support => General Support => Topic started by: wannabee on November 20, 2006, 10:47:32 PM

Title: Ads between posts, works great but quick question
Post by: wannabee on November 20, 2006, 10:47:32 PM
First off, this MOD is way sweet and totally beyond what I expected!

Thanks Jerm and Big Guy! I just have a quick question and hopefully it's a simple one.

When the ads are posted in between posts it looks like somebody posted it. It has the topic title and the date and then the ad itself.

Is there anyway to have just the ad below the 1st post without the topic and date? I think it kind of distracts from the ad a little bit.

Any guidance on this one?  :)
Title: Re: Ads between posts, works great but quick question
Post by: bigguy on November 21, 2006, 07:49:43 PM
There is a way to change that. I have seen it posted here. Do a search and you might find it. I am not sure where it is now.
Title: Re: Ads between posts, works great but quick question
Post by: wannabee on November 21, 2006, 08:11:18 PM
I have done several searches with different wording, and have yet to find anything yet!  :-\

Hopefully somebody will chime in.
Title: Re: Ads between posts, works great but quick question
Post by: jerm on November 22, 2006, 09:25:53 PM
This is done so that it actually looks like a post. That way someone might just click it by accident.
You should look into display.template.php
Title: Re: Ads between posts, works great but quick question
Post by: wannabee on November 23, 2006, 08:32:03 PM
Quote from: jerm on November 22, 2006, 09:25:53 PM
This is done so that it actually looks like a post. That way someone might just click it by accident.
You should look into display.template.php

That's the whole thing, I'd rather it not like like a post, I wouldn't mind if someone clicked on it accidentally.

Thanks for the idea of checking display.template.php. Although I'm not too savvy with PHP, the comments in the code really help! From my novice point of view I can't see where the AD is posted here. Maybe there is a another file I could look at that posts the ad? Or maybe I'm not seeing it.

Any further input is very much anticipated and appreciated.

Thanks!  :)
Title: Re: Ads between posts, works great but quick question
Post by: wannabee on November 23, 2006, 09:36:34 PM
BTW: HAPPY THANKSGIVING TO ALL!!!!!  :)
Title: Re: Ads between posts, works great but quick question
Post by: jerm on November 23, 2006, 11:29:39 PM
Attach your display.template.php file to your post and i'll fix it up for you.
Title: Re: Ads between posts, works great but quick question
Post by: wannabee on November 24, 2006, 12:59:47 AM
Quote from: jerm on November 23, 2006, 11:29:39 PM
Attach your display.template.php file to your post and i'll fix it up for you.

Wow, that sure is a nice gesture JERM!   8)

I have attached the only file I was able to download which is

"Display.template.php~"

Display.template.php would not let me d/l it. It said:
Transferring Files Failed:
Display.template.php: Failed to open local target file /Users/Joe/Desktop/Display.template.php:Is a directory


So I sure hope I am attaching the right file for you.

BTW: This is kind of the look I was hoping for: http://howardforums.com/showthread.php?t=1049953

Thanks again!!!!!  :)
Title: Re: Ads between posts, works great but quick question
Post by: bigguy on November 25, 2006, 12:29:03 AM
That file is a backup file of the original. I doubt it will work. (it might) You should contact your host to find out why that file is a directory
Title: Re: Ads between posts, works great but quick question
Post by: jerm on November 25, 2006, 11:32:54 AM
Ya, we need the file without the ~
Title: Re: Ads between posts, works great but quick question
Post by: wannabee on November 25, 2006, 08:06:30 PM
OK guys, I finally got the file display.template.php! I have attached it.  :)
Title: Re: Ads between posts, works great but quick question
Post by: jerm on November 27, 2006, 09:43:06 PM
Try this out.. and remember to not overwrite your other Display.template.php.
Just incase this one doesn't work :)
Title: Re: Ads between posts, works great but quick question
Post by: wannabee on November 27, 2006, 09:49:37 PM
Great... I'll make sure to make a back up of the original. I'll let you know how it works shortly.

Thanks again!
Title: Re: Ads between posts, works great but quick question
Post by: wannabee on November 27, 2006, 10:06:30 PM
Quote from: jerm on November 27, 2006, 09:43:06 PM
Try this out.. and remember to not overwrite your other Display.template.php.
Just incase this one doesn't work :)

What do you mean just incase, It works perfectly!!!!!

I can't thank you enough. This mod is awesome and the support is 2nd to none!

Thank you kindly for everything!
Joseph


Title: Re: Ads between posts, works great but quick question
Post by: bigguy on November 28, 2006, 07:32:30 PM
Glad you got it working. ;)
Title: Re: Ads between posts, works great but quick question
Post by: fedlerner on November 30, 2006, 06:26:50 AM
Can you please post what you modified so that others can do it too? :)  :D
Title: Re: Ads between posts, works great but quick question
Post by: Voyager on December 02, 2006, 07:14:43 AM
I would like some before and after code myself if it's not to much of a problem Big Guy.
Title: Re: Ads between posts, works great but quick question
Post by: jerm on December 02, 2006, 03:36:26 PM
Display.template.php

if ($adpost = show_posts($adcounter))
{
echo '

<tr><td style="padding: 1px 1px 0 1px;">
<table width="100%" cellpadding="3" cellspacing="0" border="0">
<tr><td class="windowbg3">
<table width="100%" cellpadding="5" cellspacing="0" style="table-layout: fixed;">
<tr>
<td valign="top" width="16%" rowspan="2" style="overflow: hidden;">
<b>', $context['forum_name'], '</b>
<div class="smalltext">
</div>
</td>
<td valign="top" width="85%" height="100%">
<table width="100%" border="0"><tr>
<td valign="middle"><img src="', $message['icon_url'] . '" alt="" border="0" /></td>
<td valign="middle">
<div style="font-weight: bold;" id="subject_', $message['id'], '">
<a href="', $message['href'], '">', $message['subject'], '</a>
</div>
<div class="smalltext">« <b>', !empty($message['counter']) ? $txt[146] . ' #' . $message['counter'] : '', ' ', $txt[30], ':</b> ', $message['time'], ' »</div></td>
<td align="', !$context['right_to_left'] ? 'right' : 'left', '" valign="bottom" height="20" style="font-size: smaller;">';
if ($context['can_reply'] && !empty($options['display_quick_reply']))
echo '
', $reply_button, '';

// So... quick reply is off, but they *can* reply?
elseif ($context['can_reply'])
echo '
', $reply_button, '';

// Can the user modify the contents of this post?
if ($message['can_modify'])
echo '
', $modify_button, '';

// How about... even... remove it entirely?!
if ($message['can_remove'])
echo '
', $remove_button, '';

// What about splitting it off the rest of the topic?
if ($context['can_split'])
echo '
', $split_button, '';
echo '
</td>
</tr></table>
<hr width="100%" size="1" class="hrcolor" />
<div class="post">', $adpost['type'] == 0 ? $adpost['content'] : eval($adpost['content']) , '</div>
</td>
</tr>
<tr>
<td valign="bottom" class="smalltext" width="85%">
<table width="100%" border="0" style="table-layout: fixed;"><tr>
<td colspan="2" class="smalltext" width="100%">
</tr><tr>
<td valign="bottom" class="smalltext" id="modified_', $message['id'], '">
</td>
<td align="', !$context['right_to_left'] ? 'right' : 'left', '" valign="bottom" class="smalltext">
<img src="', $settings['images_url'], '/ip.gif" alt="" border="0" />&nbsp;', $txt[511], '
</td>
</tr></table>
</tr>
</table>
</td></tr>
</table>
</td></tr>';
}


And change to

if ($adpost = show_posts($adcounter))
{
               <tr><td>', $adpost['type'] == 0 ? $adpost['content'] : eval($adpost['content']) , '</tr></td>';
        }


Title: Re: Ads between posts, works great but quick question
Post by: Voyager on December 02, 2006, 09:46:53 PM
I tried it out on a test forum and got template parse error:

533:                <tr><td>', $adpost['type'] == 0 ? $adpost['content'] : eval($adpost['content']) , '</tr></td>'';
Title: Re: Ads between posts, works great but quick question
Post by: g-c on December 03, 2006, 12:19:47 PM
I get also an parse error.
im using SMF1.1 full and newest verion of ad-mod.

With this "idea" of the thread-starter, does this also solving my "problem"
I just want to have more space for a leaderboard-ad between posts so that user with smaller screen-resolutions see no scrollbars.
Just look at the pic:(http://img119.imageshack.us/img119/7864/screenadmodmo1.th.jpg) (http://img119.imageshack.us/my.php?image=screenadmodmo1.jpg)

Thx, Christian
Title: Re: Ads between posts, works great but quick question
Post by: bigguy on December 03, 2006, 12:22:14 PM
Using a smaller ad will acomplish what you want there. That space you have marked in red is for avatar and user info so it is not part of the post, meaning it can't be used without editing the template file. Jerm might know how to do that.
Title: Re: Ads between posts, works great but quick question
Post by: g-c on December 03, 2006, 12:32:32 PM
Quote from: bigguy on December 03, 2006, 12:22:14 PM
That space you have marked in red is for avatar and user info so it is not part of the post, meaning it can't be used without editing the template file..
Yes i know -  and because i know this, i asked if the method described here in this thread would display the "ad-post" complete without that avatar and user-info area?

Thx, Christian
Title: Re: Ads between posts, works great but quick question
Post by: bigguy on December 03, 2006, 12:40:35 PM
As far as I have read in this topic, its for removing the time and date only. Maybe someone knows how to do what you want but I do not.
Title: Re: Ads between posts, works great but quick question
Post by: Voyager on December 03, 2006, 01:19:36 PM
Quote from: bigguy on December 03, 2006, 12:40:35 PM
As far as I have read in this topic, its for removing the time and date only. Maybe someone knows how to do what you want but I do not.

Correct Big Guy this topic was for removing the re: of the previous post and the time and date and we are just waiting for jerm to get back to get the correct code to insert.

As for getting rid of the avatar area that is covered in a different post and thier has been no answer to it which means that one might not be a doable thing.
Title: Re: Ads between posts, works great but quick question
Post by: g-c on December 03, 2006, 02:24:04 PM
Quote from: Voyager on December 03, 2006, 01:19:36 PM
As for getting rid of the avatar area that is covered in a different post and thier has been no answer to it which means that one might not be a doable thing.
If i understand you correct, you say that this is not possible?
Well there are so many forums out there in the Internet which using such Advertising between posts - this must be possible!

As you can see here in this Forum, it is possible to show an Ad in that "empty area" (between user-area and "main-area") or at the bottom of the Forum... So if it's not possible to show it like a "post" between posts, including avatar&user info-area -  it should be possible to put an ad between posts when using the empty space of the Forum, so that such a Ad appers not as a post, but as a simple Box which contains the Ad-code.

You know how i mean this?
I hope that Jerm tell us what is possible and what not?
Title: Re: Ads between posts, works great but quick question
Post by: jerm on December 03, 2006, 08:03:52 PM
Quote from: Voyager on December 02, 2006, 09:46:53 PM
I tried it out on a test forum and got template parse error:

533:                <tr><td>', $adpost['type'] == 0 ? $adpost['content'] : eval($adpost['content']) , '</tr></td>'';
its a single quote at the end, not a double quote.
'</tr></td>'';
to
'</tr></td>';

not sure why i made that mistake, maybe i was tired.
Title: Re: Ads between posts, works great but quick question
Post by: Voyager on December 03, 2006, 08:08:53 PM
I caught that last and I thought I changed it and got the same error. Will give it a try tonight.

Thanks
Title: Re: Ads between posts, works great but quick question
Post by: Voyager on December 04, 2006, 10:18:47 AM
I gave it a try and still get the same parse error. Went through the begging code and removed what I thought would get rid of "re:post and time" and it worked except I ended up with a blank box with no ad.

Shows how good I'm at this coding. :'(
Title: Re: Ads between posts, works great but quick question
Post by: jerm on December 04, 2006, 11:56:46 AM
show me the code you are using.
Title: Re: Ads between posts, works great but quick question
Post by: Voyager on December 10, 2006, 09:48:43 AM
Here it is,

Parse error: syntax error, unexpected '<' in .../Themes/default/Display.template.php on line 533

524:                   </td>
525:                </tr>
526:             </table>
527:          </td></tr>
528:       </table>
529:    </td></tr>';
530:    if ($adpost = show_posts($adcounter))
531:    
532: {
533:                <tr><td>', $adpost['type'] == 0 ? $adpost['content'] : eval($adpost['content']) , '</tr></td>';534:         }
535:
Title: Re: Ads between posts, works great but quick question
Post by: jerm on December 10, 2006, 01:13:42 PM
Change this:
<tr><td>', $adpost['type'] == 0 ? $adpost['content'] : eval($adpost['content']) , '</tr></td>';
to:
echo '<tr><td>', $adpost['type'] == 0 ? $adpost['content'] : eval($adpost['content']) , '</tr></td>';
Title: Re: Ads between posts, works great but quick question
Post by: Voyager on December 10, 2006, 01:28:26 PM
Works perfect. :)  Thanks for your time with this.
Title: Re: Ads between posts, works great but quick question
Post by: g-c on December 10, 2006, 07:02:22 PM
YEAHHAAAA also solves my problem!
So all the Space is now usable...... There is only one Problem: How can i chnage that ugly dark-gray into that color which was used before the changes in display.template.php
Title: Re: Ads between posts, works great but quick question
Post by: g-c on December 12, 2006, 07:08:09 PM
Quote from: g-c on December 10, 2006, 07:02:22 PM
YEAHHAAAA also solves my problem!
So all the Space is now usable...... There is only one Problem: How can i chnage that ugly dark-gray into that color which was used before the changes in display.template.php
PUSH!
How to change the backgroundcolor from that very ugly "dark-grey" into the color which was used before the changes we made...
Title: Re: Ads between posts, works great but quick question
Post by: g-c on December 30, 2006, 07:57:15 PM
It seems that nobody wants to help me - very sad!  :( :(
Title: Re: Ads between posts, works great but quick question
Post by: bigguy on January 03, 2007, 06:57:34 PM
Check in the style.css file. I think you can change it in there.
Title: Re: Ads between posts, works great but quick question
Post by: g-c on January 04, 2007, 06:50:38 AM
Quote from: bigguy on January 03, 2007, 06:57:34 PM
Check in the style.css file. I think you can change it in there.
thanks!!
For all: it's the class .bordercolor .

Title: Re: Ads between posts, works great but quick question
Post by: g-c on January 12, 2007, 01:01:50 PM
Quote from: g-c on January 04, 2007, 06:50:38 AM
Quote from: bigguy on January 03, 2007, 06:57:34 PM
Check in the style.css file. I think you can change it in there.
thanks!!
For all: it's the class .bordercolor .


So my question: can i make a Div box with an id in that area where the adcode is showed by this mod? because that i can format this with css

Title: Re: Ads between posts, works great but quick question
Post by: g-c on January 12, 2007, 01:15:36 PM
well i try it and i add to line with that tables in display.template.php the following: style="background-color:#FDFDFD;"
now everything seems to be ok.
Title: Re: Ads between posts, works great but quick question
Post by: bigguy on January 12, 2007, 02:09:34 PM
Glad to hear you got it figured. :)
Title: Re: Ads between posts, works great but quick question
Post by: puchi on January 14, 2007, 04:24:56 AM
Alguien habla un poco de espaƱol? Necesito una ayuda urgente con este mod.
Title: Re: Ads between posts, works great but quick question
Post by: g-c on January 14, 2007, 06:31:30 AM
Quote from: bigguy on January 12, 2007, 02:09:34 PM
Glad to hear you got it figured. :)
Only a few hours after my testing, Version 2.3 was releasen in which this "function" is already implement.
hehe  :) ;)
Title: Re: Ads between posts, works great but quick question
Post by: Voyager on January 15, 2007, 11:58:19 AM
Quote from: g-c on January 12, 2007, 01:15:36 PM
well i try it and i add to line with that tables in display.template.php the following: style="background-color:#FDFDFD;"
now everything seems to be ok.

Cool that you found it. :)  Now can you share with the rest of us exactly where did you place your code for those of us that don't want to upgrade?
Title: Re: Ads between posts, works great but quick question
Post by: Voyager on January 27, 2007, 03:23:12 PM
I never got an answer so I upgraded one of my forums to the latest admod and still I get the ugly dark color on both sides of my ad between post when I have it centered.

The fix is out there so can someone share what template it is in and where to place it?
Title: Re: Ads between posts, works great but quick question
Post by: Sineksekiz on June 29, 2007, 11:14:41 PM
Quote from: Voyager on January 27, 2007, 03:23:12 PM
I never got an answer so I upgraded one of my forums to the latest admod and still I get the ugly dark color on both sides of my ad between post when I have it centered.

The fix is out there so can someone share what template it is in and where to place it?

I have exactly the same problem. I can't figure out how can we change the color of the background add between messages. It gives you a dark grey which is not cool for the looks of your theme....

If anybody has the answer for this question (including who has solved before) please share whit us.

Thank you.
Title: Re: Ads between posts, works great but quick question
Post by: g-c on June 30, 2007, 06:27:58 AM
Take a Developer-Extension (http://chrispederick.com/work/web-developer/) for your Browser, select something like "outline current element" and then you will see which item has which class....

Regards, Christian
Title: Re: Ads between posts, works great but quick question
Post by: Sineksekiz on July 01, 2007, 01:59:27 AM
Quote from: g-c on June 30, 2007, 06:27:58 AM
Take a Developer-Extension (http://chrispederick.com/work/web-developer/) for your Browser, select something like "outline current element" and then you will see which item has which class....

Regards, Christian

I have installed this Developer bar and  to install it I have install the Firefox aswell. It is a very nice bar. But result was nothing. Because when I click on the ads post to see which .css file they are attached it showed result as "No style information"...

Then I tried same thing on default theme. Result was same. I bleive these posts does not get any information from a style sheet instead their color are predefined. So how can I change these pre defined colors... OR if I am totlay wrong could you tell me please which style blocks is this mod using. SO I can copy these blocks to my own theme to set the colors.

Thank you.

<<<<<<EDITED>>>>>>

I find what the problem was. You need to ad windowbg3 tab to your modified themes style.css file.

And then change the color settings.
Title: Re: Ads between posts, works great but quick question
Post by: bigguy on July 06, 2007, 09:18:38 AM
Glad you got it solved. :)