i would like to add this page block with functioning links from the ads module to my index page can anyone help me or guide me in doing so?
i would like to add this page block with functioning links from the ads module to my index page can anyone help me or guide me in doing so? |
Does no answer mean that it can not be done? |
Hello It can be done, but you need to do a custom modification in PHP code of Ads module. You'll need to create a service method in modules/boonex/ads/classes/BxAdsModule.php file which will return the block with categories. It should look like the following.
function serviceGetAdsCategories() {
Then you need to create a block for index page which will call this service method. MySQL query should look like the following
INSERT INTO `sys_page_compose` (`Page`, `PageWidth`, `Desc`, `Caption`, `Column`, `Order`, `Func`, `Content`, `DesignBox`, `ColWidth`, `Visible`, `MinWidth`) VALUES
Then move the block in necessary position via admin panel -> builders -> pages builder -> homepage. That's all. I think it should work :)
Best Regards AntonLV - http://www.boonex.com/market/posts/AntonLV |
When running the sql query i got the following error
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ads', 'get_ads_categories');', 1, 71.9, 'non,memb', 0)' at line 2 |
i manually created the page block in the MySql but when i moved the block into position with page builder nothing shows up on the index page after clearing the cache |
Try this INSERT INTO `sys_page_compose` (`Page`, `PageWidth`, `Desc`, `Caption`, `Column`, `Order`, `Func`, `Content`, `DesignBox`, `ColWidth`, `Visible`, `MinWidth`) VALUES ('index', '1140px', 'Show Ads Categories', '_bx_ads_Categories', 1, 0, 'PHP', 'return BxDolService::call(''ads'', ''get_ads_categories'');', 1, 71.9, 'non,memb', 0); Good luck so much to do.... |
Try this INSERT INTO `sys_page_compose` (`Page`, `PageWidth`, `Desc`, `Caption`, `Column`, `Order`, `Func`, `Content`, `DesignBox`, `ColWidth`, `Visible`, `MinWidth`) VALUES ('index', '1140px', 'Show Ads Categories', '_bx_ads_Categories', 1, 0, 'PHP', 'return BxDolService::call(''ads'', ''get_ads_categories'');', 1, 71.9, 'non,memb', 0); Good luck
Error
SQL query:
< p class = "code" > INSERT INTO `sys_page_compose` ( `Page` , `PageWidth` , `Desc` , `Caption` , `Column` , `Order` , `Func` , `Content` , `DesignBox` , `ColWidth` , `Visible` , `MinWidth` )
|
Hello The problem appears because you are copping MySQL query with unnecessary HTML tags at the beginning < p class = "code" > The query shoul start with INSERT and with ; Best Regards AntonLV - http://www.boonex.com/market/posts/AntonLV |
i have tried it with and with out the p class code and same result- i was able to set the sql table up but the box does not show on the index page |
any other idea's to make this work?> |
Use Prashanks method! INSERT INTO `sys_page_compose` (`Page`, `PageWidth`, `Desc`, `Caption`, `Column`, `Order`, `Func`, `Content`, `DesignBox`, `ColWidth`, `Visible`, `MinWidth`) VALUES ('index', '1140px', 'Show Ads Categories', '_bx_ads_Categories', 1, 0, 'PHP', 'return BxDolService::call(''ads'', ''get_ads_categories'');', 1, 71.9, 'non,memb', 0); I couldn't get Alex's to work. After that this mod worked perfect for me. ManOfTeal.COM a Proud UNA site, six years running strong! |
it created the block in page builders but it still does not show up on the index page Use Prashanks method! INSERT INTO `sys_page_compose` (`Page`, `PageWidth`, `Desc`, `Caption`, `Column`, `Order`, `Func`, `Content`, `DesignBox`, `ColWidth`, `Visible`, `MinWidth`) VALUES ('index', '1140px', 'Show Ads Categories', '_bx_ads_Categories', 1, 0, 'PHP', 'return BxDolService::call(''ads'', ''get_ads_categories'');', 1, 71.9, 'non,memb', 0); I couldn't get Alex's to work. After that this mod worked perfect for me.
|