Author |
Message |
Susann
Moderator

Joined: Dec 19, 2004
Posts: 3191
Location: Germany:Moderator German NukeSentinel Support
|
Posted:
Mon Sep 05, 2005 5:44 am |
|
Is there an easy way to to make survey´s in english and in other languages at the same time ?
We have started a survey in German till the end of the year.
Therefore the english site displays for the survey block:
There isn't content right now for this block. |
Last edited by Susann on Fri Oct 21, 2005 7:19 am; edited 1 time in total |
|
|
 |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Fri Sep 09, 2005 12:23 pm |
|
Why not just code the options in both languages at the same time? In other words, ask the question in both languages. Then, in the options, code them in both languages. Let's say (since my German is almost nil) that you could answer Yes or No. Your options would show
Do you speak German? - Sprechen Sie Deutsches?
Yes (Ja)
No (Nein)
Anyway, you get my meaning I'm sure  |
|
|
|
 |
Susann

|
Posted:
Fri Sep 09, 2005 4:28 pm |
|
Your solution is very clever and definitely multilingual .
But I would like to have 2 different surveys.The German block is called "Umfrage" and the Englisch block "Surveys" or "Vote" and of course with other questions.
If there are too many English words on the German site it could be a problem for some search engines. But I will think over different solutions.
Btw:Sprechen Sie Deutsch ? |
Last edited by Susann on Fri Sep 09, 2005 4:32 pm; edited 1 time in total |
|
|
 |
Raven

|
Posted:
Fri Sep 09, 2005 4:30 pm |
|
You will need to create another Survey block with corresponding tables. That is really the easiest and quickest way. |
|
|
|
 |
Susann

|
Posted:
Thu Oct 20, 2005 6:40 pm |
|
Our new survey is multilingual but I´m wondering it´s not possible to show this block in all languages.I have checked http://nukeum66.us/ and his survey block works well in all languages.
When I create a new survey in nuke 6.5 I can only choose between English, French or German. The settings in the administration for this block is for all visitors and all languages.
But still"there isn´t content right now for this block". Really, I hate this sentence.
How can I get this survey working on the English and French part of our website ?
Only registered users can see links on this board! Get registered or login! |
|
|
|
 |
Nukeum66
Life Cycles Becoming CPU Cycles

Joined: Jul 30, 2003
Posts: 551
Location: Neurotic, State, USA
|
Posted:
Fri Oct 21, 2005 5:59 am |
|
Well, my Survey block is just the standard block that ships with 7.6.3.0. If you think it may help you here is the code.
Code:<?php
/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
/* Additional security & Abstraction layer conversion */
/* 2003 chatserv */
/* http://www.nukefixes.com -- http://www.nukeresources.com */
/************************************************************************/
if ( !defined('BLOCK_FILE') ) {
Header("Location: ../index.php");
die();
}
global $prefix, $multilingual, $currentlang, $db, $boxTitle, $content, $pollcomm, $user, $cookie;
if ($multilingual == 1) {
$querylang = "WHERE planguage='$currentlang' AND artid='0'";
} else {
$querylang = "WHERE artid='0'";
}
$row = $db->sql_fetchrow($db->sql_query("SELECT pollID FROM ".$prefix."_poll_desc $querylang ORDER BY pollID DESC LIMIT 1"));
$pollID = intval($row['pollID']);
if ($pollID == 0 || $pollID == "") {
$content = "";
} else {
if (!isset($url)) {
$url = sprintf("modules.php?name=Surveys&op=results&pollID=%d", $pollID);
}
$content = "<form action=\"surveys.html\" method=\"post\">";
$content .= "<input type=\"hidden\" name=\"pollID\" value=\"".$pollID."\">";
$content .= "<input type=\"hidden\" name=\"forwarder\" value=\"".$url."\">";
$row2 = $db->sql_fetchrow($db->sql_query("SELECT pollTitle, voters FROM ".$prefix."_poll_desc WHERE pollID='$pollID'"));
$pollTitle = $row2['pollTitle'];
$voters = intval($row2['voters']);
$boxTitle = _SURVEY;
$content .= "<font class=\"content\"><b>$pollTitle</b></font><br><br>\n";
$content .= "<table border=\"0\" width=\"100%\" summary=\"survey_table1\">";
for($i = 1; $i <= 12; $i++) {
$row3 = $db->sql_fetchrow($db->sql_query("SELECT pollID, optionText, optionCount, voteID FROM ".$prefix."_poll_data WHERE (pollID='$pollID') AND (voteID='$i')"));
if(isset($row3)) {
$optionText = $row3['optionText'];
if ($optionText != "") {
$content .= "<tr><td valign=\"top\"><input type=\"radio\" name=\"voteID\" value=\"".$i."\"></td><td width=\"100%\"><font class=\"content\">$optionText</font></td></tr>\n";
}
}
}
$content .= "</table><br><center><font class=\"content\"><input type=\"submit\" value=\""._VOTE."\"></font><br>";
if (is_user($user)) {
cookiedecode($user);
}
for($i = 0; $i < 12; $i++) {
$row4 = $db->sql_fetchrow($db->sql_query("SELECT optionCount FROM ".$prefix."_poll_data WHERE (pollID='$pollID') AND (voteID='$i')"));
$optionCount = intval($row4['optionCount']);
$sum = (int)$sum+$optionCount;
}
$content .= "<br><font class=\"content\"><a href=\"modules.php?name=Surveys&op=results&pollID=$pollID&mode=$cookie[4]&order=$cookie[5]&thold=$cookie[6]\"><b>"._RESULTS."</b></a><br><a href=\"surveys.html\"><b>"._POLLS."</b></a><br>";
if ($pollcomm) {
$numcom = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_pollcomments WHERE pollID='$pollID'"));
$content .= "<br>"._VOTES.": <b>$sum</b> <br> "._PCOMMENTS." <b>$numcom</b>\n\n";
} else {
$content .= "<br>"._VOTES." <b>$sum</b>\n\n";
}
$content .= "</font></center></form>\n\n";
}
?>
|
|
_________________ Scott Johnson MIS Ubuntu/Linux 11.10 |
|
|
 |
Susann

|
Posted:
Fri Oct 21, 2005 6:23 am |
|
Thanks for the code.
I like your new design.
I ´ll check it, but I´m interested what planguage is in your table nuke_poll_desc. I have set this to german maybe it´s wrong ? |
|
|
|
 |
Nukeum66

|
Posted:
Fri Oct 21, 2005 6:37 am |
|
|
|
 |
Susann

|
Posted:
Fri Oct 21, 2005 7:08 am |
|
Thanks again. I just tried your code gaves me a never ending loop. But I ´ll go through the code to find the difference. Maybe I try a survey block from 6.9.
If I set the languages to english I have on the main page my latest survey and on the english page the newest survey. It´s not the solotion. |
|
|
|
 |
Nukeum66

|
Posted:
Fri Oct 21, 2005 7:16 am |
|
Sorry I did not mean for you to use the block code as a replacement, but rather as a refference..... I'll have more time this evening to try and help you sort through this problem, but for now I'm off to work.....  |
|
|
|
 |
Susann

|
Posted:
Fri Oct 21, 2005 7:50 pm |
|
I tried today the 6.9 index.php and the block from nuke 6.9 and I added the missing french language file into the folder.
Changed also the first lines of your code afterthat your code works without loop but still the same empty content for the english and french survey block.
Do you have any other ideas ? |
|
|
|
 |
|