Coinbase

Author Topic: Edits for ad_mod_rc2_v2 for themes other than default  (Read 157718 times)

0 Members and 1 Guest are viewing this topic.

Offline ziya

  • Newbie
  • *
  • Posts: 1
Re: Edits for ad_mod_rc2_v2 for themes other than default
« Reply #225 on: January 01, 2007, 04:51:50 am »
Hi Bigguy,
Happy New Year,
I had a problem
I am using Juno theme designed by Bloc.
My ads which are below the menu are displaced from center but the lower down ads are at an exact center.
Please check  it here.....

www.stockbazaar.co.in/forum

please suggest me.

Offline thelaw

  • Jr. Member
  • **
  • Posts: 14
    • Single Forums Chat for Singles
Re: Edits for ad_mod_rc2_v2 for themes other than default
« Reply #226 on: January 02, 2007, 06:29:08 pm »
EM...now this mind sound a little embarrassing for me... but since with the older version of SMF i did not had to make any of the edits to make Ads Manager work with Epsilon theme...after the update i also did not made any changes to the theme.

With the previous version of SMF i only changed some file names of the theme and everything worked, i.e. i did not edit any code... so, i guess I will have to edit some code this time ;) .... but as far as i remember (can't get back and look in the thread at this moment, but i will once i post this) there was a part/code/line that i was not able to find in the Epsilon theme, that's why and you adviced me then to make the file name changes and everything worked.

I will try now to make the necessary changes of the code and see if it will work.


Thank you bigguy ;)

Offline thelaw

  • Jr. Member
  • **
  • Posts: 14
    • Single Forums Chat for Singles
Re: Edits for ad_mod_rc2_v2 for themes other than default
« Reply #227 on: January 02, 2007, 06:46:30 pm »
 damn, i just lost bigguy for few seconds...he was here a minute ago :/...

Anyway, i made the changes as posted in the beginning of this thread... i am getting error on Display.template.php file...this is the error i get

Quote
There was a problem loading the /Themes/epsilon11rc2/Display.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...

Parse error: syntax error, unexpected $end in .../Themes/epsilon11rc2/Display.template.php on line 787

And on line 787 of Display.template.php Is the next (787: is the line number)

Quote
787: ?>

Offline thelaw

  • Jr. Member
  • **
  • Posts: 14
    • Single Forums Chat for Singles
Re: Edits for ad_mod_rc2_v2 for themes other than default
« Reply #228 on: January 06, 2007, 04:39:14 pm »
 Fixed the problem. It was all sitting in this code
The </td></tr>'; } was replaced, but the } was missing in the replaced code. So just by adding } made everything work.

Ty ty

In "Display.template.php" FIND:

In the same file find:

Code: [Select]
</td></tr>';
}

And REPLACE with: (fixed/edited/added the missing } )

Code: [Select]
</td></tr>';
       }
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>';
}

}

New problem, heh, people can't view their posts. You can view the thread, see that there is a post...but, once you get inside the topic you are not able to see the post, all i see is the Ads....this thing is frustrating me ....
« Last Edit: January 07, 2007, 06:55:01 pm by thelaw »

Offline jerm

  • Support
  • Elite Member
  • *
  • Posts: 726
Re: Edits for ad_mod_rc2_v2 for themes other than default
« Reply #229 on: January 08, 2007, 01:46:59 am »
I believe you need to take this off
Code: [Select]
</td></tr>';
       }

The one at the top of the code you pasted.

Offline thelaw

  • Jr. Member
  • **
  • Posts: 14
    • Single Forums Chat for Singles
Re: Edits for ad_mod_rc2_v2 for themes other than default
« Reply #230 on: January 08, 2007, 02:51:05 am »
Unfortunately if i remove that it kills the forum when i try to read a post.

Would you guys mind if i paste the whole Display.index.php code file here?

Offline bigguy

  • Support
  • Elite Member
  • *
  • Posts: 1518
    • SMF Helper
Re: Edits for ad_mod_rc2_v2 for themes other than default
« Reply #231 on: January 08, 2007, 12:08:47 pm »
Jerm is right this part of the code gets replaced, it should not be there:

Code: [Select]
</td></tr>';
       }

Offline underdog

  • Newbie
  • *
  • Posts: 6
    • Email
Re: Edits for ad_mod_rc2_v2 for themes other than default
« Reply #232 on: January 08, 2007, 12:46:58 pm »
Well first thx for the explonation how to change the ad-mod. I'm looking for so long and I hope that it will work.
U said to look for template_menu. Well I use PHP designer 2007 and search for it but I can't find it!!! Do I have to put it then by my self and if it is where do I've to put it? I use pdx-dk06 theme
Thx man!!!!!

Offline bigguy

  • Support
  • Elite Member
  • *
  • Posts: 1518
    • SMF Helper
Re: Edits for ad_mod_rc2_v2 for themes other than default
« Reply #233 on: January 08, 2007, 01:09:20 pm »
Can you post the 4 template files here and I will take a look.

Offline underdog

  • Newbie
  • *
  • Posts: 6
    • Email
Re: Edits for ad_mod_rc2_v2 for themes other than default
« Reply #234 on: January 08, 2007, 01:48:08 pm »
Ok I put theme as attach

thx  ::)

Offline bigguy

  • Support
  • Elite Member
  • *
  • Posts: 1518
    • SMF Helper
Re: Edits for ad_mod_rc2_v2 for themes other than default
« Reply #235 on: January 08, 2007, 03:07:29 pm »
I couldn't find a place for the welcome ads so I hope they show in the right place but this file should work.

Offline underdog

  • Newbie
  • *
  • Posts: 6
    • Email
Re: Edits for ad_mod_rc2_v2 for themes other than default
« Reply #236 on: January 08, 2007, 11:45:06 pm »
thx but I see that the other php files wernt there so I try again

thx again

Offline bigguy

  • Support
  • Elite Member
  • *
  • Posts: 1518
    • SMF Helper
Re: Edits for ad_mod_rc2_v2 for themes other than default
« Reply #237 on: January 09, 2007, 01:19:51 am »
Did that one work. I will have to get to this tomorrow as it's late here.

Offline thelaw

  • Jr. Member
  • **
  • Posts: 14
    • Single Forums Chat for Singles
Re: Edits for ad_mod_rc2_v2 for themes other than default
« Reply #238 on: January 09, 2007, 09:02:57 am »
Ok...
removing the <td><tr>; } would cause me this error
Quote
Template Parse Error!
There was a problem loading the /Themes/epsilon11rc2/Display.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 '>' in .../Themes/epsilon11rc2/Display.template.php on line 543

Using the code as it is replaced the <td><tr>; } (i.e. without the } ) is causing me this error
Quote
Template Parse Error!
There was a problem loading the /Themes/epsilon11rc2/Display.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 in .../Themes/epsilon11rc2/Display.template.php on line 788

And on line 788 you will find ?> .... heh

.. So far i have kept SMF Default theme since Epsilon didn't worked. But to let you all have a better view of the error i will leave it on Epsilon theme. To view the error try to read one of the topics.

Offline Abby

  • Newbie
  • *
  • Posts: 5
    • Email
Re: Edits for ad_mod_rc2_v2 for themes other than default
« Reply #239 on: January 09, 2007, 11:44:51 am »
Thank you for posting this excellent 'how to'.  It was easy to understand and worked like a dream!

SMF Ads Support Forum

Re: Edits for ad_mod_rc2_v2 for themes other than default
« Reply #239 on: January 09, 2007, 11:44:51 am »
.