News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Ad Management mod

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

Previous topic - Next topic

pixel375

Quote from: vbgamer45 on July 03, 2016, 10:16:02 AM
How did you install it?

The same way you install any package, by using the package downloader/manager.
I got it off by deleting everything and redownloading all the files and themes. But still no success with the package.

vbgamer45

That is strange to get that.
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

pixel375


badon

I'm trying to figure out what the relationship is between Ad Management and Ad Seller Pro, but there are no screenshots for Ad Management, and the examples for Ad Seller Pro are all a broken mess:

http://www.smfads.com/forums/index.php?topic=48.0

I suspect Ad Seller Pro is based on Ad Management, so bug fixes etc for Ad Managment would also be applied to Ad Seller Pro. However, Ad Management isn't mentioned anywhere on Ad Seller Pro's webpage:

http://www.smfhacks.com/ad-seller-pro.php

It appears there's no feature comparison either, which would be expected if they shared code.

The reason why I'm interested in this relationship between the two (if it exists) is because I'm hoping for upgrade/downgrade compatibility, and I'm hoping the more-tested Ad Management mod benefits the far less tested Ad Seller Pro.

vbgamer45

There is no shared code between ad management and adseller pro. i started adseller pro then later acquired ad management.
There is no ad transfer/upgrade to adseller pro. Ads would need to be remade.
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

badon

Yikes! I didn't expect that answer. So now I have to ask, which is better? :)

vbgamer45

It depends. I am updating AdSeller Pro still. If you want to sell ads or have others buy ads or revenue sharing adseller pro is the way to go.
It has more built in ad locations options and has the option to expand to add your own custom ad locations in SMF or even outside of SMF on a website.
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

badon

My #1 priority is reliability. I don't need the features of Ad Seller Pro (yet). It sounds like my best course of action is to go with the one that is the most tested, which is this one, Ad Management. Thanks for the help!

vbgamer45

They are both reliable they both do the same tasks showing ads.
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

badon

I had an installation failure in MessageIndex.template.php. I have attached screenshots and my MessageIndex.template.php file. I also copy-pasted the error details, and my list of installed mods.

Code: (Find) [Select]

global $context, $settings, $options, $scripturl, $modSettings, $txt;


Code: (Add After) [Select]

//Display Ads on the Message index
if (function_exists("show_threadindexAds"))
{
$ads = show_threadindexAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}


List of installed packages:

1.   Move Topic Default: No Redirection Post   1.0
2.   AdditionalMembergroups   1.04
3.   Add And Remove Buttons   0.4
4.   Ultimate Menu   1.0
5.   Google Analytics Code   1.5.1
6.   Simple Audio Video Embedder   3.6.2
7.   SMF 2.0.11 Update   1.0
8.   SMF 1.1.21 / 2.0.10 Update   1.0
9.   SMF 1.1.20 / 2.0.9 Update   1.0
10.   SMF 2.0.8 Update   1.0
11.   SMF 2.0.7 Update   1.0
12.   SMF 1.1.19 / 2.0.6 Update   1.0
13.   Google Translate for SMF 2.0   1.4
14.   Users Online Today   2.0.3
15.   SMF 2.0.5 Update   1.0
16.   SMF 2.0.4 Update   1.0
17.   Customize *Child Board*   2.7
18.   Stop Spammer   2.3.9
19.   SMF 2.0.3 Update   1.0

On line 15 of my MessageIndex.template.php file, I found this code that resembles the code Ad Management was attempting to change:


global $context, $settings, $options, $scripturl, $modSettings, $txt, $sourcedir;


There are no other lines in the file that are similar, so I think I've found the problem. I'm not sure which mod added $sourcedir, but I'm guessing it should be straightforward for Ad Management to fall back to finding the above line instead, to become compatible with the other mod.

I'm not sure how SMF tracks a sequence of changes like this so the mods could be uninstalled in any order without errors. I would appreciate it if you would point me in the right direction to learn more about how this situation is supposed to be handled, so maybe in the future I can fix the bugs I find instead of merely reporting them. Let me know if you need more information. Thanks in advance!

badon

Quote from: badon on August 10, 2016, 04:39:04 PM
I had an installation failure in MessageIndex.template.php. I have attached screenshots and my MessageIndex.template.php file. I also copy-pasted the error details, and my list of installed mods.

Code: (Find) [Select]

global $context, $settings, $options, $scripturl, $modSettings, $txt;


Code: (Add After) [Select]

//Display Ads on the Message index
if (function_exists("show_threadindexAds"))
{
$ads = show_threadindexAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}


Correct me if I'm wrong, but I don't think Ad Management is actually changing the line it's searching for. It just needs to find its position, so new code can be inserted after it. If so, then it looks to me that the fix is really easy. Instead of searching for this line:


global $context, $settings, $options, $scripturl, $modSettings, $txt;


Search for this line:


global $context, $settings, $options, $scripturl, $modSettings, $txt


Then the Ad Management code can be inserted after the line, without any further concerns, because it will match my actual line:


global $context, $settings, $options, $scripturl, $modSettings, $txt, $sourcedir;

vbgamer45

Yes that is the case. It is just adding code after that line.
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

badon

OK, so how do we go about fixing this bug in the package?

vbgamer45

It can't fix if the template is different than default or is modified by other mods.
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

Kindred

It is not a bug in the package.

The mod installs correctly under the default SMF theme. Any custom themes which use different coding or mods which ave changed the target code may require you to MANUALLY apply that section of edit.
Слaва
Украинi

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

Soulmaster

I've got the VVIDE Theme on my board and in index.template.php i'm missing

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

Is there a solution to fix this?
check out my lightning site

vbgamer45

Compare it to the default theme and put the code in a similiar spot around the same area.
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

PenelopeQ

My webhost just migrated my account to a new server and this initially caused a database error. The host has provided what they say is a temporary fix.I  am going to paste the error message and then my hosts' explanation below.
Quote from: error messageOut of range value for column 'HITS' at row 1
File: /home/rollerco/public_html/mlcforum/Sources/LoadAds.php
Line: 301

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.11, while your database is at version 2.0.1. The above error might possibly go away if you execute the latest version of upgrade.php.
Quote from: cyberlynk support responseI believe that you are running an add-on to SMF to show adds.  Within the SMF database there is a column (a place where data is stored) called "HITS".  This counts the HITS/clicks (I believe) on the ad.  Each column is in the database has what is called a "data type".  This basically tells the database what kind of data is being stored (a date, a number, characters etc).  The mod developer choose the type "mediumint". (a medium sized integer or whole number).  The maximum value that this can store is 8388607.

On the old server we were running MySQL 5.5.  The new server is running MySQL 5.6.  In 5.5 MySQL (the database server) seems to have just ignore if you exceeded the capacity of the mediumint.  In 5.6 it's giving the 'Out of range' error.

If it's OK, the simplest solution (short term) to get you going is to simply site the "HITS" column back to zero for the ads that have hit the limit of 8388607.
Is there a more permanent solution to this problem in the newest version of the mod and if so, do I just install and it will overwrite the old--or how do I upgrade?
If not, is there some other permanent solution?

As for the upgrade.php, that may be another issue for the main SMF support board; when I tried to go to the file I got a website not found 404 error.

vbgamer45

Try running this command on your database to fix the issue

alter table smf_ads HITS HITS BIGINT NOT NULL default '0';
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

PenelopeQ

Quote from: vbgamer45 on August 29, 2016, 06:16:03 PM
Try running this command on your database to fix the issue

alter table smf_ads HITS HITS BIGINT NOT NULL default '0';

Okay um...sorry to be dense, but how do I run a command on my database?

Advertisement: