FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » FUDforum 3.0+ » Make 'index.php' configurable in GLOBALS.php
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Make 'index.php' configurable in GLOBALS.php [message #32136] Sun, 11 June 2006 18:56 Go to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3772
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Would it be possible to introduce a new variable in GLOBALS.php to configure the compiler.inc ROOT (default is index.php):

$cmpl['ROOT'] = 'index.php';


I like to change it to '.' on my site to strip the 'index.php' part from forum URL's.

If it is in GLOBALS.php, external programs would also be able to read the variable to create valid forum URL's.
Re: Make 'index.php' configurable in GLOBALS.php [message #32148 is a reply to message #32136] Mon, 12 June 2006 15:26 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Given that this option can easily be changed inside compiler.inc I am reluctant to add it to GLOBALS control panel. In my mind it is a rather dangerous option that if mis-configured could easily break the forum and for people who know what they are doing (such as yourself) it is a very easy tweak to make inside compiler.inc.

FUDforum Core Developer
Re: Make 'index.php' configurable in GLOBALS.php [message #32150 is a reply to message #32148] Mon, 12 June 2006 16:41 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3772
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
I agree, changing it is easy. However, 3rd party modules wouldn't know how to format forum URL's.

For example, I've started a Drupal module at http://drupal.org/node/67177
This module needs to know if it should create URL's like
www.site.com/forum/index.php/t/1/2/ or
www.site.com/forum/t/1/2/
Re: Make 'index.php' configurable in GLOBALS.php [message #32186 is a reply to message #32150] Tue, 13 June 2006 20:06 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
How do the two relate, I think I am missing something there.

FUDforum Core Developer
Re: Make 'index.php' configurable in GLOBALS.php [message #32189 is a reply to message #32186] Tue, 13 June 2006 20:22 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3772
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
The module reads FUDforum's GLOBALS.php file to figure out how to behave. However, there is no setting to tell it how to format URLs (the index.php part). Having such a setting would be great. If it cannot be done, I'll have to invent some other strange workaround.
Re: Make 'index.php' configurable in GLOBALS.php [message #32202 is a reply to message #32189] Wed, 14 June 2006 13:08 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
The URL formatting is really complex it is not something that can be configured into GLOBALS.php, you can see the reverse syntax in users.inc.t (big switch statement at the top).

FUDforum Core Developer
Re: Make 'index.php' configurable in GLOBALS.php [message #35199 is a reply to message #32136] Sun, 17 December 2006 04:03 Go to previous messageGo to next message
stanpro is currently offline  stanpro
Messages: 1
Registered: December 2006
Karma: 0
Junior Member
Is there any way to add custom variable[s] to all URL's? The following case doesn't work for an obvious reason:

Quote:

$cmpl['ROOT'] = 'index.php?custom=value';

Re: Make 'index.php' configurable in GLOBALS.php [message #35203 is a reply to message #35199] Sun, 17 December 2006 17:45 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
You can do so by modifying the _rsid and _rsidl constants defined inside users.inc.t

FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: FUDforum hangs at startup
Next Topic: FUDForum hard to install
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Dec 26 14:37:25 GMT 2024

Total time taken to generate the page: 0.03856 seconds