News:

Version 3.5 has been released. Visit https://custom.simplemachines.org/mods/index.php?mod=255 to get the most up to date version.

Main Menu
Coinbase

Edits for ad_mod_rc2_v2 for themes other than default

Started by bigguy, June 20, 2006, 08:26:59 AM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

ziya

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.

thelaw

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 ;)

thelaw

 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: ?>

thelaw

#228
 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:

</td></tr>';
}


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

</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 ....

jerm

I believe you need to take this off
</td></tr>';
       }


The one at the top of the code you pasted.

thelaw

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?

bigguy

Jerm is right this part of the code gets replaced, it should not be there:

</td></tr>';
       }

underdog

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!!!!!

bigguy

Can you post the 4 template files here and I will take a look.


bigguy

I couldn't find a place for the welcome ads so I hope they show in the right place but this file should work.

underdog

thx but I see that the other php files wernt there so I try again

thx again

bigguy

Did that one work. I will have to get to this tomorrow as it's late here.

thelaw

Ok...
removing the <td><tr>; } would cause me this error
QuoteTemplate 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
QuoteTemplate 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.

Abby

Thank you for posting this excellent 'how to'.  It was easy to understand and worked like a dream!