Profile URL v1.1

Release Notes

Fixed 404 when username contains a dot

  • Works great on Elgg 1.8.6! Thanks Matt.

  • @Matt : want to reduce one more line? Remove global $CONFIG and use elgg_get_config('pagehandler) 

  • That bug I found if the username contains a dot, now I tried this updated plugin. I can see the dot between username changes into this  ( - ) instead of ( . )

  • @Mattz: r u planning newer features to enhance this?
    i have some feature ideas.. if u r interested - that will make
    this plugin more of novelty and put it on par w/ the best
    of the 'other cmss' out there..

     

  • ps: * only 20 lines of real code minus all the blurbz ;P

  • @Mohammed Aqeel - Already got that one in github, thanks  :)

    @Kissssss4ever - yes, it changes the ( . ) to ( - ) in the url

    @Dhrup - I don't really have plans to do anything more with this.  I have no need of it myself.

  • Thanks for this - exactly what I was looking for :)

  • As Mohammed Aqeel said "want to reduce one more line? Remove global $CONFIG and use elgg_get_config('pagehandler) "

    May I know why we need to make that changes? Although this plugin works fine for me but I wanna know why we need to chage those codes???


  • You don't need to make those changes, it works fine as is.  It's purely an ego thing.  The fact that others were wading though many hundreds of lines of code and I was able to pull it off with about 3% of that.  Now it's a game - just how small can I make it  :)

  • nice plugin... can u please add same thing for groups too? it would be much helpful..

     

  • @k4e: there is no need of changing that line. As matt mentioned, its just fun to see how much the code can be minified. 

  • @kisssy!!!! now.. now.. tell me that you don't realyyy wanna do that 1-line code change, do you? as in... aren't you a little too young to be going foolign around.. just changing elgg plugins' code ? what if through some freak accident of mother-nature - your whole site gets damaged beyond repair ? who-ya-gonna-call ? you do not need to make any changes.

    @matt: lolz & goodddd mawning matey !;-P *and.. nooo @ 'ego' @elgg ;-P There's a concept and a real practice almost as old in computing sciences as i am (letting out my grayhaired@mooch-face;) by Gerald Weinberg - described here - http://www.stevemcconnell.com/ieeesoftware/eic09.htm expounding the ' Psychology of Computer Programming '.. interesting reading stuff and 'condoned' by the IEEE no less ! the 'game' is mere dust in the eye(s). just nix it out & away ;-P 20 lines minus 1 loc ? wazza the diff ? it's not like the whole entourage !;-oO;X let'em axe n let'em code it demselvs.. and ps: you didn't merely -- 'pull it off..' yew pulled and lost a few synapses to deliver the goods, man! and that's the way stay cool (& no pun intended re: your weather;)

     

  • Thanks a lot everyone for your kind replies on time.

    Matt Beckett you did a great job, I think this plugin is number one and should be on the top of all plugins in Elgg. Because short URL u made it possible with small codes. You are my fav expert now. I hope you would make the same short url for groups, blogs etc as well same as Satheesh PM said. Because blogs, groups etc give only numbers in the URL 12345 etc. That would be another great achievement for Elgg if you can make that possible same you did for short profile URL.

     

  • @ Matt can this plugin morph into my desired plugin which uses the members title name instead of username for the the short URL (and magically add a second series of numbers to the string like a zip code) of would that be another complete plugin altogether?

  • @Dhrup - depends on perspective, minimizing 1 line out of hundreds is a drop in the bucket, minimizing 1 line out of 20 is a 5% difference!  :)

    @k4e, @Satheesh - it's really not a great idea to be doing this with many things.  Personally I don't think it's a great idea to be doing this with profiles - though I'm glad you're happy with it.  The more types of urls you change to just <base_url>/<title> the more conflicts you're going to get.  Right now you're just pissing off the guy whose username is 'blog' or whatever.  Now you're going to be creating conflicts where groups and users have the same name, and groups and a pagehandler have the same name.  It's a slippery slope, with no good benefit.  Blogs and groups still have friendly URLs, the title is in the URL, the numbers are there for uniqueness as two or more blog posts/groups may have the same title/name.

     

    @Billy - potentially, but if you don't use username you run the risk of more clashes.  There still has to be something in the URL that can point unambiguously to a user.

  • @Matt Beckett if this plugin can do same thing with groups then  it would  be like in the facebook... baseurl/groupname

    group owner can advertise like 'follow us on baseurl/groupname for latest updates.. instead of baseurl/groups/groupname

     

  • Matt Beckett yesterday 

    @Dhrup - I don't really have plans to do anything more with this.  I have no need of it myself.

    --- i hear ya, buddy ;o.. u r maybe @mindframeset ! code just b/c it is mostly fun and why? why not? because.. it cud be done ;-X

     

  • @Dhrup - pretty much, I enjoy coding.  To me it's like playing with lego, but I never run out of blocks

  • @Matt Beckett thanks for the reply I fully understand and agree with u there could be conflicts. But as Satheesh PM  said again follow us on baseurl/groupname for latest updates if that is possible then THAT WOULD BE AWESOME....  <3

  • Gosh Matt, where were you 2 years ago where I could just snap my fingers and you would slam a plugin for me, Instead I had to go the read method or pay to get er done. Kissessss you are so lucky that all you have to do is ask and very talented people spend their free time developing your website. 

  • Sorry Steve, I know it seems like I've been around here forever but I'm still a relative newcomer - only 18 months.  I'm like the Stephen King of plugin development I guess  :)

    That said you are correct, @k4e is extremely lucky, but s/he wasn't the motivation behind doing this plugin.  Honestly, this one took me maybe an hour and half to do - while watching tv, including testing and uploading it here.  It was due to frustration at seeing the same thing being discussed and no-one coming up with what seemed to me to be a really obvious solution (even though I hinted at the correct way to do it more than once).

    You're a better person for going through the learning curve.

  • Steve Aquila I am fully agree with you :) but thanks to Matt Beckett  he really did that.

    Well, to be honest I am very creative but the thing is I am new to elgg. Once I know the basic then soon I would start creating my own plugins for elgg. I'm just learning these days trying to know the very basic things like how to integrate something in elgg website. But I hope I would also soon start making plugins just need sometime. While I'm enjoying elgg a lot, I have wasted my years on paid social networks. Wish if I knew elgg earlier...

    My thanks to the all elgg experts, team and members...all are so kind doing help each other without money... Elgg is great script everything in Elgg is free and support of good members make it more better than all paid scripts.

  • Great plugin, works so nice! Elegant code (which I didn't understand yet). Thumbs up!

  • Awesome plugin!!

    Magical Framework LOL hahahahahaha

     

  • Thanks very much. I have to visit threads I was asking about this and include a link. Just one thing though. If someone inserts another "/" by accident then there is an error response. Should it be like this?

Matt Beckett

I'm a self-employed web developer, family man, nerd, scuba diver. Manager/maintainer of this elgg community site, and core Elgg development team member.

Stats

  • Category: User admin
  • License: GNU General Public License (GPL) version 2
  • Updated: 2014-11-27
  • Downloads: 2950
  • Recommendations: 23

Other Projects

View Matt Beckett's plugins