Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

ForceRedirect

It is unclear to me how this line works:
$ShowOnController = array('entrycontroller, plugincontroller');
From where do the "___controller" variables originate?
I'd like to allow access to Visitor Page from the SignIn page, but nowhere else unless the user has signed-in.
Thanks!

«1

Comments

  • x00x00 MVP
    edited July 2013

    it is better to ask the question on the page of the addon therefore it is properly linked and the author is informed.

    grep is your friend.

  • hgtonighthgtonight ∞ · New Moderator

    Welcome to the community!

    Those array items are the controller class names. You can find all the available controllers by searching through the source code.

    For 2.0.18.8, I found the following using a regex of class .*Controller extends .*Controller

    • ConversationsController
    • MessagesController
    • ActivityController
    • AuthenticationController
    • DashboardController
    • EmbedController
    • EntryController
    • HomeController
    • ImportController
    • LogController
    • MessageController
    • ModuleController
    • NotificationsController
    • PluginController
    • ProfileController
    • RoleController
    • RoutesController
    • SearchController
    • SessionController
    • SettingsController
    • SetupController
    • StatisticsController
    • UserController
    • UtilityController
    • SkeletonController
    • CategoriesController
    • CategoryController
    • DiscussionController
    • DiscussionsController
    • DraftsController
    • ModerationController
    • PostController
    • SettingsController
    • VanillaController

    I suggest you check out the wiki if you want to learn more about what controllers do.

    http://vanillawiki.homebrewforums.net/index.php/Controllers_&_Urls

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • I don't see a menu item here to choose the discussion area for each of the addons. Where would I find that, please? When I click on the Addons link at the top then search for "forceredirect" I get the download page but see no discussion area. I thought including a Tag for forceredirect would link and inform.

  • Wow, thanks!
    Our teen son says I am pre-HTML 4 (my limited coding, scripting, & systems management days are a couple of decades back, so php, css, HTML 5 present a learning curve for me).
    I read the wiki but since there's no controller for Visitor Page I don't see where/how I'd create an exception in ForceRedirect to permit a non-Signed-In visitor to go to the Visitor Page. (They will likely want to read that, then send a request for membership, since there is no way to Sign In without an approved membership.)
    WDYT, please?

  • hgtonighthgtonight ∞ · New Moderator

    @DavidColburn said:
    I don't see a menu item here to choose the discussion area for each of the addons. Where would I find that, please? When I click on the Addons link at the top then search for "forceredirect" I get the download page but see no discussion area. I thought including a Tag for forceredirect would link and inform.

    Underneath the info box on and addon's page is the text 'Ask a question'.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    Actually you need to use the plugincontroller

    controllers are just pages, a cool name for a page

    because extrapage is a plugin controller you need to add plugincontroller to the array so it is allowed to be seen.

    Nice list @hgtonight !

  • I don't see that here: vanillaforums.org/addon/forceredirect-plugin
    Sorry if I appear obtuse, it's just not obvious to me ...

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    it is on the page of the plugin , remove the ones you do not want to be seen, keep the entrycontroller and the plugincontroller

    $ShowOnController = array('discussioncontroller','discussionscontroller','categoriescontroller','plugincontroller','entrycontroller');
  • hgtonighthgtonight ∞ · New Moderator

    @DavidColburn said:
    I don't see that here: vanillaforums.org/addon/forceredirect-plugin
    Sorry if I appear obtuse, it's just not obvious to me ...

    Don't feel bad :D

    image

    As far as forcing the redirect, filtering by controllers isn't granular enough.

    temp.png 115.9K

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    As far as forcing the redirect, filtering by controllers isn't granular enough.

    I would like to be able to pick the plugin controller to allow but seems there is no way of calling it by it's whole name, example, extrapageplugincontroller

    would be great if you could

  • @vrijvlinder said:
    Actually you need to use the plugincontroller

    controllers are just pages, a cool name for a page

    because extrapage is a plugin controller you need to add plugincontroller to the array so it is allowed to be seen.

    I do have it in the array $ShowOnController = array('entrycontroller, plugincontroller');

    I can't figure out how to write an exception for Visitor Page.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    The controller for ExtraPage is plugincontroller it should be allowed to be viewed

  • hgtonighthgtonight ∞ · New Moderator

    Your visitor page is added how?

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Via ExtraPage where I have links to a few html pages (on the same server as the forum) for documents.

  • @vrijvlinder said:
    The controller for ExtraPage is plugincontroller it should be allowed to be viewed

    If you visit here: oachegroup.org/entry/signin it's "Visitor Page" I'd like to allow.

    Right now it just returns to SignIn.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    that is odd Do you by any chance have it set in the dashboard ? the permissions for guests? that may be preventing it

  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited July 2013

    you are missing some ' ' in there make sure they are surrounded
    by the ' ' se below you are missing one on each

    I do have it in the array $ShowOnController = array('entrycontroller, plugincontroller');

    like this

    $ShowOnController = array('entrycontroller', 'plugincontroller');

  • Wow, you see, what a difference a second set of eyes can make!
    When I had trouble with code in days past I'd print it and hang it on the wall and invite others to look at it and see if they could spot what I was missing.
    Thanks - it's working fine now!
    Now if only I could locate the Donate button for peregrine ...

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    try it with this plugin I know this one works and you can use it to put your own donate button :)

    http://vanillaforums.org/addon/forumdonate-plugin

  • Your suggestion is that I add this to the Forum I just created?
    Is it like Paypal where one may donate to anyone by specifying the intended recipient?
    Why isn't this on the Vanilla Forum Discussion site so it's easy to donate to the larger project as well as to specific developers/helpers?
    Am I misunderstanding how Donate works?

Sign In or Register to comment.