Ever read a thread, going along and ++'ing those nodes that you think deserve it and --'ing trolls (as few as they are), reach the end and vote? Suddenly, the cogs in your mind start spinning and before you know it you are thinking of all the nifty and fantastic stuff you could do. You bookmark the page because you have something else to do (i.e. pay attention to your significant other, let the dog outside, get back to work because you just heard your boss clear his throat from somewhere behind you and you really enjoy having a job). Later on when you're no longer busy, you remember about that fantastic node you bookmarked. You open your browser, pull down your favorites, spot the document title you remembered, and....ah geez...The Monastery Gates? You didn't bookmark that. What on earth? Is someone playing a trick on you?

Of course no one is playing a trick on you. There's a perfectly legitimate reason why all of this happens. Voting POSTs to index.pl. Why? If the form were submitted through GET and you bookmarked the page after you clicked vote, you'd vote for everything again everytime you visited the bookmark. I don't know how index.pl would cope, but I'm certain it would take it like a champ. Anyhow, I don't know if it would work, but a workaround could be to POST to /index.pl?node_id=Xnode_id_of_the_current_nodeX. Of course, it might not work in which case I'd like to beg for someone to come up with a solution. Sometimes my mind wanders off after "experiencing" some of the ideas put forth by fellow monks and in this state of euphoria, I don't think about what I'm doing and thus end up with a favorites list half-occupied with mislabeled bookmarks to the gates. Please help a poor monk who just wants to have his mind candy.

p.s. I applied to pmdev some time back yet was put in the backlog and am not available to implement the feature.

antirice    
The first rule of Perl club is - use Perl
The
ith rule of Perl club is - follow rule i - 1 for i > 1

Title edit by tye

  • Comment on Bookmarking after a submit bookmarks The Gates; change target= ?

Replies are listed 'Best First'.
Re: Why I hate voting -or- a grown man's plea to change vote submission
by VSarkiss (Monsignor) on Aug 28, 2003 at 19:59 UTC

    I asked about that a couple of years ago, and got some interesting replies and discussion.

    That part of the code hasn't changed much since then, but my impression is that it's a lot more work than I thought. (Though that's not meant to discourage you or anyone else from making the changes....)

Re: Why I hate voting -or- a grown man's plea to change vote submission
by belg4mit (Prior) on Aug 28, 2003 at 20:02 UTC
    Try using your personal nodelet, it should still know where you are after voting (although I recommend "add to scratchpad").

    --
    I'm not belgian but I play one on TV.

Re: Why I hate voting -or- a grown man's plea to change vote submission
by bart (Canon) on Aug 28, 2003 at 21:50 UTC
    Hmm... that ties in very well with another pieve of mine: that it is so damn hard to get a reference to the current node, once you posted something, be it vote, or in the chatterbox, if for example you want to mention it to other monks. Sure, it's possible to display the node ID in the title of the current document, which then appears in the title bar, but you can't copy it easily. If you hadn't posted yet, at least you could copy the node ID from the location textbox.

    The solution I was thinking of, if you can even call it that, is to make title of the node, a link to the node tself. Thanks to CSS, appearnace could just as well remain identical to what it is now, but at least you could simply reload the file, as "GET", by clicking on it, after which you can copy the node id from the location bar.

    Granted, it's still iffy, but it would be a perfect solution for your current grief: you could reload the page by clicking on the title, and then bookmark; or, if you don't mind rightclicking, select "bookmark this link" (using Mozilla's terminology from the popup-menu. There. Perfect.

    p.s. I'd still love it if the node id appeared somewhere near the ttile in the format [id://123], which would making copying it even easier. I don't know how obstrusive that would look.

      At one point I submitted a patch which was applied that had extra entries in the "( print w/ replies, xml )" bit, which was a regular link to the node itself, but many complained about it (ar0n) and it was removed.

      JavaJunkies turns the title of a node (like "Why I hate voting -or- a grown man's plea to change vote submission") into a link, and I'd also like perlmonks to do the same.

      MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
      I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
      ** The third rule of perl club is a statement of fact: pod is sexy.

        I, for one, would like to see such a thing. For bonus points, add in a style="text-decoration: none" (IIRC) to remove the underlining. Shouldn't be to difficult a patch, either. (I'm thinking about an alternate method, though, that would change from using hidden parameters (which get POSTed) to adding on to the URL to maintain the node_id, but that won't get finished for a while, due to other pressing matters.)

        Update: There's an easy way to do it, but it requires modifing CGI.pm (search for "Some pople want to have their cake and eat it too!", around line 443).


        Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).

Re: Why I hate voting -or- a grown man's plea to change vote submission
by Aristotle (Chancellor) on Aug 29, 2003 at 11:16 UTC
    Personally, I've long thought PM needs a rewrite rule such that rather than /?node_id=287487 links would point to /287487/ .. Simply removing the action from any form on the page would then automatically have the browser returning to the right page, among other effects. Search engines like this better too. (Yes, I know about thepen.)

    Makeshifts last the longest.

      thepen was created because it was possible without the red tape of changing PM (the difficulty of making changes to an active site and the fact that the power to make even the most trivial changes means having the power to blow the whole thing away so very few people can authorize changes). It was not because it was considered a better solution (though I'm certainly glad to have it).

      I'd love to eventually have perlmonks.org/287487 and perlmonks.org/robot/287487 (this later resulting in google-friendly style such as no chatterbox, etc.)

                      - tye
Re: Why I hate voting -or- a grown man's plea to change vote submission
by simonm (Vicar) on Aug 28, 2003 at 21:21 UTC
    The rule of thumb I use in developing web applications is that when submitting a form causes some kind of an action, such as voting or buying something, the script should apply the changes and then redirect to an appropriate url that shows the results.

    This would eliminate the "double submit" problem as well as the "useless bookmark" problem, at the cost of a slower response time to such requests.

    I haven't poked through the slash code base (Update: or Everything's), so I don't know how difficult it would be to make such a change in this particular case.

      It ain't slash.
      This page brought to you by the kind folks at The Everything Development Company and maintained by Tim Vroom. Perl Monks is a proud member of the Yet Another Society. Wonderful Web Servers and Bandwidth Generously Provided by pair Networks
Re: Why I hate voting -or- a grown man's plea to change vote submission
by BrowserUk (Patriarch) on Aug 28, 2003 at 23:03 UTC

    FWIW. I tend to use copy-link from the xml link and then edit out the "&displaytype=xml". This would work better if the link(s) were relative rather than absolute though.

    Which begs the question: Why are all the links absolute?


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller
    If I understand your problem, I can solve it! Of course, the same can be said for you.

      Which begs the question: Why are all the links absolute?

      They aren't. None of the links are absolute. View the HTML source. Your browser takes the relative URLs and converts them to absolute URLs and gives those to you when you cut'n'paste (rather "copy") URLs. Presumably because relative URLs just aren't as useful in most situations when you'd want to paste a URL.

                      - tye

        My object lesson for today. Read the source Luke!

        Thanks.


        Examine what is said, not who speaks.
        "Efficiency is intelligent laziness." -David Dunham
        "When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller
        If I understand your problem, I can solve it! Of course, the same can be said for you.

Re: Why I hate voting -or- a grown man's plea to change vote submission
by guha (Priest) on Aug 29, 2003 at 07:55 UTC

    How about invoking "back" in your browser and THEN saving the bookmark ??

    I know that it is somewhat awkward but considering the amount of "fantastic" nodes here at the monastary, you will get plenty of practice and soon the action will be autonomous ;-)

      That only works if you haven't used CB before voting on that page ;-(.

      I have similar problems with Super Search: if I click on a find, and then go back to the list, many times I get another (older) page with "index.pl", not the Super Search page I just had. This may be a Safari bug, but it is annoying nonetheless. I've learned to open links from a Super Search in another tab and close that tab when I'm done there.

      Liz

        I knew there was a gotcha ...

        I don't know if it is practical in every case but you could extend my advice to "click back in browser until you see the URL http://www.perlmonks.org/index.pl?node_id=nnnnnn in the adressfield and THEN save ...."

Re: Bookmarking after a submit bookmarks The Gates; change target= ?
by artist (Parson) on Aug 29, 2003 at 17:01 UTC
    An alternative solution is to combine the voting and bookmark, possible via having a checkbox at each node (to bookmark), along with voting radio buttons.

    I think it's not a bad idea beacuse generally what you like, you might want to refer it again.

    artist
    ===============
    AIming for AI