Limiting Classifieds to be displayed

how do i set classifieds to be displayed in my mainpage to say one (1) or two (2)?

Quote · 28 Aug 2008

Hmmm.

Perhaps by using Builders>Page Builder>DRAGClassifieds>up into Homepage

The you can change the number to be listed....

Quote · 29 Aug 2008

thnx for the concern Irepton, but your suggestion doesnt solve it.

anyone has the solution for this?

Quote · 30 Aug 2008

You can try this it works for me:
/templates/base/scripts/BxBaseIndex.php

find:
$oClassifieds = new BxDolClassifieds();
$oClassifieds->UseDefaultCF();
if( $iTotalNum ) {
$iResPerPage = (int)getParam("max_blogs_on_home");
$iTotalPages = ceil( $iTotalNum / $iResPerPage );
$page = (int)$_REQUEST['classifieds_page'];

if( $page < 1 or $mode == 'rand' )
$page = 1;
if( $page > $iTotalPages )
$page = $iTotalPages;
$sqlLimitFrom = ( $page - 1 ) * $iResPerPage;

Change/add:
$oClassifieds = new BxDolClassifieds();
$oClassifieds->UseDefaultCF();
if( $iTotalNum ) {
$iResPerPage = (int)getParam("max_blogs_on_home");
$iTotalPages = ceil( $iTotalNum / $iResPerPage );
$page = (int)$_REQUEST['classifieds_page'];

if( $page < 1 or $mode == 'rand' )
$page = 1;
if( $page > $iTotalPages )
$page = $iTotalPages;
$sqlLimitFrom = ( $page - 1 ) * $iResPerPage = 3;


You can do the same for other areas if you can't set them in admin panel on this same page, using the same concept. Some are available in admin panel or database too.

Change the 3 to the number you want displayed.

gameutopia

DialMe.com - Your One and Only Source For Boonex Dolphin Tutorials and Resources
Quote · 30 Aug 2008

wow! thnx a lot.....it worked!

Quote · 30 Aug 2008

Does this just change the number of 'classifieds' displayed or does it alter others as well?

Stuart

You can try this it works for me:
/templates/base/scripts/BxBaseIndex.php

find:
$oClassifieds = new BxDolClassifieds();
$oClassifieds->UseDefaultCF();
if( $iTotalNum ) {
$iResPerPage = (int)getParam("max_blogs_on_home");
$iTotalPages = ceil( $iTotalNum / $iResPerPage );
$page = (int)$_REQUEST['classifieds_page'];

if( $page < 1 or $mode == 'rand' )
$page = 1;
if( $page > $iTotalPages )
$page = $iTotalPages;
$sqlLimitFrom = ( $page - 1 ) * $iResPerPage;

Change/add:
$oClassifieds = new BxDolClassifieds();
$oClassifieds->UseDefaultCF();
if( $iTotalNum ) {
$iResPerPage = (int)getParam("max_blogs_on_home");
$iTotalPages = ceil( $iTotalNum / $iResPerPage );
$page = (int)$_REQUEST['classifieds_page'];

if( $page < 1 or $mode == 'rand' )
$page = 1;
if( $page > $iTotalPages )
$page = $iTotalPages;
$sqlLimitFrom = ( $page - 1 ) * $iResPerPage = 3;


You can do the same for other areas if you can't set them in admin panel on this same page, using the same concept. Some are available in admin panel or database too.

Change the 3 to the number you want displayed.

gameutopia

There are none so blind as those that will not see.
Quote · 30 Aug 2008

Just the number of classifieds displayed on the homepage index page. Just change the number as mentioned.

Some others can be changed in admin panel. If you can't find one that is changeable in admin panel apply the same concept to the page to change their particular display number too.

This way you can have any combination. If you change blogs in admin panel it will change events, blogs and classifieds. So if you set 6 in admin panel, you get 6 of each on the main page. By setting 6 in admin panel for blogs, you could then edit the code to change events to 2 and classifieds to 2 using this.

Hope that makes sense.

gameutopia

DialMe.com - Your One and Only Source For Boonex Dolphin Tutorials and Resources
Quote · 30 Aug 2008
 Many thanks, gameutopia. Appreciate your efforts! Stuart
There are none so blind as those that will not see.
Quote · 30 Aug 2008

i was successful in editing the number of classifieds to be displayed, but when i tried the same process to limit the number of blogs.....after saving it.... only a blank screen appears when i point my browser to my mainpage.

what should i do? can i just download BxBaseIndex.php and replace the existing one? maybe it was corrupted while I was saving?

will the new BxBaseIndex.php affect the rest of the appearance of my mainpage?

Quote · 31 Aug 2008

Just undo the changes you made. You should always back up any files/code before you make any changes. Very simple to repair mistakes that way.

Stuart

Ps. what is your site address?

i was successful in editing the number of classifieds to be displayed, but when i tried the same process to limit the number of blogs.....after saving it.... only a blank screen appears when i point my browser to my mainpage.

what should i do? can i just download BxBaseIndex.php and replace the existing one? maybe it was corrupted while I was saving?

will the new BxBaseIndex.php affect the rest of the appearance of my mainpage?

There are none so blind as those that will not see.
Quote · 31 Aug 2008

yup stuart..that was very stupid of me...i should've backed up my file. :(

can't undo now.....

can i just replace the existing baseindex?

Quote · 31 Aug 2008

Hello Marlon,

You can but make sure you set the permissions accordingly. Unfortunately any mods you made up until now will be gone. But if you copy the corrupt file you may be able to redo any (working) mods across.

Stuart

yup stuart..that was very stupid of me...i should've backed up my file. :(

can't undo now.....

can i just replace the existing baseindex?

There are none so blind as those that will not see.
Quote · 31 Aug 2008

tnx stuart! its working now. really appreciate your assistance

Quote · 2 Sep 2008
 
 
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.