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

Home » FUDforum » How To » FUD_OPT_2
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
FUD_OPT_2 [message #162666] Wed, 30 June 2010 17:18 Go to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
I have PATH_INFO enabled, but the PAGE_PAGER, drawn with the function tmpl_create_pager from draw_pager.inc.t does not work.

It commits a check like this:
if ($FUD_OPT_2 & 32768)

However, this returns false, eventhough i have PATH_INFO enabled in my admglobals.php

I wrecked one of the symlinks by misstake earlier so I repaired it today, but I have currently 3 FUD_OPT values.

If I in the above check change FUD_OPT_2 to FUD_OPT_1 it works.

Here are my FUD_OPTs, perhaps you could suggest to me what to change them too, or can I erase them or change them to something default to "repair" them perhaps?

$FUD_OPT_1 = 1739256863;
$FUD_OPT_2 = 1264554494;
$FUD_OPT_3 = 2626114;

The draw_pager.inc that I have also is "bugged" and outputs &start=N even in path_info mode, but I shall check that later against the newest version if perhaps mine is borked when it comes to that.



So, the question is:
Can I somehow alter my FUD_OPT_2 so that all the if ($FUD_OPT_2 & 32768) returns TRUE, or should I comment out that check in the 8 places it occurs?



Re: FUD_OPT_2 [message #162667 is a reply to message #162666] Wed, 30 June 2010 17:37 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
I'm not sure what you are busy with, but if you enable "Use PATH_INFO style URLs" in the ACP, it should stick and the check will evaluate to TRUE. If not, you have different issues. Please double check your symlinks and ensure FUDforum has write access to GLOBALS.php.
Re: FUD_OPT_2 [message #162668 is a reply to message #162667] Wed, 30 June 2010 18:13 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
PATH_INFO is enabled and working across the board, I can disable it in the global settings and enable it again no problem (if I disable it, the forum navigation and links etc stop working)

The only issue I bumped into was that the page_pager, that draws how many pages of threads you have in a forum, is not conforming to the PATH_INFO settings, and the check that it attempt to see if PATH_INFO is enabled isnt returning true.

I know nothing about that bit manipulation thing so I cant really tell what is wrong hehe.


Re: FUD_OPT_2 [message #162669 is a reply to message #162668] Wed, 30 June 2010 18:18 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
It's this piece of code that doesn't validate:

        if ($FUD_OPT_2 & 32768) {
                $page_pager = tmpl_create_pager($start, $THREADS_PER_PAGE, $frm->thread_count, '{ROOT}/sf/thread/'.$frm_id.'/1/', '/' ._rsid);
        } else {
                $page_pager = tmpl_create_pager($start, $THREADS_PER_PAGE, $frm->thread_count, '{ROOT}?t=thread&frm_id='.$frm_id.'&'._rsid);
        }


If I alter that and change FUD_OPT_2 to FUD_OPT_1 it works.

I checked the FUD_OPT_2 value, it alters when i enable/disable path_info in ACP


Re: FUD_OPT_2 [message #162670 is a reply to message #162669] Wed, 30 June 2010 18:28 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
($FUD_OPT_1 & 32768) is ALLOW_SIGS. Not quite what you want.

I have a forum with PATH_INFO enabled, and I cannot see anything wrong with the URLs.
Re: FUD_OPT_2 [message #162671 is a reply to message #162670] Wed, 30 June 2010 19:01 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
Well, my if ($FUD_OPT_2 & 32768) doesnt return true, is there no way to calculate $FUD_OPT_2 = 1264554494; and see if it should validate, or if you can edit it, ors something?

Re: FUD_OPT_2 [message #162672 is a reply to message #162671] Wed, 30 June 2010 19:15 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
If $FUD_OPT_2 is 1264554494, then ($FUD_OPT_2 & 32768) is true. Always!
Re: FUD_OPT_2 [message #162673 is a reply to message #162672] Wed, 30 June 2010 19:26 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
When i echo $FUD_OPT_2 just above the function in thread.php.t I see the value 1264521726 (which is not the same as the value I see in my GLOBALS.php)

Argh, this is annoying hehe


Re: FUD_OPT_2 [message #162674 is a reply to message #162673] Wed, 30 June 2010 19:47 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Well, in that case your symlinks are still messed up. Fix them and the problem will disappear.
Re: FUD_OPT_2 [message #162675 is a reply to message #162674] Wed, 30 June 2010 20:12 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
I removed and then re-created the 4 symlinks:
ln -s /home/ginnunga/FUDforum/include/GLOBALS.php /home/ginnunga/FUDforum/scripts/GLOBALS.php
ln -s /home/ginnunga/FUDforum/include/GLOBALS.php /home/ginnunga/public_html/forums/GLOBALS.php
ln -s /home/ginnunga/FUDforum/include/GLOBALS.php /home/ginnunga/public_html/forums/adm/GLOBALS.php
ln -s /home/ginnunga/FUDforum/include/GLOBALS.php /home/ginnunga/public_html/forums/apl/GLOBALS.php

Still reports the wrong value. Head is exploding =(


Re: FUD_OPT_2 [message #162676 is a reply to message #162675] Thu, 01 July 2010 05:53 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
After 8 hours I have found the culprit. Well worth the time IMO.

In users.inc.t there is a row like this:
/* this should allow path_info & normal themes to work properly within 1 forum */
if ($o2 & 32768 && !($u->theme_opt & 4)) {
$o2 ^= 32768;
}


If I echo $o2 before and after that, i see that this is where it changes.

soooo, how to fix? =)


Re: FUD_OPT_2 [message #162677 is a reply to message #162676] Thu, 01 July 2010 05:56 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
My theme isn't originally built on the PATH_INFO theme, perhaps I have to edit some form of thingymabob in DBPREXIX_themes to flag it as PATH_INFO?

Re: FUD_OPT_2 [message #162678 is a reply to message #162676] Thu, 01 July 2010 06:07 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Nothing wrong with the code. If PATH_INFO is enabled, but you are not currently using a PATH_INFO theme, FUDforum will disables it for your session.

Go to the Theme Manager and change the theme's template set to "path_info".

If you have copied the "path_info" template set files to customize it, ensure you also copy the PATH_INFO marker (hidden file called .path_info).

Best regards.

Frank
Re: FUD_OPT_2 [message #162679 is a reply to message #162677] Thu, 01 July 2010 06:12 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
I changed my theme_opt to 7 from 3, and now it works, but I don't know if this was correct? What does 7 mean?

I figure that 1 means enabled, 3 means enabled+default and 7 means 1enable+2default+4path info enabled?


[Updated on: Thu, 01 July 2010 06:13]

Report message to a moderator

Re: FUD_OPT_2 [message #162681 is a reply to message #162679] Thu, 01 July 2010 06:23 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
See documentation at Fud30_themes.

7 is actually wrong.
Should be 1+2=3 or 1+4=5

Instead of changing these values manually, rather touch .path_info (create marker file) in your template set's directory.
Re: FUD_OPT_2 [message #162683 is a reply to message #162681] Thu, 01 July 2010 06:57 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
I did the touching and stuff and now it set it to 7 Razz

1enabled+2default+4path_info=7

HAH!

You are a God by the way. I want to worship the ground you walk on.


Re: FUD_OPT_2 [message #162686 is a reply to message #162683] Thu, 01 July 2010 07:48 Go to previous message
naudefj is currently offline  naudefj   
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Ernesto wrote:
I did the touching and stuff and now it set it to 7 Razz

1enabled+2default+4path_info=7

HAH!


Interesting, thanks for the correction.

Ernesto wrote:
You are a God by the way. I want to worship the ground you walk on.


Please don't. I'm just another sinner who tries to walk the straight and narrow road.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: How to answer a lovelorn spammer
Next Topic: How Morons Can Install New Version of Fudforum to Their Host
Goto Forum:
  

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

Current Time: Thu Nov 21 16:28:23 GMT 2024

Total time taken to generate the page: 0.06462 seconds