1
johny
How to Change the Title Case
  • 2004/5/29 20:30

  • johny

  • Just popping in

  • Posts: 23

  • Since: 2003/8/25


The Spotlight module changes the capitalisation of my titles (change case).

Example:
This is my news title gets converted into This Is My News Title

Since I don't use XOOPS in English, and my language does not allow such capitalisation, I really need to disable this feature.

I've noticed that the News module also does something similar - it coverts the titles into the UPPERcase, so this is not something exclusive to the Spotlight module only.

Please share your ideas or even better - solutions

2
Dave_L
Re: How to Change the Title Case
  • 2004/5/29 21:45

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


If there are no configuration options that control that, then you would have to locate the places in the code (or template) where the capitalization or uppercasing is done, and remove it.

The capitalization is probably done by the PHP function ucfirst or the Smarty modifier capitalize.

Conversion to all uppercase is probably done by the PHP function strtoupper or the Smarty modifier upper.

3
macnoludo
Re: How to Change the Title Case (spotlight)
  • 2004/6/23 14:59

  • macnoludo

  • Just popping in

  • Posts: 24

  • Since: 2002/9/18


Hello,
i'm not sure this is the best way todo that but...
You could remove in functions.php the line 442and 443 corresponding to :

if (!in_array($word$higher_exceptions)) $word strtolower($word);
 if (!
in_array($word$lower_exceptions))$word[0] = strtoupper($word[0]);

Ciao

4
johny
Re: How to Change the Title Case (spotlight)
  • 2004/7/16 15:28

  • johny

  • Just popping in

  • Posts: 23

  • Since: 2003/8/25


A big Thank U to both of you!

I had to move my site to a new server and had so many problems with that that I forgot all about this setting.

The solution that worked was macnoludo's one - I had to edit (delete) the two lines in modules/spotlight/include/function.php and my problem was solved.

For additional reference: XOOPS itself also has the same function; class/smarty/plugins/modifier.upper.php (but spotlight module does not use that one).

5
Stewdio
Re: How to Change the Title Case (spotlight)
  • 2004/7/16 15:37

  • Stewdio

  • Community Support Member

  • Posts: 1560

  • Since: 2003/5/7 1


Another possibility (for future reference for other users, is to:

Edit spotlight/includes/functions.php around line 418:

Change:
if (isset($xoopsModuleConfig['stopshouting']))
    {
        return 
$string;
    }


to:
if ($xoopsModuleConfig['stopshouting'] == 0)
    {
          return 
$string;
    }


This may or may not work depending on your version, but it worked for me when I had a problem where I could not use all upper case for things like acronyms and such.

6
mrgym
Re: How to Change the Title Case (spotlight)
  • 2004/7/16 17:38

  • mrgym

  • Just popping in

  • Posts: 28

  • Since: 2002/4/26


Or, you could alter the smarty template, using the capitalize function

http://smarty.php.net/manual/en/language.modifiers.php#language.modifier.capitalize

Login

Who's Online

91 user(s) are online (64 user(s) are browsing Support Forums)


Members: 0


Guests: 91


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits