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

Home » FUDforum » How To » FUD_OPT_2
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
FUD_OPT_2 [message #162666] Wed, 30 June 2010 13:18 Go to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
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 13:37 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3624
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
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 14:13 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
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 14:18 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
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 14:28 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3624
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
($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 15:01 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
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 15:15 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3624
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
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 15:26 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
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 15:47 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3624
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
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 16:12 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
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 01:53 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
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 01:56 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
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 02:07 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3624
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
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 02:12 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
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 02:13]

Report message to a moderator

Re: FUD_OPT_2 [message #162681 is a reply to message #162679] Thu, 01 July 2010 02:23 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3624
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
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 02:57 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
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 03:48 Go to previous message
naudefj is currently offline  naudefj   
Messages: 3624
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
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.
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
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: Mon Oct 23 22:28:06 EDT 2017

Total time taken to generate the page: 0.00944 seconds