[pLog-svn] r1924 - plog/branches/plog-1.0.1/templates/admin
mark at devel.plogworld.net
mark at devel.plogworld.net
Mon May 2 17:31:36 GMT 2005
Author: mark
Date: 2005-05-02 17:31:36 +0000 (Mon, 02 May 2005)
New Revision: 1924
Modified:
plog/branches/plog-1.0.1/templates/admin/newlink.template
plog/branches/plog-1.0.1/templates/admin/newpost.template
Log:
Add two bookmarklets to template files. Now, user can install them through newLink and newPost view without any additional file download.
1. Bookmark It to pLog. (Add currrent url to pLog new link)
2. Blog It to pLog. (Add selection text to pLog new post)
Modified: plog/branches/plog-1.0.1/templates/admin/newlink.template
===================================================================
--- plog/branches/plog-1.0.1/templates/admin/newlink.template 2005-05-02 14:35:29 UTC (rev 1923)
+++ plog/branches/plog-1.0.1/templates/admin/newlink.template 2005-05-02 17:31:36 UTC (rev 1924)
@@ -1,5 +1,11 @@
{include file="$admintemplatepath/header.template"}
{include file="$admintemplatepath/navigation.template" showOpt=newLink title=$locale->tr("newLink")}
+{if $smarty.request.linkName}
+ {assign var=linkName value=$smarty.request.linkName}
+{/if}
+{if $smarty.request.linkUrl}
+ {assign var=linkUrl value=$smarty.request.linkUrl}
+{/if}
<form name="newLink" action="admin.php" method="post">
@@ -50,6 +56,11 @@
{/foreach}
</select>
</div>
+ <div class="field">
+ <label for="bookmarklet">{$locale->tr("bookmarklet")}</label>
+ <div class="formHelp">{$locale->tr("bookmarklet_help")}</div>
+ <a href="javascript:location.href='{$url->getAdminUrl()}?op=newLink&linkName='+encodeURIComponent(document.title)+'&linkUrl='+encodeURIComponent(location.href)" onclick="window.alert('{$locale->tr("bookmarklet_help")}');">{$locale->tr("bookmarkit_to_plog")}</a>
+ </div>
</fieldset>
<div class="buttons">
<input type="hidden" name="op" value="addLink" />
Modified: plog/branches/plog-1.0.1/templates/admin/newpost.template
===================================================================
--- plog/branches/plog-1.0.1/templates/admin/newpost.template 2005-05-02 14:35:29 UTC (rev 1923)
+++ plog/branches/plog-1.0.1/templates/admin/newpost.template 2005-05-02 17:31:36 UTC (rev 1924)
@@ -1,5 +1,9 @@
{include file="$admintemplatepath/header.template"}
{include file="$admintemplatepath/navigation.template" showOpt=newPost title=$locale->tr("newPost")}
+{if $smarty.request.postText}
+ {assign var=postText value=$smarty.request.postText}
+{/if}
+
{assign var=htmlarea value=$blogsettings->getValue("htmlarea_enabled")}
<script type="text/javascript" src="js/ui/plogui.js"></script>
<script type="text/javascript" src="js/calendar/datetimepicker.js"></script>
@@ -80,7 +84,15 @@
{if !$htmlarea}
<a href="javascript:resource_list_window(2);">{$locale->tr("add_resource")}</a>
{/if}
- </div>
+ </div>
+
+ <div class="field">
+ <label for="bookmarklet">{$locale->tr("bookmarklet")}</label>
+ <div class="formHelp">{$locale->tr("bookmarklet_help")}</div>
+ {$locale->tr("blogit_to_plog")}
+ (<a href="javascript:location.href='{$url->getAdminUrl()}?op=newPost&postText='+encodeURIComponent(document.selection.createRange().text)" onclick="window.alert('{$locale->tr("bookmarklet_help")}');">IE</a> /
+ <a href="javascript:location.href='{$url->getAdminUrl()}?op=newPost&postText='+encodeURIComponent(window.getSelection())" onclick="window.alert('{$locale->tr("bookmarklet_help")}');">FF</a>)
+ </div>
<!-- text area custom fields -->
{include file="$admintemplatepath/newpost_customfields.template" type=2 fields=$customfields}
More information about the pLog-svn
mailing list