Add a comment as a tooltip anwhere in the page with WordPress - ajax

Is there a way to place comments on a WordPress post in a specific place on the page? Like if I was tagging a photo on Facebook, adding a note to a Flickr image, or commenting on Soundcloud wave.
I'm wornking with a special e-book project, and we want to know if WordPress may be used to create a feature to allow the reader to click anywhare in the page to add a comment, that will be then showed as a tooltip.

You could do that of course but you'd probably have to write that logic yourself, can't find a plugin that does that. The Django Book does this; http://www.djangobook.com/about/comments/, and you could build that for WordPress if you'd extend the regular comment with some info on what paragraph in a post the comment was made on, and find out a way to keep track of a paragraph associated to specific comments. It does feel to me like a hard thing to do, maybe there is an existing solution for it, I don't know about that.

Related

One-page AJAX-based WordPress site. How should I do it?

I am trying to create a one-page WordPress website, something like the ones you sometimes see in ThemeForest's WP section: the whole website is a long page that has everything in one place, from about us, to portfolio, to some blog posts, to contacts.
Placing all things on one page is not difficult. But when I started thinking about how to present individual posts and pages, I realised that I probably need a general way of getting posts' data via AJAX, and create new blocks with JS. How should I go about this? I suppose this was done before, but I struggle to find something this specific on Codex or a tutorial with best practices.
Any advice or link will be greatly appreciated.
You could use a plugin such as jQuery Easytabs, download it here, that has a built-in Ajax component.
I've found that the easiest way is to just get all content to load into the divs ahead of time, vs. trying to load all pages through Ajax. However, appending something like '?ajax/ajax' to the end of your urls through the Easytabs plugin is one option that I have successfully used in the past.
If you decide to use the easytabs functionality, there is ample documentation on the page that I linked to.

From drupal to web2py: taxonomy/tagging and comments?

I have some sites that I implemented using Drupal. However as cool as Drupal is I've never been satisfied with coding in it mostly because it's in PHP and I've wanted to work with python. I've flirted with Django but I just recently discovered web2py and it's definitely caught my eye. Seems like it may be a sweet spot between Drupal and Django. Although django-cms is also on my radar.
So now I'm wondering how to re-implement my sites with web2py. Specifically suppose I have a site about DVD players. So in Drupal I'd have a CCK type DVD player, with various attributes. I guess this would correspond to a web2py model. How would I implement something like Drupal's taxonomy which is like a tagging system in web2py? Is there a module/plugin/appliance for that? Or am I manually creating the model schema to handle tagging?
Secondly, how would you handle something like comments and/or reviews on posts? Again, is there a pre-built plugin for this or do I have roll my own?
For tagging, I don't think web2py has anything quite like the Drupal Taxonomy module, but there are some options. First, you could create your own many-to-many model to assign tags to items. Another simpler option is to use web2py's list:reference field type to de-normalize the many-to-many relationship (the end of that section in the book includes a tagging example).
For existing tagging solutions, you can also check out web2py's plugin_wiki, which includes a tag widget. You can get it from the download page, or pull the source code directly. Another option is Powerpack, which includes the Instant Press CMS, which includes tagging and categories functionality.
Also, both plugin_wiki and Powerpack include comment plugins.
Finally, you'll generally get more and quicker responses from knowledgeable web2py users on the web2py mailing list.

Image upload process usability

this is more of a usability/design approach, rather than "how" question. It is html 5 and web 2.0 age, and I want more than just "select/submit" buttons.
My question is regarding blog application: I want to have a nice way to upload and attach images to posts. Right now layout is simple: it has subject and body (for body I have BBCode editor). I can refer to images from the body using [img] tag.
If someone has any ideas/links how to organize image attaching to blog posts - please share!
The best way to go about this is to check out what other people are doing to solve this usability problem. Why don't you simply check out a few free blogging sites or engines to see how they handle it? Wordpress, for example, has a few different options of embedding images in posts, and it's done fairly well in their post editor. Create a free account at wordpress.com and play with it.

HTML codes showing in viewpage HTML data

I’m a new to Codeigniter. Just using it in my project from last 2 months. I’ve a comment section in my project. Where any one can give comments. Every things are going perfect but when ever any one putting HTML content(image/videos) & then when those are showing back in the comment section… direct HTML codes are showing in the comment page rather than HTML content(image/videos).
ex: when i’m saving any “embed youtube video code” in the comment box & save that the out put comes as “raw Embed Video codes” rather than Youtube Video…..
I feel like it must be a minor thing but really can’t understand where the fault has occurring. Plz, if any body have the solution reply me back as soon as possible.
Couldn't one devise a system where somebody just posts the youtube link itself and through a combination of regular expressions your own system generates the object/embed code itself so there's no security risk possible?
I had a similar problem a while back - wanting to give end users the ability to post YouTube videos, but not allow them to just post anything without some sort of XSS protection.
I ended up using htmlpurifier - http://htmlpurifier.org/ to filter the contents being submitted in the form.
There is a modification that can be made to the whitelist that allows YouTube code through the purifier.
http://htmlpurifier.org/docs/enduser-youtube.html
So far, that's working well, but my system is still in development.
As a quick hack you can do htmlspecialchars_decode when displaying the comment in your view. This is very dangerous though without the use of sanitization when you receive the comment - search xss_clean on this page. You should also use strip_tags to remove all the HTML tags you don't need (everything except the video tags) prior to inserting the comment in the database.

Get URI fragment (hash) to affect SEO? Get indexed by SEs?

I am building a forum site where the post is retrieved on the same page as the listing via AJAX. When a new post is shown, the URI fragment is changed (ex: .php#1_This-is-the-first-post). Also the title and meta tags are changed.
My question is this. I have read that search engines aren't able to use #these-words. So therefore, my entire site won't be able to be indexed (as it will look like one page).
What can i do to get around this, or at least make my sub-pages be able to get indexed?
NOTE: I have built almost all of the site, so radically changes would be hard. SEO is my weakest geek-skill.
Add non-AJAX versions of every page, and link to them from your popups as "permalinks" (or whatever you want to call them). Not only aren't your pages available to search engines, they can't be bookmarked or emailed to friends. I recently worked with some designers on a site and talked them out of using an AJAX-only design. They ended up putting article "teasers" in popups and making users go to a page with a bookmarkable URL to read the complete texts.
As difficult as it may be, the "best" answer may be to re-architect your site to use the hash tag URL scheme more sparingly
Short of that, I'd suggest the following:
Create an alternative, non-hash based URL scheme. This is a must.
Create a site-map that allows search engines to find your existing pages through the new URL scheme.
Slowly port your site over. You might consider adding these deeper links on the page, or encourage users to share those links instead of the hash-based ones, etc.
Hope this helps!

Resources