Welcome, Guest. Please login or register.
Did you miss your activation email?
February 12, 2012, 11:02:39 PM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
149695 Posts in 21103 Topics by 7538 Members
Latest Member: ionline
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: New Module - AJAX Survey  (Read 3629 times)
SourDough

Offline Offline

Posts: 47


WWW
« on: July 09, 2008, 05:09:50 PM »

Hi,

I've created a new page module - AJAX Survey.  It is a five star rating survey that is based on http://boedesign.com/2008/02/18/ajax-star-rating/

I'd appreciate any feedback.

Nick
« Last Edit: July 11, 2008, 01:29:32 PM by SourDough » Logged
SourDough

Offline Offline

Posts: 47


WWW
« Reply #1 on: July 10, 2008, 09:14:27 PM »

I've attached a new rating_functions.ph p to replace the existing file.  In the new file, error_reporting is set to level 1 so that warning messages about the headers functions aren't displayed.  This isn't an issue in WB 2.7, however upon testing it was an issue in WB 2.6.7.

Nick
Logged
Bramus
Forum Team
*****
Offline Offline

Posts: 600


WWW
« Reply #2 on: July 10, 2008, 09:21:35 PM »

maybe zip the whole archive again and delete it from the first post, not everyone is reading all the posts, this makes it more clearer Wink

And for the addition, i havent tested it yet, but i think it is a nice little addition! Nice job!
Logged

BRAMUS Internet Services
jar

Offline Offline

Posts: 62


« Reply #3 on: July 10, 2008, 09:43:11 PM »

Hi,

I've created a new page module - AJAX Survey.  It is a five star rating survey that is based on http://boedesign.com/2008/02/18/ajax-star-rating/

I'd appreciate any feedback.

Nick


does` n work
look here :   http://www.news-bucovina.ro/pages/vot.php
Logged
Ruud
Board member
WebsiteBaker Org e.V.

Offline Offline

Posts: 2094



WWW
« Reply #4 on: July 10, 2008, 09:59:21 PM »

Add this in the <head> section of your template index page.

Code:
<?php    if(function_exists('register_frontend_modfiles')) {
    
register_frontend_modfiles('css');
    
register_frontend_modfiles('js'); } ?>


It is explained here: http://help.websitebaker.org/pages/en/advanced-docu/designer-guide/enhanced-template-elements.php#anker4

This module needs the special frontend.css to display the images correctly.

Ruud
Logged

Professional WebsiteBaker Developer
cnwb

Offline Offline

Posts: 234



WWW
« Reply #5 on: July 11, 2008, 03:16:38 AM »

AJAX Survey

Repacked ajaxsurvey-v1.0.zip with the rating_functions.zi p new rating_functions.ph p

Just remember that you need to add the following

Code:
   <?php 
    
// automatically include optional WB module files (frontend.css, frontend.js)
    
if (function_exists('register_frontend_modfiles')) {
        
register_frontend_modfiles('css');
        
register_frontend_modfiles('js');
    } 
?>

within your header of the template index.php your using or it won't work...

Example on how it should look in your template

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php 
        
echo defined('DEFAULT_CHARSET') ? DEFAULT_CHARSET 'utf-8'?>
" />
    <meta name="description" content="<?php page_description(); ?>" />
    <meta name="keywords" content="<?php page_keywords(); ?>" />
    <?php 
    
// automatically include optional WB module files (frontend.css, frontend.js)
    
if (function_exists('register_frontend_modfiles')) {
        
register_frontend_modfiles('css');
        
register_frontend_modfiles('js');
    } 
?>

    <link rel="stylesheet" type="text/css" href="<?php 
    
echo TEMPLATE_DIR?>
/template.css" media="screen,projection" />
    <link rel="stylesheet" type="text/css" href="<?php 
    
echo TEMPLATE_DIR?>
/print.css" media="print" />
    <title><?php page_title('''[WEBSITE_TITLE]'); ?></title>
</head>

Tested AJAX Survey using Internet Explorer 7 and Firefox 2.0.0.15 both worked fine for me!!

this module is based off a version created by
http://boedesign.com/2008/02/18/ajax-star-rating/

Which is based off a version created by
http://www.komodomedia.com/blog/2007/01/css-star-rating-redux/

Nice work thank you for the module
« Last Edit: January 01, 2009, 03:22:19 PM by cnwb » Logged

Argos
Moderator
**
Offline Offline

Posts: 2084


WWW
« Reply #6 on: July 12, 2008, 01:14:16 AM »

This has nothing to do with a survey. It's a rating function, not a survey function. Please rename, it's confusing now.
Logged

Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase: http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
cnwb

Offline Offline

Posts: 234



WWW
« Reply #7 on: July 12, 2008, 04:30:19 PM »

OK!!! After test this module and keeping track of the post here, Argos brought up a good point about

Quote
This has nothing to do with a survey. It's a rating function, not a survey function. Please rename, it's confusing now.

So I completely modified the module PHP and MYSQL files to reflect AJAX Star Rating instead of AJAX Survey..
and renamed the module..
 
I hope this clears up any confusion on the modules purpose..


You must do this FIRST!!!!!

If you previously installed ajaxsurvey.zip you will need to
delete any surveys from pages you created and then uninstall
module before installing this one or you will create problems in MYSQL..
« Last Edit: January 01, 2009, 03:22:33 PM by cnwb » Logged

soki

Offline Offline

Posts: 4


« Reply #8 on: August 26, 2008, 12:09:52 PM »

It's a nice modul and it works fine.
But my problem is: I want to show the rating results on two pages (only the result!).
Does anyone have an idea how to do this?

Logged
SourDough

Offline Offline

Posts: 47


WWW
« Reply #9 on: August 26, 2008, 01:52:09 PM »

It's a nice modul and it works fine.
But my problem is: I want to show the rating results on two pages (only the result!).
Does anyone have an idea how to do this?



I'm not entirely clear.  Do you want just the numerical data, or do you also want the rating graphic.  I'm working on an update to this version that would provide a results page in the admin area.  However, there is no reason it couldn't be presented in the frontend. 

Can you be a bit more specific about "I want to show the rating results on two pages (only the result!)."

I guess I'd also be curious to know how you're using the module, any links?

Nick
Logged
soki

Offline Offline

Posts: 4


« Reply #10 on: August 26, 2008, 02:24:00 PM »

It's a new site which is not online. So I can't give you a link.

But I want to explain it with some more details.
On my new site, users can rate for dating sites.

The dating sites are in diffrent categories.
Example:
Categorie: Photo Voting Sites
provider 1          (here I want to show the result of rating)
provider 2                              "
provider 3                              "
And evry provider has its own detail site. On this detail site, users can rate.

Now I want to show the results of rating from the detail site additional on the categorie site (with rating graphic).

Logged
SourDough

Offline Offline

Posts: 47


WWW
« Reply #11 on: August 26, 2008, 06:00:48 PM »

I'm working on a snippet that should provide you with what you need. 

Nick
Logged
soki

Offline Offline

Posts: 4


« Reply #12 on: August 27, 2008, 08:59:48 AM »

That's great ! Thank you

Sven
Logged
SourDough

Offline Offline

Posts: 47


WWW
« Reply #13 on: August 27, 2008, 02:44:22 PM »

I've posted the snippet in the following thread: http://www.websitebaker2.org/forum/index.php/topic,10869.msg64592.html#msg64592.

Nick
Logged
chnosli

Offline Offline

Posts: 28



« Reply #14 on: April 30, 2010, 02:37:53 PM »

hello

i'm a snippet-rookie. could you tell me how i can install AJAX?
i don't know how i can start with this modul.

thank's for your help!
claudia
Logged
Argos
Moderator
**
Offline Offline

Posts: 2084


WWW
« Reply #15 on: April 30, 2010, 05:58:39 PM »

It's not a module, but a snippet. Snippets are php code and cannotbe installed like  module. Please read more about snippets on http://www.websitebaker2.org/en/add-ons/modules/code-snippets.php
Logged

Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase: http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!