Code for bookmarklet here...

Your users can use this code to place a bookmarklet on their browsers toolbar, be sure to replace www.example.com with your site.

javascript:q=(document.location.href);void(open('http://www.example.com/submit?url='+escape(q),'','resizable,location,menubar,toolbar,scrollbars,status'));

bookmarklets only working if already logged in

These bookmarklets only seem to work, if you are already logged in to your Drigg site. If not, they send you to an "access denied" page; and if now you log in, you go to the Scoop Submit page, but it is blank, not populated by the submitted story.

Fortunately, since the submit page was opened in a new window, it is possible to now go back to the original story and re-submit - now that you are logged in, it works fine. As long as you know this (i.e., are experienced with the system), and don't just immediately assume something is amiss.

I note that Drigg's very similar bookmarklet behaves nicely in this regard - if you are not logged in when submitting a story, you are directed to a login page, and after logging in, the submit page is properly populated with the submitted story.

This is particularly significant for my user population - if you keep yourself persistently logged in, no problem - but I have a bulk of users (at a college) using library terminals, needing therefore to log off after a session to permit others to log in.

Looking over the bookmarklet code, I don't see much difference between those here, and that for Pligg (below):
Pligg bookmarklet code:
javascript:q=(document.location.href);void(open('http://YOURPLIGGSITEURL/submit.php?url='+escape(q),'','resizable,location,menubar,toolbar,scrollbars,status'));

Any clues on this?

The latest drigg...

Hi,

The latest drigg solves this.
However, IF you are using the latest Drigg, you will need to give "Create contents" access for "scoops" (Admin -> User Management -> Access control) to "Anonymous users".

Drigg will make sure that anonymous users are redirected.

Bye,

Merc.

... The latest drigg solves

... The latest drigg solves this ...

Which version is that?
I'm currently using v 1.1.2.39 2008/08/25 19:44:33

bummer tho -
I'm setting this up for a closed community of contributors (students/faculty of a medical school), so do not wish to permit anonymous users to contribute - do I understand correctly that this would be necessary in order to have the Submit script work when not already logged in?

will

still not able to submit with bookmarklet when not logged in

I'm trying this -
upgraded to the latest release tonight,
v 1.1.2.40 2008/09/25 01:37:17

Gave anonymous users privileges to submit drigg scoops

Using the bookmarklet, when not yet logged in to my site,
I am now redirected to the User Account page with the Create New Account tab active; if I click the Log in tab and log in,
I go to my User Profile page -

but I still do not get the Submit Scoop page with info filled out for the item being submitted;
this only works if I'm already logged in to my Drigg site.

It would be great to have this work when not already logged in; it must be possible (Pligg does this nicely). Any ideas??

will

Please open an issue...

Hi,

Please open an issue for Drigg on drupal.org.

Describe exactly what is happening, and what should be happening instead!
Describe everything in amazingly specific details. It's best if you replicate the problem in www.drigg.org.

Bye,

Merc.

issue opened

done -
see
http://drupal.org/node/314580

thanks for all your hard work on this, Tony - the platform is fantabulous. I can only find small stuff like this to kvetch about ;^).

embedding the bookmarklet

Probably obvious to most folks who have a clue ;^),
but if you're embedding a variation of this bookmarklet in a page (e.g. in an "about" page created as a story node) so that users can save it in their bookmarks with a right-click "bookmark this link" or by dragging to their bookmark toolbar -

the page needs to be set for input format as "full html"

ask me how long it took me to figure this out ...

will taylor
who seems to eventually figure things out :^(

I'm using this code since

I'm using this code since the other code opened in a new window (presumably since the 'resizable, location, menubar, etc...' options are set).


javascript:q=(document.location.href);void(open('http://www.example.com/submit?url='+escape(q),''));

It would be nice if there were a way to populate the Title with the title text from the page. Anyone know if that is possible or maybe could be added to the submit page?

-Dave

Try this!

< a href="javascript:q=(document.location.href);t=(document.title);void(open('http://www.example.com/node/add/drigg?url='+escape(q)+'&title='+escape(t),'',''));" title="Submit Scoop" alt="Submit Scoop">Submit Scoop< /a>

This works by opening in a new tab, with the URL and title intact.

* Plz remove the space in between "< a"

Fill in summary from highlighted text?

Would it be possible to tweak this so that if a user clicks the bookmarklet after highlighting some text on a page he or she wants to submit to drigg, that highlighted text will populate the description/summary field?

What would you add to this to get it to do that?

UPDATE: I figured it out. The Drigg bookmarklet is now kicking mega ass.

What you need to do is add in: s=(document.getSelection()

< a href="javascript:q=(document.location.href);t=(document.title);s=(document.getSelection());void(open('http://www.example.com/node/add/drigg?url='+escape(q)+'&title='+escape(t)+'&body='+escape(s),'',''));"> Submit to Drigg

So now when I go to a page, I highlight some text and then click my bookmarklet....and a new browser pane opens with my Drigg submission form....with the URL, Title AND summary fields filled in. I just give it some tags and voila!

Now I need to see if I can somehow automatically fill in the tags..... :) Gotta make it easy, easy, easy, easy to submit links to our sites, right?

Question: The bookmarklet above is opening a new browser pane. What if I want it to not do that? To refresh the current pane instead? How do I modify this?

hey bflora, Thanks for this!

hey bflora,
Thanks for this! Is working great for me!
I like opening a new browser window - this way the original story remains open in the background, so it can be consulted if the user wishes to work further on the Description entry.

Interesting! Plus, I don't know...

Hi,

Your bookmarklet is _really_ interesting.
I don't suppose you could have a look here:

http://www.drigg-code.org/pages/download_and_install

Go right to the bottom of the page: you will see a bookmarklet example. I don't suppose you could change *that* one, into something that takes the selected text? And could this help you answer your question as well?

Bye!

Merc.

Here's your download page's

Here's your download page's updated code with selection:

< a href="javascript:q=(document.location.href);t=(document.title);s=(document.getSelection());void(open('http://www.example.com/node/add/drigg?url='+escape(q)+'&title='+escape(t)+'&body='+escape(s),'','resizable,location,menubar,toolbar,scrollbars,status'));" title="Submit to EXAMPLE.COM" alt="Submit to EXAMPLE.COM">< img src="http://WWW.EXAMPLE.COM/path_to_your_image.png" alt="Submit to EXAMPLE.COM"/>< /a>

the code tag is not working for me on this forum, so take care of removing the starting space at the opening and closing A tags as well as at the IMG tag.

Tried that, but still not working

Yeeloon: I tried your code, here's exactly what I typed (minus the opening and closing anchor tags
href="javascript:q=(document.location.href);t=(document.title);void(open('http://www.MYSITE.com/submit?url='+escape(q)+'&title='+escape(t),'',''));" title="Submit Scoop" alt="Submit Scoop">Submit Scoop

So if someone drags this bookmarklet to their bookmark bar, and visits "WWW.COOLSITE.COM" and is looking at an article with the Title of "NEW COOL THINGS" and then clicks the bookmarklet in the bookmark bar, shouldn't it fill out the Submit a Scoop form with the URL and Title of the page they were viewing? Because right now, it just seems to open the submit a scoop page.

Thanks for the help and Merc thanks for Drigg.

It should...

Hi,

It should do exactly as you said. I don't understand why it doesn't. Are you using the official bookmarklet?

Merc.

The "official" one...

Hi,

The "official" code is in http://www.drigg-code.org/pages/download_and_install -- right at the bottom!

Merc.

Thanks

Thanks for this, I'll try it out later tonite and report back on how well it works.

I don't know if I just don't

I don't know if I just don't understand this or not but I can't get it to work. I really want a bookmarklet tool too so I hope someone can explain what I'm doing wrong. All I did was paste it into a section of my site where I'm hosting buttons and things. Besides changing the example.com thing, is there anything else I was supposed to do?

Nevermind. I figured it out.

Nevermind. I figured it out. I didn't realize that I had to attach it to an image or whatever. I'm good now. Thanks.