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

Home » FUDforum » How To » PATH_INFO theme option
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
PATH_INFO theme option [message #31935] Thu, 25 May 2006 01:42 Go to next message
geekmug is currently offline  geekmug   United States
Messages: 5
Registered: January 2006
Karma: 0
Junior Member
The latest development release has a line of code in index.php to remove the FUD_OPT_2 flag for PATH_INFO support which means things like draw_pager don't use PATH_INFO style URLs. The line of code is turned off by a theme option flag, but I see no interface for that (well, SQL doesn't count). Perhaps my adm tools are out of date? I don't know.. As much as I have taught myself about the innerworkings of FUDforum, I still don't know how whether the adm tools are generated (and where from).

Thanks for any help, or if this really is a missing interface then for moving it to the bug report category Very Happy.
Re: PATH_INFO theme option [message #31943 is a reply to message #31935] Thu, 25 May 2006 23:35 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
Can you tell me what line or show the code block you are referring to?

FUDforum Core Developer
Re: PATH_INFO theme option [message #31951 is a reply to message #31943] Fri, 26 May 2006 02:15 Go to previous messageGo to next message
geekmug is currently offline  geekmug   United States
Messages: 5
Registered: January 2006
Karma: 0
Junior Member
The spot I am refering to is users.inc.t@641:

	/* this should allow path_info & normal themes to work properly within 1 forum */
	if ($o2 & 32768 && !($u->theme_opt & 4)) {
		$o2 ^= 32768;
	}


This block of code masks out the PATH_INFO flag for the rest of the code. I checked against the CVS admin panel, there is no checkbox for this theme option. This seems to be a magic flag brought on by the theme being named both 'path_info' and having the '.path_info' file. I think this should be reduced to just having the '.path_info' file, as this would make the most sense (and not some checkbox a person has to check). theme.inc has several things to say on this.

theme.inc@40:fud_theme::add():
		if ($this->theme == 'path_info') {
			$this->theme_opt |= 4;
		}


theme.inc@72:fud_theme::sync():
		if ($this->theme == 'path_info' || @file_exists($GLOBALS['DATA_DIR'].'thm/'.$this->theme.'/.path_info')) {
			$this->theme_opt |= 4;
		}


I would prefer both of those be:
		if(@file_exists($GLOBALS['DATA_DIR'].'thm/'.$this->theme.'/.path_info')) {
			$this->theme_opt |= 4;
		}


Which would then use the '.path_info' as the magic switch.
Re: PATH_INFO theme option [message #31956 is a reply to message #31951] Fri, 26 May 2006 14:16 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 code was improved to include the magic file check on theme creation as well. The reason we do both name and magic file check is to try to avoid a file system call when the "base" path_info theme is being used (very common situation).

FUDforum Core Developer
Re: PATH_INFO theme option [message #31957 is a reply to message #31956] Fri, 26 May 2006 14:27 Go to previous message
geekmug is currently offline  geekmug   United States
Messages: 5
Registered: January 2006
Karma: 0
Junior Member
Ah ok sorry, I glazed over it being an || and not a &&. Thanks for looking into it.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Most users online
Next Topic: [Solved] category and header.tmpl
Goto Forum:
  

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

Current Time: Wed Nov 27 19:21:14 GMT 2024

Total time taken to generate the page: 0.02627 seconds