2013-01-13, 23:32:38
(This post was last modified: 2013-01-13, 23:48:44 by stevenjaycohen.)
May I suggest that you name it news_manager_createpost.php instead?
That way, it groups with the other plugins in the plugins folder.
I am trying to port some code I wrote for Drupal 6 to News Manager.
http://sjc.sdf.org/post/blog-this-bookma...r-drupal-6
If you are browsing the Web and see something that you would like to post about. You can click the bookmarklet and it will make a new post and quote the web page for you.
I haven't gotten it working yet, but I thought if I posted it here. Someone might be able to help out.
This version launches in a sized popup window:
That way, it groups with the other plugins in the plugins folder.
(2013-01-13, 06:45:38)Carlos Wrote: Save as nm_createpost.php in your plugins folder.
I am trying to port some code I wrote for Drupal 6 to News Manager.
http://sjc.sdf.org/post/blog-this-bookma...r-drupal-6
If you are browsing the Web and see something that you would like to post about. You can click the bookmarklet and it will make a new post and quote the web page for you.
I haven't gotten it working yet, but I thought if I posted it here. Someone might be able to help out.
Code:
javascript:u=document.location.href;t=document.title;s=
''''+window.getSelection()+'''';
pre=''From <a target="_blank"
href="''+escape(u)+''">''+escape(t) + escape(''</a>:
'');void(window.open(''
http://sjc.sdf.org/admin/load.php?id=news_manager&edit&
edit[title]=''+escape(''Link: ''+t)+''
&edit[body_field][body]=''+pre+escape(s)
+escape(''<a href="''+u+''" target="_blank">Link</a>'')));
Code:
javascript:u=document.location.href;t=document.title;
s=''''+window.getSelection()+'''';
pre=''From <a target="_blank"
href="''+escape(u)+''">''+escape(t) + escape
(''</a>:<br /> '');void(window.open
(''http://sjc.sdf.org/admin/load.php?id=news_manager&edit&
edit[title]=''+escape(''Link: ''+t)+''&edit[body_field]
[body]=''+pre+escape(s)+escape(''
<a href="''+u+''" target="_blank">Link</a>''),
''_blank'',''width=710,height=500,status=yes,
resizable=yes,scrollbars=yes''));