Tom,<div><br></div><div>Thanks for the reply. I guess you missed the first part of my post. I am using a code snapshot from May 2010. There is no editors.rb in lib, nor is there a "default editor" in applicaitons.yml.</div>
<div><br></div><div>Are you saying I would be best served by updating my web front end code?</div><div><br></div><div>-Eric</div><div><br clear="all">-=--=---=----=----=---=--=-=--=---=----=---=--=-=-<br>Eric B. Wolf                           720-334-7734<br>
<br><br><br>
<br><br><div class="gmail_quote">On Mon, Dec 13, 2010 at 3:56 PM, Tom Hughes <span dir="ltr"><<a href="mailto:tom@compton.nu">tom@compton.nu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 13/12/10 22:20, Eric Wolf wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
I'm trying to get Potlatch2 setup as the default editor on our OSMCP<br></div>
server (<a href="http://navigator.er.usgs.gov" target="_blank">navigator.er.usgs.gov</a> <<a href="http://navigator.er.usgs.gov" target="_blank">http://navigator.er.usgs.gov</a>>). We built<div class="im"><br>
the site using a snapshot of the OSM code from May 14, 2010. I've setup<br>
Potlatch2 in the rails/public/p2 directory (you can hit it via<br>
<a href="http://navigator.er.usgs.gov/p2/potlatch2.html" target="_blank">navigator.er.usgs.gov/p2/potlatch2.html</a><br></div>
<<a href="http://navigator.er.usgs.gov/p2/potlatch2.html" target="_blank">http://navigator.er.usgs.gov/p2/potlatch2.html</a>>). I've been able to<div class="im"><br>
configure Oauth to work with that URL. To get it to work on the Edit<br>
tab, I cut the code out of /app/views/site/_potlatch2.html.erb and<br>
pasted it over the old code in /app/views/site/index.html.erb. I don't<br>
want to let the user select between Potlatch 1 & 2 - just take them<br>
straight to 2.<br>
</div></blockquote>
<br>
If you want it to default to Potlatch 2 then just change the default editor in config/application.yml and  if you want to hide Potlatch 1 then remove it from the list of available editors in lib/editors.rb.<br>
<br>
That will be far more robust than fiddling with the code.<br>
<br>
I have no idea why you are pasting _potlatch2.html.erb into the index page anyway - that drives the view tab not the edit tab. I suggest you undo that as it sounds like you have broken things.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I've gone through as much of the Rails app as I can seem to track down<br>
(I'm a Rails n00b) and updated everything related to oauth. I noticed in<br>
OSM, on my "oauth settings" I've got "Potlatch2" list as a "token issued<br>
in my name". On my site, I can't figure out how to issue Oauth tokens.<br>
</blockquote>
<br></div>
Once again I suggest you undo whatever you have "updated" as there should be no need to change any of the code.<br>
<br>
Tokens will be issued automatically. All you need to do is register an OAuth application for PL2 and then put the key value into the config file and everything else will happen automatically.<br>
<br>
Go to your user page, then "oauth settings" and "Register your application" and fill in the details (the callback and support urls can be left blank) and you will get given the key value.<br>
<br>
Tom<br><font color="#888888">
<br>
-- <br>
Tom Hughes (<a href="mailto:tom@compton.nu" target="_blank">tom@compton.nu</a>)<br>
<a href="http://compton.nu/" target="_blank">http://compton.nu/</a><br>
</font></blockquote></div><br></div>