我想制作bookmarklet [英] I want to make bookmarklet

查看:99
本文介绍了我想制作bookmarklet的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我正在制作一个网络应用程序。

我的问题是我想为我的应用程序制作bookmarklet。

因此,如果用户在我的网站上登录后,如果他将某些东西加入书签并在我的网站上,他会选择他的书签,然后在我的网站上的特定文本区域等上检索书签页面的所有信息。

<罢工>请紧急请快点...

提前谢谢。

Hi everyone,

I am making a web application.
My problem is that I want to make bookmarklet for my application.
So if after user login on my site if he bookmark something and on my site he comes and select his bookmark then all the information of bookmark page retrieved on my site on particular text area etc.
Its urgent please rpl fast...
Thanks in advance.

推荐答案

什么你到目前为止试过吗?我什么都没想。你在未知方向射击问题。现在,这是一个启动提示:

1)创建一个数据库表来存储用户ID和书签ID。

2)创建一个存储用户ID和书签ID的函数在此表中。

3)点击添加到书签按钮调用此功能。

4)当用户登录并单击我的书签链接时他存储的书签列表并显示在页面上。

5)另外,创建一个Bookmarks主表(这应该是第一步)。此表的主键将是表中用于存储用户标识和书签标识的外键。此表是为了确保将来如果您更改页面的网址,则用户的书签最终不会出现错误404.



替代解决方案是存储页面的URL与用户ID一起在表中。但是,您将不得不处理如果URL在未来发生变化会怎么样的情况?



尝试这些东西并不像看起来那么难。无论您遇到什么困难,请发布您的问题,我们将很乐意为您提供帮助。但是不要指望拿到完整的解决方案。
What have you tried so far? I suppose nothing. You are shooting question in unknown direction. Now, here is a startup tip:
1) Create a database table to store userid and bookmark id.
2) Create a function that will store the userid and bookmark id in this table.
3) Call this function on click of "Add to bookmark" button.
4) When user logs in and click "My Bookmarks" link get the list of his stored bookmarks and display on the page.
5) Also, create a master table of Bookmarks(this should be the first step). The primary key of this table will be the foreign key for the table in which you will store the userid and bookmark id. This table is to ensure that in future if you change the url of a page the bookmarks of a user does not end up in error 404.

Alternate solution is to store the pages''s url in a table along with the userid. But again you will have to handle the situation like "What if the URL changes in the future"?

Try these things it is not that hard as it looks. Wherever you are stuck, post your question and we will be happy to help further. But do not expect to get the complete solution in hand.


这篇关于我想制作bookmarklet的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆