Xuups
Get an account!     Login

Utilities

Main menu

Who's Online

10 user(s) are online (1 user(s) are browsing Hacks and Tips)

Members: 0
Guests: 10

more...

Get Xoops

Support Xuups Project

Modules :  jQuery's Quick Comment Hack for News Module
Tags: news   comments   jQuery  
 
jQuery's Quick Comment Hack allow your site's visitors to post comments from article page directly.

Quick comment box will display at the bottom of the article instead of Post Comment button.

Installation:
1. Download jquery.js file ( click here ), then upload it to modules/news/js folder.

2. Add this line to your theme.html between and :

<script type="text/javascript" src="<{$xoops_url}>/modules/news/js/jquery-1.2.6.min.js"></script>


3. edit modules/news/templates/news_article.hml and replace:

<div style="text-align: center; padding: 3px; margin:3px;">  
    <{
$commentsnav}>  
    <{
$lang_notice}>  
</
div>


with:

<script>  
jQuery.noConflict();
jQuery(document).ready(function($) {  
    
jQuery.get("comment_new.php?com_itemid=<{$story.id}>", function(data){  
        $(
'#quickcomment').append(data.substring(data.indexOf("<form name='commentform'"),data.indexOf("<!-- End Form Vaidation JavaScript //-->")));  
    });  
}); 
</script>  

<div id="quickcomment" style="text-align: center; padding: 3px; margin:3px;"><{$lang_notice}></div>


Don't forget to turn on Check templates for modifications via General Settings.

Demo: click here




www.arabxoops.com

Author
Mowaffaq
Author Mowaffaq
News by the same authorMore stories
Author rssAuthor rss
StatisticsStatistics
 
Story
Date 2008/12/13 23:11:47
Views 7541
Favorites 1
Send this Story to a FriendSend
Printer Friendly PagePrint
Create a PDF from the articleCreate a pdf
 
Bookmarks
         
         
         
         
         
     
Recents
jQuery's Quick Comment Hack for News Module
Hide Read More link in smartsection spot block
Random
jQuery's Quick Comment Hack for News Module
Hide Read More link in smartsection spot block
The comments are owned by the poster. We aren't responsible for their content.
Poster Thread
trabis
Posted: 2008/12/15 19:25  Updated: 2008/12/15 19:25
Moderator
Joined: 2008/4/7
From: Portugal
Posts: 303
 Re: jQuery's Quick Comment Hack for News Module
This is a very interesting way of include extra content on a page.
Your tip was highly appreciated, thanks for sharing!
Mowaffaq
Posted: 2008/12/16 13:11  Updated: 2008/12/16 13:11
Moderator
Joined: 2008/6/2
From:
Posts: 48
 Re: jQuery's Quick Comment Hack for News Module
Thnx bro

I modify it to prevent any conflict with other javascripts.
Deka87
Posted: 2009/4/6 19:31  Updated: 2009/4/6 19:31
Just popping in
Joined: 2008/12/22
From:
Posts: 2
 Re: jQuery's Quick Comment Hack for News Module
is there any way to get it working with smartsection and other modules?
bjuti
Posted: 2009/5/12 23:12  Updated: 2009/5/12 23:12
Just popping in
Joined: 2009/1/25
From:
Posts: 13
 Re: jQuery's Quick Comment Hack for News Module
Any chance getting it WORK at all? :)

I got blank window with font selector :D
 

Login

Username:

Password:

Remember me



Lost Password?

Register now!

Ajax Search


Advanced Search

Sub menu

Last comments