Web Content Highlighter

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sandy82
Forum Newbie
Posts: 3
Joined: Mon Jun 12, 2006 5:37 am

Web Content Highlighter

Post by sandy82 »

Hi,
I am sandy working as Senior PHP developer, I want to develop a site with functionality same as http://gibeo.net/.

here is my idea,

I will have the two frames one for the site and other for the toolbox the will have the tool to highlight or add comments to the highlighted text in the the web page in frame1 my questions are

1. How do I higlight selected text in frame 1 ?
2. how do I save it so when ever user comes to the site next time he should be able to see the highlighted text and added comments.

Please help me on this, ot just provide some info so that I can go ahead with development.

Thanks,
Sandy.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

I think a lot of this is going to be client side, if I am understanding you correctly. Can you give a few more details?
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Have you looked at their site? They have some cool snippets in the developer section. I'd have a go at those.
sandy82
Forum Newbie
Posts: 3
Joined: Mon Jun 12, 2006 5:37 am

I got the code to highlight :)

Post by sandy82 »

Hi,
I got the code to highlight the selected text in first frame but I can access the the frame1 document object only if the frame1 resource resides in out directory, so for now I am not able to modify the other site content :( ,
Please suggest ......

Thanks for your reply.

Sandy.
printf
Forum Contributor
Posts: 173
Joined: Wed Jan 12, 2005 5:24 pm

Post by printf »

I would just grab the page, process it and then show it with the internal links pointing to your application, but have the page base path pointing to the real page, so images, scripts and css still get loaded. I do this for translation text highlighter that I wrote using Aspell!

pif!
User avatar
bokehman
Forum Regular
Posts: 509
Joined: Wed May 11, 2005 2:33 am
Location: Alicante (Spain)

Post by bokehman »

If the two frames contain documents from different domains the sandbox will not allow any communication between the two.
printf
Forum Contributor
Posts: 173
Joined: Wed Jan 12, 2005 5:24 pm

Post by printf »

bokehman wrote:If the two frames contain documents from different domains the sandbox will not allow any communication between the two.
I totaly agree with you on that point. Thats why managing the documents should be internal. I'll explain it more detail...


Say a user wishes to browse some page....

They enter the url in text box and submit it to the application. The application, builds the user information (browser info, cookies) then send the request for the page using CURL or other type functions. The application then stores the page in a file or database along with the cookie data and page data (last modified, length, ....). Then the application converts all the links to point to it's self, so when a link is clicked the application can fetch that page to, real browsing in a local controled system.

When it comes time for editing, you load the local page in your frame template which allows for the user to add notes, highlight or do anything across frames that your application supports via JavaScript or other. it's sort of like a proxy CMS system, but it can have much more options than just fetching and showing the raw page.


pif!
sandy82
Forum Newbie
Posts: 3
Joined: Mon Jun 12, 2006 5:37 am

CURL

Post by sandy82 »

I have fetched HTML output (only for PHP site I am looking for a option to fetch to for all sites) with the help of CURL and stored it with the same name on my server in specified folder so now I can access the document in first frame :) as its in my domain. but the problem is what if they modify the site tomorrow :(.

also look the way that they are browsing the site

http://yoursite.gibeo.com its very interesting, I mean its working like a subdomain.
Post Reply