[pLog-svn] r1924 - plog/branches/plog-1.0.1/templates/admin
Mark Wu
markplace at gmail.com
Mon May 2 17:43:40 GMT 2005
Forgot to mention, both of bookmarklet already tested under Moaillz/FireFox
and IE. But, not opera.
Mark
> -----Original Message-----
> From: plog-svn-bounces at devel.plogworld.net
> [mailto:plog-svn-bounces at devel.plogworld.net] On Behalf Of
> mark at devel.plogworld.net
> Sent: Tuesday, May 03, 2005 1:32 AM
> To: plog-svn at devel.plogworld.net
> Subject: [pLog-svn] r1924 - plog/branches/plog-1.0.1/templates/admin
>
> 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=newLi
nk&linkName='+encodeURIComponent(document.title)+'&linkUrl='+encodeURICompon
ent(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_r
> esource")}</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=newPo
st&postText='+encodeURIComponent(document.selection.createRange().text)"
onclick="window.alert('{$locale->> tr("bookmarklet_help")}');">IE</a> /
> + <a
> href="javascript:location.href='{$url->getAdminUrl()}?op=newPo
st&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}
>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.plogworld.net
> http://devel.plogworld.net/mailman/listinfo/plog-svn
More information about the pLog-svn
mailing list