Coinbase

Author Topic: Ads between posts, works great but quick question  (Read 21275 times)

0 Members and 1 Guest are viewing this topic.

Offline wannabee

  • Newbie
  • *
  • Posts: 8
Ads between posts, works great but quick question
« 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?  :)
« Last Edit: November 20, 2006, 10:49:48 pm by wannabee »
Well isn't this fun?

Offline bigguy

  • Support
  • Elite Member
  • *
  • Posts: 1518
    • SMF Helper
Re: Ads between posts, works great but quick question
« Reply #1 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.

Offline wannabee

  • Newbie
  • *
  • Posts: 8
Re: Ads between posts, works great but quick question
« Reply #2 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.
Well isn't this fun?

Offline jerm

  • Support
  • Elite Member
  • *
  • Posts: 726
Re: Ads between posts, works great but quick question
« Reply #3 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

Offline wannabee

  • Newbie
  • *
  • Posts: 8
Re: Ads between posts, works great but quick question
« Reply #4 on: November 23, 2006, 08:32:03 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!  :)
« Last Edit: November 23, 2006, 09:35:54 pm by wannabee »
Well isn't this fun?

Offline wannabee

  • Newbie
  • *
  • Posts: 8
Re: Ads between posts, works great but quick question
« Reply #5 on: November 23, 2006, 09:36:34 pm »
BTW: HAPPY THANKSGIVING TO ALL!!!!!  :)
Well isn't this fun?

Offline jerm

  • Support
  • Elite Member
  • *
  • Posts: 726
Re: Ads between posts, works great but quick question
« Reply #6 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.

Offline wannabee

  • Newbie
  • *
  • Posts: 8
Re: Ads between posts, works great but quick question
« Reply #7 on: November 24, 2006, 12:59:47 am »
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!!!!!  :)
« Last Edit: November 24, 2006, 01:01:58 am by wannabee »
Well isn't this fun?

Offline bigguy

  • Support
  • Elite Member
  • *
  • Posts: 1518
    • SMF Helper
Re: Ads between posts, works great but quick question
« Reply #8 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

Offline jerm

  • Support
  • Elite Member
  • *
  • Posts: 726
Re: Ads between posts, works great but quick question
« Reply #9 on: November 25, 2006, 11:32:54 am »
Ya, we need the file without the ~

Offline wannabee

  • Newbie
  • *
  • Posts: 8
Re: Ads between posts, works great but quick question
« Reply #10 on: November 25, 2006, 08:06:30 pm »
OK guys, I finally got the file display.template.php! I have attached it.  :)
Well isn't this fun?

Offline jerm

  • Support
  • Elite Member
  • *
  • Posts: 726
Re: Ads between posts, works great but quick question
« Reply #11 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 :)

Offline wannabee

  • Newbie
  • *
  • Posts: 8
Re: Ads between posts, works great but quick question
« Reply #12 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!
Well isn't this fun?

Offline wannabee

  • Newbie
  • *
  • Posts: 8
Re: Ads between posts, works great but quick question
« Reply #13 on: November 27, 2006, 10:06:30 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


Well isn't this fun?

Offline bigguy

  • Support
  • Elite Member
  • *
  • Posts: 1518
    • SMF Helper
Re: Ads between posts, works great but quick question
« Reply #14 on: November 28, 2006, 07:32:30 pm »
Glad you got it working. ;)

Offline fedlerner

  • Newbie
  • *
  • Posts: 4
Re: Ads between posts, works great but quick question
« Reply #15 on: November 30, 2006, 06:26:50 am »
Can you please post what you modified so that others can do it too? :)  :D

Offline Voyager

  • Jr. Member
  • **
  • Posts: 19
    • Email
Re: Ads between posts, works great but quick question
« Reply #16 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.

Offline jerm

  • Support
  • Elite Member
  • *
  • Posts: 726
Re: Ads between posts, works great but quick question
« Reply #17 on: December 02, 2006, 03:36:26 pm »
Display.template.php
Code: [Select]
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
Code: [Select]
if ($adpost = show_posts($adcounter))
{
               <tr><td>', $adpost['type'] == 0 ? $adpost['content'] : eval($adpost['content']) , '</tr></td>';
        }

« Last Edit: December 03, 2006, 08:04:26 pm by jerm »

Offline Voyager

  • Jr. Member
  • **
  • Posts: 19
    • Email
Re: Ads between posts, works great but quick question
« Reply #18 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>'';

Offline g-c

  • Jr. Member
  • **
  • Posts: 33
Re: Ads between posts, works great but quick question
« Reply #19 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:

Thx, Christian

Offline bigguy

  • Support
  • Elite Member
  • *
  • Posts: 1518
    • SMF Helper
Re: Ads between posts, works great but quick question
« Reply #20 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.

Offline g-c

  • Jr. Member
  • **
  • Posts: 33
Re: Ads between posts, works great but quick question
« Reply #21 on: December 03, 2006, 12:32:32 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

Offline bigguy

  • Support
  • Elite Member
  • *
  • Posts: 1518
    • SMF Helper
Re: Ads between posts, works great but quick question
« Reply #22 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.

Offline Voyager

  • Jr. Member
  • **
  • Posts: 19
    • Email
Re: Ads between posts, works great but quick question
« Reply #23 on: December 03, 2006, 01:19:36 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.

Offline g-c

  • Jr. Member
  • **
  • Posts: 33
Re: Ads between posts, works great but quick question
« Reply #24 on: December 03, 2006, 02:24:04 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?

Offline jerm

  • Support
  • Elite Member
  • *
  • Posts: 726
Re: Ads between posts, works great but quick question
« Reply #25 on: December 03, 2006, 08:03:52 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.
Code: [Select]
'</tr></td>'';to
Code: [Select]
'</tr></td>';
not sure why i made that mistake, maybe i was tired.

Offline Voyager

  • Jr. Member
  • **
  • Posts: 19
    • Email
Re: Ads between posts, works great but quick question
« Reply #26 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

Offline Voyager

  • Jr. Member
  • **
  • Posts: 19
    • Email
Re: Ads between posts, works great but quick question
« Reply #27 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. :'(

Offline jerm

  • Support
  • Elite Member
  • *
  • Posts: 726
Re: Ads between posts, works great but quick question
« Reply #28 on: December 04, 2006, 11:56:46 am »
show me the code you are using.

Offline Voyager

  • Jr. Member
  • **
  • Posts: 19
    • Email
Re: Ads between posts, works great but quick question
« Reply #29 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:

Offline jerm

  • Support
  • Elite Member
  • *
  • Posts: 726
Re: Ads between posts, works great but quick question
« Reply #30 on: December 10, 2006, 01:13:42 pm »
Change this:
Code: [Select]
<tr><td>', $adpost['type'] == 0 ? $adpost['content'] : eval($adpost['content']) , '</tr></td>';to:
Code: [Select]
echo '<tr><td>', $adpost['type'] == 0 ? $adpost['content'] : eval($adpost['content']) , '</tr></td>';

Offline Voyager

  • Jr. Member
  • **
  • Posts: 19
    • Email
Re: Ads between posts, works great but quick question
« Reply #31 on: December 10, 2006, 01:28:26 pm »
Works perfect. :)  Thanks for your time with this.

Offline g-c

  • Jr. Member
  • **
  • Posts: 33
Re: Ads between posts, works great but quick question
« Reply #32 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

Offline g-c

  • Jr. Member
  • **
  • Posts: 33
Re: Ads between posts, works great but quick question
« Reply #33 on: December 12, 2006, 07:08:09 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...

Offline g-c

  • Jr. Member
  • **
  • Posts: 33
Re: Ads between posts, works great but quick question
« Reply #34 on: December 30, 2006, 07:57:15 pm »
It seems that nobody wants to help me - very sad!  :( :(

Offline bigguy

  • Support
  • Elite Member
  • *
  • Posts: 1518
    • SMF Helper
Re: Ads between posts, works great but quick question
« Reply #35 on: January 03, 2007, 06:57:34 pm »
Check in the style.css file. I think you can change it in there.

Offline g-c

  • Jr. Member
  • **
  • Posts: 33
Re: Ads between posts, works great but quick question
« Reply #36 on: January 04, 2007, 06:50:38 am »
Check in the style.css file. I think you can change it in there.
thanks!!
For all: it's the class .bordercolor .


Offline g-c

  • Jr. Member
  • **
  • Posts: 33
Re: Ads between posts, works great but quick question
« Reply #37 on: January 12, 2007, 01:01:50 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

 
« Last Edit: June 30, 2007, 05:26:06 am by g-c »

Offline g-c

  • Jr. Member
  • **
  • Posts: 33
Re: Ads between posts, works great but quick question
« Reply #38 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.

Offline bigguy

  • Support
  • Elite Member
  • *
  • Posts: 1518
    • SMF Helper
Re: Ads between posts, works great but quick question
« Reply #39 on: January 12, 2007, 02:09:34 pm »
Glad to hear you got it figured. :)

Offline puchi

  • Newbie
  • *
  • Posts: 2
    • Email
Re: Ads between posts, works great but quick question
« Reply #40 on: January 14, 2007, 04:24:56 am »
Alguien habla un poco de espaņol? Necesito una ayuda urgente con este mod.

Offline g-c

  • Jr. Member
  • **
  • Posts: 33
Re: Ads between posts, works great but quick question
« Reply #41 on: January 14, 2007, 06:31:30 am »
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  :) ;)

Offline Voyager

  • Jr. Member
  • **
  • Posts: 19
    • Email
Re: Ads between posts, works great but quick question
« Reply #42 on: January 15, 2007, 11:58:19 am »
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?

Offline Voyager

  • Jr. Member
  • **
  • Posts: 19
    • Email
Re: Ads between posts, works great but quick question
« Reply #43 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?

Offline Sineksekiz

  • Newbie
  • *
  • Posts: 8
Re: Ads between posts, works great but quick question
« Reply #44 on: June 29, 2007, 10:14:41 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.

Offline g-c

  • Jr. Member
  • **
  • Posts: 33
Re: Ads between posts, works great but quick question
« Reply #45 on: June 30, 2007, 05:27:58 am »
Take a Developer-Extension for your Browser, select something like "outline current element" and then you will see which item has which class....

Regards, Christian

Offline Sineksekiz

  • Newbie
  • *
  • Posts: 8
Re: Ads between posts, works great but quick question
« Reply #46 on: July 01, 2007, 12:59:27 am »
Take a Developer-Extension 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.
« Last Edit: July 01, 2007, 02:03:33 am by Sineksekiz »

Offline bigguy

  • Support
  • Elite Member
  • *
  • Posts: 1518
    • SMF Helper
Re: Ads between posts, works great but quick question
« Reply #47 on: July 06, 2007, 08:18:38 am »
Glad you got it solved. :)

SMF Ads Support Forum

Re: Ads between posts, works great but quick question
« Reply #47 on: July 06, 2007, 08:18:38 am »
.

 

.