• Welcome to Simple Machines Community Forum. Please login or sign up.

Ad Management mod

Started by SMFHacks.com Team, January 30, 2006, 08:41:19 PM

Previous topic - Next topic

vbgamer45

Paid mod allows you to sell advertising spots anybody can buy adspace on your forum for areas that allow.
And has some extra ad locations and allows easy adding of additional ad locations.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

DoiCromoY

I had 1.15 forum with Ad Management 2.3.1 and was working great

Today I've updated forum to 2.0.7 and installed latest Ad Managent 3.2 but after I install it, forum is not working anymore (webpage cannot be displayed error)
Using default theme - curve
I checked and rechecked all the "parse" things 4 times. Couldn't find where I do it wrong and going crazy :D

Here are the files:

Kindred

instead of including all of those files, why don't you just tell us the ACTUAL error that is displayed and/or give the URL?
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

DoiCromoY

The website cannot display the page

  HTTP 500
   
Most likely causes:
•The website is under maintenance.
•The website has a programming error.
   
What you can try:

  Refresh the page. 
  Go back to the previous page. 

More information  More information   

This error (HTTP 500 Internal Server Error) means that the website you are visiting had a server problem which prevented the webpage from displaying.


If I replace index.php with the original one, forum is working and give this error log:



hxxp:www.invatapoker.ro/forum/index.php?action=admin;area=logs;sa=errorlog;desc [nonactive]

8: Undefined index: ads_txt_copyrightremoval

File: /var/www/vhosts/invatapoker.ro/httpdocs/forum/Sources/Admin.php

URL: hxxp:www.invatapoker.ro/forum [nonactive]

Thanks

Kindred

A 500 error is due to server side issues. I am betting it probably has to do with file permissions. Your host: probably does not allow 777 Chmod...
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

luuuciano

Check your errorlog at cpanel, or a file phperrors, or a name like that, on FTP
It will inform you whats going on
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

DoiCromoY

This is the error I get in log


[Tue Apr 29 23:32:27 2014] [error] [client 137.x.x.x] PHP Fatal error:  Cannot redeclare template_main() (previously declared in /var/www/vhosts/invatapoker.ro/httpdocs/forum/Sources/Load.php(2151) : eval()'d code:19) in /var/www/vhosts/invatapoker.ro/httpdocs/forum/Sources/Load.php(2151) : eval()'d code on line 273, referer: hxxp:www.invatapoker.ro/forum/ [nonactive]

Kindred

Which suggests that you have installed a mod twice...

Turn off eval in order to find out where the real error is occurring.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

DoiCromoY

Googled how to do this but in the end I did it.

So now the error looks like this:

PHP Fatal error:  Cannot redeclare template_main() (previously declared in /var/www/vhosts/invatapoker.ro/httpdocs/forum/Themes/default/Ads.template.php:19) in /var/www/vhosts/invatapoker.ro/httpdocs/forum/Themes/default/BoardIndex.template.php on line 273


Kindred

and that would seem to clearly indicate your problem ---   The Ad mod is conflicting with the basic declaration in Boardindex.template.php -- Which seems odd... template_main should only be used in a single template file - I don't think it should be declared/used int he ad template
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

DoiCromoY

Thank you !!!!

Your last post made me realize that I FORGOT to replace the old files. As I said I had SMF 1.x and an older Ad mode. After update I forgot to replace the files and I had the older ads.templates.php and ads.php

Replaced with the correct version and now it';s working.
Fixed and thanks

vbgamer45

Glad you have it working.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

SimianSteam

I'm having a lot of problems trying to get this mod installed. Probably conflicts with other mods I've already got installed, but here it goes:

default/index.template.php:

Find
echo '
<input type="hidden" name="hash_passwrd" value="" />
</form>';
}


Add After
// Begin Ad  management Location - Welcome Area/User Information Box

if (function_exists("show_welcomeAds"))
{
$ads = show_welcomeAds();
if(!empty($ads))
{
echo '<td class="windowbg2">';
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
echo '</td>';
}
unset($ads);
}

// End Ad  management Location - Welcome Area/User Information Box



I don't have the first code in any form in my php file.

core/boardindex.template.php

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


Add 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>';


I don't have the first code in any form in my php file.

core/message.index.php

Find
echo '
</tbody>
</table>
</div>
</div>';


Replace with
echo '
</tbody>
</table>
</div>
</div>';
//Display Ads on the Message index
if (function_exists("show_underchildren"))
{
$ads = show_underchildren();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}


I've got this instead of the first code:
echo '
</tbody>
</table>
</div>
<a id="bot"></a>';


(customtheme)/index.template.php

Find
echo '
<input type="hidden" name="hash_passwrd" value="" />
</form>';
}


Add after
// Begin Ad  management Location - Welcome Area/User Information Box

if (function_exists("show_welcomeAds"))
{
$ads = show_welcomeAds();
if(!empty($ads))
{
echo '<td class="windowbg2">';
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
echo '</td>';
}
unset($ads);
}

// End Ad  management Location - Welcome Area/User Information Box



I don't have anything resembling the first code in my php file.

I've attached the relevant php files. Please help!

margarett

Forget Core. It's really too different.

What happened to your default's index.template.php? Where's all the header? :)

You can install even with errors. You will loose Ads in the "welcome user" area but you don't have it already, so who cares? :P
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

SimianSteam

Quote from: margarett on May 19, 2014, 07:36:32 PM
Forget Core. It's really too different.

What happened to your default's index.template.php? Where's all the header? :)

You can install even with errors. You will loose Ads in the "welcome user" area but you don't have it already, so who cares? :P

I hacked it up to build my custom theme and probably did it wrong. I'm encountering problems already. I should've just asked someone how to make everything above the menu bar not show instead of cutting it out. Newb mistake.

Thank you!

webewitch

I cannot get the boards part to work correctly.

If I put 0 then it works on the index page.
If I leave blank it works on all pages.
So far, so good.

But if I put 0,44 or just 44 it won't display on board 44.
Am I doing something wrong?


SimianSteam

I could use some help centering my ads, please. Here's what I've currently got:

<script type="text/javascript">var p="http",d="static";if(document.location.protocol=="https:"){p+="s";d="engine";}var z=document.createElement("script");z.type="text/javascript";z.async=true;z.src=p+"://"+d+".xxxxxxxx.com/ados.js";var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(z,s);</script>
<script type="text/javascript">
var ados = ados || {};
ados.run = ados.run || [];
ados.run.push(function() {
ados_add_placement(3786, 60610, "xxxxxxx", 4).setZone(67244);
ados_setDomain('engine.xxxxxxxx.com');
ados_load();
});</script>
<center>
<div id="xxxxxxx">
</center>


Unfortunately this seems to be causing issues with some IE users. I'm sure the ,<center> tags are not the proper way to do it, but it worked. At least I thought it did.

vbgamer45

June 01, 2014, 11:46:43 AM #7257 Last Edit: June 01, 2014, 12:45:03 PM by vbgamer45
missing open center tag see it there normally you would put the center tag around the entire javascript as well.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

luuuciano

Quote from: SimianSteam on June 01, 2014, 10:40:03 AM
Unfortunately this seems to be causing issues with some IE users. I'm sure the ,<center> tags are not the proper way to do it, but it worked. At least I thought it did.

Try <div id="xxxxxxx" style="text-align:center;"> etc
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

SimianSteam

@vbgamer: Open Center Tag?

@luuuciano: Nope. Using that causes the entire forum to disappear. You only see the ad.

Advertisement: