Hi, I've got the following error come on the top of my page: Notice: Undefined index: DEFAULT_PAGE in /home/.xxxx/xxxxx/xxxxx.com/forums/library/Framework/Framework.Functions.php on line 17
edit - I put in some text and the error vanished. I've hot friendly-urls installed and the problem I'm finding is to find out what the dynamic-url of one of my posts is which I want it to direct to. Does anyone know how I could find out?
Not used friendly-urls myself so have not run into this problem.
I've installed 'friendly-urls' and have not been able to reproduce your error message, but neither have I been able to get a friendly-url entry to work with DefaultPage. It is possible however to use a 'dynamic url' as the entry for the default page.
For a discussion with the title 'Some Discussion':
Thanks for that. It's working fine now. Right now I have the default page set to one of my discussions.
Do you know how I could make it so that it only goes to the set default page if the user has not participated in that particular discussion? (going off-road here).
Thank you for your help.
I have added an option to strip ReturnUrl from the url. This is a workaround for a problem with the Blog extension (and possibly others) when a user is not signed in, is viewing the 'Blog' page and then clicks on the 'Sign-In' link. See http://lussumo.com/community/?CommentID=70417
Notice: Undefined index: CssClass in /forum/themes/people_banner.php on line 5
Edit the following line in your conf/settings.php file:
Quote: MightyMango Avoids the need to make changes to your .htaccess files or use mod_rewrite.
All the extensions that purport to change the default page fail for me. I have had to use a combination of methods including changes to my .htaccess file.
Dexter, sorry that you are having problems and not sure why you are not being redirected to categories.php. It's a long shot but did you sign-out and then in again? Just tested again on our site and am being correctly redirected to our blog page. Just checked with categories.php and that seems to be working too.
Are you already using any of the methods that use .htaccess to change the default page?
Did you just enter the page file name i.e. categories.php not http://myforum.com/categories.php? The code that checks the page exists will not work as it stands if you enter the full URL
thanks for your help. I am not using any other kind of method to set a default page. And yes its categories.php that I did enter. Its a little bit weird, once I am logged out I will be redirected to the category page. After logging in again I end up at the category page, so everything is fine, but after beeing the first time in the discussion section, it doesn't work out anymore. I type the url and will end up at the discussion page. Maybe thats how it supposed to be... This is my test forum http://www.cielab.org/vanilla/
Cheers
Dex
By the way, maybe we can provide an exporter from wbb 1.1.1 to vanilla soon.
That's the exact behaviour I observe on all the Vanilla installations with this extension and others supposedly able to set a different default page.
The first time there it takes you to a different default page, usually Categories but every time after that it's right back to discussions, with or without the trailing slash.
Dexter, just realised that there is a problem with DefaultPage if your forum is not in the root of your domain e.g. http://www.cielab.org/vanilla/. I'm away from home at the moment but will fix this as soon as I get back.
In the meantime you could try changing line 87 to:
Wanderer it does work but not in the way you might think. DefaultPage directs you to your default page when you first access the forum or sign-in, it then sets a session variable to say that the redirection has been done and continues as normal i.e. it ignores the DefaultPage setting until you sign-out. This is by design.
The idea of DefaultPage is that it directs the user to a particular page when they first arrive. I agree that it is not possible to get DefaultPage to behave in the way you have your forum setup i.e. with a 'Home' button and you are correct in saying that if you need this type of behaviour then you will probably need to use mod_rewrite etc.
It will be possible with the next version of DefaultPage to set a different starting page for different roles.
But 'DefaultPageOnceOnlyPerVisit' isn't very snappy is it :)
Perhaps it should have been called StartingPage....
I've not given up yet though. Think I have a way to reproduce the behaviour you have been able to produce with mod_rewrite etc. Have been able to do it with a combination of DefaultPage and Page Manager. Just need to combine everything into DefautlPage.
The new version (1.0.0) no longer includes the work around for the error message mentioned above.
Notice: Undefined index: CssClass in /forum/themes/people_banner.php on line 5
If you experience this problem then just deselect the 'Return to the current page...' option on the DefaultPage settings page. It is not necessary to select a 'default page' for this to work.
Thanks to Dexter and Wanderer for pointing out problems and shortcomings in the earlier versions which I hope have been fixed and addressed in the new version.
Comments
I'll fix it and upload the new version as soon as possible.
I've got the following error come on the top of my page:
Notice: Undefined index: DEFAULT_PAGE in /home/.xxxx/xxxxx/xxxxx.com/forums/library/Framework/Framework.Functions.php on line 17edit -
I put in some text and the error vanished. I've hot friendly-urls installed and the problem I'm finding is to find out what the dynamic-url of one of my posts is which I want it to direct to. Does anyone know how I could find out?
The buildup of the url at present is like this:
http://www.xxxxxxxxxxxxxxx.com/forums/discussion/346/2/
edit - Addon works fine when I direct it to a more general page (extension.php?PostBackAction=Members) :)
Not used friendly-urls myself so have not run into this problem.
I've installed 'friendly-urls' and have not been able to reproduce your error message, but neither have I been able to get a friendly-url entry to work with DefaultPage. It is possible however to use a 'dynamic url' as the entry for the default page.
For a discussion with the title 'Some Discussion':
http://mywebsite.com/discussion/3/some-discussion/translates to
http://mywebsite.com/comments.php?DiscussionID=3In the above example set the 'DefaultPage' to:
comments.php?DiscussionID=3Hope this helps. I'll add a 'friendly-url- warning to the 'Extension Options' page.
Simon
It's not something that is going to be achievable with DefaultPage but is an idea for a new extension. :)
Notice: Undefined index: CssClass in /forum/themes/people_banner.php on line 5Edit the following line in your conf/settings.php file:
$Configuration['DEFAULT_PAGE_STRIP_RETURNURL'] = '1';Cheers
Dex
Posted: Friday, 28 September 2007 at 6:16AM
Yes it does.
The first time there it takes you to a different default page, usually Categories but every time after that it's right back to discussions, with or without the trailing slash.
Maybe a cookie is being set the first time?
Posted: Saturday, 29 September 2007 at 10:04AM
In the meantime you could try changing line 87 to:
header('Location: '.$Configuration['BASE_URL'].$DEFAULT_PAGE);Wanderer it does work but not in the way you might think. DefaultPage directs you to your default page when you first access the forum or sign-in, it then sets a session variable to say that the redirection has been done and continues as normal i.e. it ignores the DefaultPage setting until you sign-out. This is by design.
The idea of DefaultPage is that it directs the user to a particular page when they first arrive. I agree that it is not possible to get DefaultPage to behave in the way you have your forum setup i.e. with a 'Home' button and you are correct in saying that if you need this type of behaviour then you will probably need to use mod_rewrite etc.
It will be possible with the next version of DefaultPage to set a different starting page for different roles.
Maybe you should call it: DefaultPageOnceOnlyPerVisit!
Posted: Saturday, 29 September 2007 at 9:08PM
Perhaps it should have been called StartingPage....
I've not given up yet though. Think I have a way to reproduce the behaviour you have been able to produce with mod_rewrite etc. Have been able to do it with a combination of DefaultPage and Page Manager. Just need to combine everything into DefautlPage.
Watch this space! ;-)
Notice: Undefined index: CssClass in /forum/themes/people_banner.php on line 5If you experience this problem then just deselect the 'Return to the current page...' option on the DefaultPage settings page.
It is not necessary to select a 'default page' for this to work.
Thanks to Dexter and Wanderer for pointing out problems and shortcomings in the earlier versions which I hope have been fixed and addressed in the new version.