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

How to change the url?

Is it possible to change instead of example.com/extrapagea > example.com/mypage

If it is how is it done?

Thanks!

Tagged:
«1

Comments

  • Options
    peregrineperegrine MVP
    edited May 2014

    I know some people will provide you shortcuts that will no longer relate the names to the plugin.

    So to avoid this, perhaps.

    THE BEST WAY. without shortcuts.

    Just clone the plugin and change every reference of extrapage to mypage and ExtraPage to MyPage, in all the entire plugin files and names of files and folders. Paying close attention to uppper and lower case.

    changing just the method name to an unrelated name withithout changing the references is not a great idea, as far as naming conventions.

    thank you for using this plugin and thanks for saying thank you.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    peregrineperegrine MVP
    edited May 2014
    Alternative...  smattered throughout default.php
    
    with shortcuts instead  replacing extrapageA with mypage  and adjusting routing.
    
    $Sender->Menu->AddLink(T('Extra Page A'), T('ExtraPage A'), 'mypage');
    
     public function VanillaController_MyPage_Create($Sender) {
    
     $matchroute = '^mypage(/.*)?$';   
                 $target = 'vanilla/MyPage$1';
    
      $matchroute = '^mypage(/.*)?$';   
                   Gdn::Router()-> DeleteRoute($matchroute); 
    

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    r0obertr0obert
    edited June 2014

    @peregrine said:
    I know some people will provide you shortcuts that will no longer relate the names to the plugin.

    So to avoid this, perhaps.

    THE BEST WAY. without shortcuts.

    Just clone the plugin and change every reference of extrapage to mypage and ExtraPage to MyPage, in all the entire plugin files and names of files and folders. Paying close attention to uppper and lower case.

    changing just the method name to an unrelated name withithout changing the references is not a great idea, as far as naming conventions.

    thank you for using this plugin and thanks for saying thank you.

    I'm not doing this right, for sure. Could you be more explicit? Let's say I want to change the url from /extrapagea to /resources.

    I've tried to change every reference of 'extrapagea' to 'resources' but for some reason it didn't work.

    Thanks!

    Edit: Hmm.. I think I need to actually change 'extrapage' to 'resources' not 'extrapagea', I will try that.

  • Options
    R_JR_J Ex-Fanboy Munich Admin

    Look in your dashboard under "Routes". I guess the plugin sets the custom route during the setup process and if you change it later in the code it will have no effect.

  • Options

    @R_J said:
    Look in your dashboard under "Routes". I guess the plugin sets the custom route during the setup process and if you change it later in the code it will have no effect.

    Thanks, but I didn't manage to do it. If anyone could assist me, I would appreciate it.

  • Options
    peregrineperegrine MVP
    edited June 2014

    @R_J said:
    Look in your dashboard under "Routes". I guess the plugin sets the custom route during the setup process and if you change it later in the code it will have no effect.

    Exactly as R_J said.

    yes that is why I recommend disabling plugins before you change them or upgrade them.
    not taking heed to this, can lead to unintended consequences. especially if you are changes to anything related to Setup, Structure, Disable, routing are made.

    @r0obert said:
    . If anyone could assist me, I would appreciate it.

    • Yes.
    • disable the plugin
    • delete all the old routes relating to the plugin in your dashboard.
    • read the first comment and make your changes, or do the clone.
    • and enable the plugin.

    its really quite simple, you should be able to do that with your skillset.

    if you clone the plugin
    - rename everything folders. files, and any instance of the ExtraPage or extrapage in each and every file to whatever the heck you want.

    make sure you match all cases upper and lower case exactly.

    ExtraPage  - ROobertPage
    extrapage -  roobertpage
    

    if you are capable of changing all names correctly - you will have what you want done.

    if you can't figure it out. send me a donation and I will do the renaming for you exactly as I specified you should do via my text editor search and replace function.

    As much as I like to solve issues, solving esoteric, specific issues on plugins that i wrote, there comes a time when I run out of FREE time, especially for trivial cosmetic url issues.


    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    r0obertr0obert
    edited June 2014

    @peregrine I managed to get as close as "mywebsite.com/R0oberta" but I cannot figure out how to get rid of the "a" and get /R0obert.

    I cloned plugin, searched and replaced:

    ExtraPage -> R0obert
    extrapage -> r0obert

    in:

    a) plugin folder name from ExtraPage -> R0obert
    b) default.php
    c) all files inside /views folder

    Edit: Didn't see this:

    @peregrine said:
    As much as I like to solve issues, solving esoteric, specific issues on plugins that i wrote, there comes a time when I run out of FREE time, especially for trivial cosmetic url issues.

    ..sorry I will figure it out myself. Thanks for your support, I will definitely make a donation for your efforts.

  • Options
    peregrineperegrine MVP
    edited June 2014

    shouldn't be too difficult for you based on what you just said:

    • change the file in views from R0oberta to r0obert

    • search for R0oberta and replace with R0obert

    • search for r0oberta and replace with r0obert

    • search for R0obertA and replace with R0obert

    • search for r0obertA and replace with r0obert

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    I wanna do this too, but I put Van2Shout on extrapage page, manually added it to header, but have url in browser /discussions/extrapagea when shoutbox is opened is very weird and SEO unfriendly...

  • Options
    peregrineperegrine MVP
    edited June 2014

    @deathbeam said:
    I wanna do this too, but I put Van2Shout on extrapage page, manually added it to header, but have url in browser /discussions/extrapagea when shoutbox is opened is very weird and SEO unfriendly...

    there have been at least 3 if not me ways to add a shoutbox to a separate page to meet your shoutbox needs.
    if this plugin is too seo unfriendly for you, I recommend you try a different way.

    you can use the other mod under the shoutbox plugin comments or the other option. As far as SEO unfriendly, personally, I couldn't give a rip.

    at least you liked the peregrine reactions plugin enough to use it. thanks for using that one. :)

    tell me your specs, and what it needs to be seo friedly, and your budget , if the other mods don't work for you, and I will gladly customize a free plugin to suit your needs depending on whether your budget can meet my needs to make those changes.

    Perhaps, with six months or a year's time (or less) of studying vanilla, you will be able produce add-ons as they should be done, and you won't have the need to carp about SEO unfriendly plugins anymore.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    Hmm I learned C# perfectly in 3 months, VB6 in 2 months and VB.NET iN 1 month (ofc after switching from VB6). I am sure that I will get used to Vanilla in less that 3 weeks ;)

  • Options
    peregrineperegrine MVP
    edited June 2014

    @deathbeam said:
    Hmm I learned C# perfectly in 3 months, VB6 in 2 months and VB.NET iN 1 month (ofc after switching from VB6). I am sure that I will get used to Vanilla in less that 3 weeks ;)

    great looking forward to your new well constructed plugins.

    it took me ZERO years to learn C#, VB6 and VB.NET. :) since I never learned them.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    hgtonighthgtonight ∞ · New Moderator

    @deathbeam said:
    Hmm I learned C# perfectly in 3 months, VB6 in 2 months and VB.NET iN 1 month (ofc after switching from VB6). I am sure that I will get used to Vanilla in less that 3 weeks ;)

    I started learning C/C++ 14 years ago and I still learn new things about it everyday. I started with Garden 2 years ago, and am consistently impressed with the depth and breadth of the framework. Vanilla is nice too ;).

    @peregrine said:
    it took me ZERO years to learn C#, VB6 and VB.NET. :) since I never learned them.

    Lol. You aren't missing a whole lot with VB and VB.NET. They should never be used outside of microsoft office products, imo.

    C# is pretty decent, since Mono is a thing these days.

    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.

  • Options
    peregrineperegrine MVP
    edited June 2014

    hgtonight said: Lol. You aren't missing a whole lot with VB and VB.NET

    hg, I forgot to mention I leaned BASIC-PLUS , haven't had the need for it lately though. :) as well as the BASIC when they came out with the new operating systems in MS-DOS 1.1 and CP/M ( 2.9 months to learn print "hello world")

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    hgtonighthgtonight ∞ · New Moderator

    @peregrine said:
    hg, I forgot to mention I leaned BASIC-PLUS , haven't had the need for it lately though. :) as well as the BASIC when they came out with the new operating systems in MS-DOS 1.1 and CP/M ( 2.9 months to learn print "hello world")

    My first ever experience with programming was BASIC on an Apple IIe. That thing was old even when I was using it in kindergarten. No text editor and once you hit enter, there was no editing that line anymore. I distinctly remember coming up with a ROT13 program to make "secret" messages.

    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.

  • Options
    peregrineperegrine MVP
    edited June 2014

    .

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    I am glad that my little comment started this programming discussion :wink:

  • Options
    deathbeamdeathbeam New
    edited June 2014

    @hgtonight said: I started learning C/C++ 14 years ago and I still learn new things about it everyday. I started with Garden 2 years ago, and am consistently impressed with the depth and breadth of the framework. Vanilla is nice too ;).

    C++ is something different and imo a lot harder to master. C# is great like you said becouse of Mono. I am making games using SFML.NET multimedia library port (to what I am also contributing) so my thingies are always cross-platform ;)

  • Options
    peregrineperegrine MVP
    edited June 2014

    @r0obert said:

    . Thanks for your support, I will definitely make a donation for your efforts.

    also In lieu of sending me a donation directly - please send it to @Caerostris instead he deserves it, as you are in <3 with his plugin.

    http://vanillaforums.org/profile/17116/caerostris,

    I will ask him to let me know if he receives a donation from you.

    and I'll post a note in this here discussion, if a donation is received.

    you might also look here for a third option and then you can choose controllers under the base render.

    http://vanillaforums.org/discussion/27229/caerostris-some-changes-diff-didn-t-display-too-well-for-me

    I suppose you will be running the gamut and asking these questions next:

    • how do I add the van2shout to the signatures plugin?
    • how do I add the van2shout to the registration page?
    • how do I add the van2shout to the buttonbar?
    • how do I add the van2shout to the Custom Pages?
    • how do I add the van2shout to the vchat?
    • how do I add the van2shout to the fishtank-plugin
    • how do I add the van2shout to the marquee-plugin
    • how do I add the van2shout to the vanilla api plugin
    • how do I add the van2shout to the pages-application
    • how do I add the van2shout to the candy-application
    • how do I replace my avatar with van2shout

    • however how to add a separate van2shout page to van2shout plugin is here (and you can comment out the controllers or events to rigger on to make it only display on its own page.

    http://vanillaforums.org/discussion/27229/caerostris-some-changes-diff-didn-t-display-too-well-for-me

    I can't wait to see which location and positions you want to add it to next? >:)

    the suspense is overwhelming me.

    solution for adding van2 shout to extra page - done.
    solution for adding van2shout to basic pages - pending

    http://vanillaforums.org/discussion/27218/van2shout-with-basic-pages

    how do I replace my avatar with van2shout - solution pending
    how do I the van2shout to the fishtank-plugin - solution pending

    • how do I the van2shout to the registration page- solution pending

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    you forgot van2shout and FishTank plugin as a background of the chat box lmao !

Sign In or Register to comment.