The main ads page is not in the dolphin page builders. Many have asked how to modify this page. This tutorial will show you how to modify various sections. Each code change in this tutorial will be done one at a time with a screen shot of the effect the change has. You can than apply what changes you prefer to your ads page.
Change 1) This code change will allow you to insert a div containing anything you want to the top of the All Ads block in the left hand column.
Open modules\boonex\ads\classes\BxAdsModule.php and go to line 1939
Look for the following.
$sLastAdsSection = DesignBoxContent($sCaption, $sLastAds, 1);
return $sLastAdsSection;
}
Modify to look like this. Adding the line in red.
$sLastAds = '<div style="padding:9px;text-align:center;">My content here</div>' . $sLastAds;
$sLastAdsSection = DesignBoxContent($sCaption, $sLastAds, 1);
return $sLastAdsSection;
}
The result will be this.
Change 2) This is similar to the the first except it places the new content at the bottom of the All Ads block.
Open modules\boonex\ads\classes\BxAdsModule.php and go to line 1939
Look for the following.
$sLastAdsSection = DesignBoxContent($sCaption, $sLastAds, 1);
return $sLastAdsSection;
}
Modify to look like this. Adding the line in red.
$sLastAds .= '<div style="padding:9px;text-align:center;">My content here</div>';
$sLastAdsSection = DesignBoxContent($sCaption, $sLastAds, 1);
return $sLastAdsSection;
}
The result will be this.
Change 3) This code change will allow you to insert a div containing anything you want to the top of the Latest Featured Ad block in the right hand column.
Open modules\boonex\ads\classes\BxAdsModule.php and go to line 2083
Look for the following.
$sTopAdOfAllDaySection = DesignBoxContent(_t('_bx_ads_last_featured'), $sTopAdOfAllDayValue, 1);
$sCategoriesSection = $this->genCategoriesBlock();
return <<<EOF
Modify to look like this. Adding the line in red.
$sTopAdOfAllDayValue = '<div style="padding:9px;text-align:center;">My content here</div>' . $sTopAdOfAllDayValue;
$sTopAdOfAllDaySection = DesignBoxContent(_t('_bx_ads_last_featured'), $sTopAdOfAllDayValue, 1);
$sCategoriesSection = $this->genCategoriesBlock();
return <<<EOF
The result will be this.
Change 4) This is similar change 3 except it places the new content at the bottom of the Latest Featured Ad block.
Open modules\boonex\ads\classes\BxAdsModule.php and go to line 2083
$sTopAdOfAllDaySection = DesignBoxContent(_t('_bx_ads_last_featured'), $sTopAdOfAllDayValue, 1);
$sCategoriesSection = $this->genCategoriesBlock();
return <<<EOF
Modify to look like this. Adding the line in red.
$sTopAdOfAllDayValue .= '<div style="padding:9px;text-align:center;">My content here</div>';
$sTopAdOfAllDaySection = DesignBoxContent(_t('_bx_ads_last_featured'), $sTopAdOfAllDayValue, 1);
$sCategoriesSection = $this->genCategoriesBlock();
return <<<EOF
The result will be this.
Change 5) This code change will allow you to insert a div containing anything you want to the top of the Categories block in the right hand column.
Open modules\boonex\ads\classes\BxAdsModule.php and go to line 2057
Look for the following.
return DesignBoxContent(_t('_bx_ads_Categories'), $sCategoriesBlocks, 1);
}
Modify to look like this. Adding the line in red.
$sCategoriesBlocks = '<div style="padding:9px;text-align:center;">My content here</div>' . $sCategoriesBlocks;
return DesignBoxContent(_t('_bx_ads_Categories'), $sCategoriesBlocks, 1);
}
The result will be this.
Change 6) This is similar to change 5 except it places the new content at the bottom of the Categories block in the right hand column.
Open modules\boonex\ads\classes\BxAdsModule.php and go to line 2057
Look for the following.
return DesignBoxContent(_t('_bx_ads_Categories'), $sCategoriesBlocks, 1);
}
Modify to look like this. Adding the line in red.
$sCategoriesBlocks .= '<div style="padding:9px;text-align:center;">My content here</div>';
return DesignBoxContent(_t('_bx_ads_Categories'), $sCategoriesBlocks, 1);
}
The result will be this.
This ends samples of placing content inside the existing blocks.
Now i will show you how to add additional blocks to the columns.
Change 7) This one will show you how to add a new block above or below the existing block in the left column.
Open modules\boonex\ads\classes\BxAdsModule.php and go to line 2083
Look for the following.
$sTopAdOfAllDaySection = DesignBoxContent(_t('_bx_ads_last_featured'), $sTopAdOfAllDayValue, 1);
$sCategoriesSection = $this->genCategoriesBlock();
return <<<EOF
Just above that, add this.
$MyNewBlockContent = '<div style="padding:9px;text-align:center;">My content here</div>';
$MyNewBlock = DesignBoxContent(_t('_MyNewLanguageKey'), $MyNewBlockContent, 1);
Now move down to line 2088
Look for this.
<div id="page_column_1" class="page_column page_column_first" style="width: 34%;">
<div class="page_block_container">
{$sLastAdsSection}
</div>
</div>
Insert the new line in red.
<div id="page_column_1" class="page_column page_column_first" style="width: 34%;">
<div class="page_block_container">
{$MyNewBlock}
</div>
<div class="page_block_container">
{$sLastAdsSection}
</div>
</div>
The result will be this.
If you want the block under the existing block instead of on top, then just change this.
<div id="page_column_1" class="page_column page_column_first" style="width: 34%;">
<div class="page_block_container">
{$MyNewBlock}
</div>
<div class="page_block_container">
{$sLastAdsSection}
</div>
</div>
To This
<div id="page_column_1" class="page_column page_column_first" style="width: 34%;">
<div class="page_block_container">
{$sLastAdsSection}
</div>
<div class="page_block_container">
{$MyNewBlock}
</div>
</div>
To put the new block in the right column instead of the left or to add it to the right as well then look for this.
<div id="page_column_2" class="page_column page_column_last" style="width: 66%;">
<div class="page_block_container">
{$sTopAdOfAllDaySection}
</div>
<div class="page_block_container">
{$sCategoriesSection}
</div>
</div>
And add the lines in red.
<div id="page_column_2" class="page_column page_column_last" style="width: 66%;">
<div class="page_block_container">
{$MyNewBlock}
</div>
<div class="page_block_container">
{$sTopAdOfAllDaySection}
</div>
<div class="page_block_container">
{$sCategoriesSection}
</div>
</div>
Or at the bottom of the column
<div id="page_column_2" class="page_column page_column_last" style="width: 66%;">
<div class="page_block_container">
{$sTopAdOfAllDaySection}
</div>
<div class="page_block_container">
{$sCategoriesSection}
</div>
<div class="page_block_container">
{$MyNewBlock}
</div>
</div>
You can also add a full width block that spans both columns by doing this.
Change the following.
return <<<EOF
<div id="page_column_1" class="page_column page_column_first" style="width: 34%;">
<div class="page_block_container">
{$sLastAdsSection}
</div>
</div>
<div id="page_column_2" class="page_column page_column_last" style="width: 66%;">
<div class="page_block_container">
{$sTopAdOfAllDaySection}
</div>
<div class="page_block_container">
{$sCategoriesSection}
</div>
</div>
<div class="clear_both"></div>
EOF;
}
To this. Add the lines in red.
return <<<EOF
<div class="page_column" style="width: 100%;">
{$MyNewBlock}
</div>
<div class="clear_both"></div>
<div id="page_column_1" class="page_column page_column_first" style="width: 34%;">
<div class="page_block_container">
{$sLastAdsSection}
</div>
</div>
<div id="page_column_2" class="page_column page_column_last" style="width: 66%;">
<div class="page_block_container">
{$sTopAdOfAllDaySection}
</div>
<div class="page_block_container">
{$sCategoriesSection}
</div>
</div>
<div class="clear_both"></div>
EOF;
}
The result will be this.
Or to put the full width row on the bottom of the page. Then do this.
Change the following.
return <<<EOF
<div id="page_column_1" class="page_column page_column_first" style="width: 34%;">
<div class="page_block_container">
{$sLastAdsSection}
</div>
</div>
<div id="page_column_2" class="page_column page_column_last" style="width: 66%;">
<div class="page_block_container">
{$sTopAdOfAllDaySection}
</div>
<div class="page_block_container">
{$sCategoriesSection}
</div>
</div>
<div class="clear_both"></div>
EOF;
}
To this. Add the lines in red.
return <<<EOF
<div id="page_column_1" class="page_column page_column_first" style="width: 34%;">
<div class="page_block_container">
{$sLastAdsSection}
</div>
</div>
<div id="page_column_2" class="page_column page_column_last" style="width: 66%;">
<div class="page_block_container">
{$sTopAdOfAllDaySection}
</div>
<div class="page_block_container">
{$sCategoriesSection}
</div>
</div>
<div class="clear_both"></div>
<div class="page_column" style="width: 100%;">
{$MyNewBlock}
</div>
<div class="clear_both"></div>
EOF;
}
Thats it. You should now have a pretty good idea of what can be done with the main ads page.