View Issue Details

This issue affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
04661Bug reportspublic2011-08-19 23:06
ReporterDenisChenu Assigned ToDenisChenu  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version1.90+ 
Fixed in Version1.91 
Summary04661: Place holder langage and survey format in template
Description

I had sometimes interest to use langage placeholder and surveyformat in template.
(in general in a body class)
I think it can be intersting to have this place holder.

Additional Information

Patch provided:
Add 2 placeholder for template:
{SURVEYLANGAGE} and {SURVEYFORMAT}

removing global $surveyformat

patch for 9180 revision

TagsNo tags attached.
Attached Files
placeholder.diff (672 bytes)   
2717c2717
<     global $help, $totalquestions, $surveyformat;
---
>     global $help, $totalquestions;
2727c2727,2735
< 
---
>     $surveylang= $clang->langcode;
>     if (isset($thissurvey['format']))
>     {
>         $surveyformat = str_replace(array("A","S","G"),array("allinone","questionbyquestion","groupbygroup"),$thissurvey['format']);
>     }
>     else
>     {
>         $surveyformat = "notsurvey";
>     }
2769c2777,2779
< 
---
>     if (strpos($line, "{SURVEYLANGAGE}") !== false) $line=str_replace("{SURVEYLANGAGE}", $surveylang, $line);
>     if (strpos($line, "{SURVEYFORMAT}") !== false) $line=str_replace("{SURVEYFORMAT}", $surveyformat, $line);
>     
placeholder.diff (672 bytes)   
Bug heat4
Complete LimeSurvey version number (& build)
I will donate to the project if issue is resolved
Browser
Database type & version
Server OS (if known)
Webserver software & version (if known)
PHP Version
Git branch / Pull Request URL

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2010-10-12 00:23

administrator   ~13105

Shnoulle, have you checked if the tags are proerly working in the template editor?

In general: Patches need to be created with Subversion (svn diff) against our development branch at:
https://limesurvey.svn.sourceforge.net/svnroot/limesurvey/source/limesurvey_dev

If you are sure the change work everwhere as expected please merge the patch with the limesurvey_dev branch.

DenisChenu

DenisChenu

2010-10-12 16:05

developer   ~13114

Put in 9222 dev revision

Issue History

Date Modified Username Field Change
2010-10-07 12:34 DenisChenu New Issue
2010-10-07 12:34 DenisChenu File Added: placeholder.diff
2010-10-07 12:35 DenisChenu Additional Information Updated
2010-10-12 00:23 c_schmitz Note Added: 13105
2010-10-12 00:23 c_schmitz Assigned To => DenisChenu
2010-10-12 00:23 c_schmitz Status new => feedback
2010-10-12 16:05 DenisChenu Note Added: 13114
2010-10-12 16:05 DenisChenu Status feedback => assigned
2010-10-12 16:05 DenisChenu Status assigned => resolved
2010-10-12 16:05 DenisChenu Fixed in Version => 1.91
2010-10-12 16:05 DenisChenu Resolution open => fixed
2011-08-19 23:06 c_schmitz Status resolved => closed
2026-11-20 10:33 c_schmitz Category Survey Design => (No Category)