Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

Categories

In this Discussion

Who's Online 11

CurtisOdendoncsaulericgillettex00 +7 guests

DefaultPage

This discussion is related to the DefaultPage addon.
DefaultPage
«1

Comments

  • Uploaded version 0.1.0 of DefaultPage.
  • If anyone finds this add-on useful I'll look to add a method to change the DefaultPage setting via a property page.
  • Uploaded version 0.2.0 of DefaultPage.
  • Property Page added in 0.2.0
  • Posts: 2,610
    If this works as I expect it to, it'll be one of the most popular extensions in no time I'm sure :D
  • Posts: 9
    Nothing appears to be showing up under Extension Options :(
  • Sorry, just discovered a problem in the code which means that DefaultPage does not appear in the' Extension Options' panel for some people.

    I'll fix it and upload the new version as soon as possible.
  • Uploaded version 0.2.1 of DefaultPage.
  • Uploaded version 0.3.0 of DefaultPage.
  • VazVaz
    Posts: 292
    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?

    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) :)
  • Vaz,

    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=3

    In the above example set the 'DefaultPage' to:

    comments.php?DiscussionID=3

    Hope this helps. I'll add a 'friendly-url- warning to the 'Extension Options' page.

    Simon
  • Uploaded version 0.4.0 of DefaultPage.
  • VazVaz
    Posts: 292
    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.
  • Sorry Vaz,

    It's not something that is going to be achievable with DefaultPage but is an idea for a new extension. :)
  • Uploaded version 0.5.0 of DefaultPage.
  • Uploaded version 0.6.0 of DefaultPage.
  • Uploaded version 0.6.1 of DefaultPage.
  • Uploaded version 0.7.0 of DefaultPage.
  • 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:

    $Configuration['DEFAULT_PAGE_STRIP_RETURNURL'] = '1';
  • Great extension. Unfortunatly it doesn't really work out. I type in categories.php but discussion keeps my default page. Do I something wrong?

    Cheers
    Dex
  • Posts: 2,419
    Quote: MightyMango
    pic Avoids the need to make changes to your .htaccess files or use mod_rewrite. pic
    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.

    Posted: Friday, 28 September 2007 at 6:16AM

  • 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.
  • "Does it have a trailing '/'"
    Yes it does.
  • Posts: 2,419
    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.

    Maybe a cookie is being set the first time? pic

    Posted: Saturday, 29 September 2007 at 10:04AM

  • 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:

    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.
  • Posts: 2,419
    OK, that clarifies things then, now that we understand the expected behaviour we can say it works!

    Maybe you should call it: DefaultPageOnceOnlyPerVisit!

    Posted: Saturday, 29 September 2007 at 9:08PM

  • 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.

    Watch this space! ;-)
  • Uploaded version 1.0.0 of DefaultPage.
  • 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.
Sign In or Register to comment.