Banners on Ads Page

How an I insert banners on my ads page? I have seen on other sites where there are banners in both the Latest Featured Ads block as well as the All Ads block.

Quote · 20 Feb 2011

To put something in those blocks, you would need to modify the code that generates the main ad page.

modules\boonex\ads\classes\BxAdsModule.php

The function that generates the page for d7.0.5 is called getAdsMainPage() from lines 2065-2103

https://www.deanbassett.com
Quote · 20 Feb 2011

Ok, thanks for that info. But isn't there some simpler method for a non programmer to use? I don't want to mess around with the code.

Quote · 20 Feb 2011

No there is not. The main ads page is not in the page builders so it has to be modified by hand.

I have just posted a full tutorial here.

http://www.boonex.com/unity/forums/#topic/Making-changes-to-the-dolphin-main-ads-page-.htm

https://www.deanbassett.com
Quote · 20 Feb 2011

Wow! That's more than I expected. I'll study your tutorial and apply it as I can. I appreciate your effort. thanks!

Quote · 20 Feb 2011
I made some of the changes you described. but I'm still a little confused. I can see the "My content here" on my Ads page, but how do I actually add the content? Should I be placing my ad info directly into the BoxAdsModule.php file in place of the "My content here"?
Quote · 21 Feb 2011

 

I made some of the changes you described. but I'm still a little confused. I can see the "My content here" on my Ads page, but how do I actually add the content? Should I be placing my ad info directly into the BoxAdsModule.php file in place of the "My content here"?

Correct. You need to replace the words My Content here with what you actually want there.


https://www.deanbassett.com
Quote · 21 Feb 2011
I tried that and got this error - Parse error: syntax error, unexpected T_NEW in /home/sunwest/public_html/whatsonyourmind.us/modules/boonex/ads/classes/BxAdsModule.php on line 2084
Quote · 21 Feb 2011

You will need to post your code so i can see whats wrong.




https://www.deanbassett.com
Quote · 21 Feb 2011

Here's the section of code that I changed -

 

$sTopAdOfAllDayValue = $oTmpAdsSearch->displayResultBlock();
$sTopAdOfAllDayValue = ($oTmpAdsSearch->aCurrent['paginate']['totalNum'] == 0) ? MsgBox(_t('_Empty')) : $sTopAdOfAllDayValue;
$sTopAdOfAllDayValue = '<div style="padding:9px;text-align:center;"><a target='new' href="http://click.linksynergy.com/fs-bin/click?id=ACGAoBc2QOk&offerid=173444.10000231&type=4&subid=0"><IMG alt="Smarthome, Inc." border="0" src="http://www.smarthome.com/lsbanners/468x60standard3.gif"></a><IMG border="0" width="1" height="1" src="http://ad.linksynergy.com/fs-bin/show?id=ACGAoBc2QOk&bids=173444.10000231&type=4&subid=0"></div>' . $sTopAdOfAllDayValue;
$sTopAdOfAllDaySection = DesignBoxContent(_t('_bx_ads_last_featured'), $sTopAdOfAllDayValue, 1);

Quote · 21 Feb 2011

 

Here's the section of code that I changed -

 

$sTopAdOfAllDayValue = $oTmpAdsSearch->displayResultBlock();
$sTopAdOfAllDayValue = ($oTmpAdsSearch->aCurrent['paginate']['totalNum'] == 0) ? MsgBox(_t('_Empty')) : $sTopAdOfAllDayValue;
$sTopAdOfAllDayValue = '<div style="padding:9px;text-align:center;"><a target='new' href="http://click.linksynergy.com/fs-bin/click?id=ACGAoBc2QOk&offerid=173444.10000231&type=4&subid=0"><IMG alt="Smarthome, Inc." border="0" src="http://www.smarthome.com/lsbanners/468x60standard3.gif"></a><IMG border="0" width="1" height="1" src="http://ad.linksynergy.com/fs-bin/show?id=ACGAoBc2QOk&bids=173444.10000231&type=4&subid=0"></div>' . $sTopAdOfAllDayValue;
$sTopAdOfAllDaySection = DesignBoxContent(_t('_bx_ads_last_featured'), $sTopAdOfAllDayValue, 1);

Start with this correction first.

Here's the section of code that I changed I changed the singled quotes in <a target='new' with double quotes. See if this change works.

 

$sTopAdOfAllDayValue = $oTmpAdsSearch->displayResultBlock();
$sTopAdOfAllDayValue = ($oTmpAdsSearch->aCurrent['paginate']['totalNum'] == 0) ? MsgBox(_t('_Empty')) : $sTopAdOfAllDayValue;
$sTopAdOfAllDayValue = '<div style="padding:9px;text-align:center;"><a target="new" href="http://click.linksynergy.com/fs-bin/click?id=ACGAoBc2QOk&offerid=173444.10000231&type=4&subid=0"><IMG alt="Smarthome, Inc." border="0" src="http://www.smarthome.com/lsbanners/468x60standard3.gif"></a><IMG border="0" width="1" height="1" src="http://ad.linksynergy.com/fs-bin/show?id=ACGAoBc2QOk&bids=173444.10000231&type=4&subid=0"></div>' . $sTopAdOfAllDayValue;
$sTopAdOfAllDaySection = DesignBoxContent(_t('_bx_ads_last_featured'), $sTopAdOfAllDayValue, 1);

https://www.deanbassett.com
Quote · 21 Feb 2011

Yes, that did it! It came out exactly right. Any idea on how to remove the box there that says "Empty"

 

I really appreciate your help here. The site documentation is very weak.

Quote · 21 Feb 2011

You don't want to remove that. That just means there are no member ads. When your members post ads, then their ads will be listed instead.

You may want to actually place some ads and make a couple of those featured so you will see what those boxes will actually look like when members start placing ads so you can see if you actually want to place your banner there.





https://www.deanbassett.com
Quote · 21 Feb 2011

OK - I understand now. I really appreciate all your help.

Quote · 21 Feb 2011
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.