Youjoomla Support Forums (http://www.youjoomla.com/joomla_support/index.php)
-   Anything Goes (http://www.youjoomla.com/joomla_support/forumdisplay.php?f=31)
-   -   Ignore stopword "the" when sorting records (http://www.youjoomla.com/joomla_support/showthread.php?t=10407)

gunpowder 08-09-2012 12:55 PM

Ignore stopword "the" when sorting records
 
Hello,
I am trying to sort some records so that the stopword "the " and the space is ignored during the sorting, although I still want to have it displayed in the list.
Example:
THE ANVIL
AMORE
THE AZIMUTH
I am trying to modify the file helper.php in modules/mod_yj_newsflash5 by changing line 98 as follows:
Code:

7=>'title ASC',
to
Code:

7=>'TRIM(LEADING \'THE \' FROM cc.title) ASC',
However this does not seem to work and I wonder where else I need to make this change. Any pointer is more than welcome.

Are you sure your are posting in product assigned forum?: Yes

What is your CMS version?: Joomla 2.5

MySQL Version: 5.x

PHP version: 5.x

Link to installation: X-Ray Touring - London

Have you edited any files? If yes tell us which ones.: No

Are you sure your are posting in product assigned forum?: Yes

What is your CMS version?: Joomla 2.5

MySQL Version: 5.x

PHP version: 5.x

Link to installation: X-Ray Touring - London

Have you edited any files? If yes tell us which ones.: Yes

chuyennhonho 12-11-2012 02:50 AM

you ask difficult than I would like to learn this
can anyone help?


All times are GMT -4. The time now is 12:22 PM.

Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.