City in Ads

In the block of all the ads of the main page of ads I would like that the city appeared.

 

I have achieved this by adding these lines in the files:

In BxAdsSearchUnit.php

Line 228 add--->$sAdCiudad = db_value("SELECT `City` FROM `bx_ads_main` WHERE `ID` = '$iAdID' LIMIT 1");

Line 273 add--->'ad_ciudad' => $sAdCiudad,

In Unit_ads.html Add---> __ad_ciudad__

 

With this it works fine, but I have to do a mysql query for each ad. Is there no variable already defined for city without having to make a new query?

 

Sin título.png · 507.4K · 246 views
Quote · 3 Oct 2017

In BxAdsSearchUnit.php at line 22, Find :

 

'ownFields' => array('ID', 'IDProfile', 'IDClassifiedsSubs', 'DateTime', 'LifeTime', 'Subject', 'EntryUri', 'Message', 'CustomFieldValue1', 'CustomFieldValue2', 'Media', 'Tags', 'Status', 'Rate', 'RateCount', 'CommentsCount'),

 
Replace with :
 
'ownFields' => array('ID', 'IDProfile', 'IDClassifiedsSubs', 'DateTime', 'LifeTime', 'Subject', 'EntryUri', 'Message', 'CustomFieldValue1', 'CustomFieldValue2', 'Media', 'Tags', 'Status', 'Rate', 'RateCount', 'CommentsCount', 'City'),
 
Then remove what you have at Line 228 and replace with :

$sAdCiudad = process_text_output($aResSQL['City']);

Paypal email is jeromemingo@gmail.com - http://www.boonex.com/market/posts/modzzz
Quote · 3 Oct 2017

Thank you very much.

One more thing.

In the block that shows the image the search filters appear.

But in the block of all ads do not appear those filters. Could they be added to the block of all ads?

Sin título.png · 456.3K · 211 views
Sin título1.png · 492K · 224 views
Quote · 4 Oct 2017

Solved

Quote · 4 Oct 2017
 
 
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.