#1  
Alt 13.12.06, 16:05
Forum Zuschauer
 
Registriert seit: 03.12.06
Beiträge: 4
Multiple Checkbox

Hi there,

For those who look for a check for a multiple checkbox in TS: a rough solution:

Include the following script e.c. with
includeLibs.multipleSelect = fileadmin/templates/multipleCheckbox.inc

That the script works you have to set some variables:


Zitat:
######
## table = table where you want to find to find the multiple checkbox
## select = here you can set search criteria // or replace in the script 'uid="'.t3lib_div::_GP('userUID').'"' for e.c.
## var = name of the multiple checkbox in the table
## count = how many possible answers or values the variable has
## val = the value to check

temp.checkbox = USER
temp.checkbox.userFunc = user_selectFunc
temp.checkbox.userFunc.table = fe_users
temp.checkbox.userFunc.select = pid=24
temp.checkbox.userFunc.var = tx_feuserext_arzt_praxinfo1
temp.checkbox.userFunc.count = 19
So you can use it then e.c. like this:

Zitat:
checkbox = TEXT
checkbox.data = LLL:EXT:feuserext/locallang_db.xml:fe_users.tx_feuserext_arzt_praxinfo.I.1
checkbox.wrap = <b>|</b>
checkbox.if.isTrue.cObject < temp.checkbox
checkbox.if.isTrue.cObject.userFunc.val = 1

And here the script (still leaking in the matter of not enough time ;) thanx to rainer & co:


Zitat:
<?php

function user_selectFunc($content,$conf) {
$boxArr[] = array();
$lConf = $conf["userFunc."];;
$table = $lConf["table"];
$select = $lConf["select"];
$var = $lConf["var"];
$count = $lConf["count"];
$val = $lConf["val"];
$k = 1;

$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($var,$table,$select,'','','');
$row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);


$features = $row[$var];
for ($m=0; $m < $count; $m++) {
if ($features & $k) {
$boxArr[$m]=1;
} else {
$boxArr[$m]=0;
}
$k *= 2;
}
$content = $boxArr[$val];
return $content;
}

?>


> I want to display the values of a multible checkbox if they are checked.
>
> 20. = TEXT
> 20.data =
> LLL:EXT:feuserext/locallang_db.xml:fe_users.tx_feuserext_arzt_praxinfo.I.1
> 20.if.isTrue.data = DB : fe_users:24:tx_feuserext_arzt_praxinfo|1
>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
Mit Zitat antworten
Sponsored Links
Unterstützen Sie das Forum und buchen Sie Ihren Webspace beim
T3N Testsieger, dem Webhoster der auch dieses Forum hostet!


Antwort

Lesezeichen

Themen-Optionen
Ansicht Thema bewerten
Thema bewerten:

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are an


LinkBacks (?)
LinkBack to this Thread: http://www.typo3forum.net/forum/typo3-4-x-fe-user/18511-multiple-checkbox.html
Erstellt von For Type Datum
[TYPO3] TS multible checkbox - TYPO3-Jack.net - Das TYPO3 Mailinglist Archiv This thread Refback 03.01.07 12:12

Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
mailformplus - multiple recipients tyan_trinity Alle anderen Extensions 5 28.08.08 15:03
Powermail und Multiple Selectbox Radiesel powermail 5 09.04.08 15:25
powermail - multiple select sandyweb powermail 3 12.03.08 18:57
Multiple Typo3 installation auf einem Webserver EmZet TYPO3 4.x Installation und Updates 8 13.12.07 09:26
Multiple Checkbox Problem beim Aufruf vario Extension modifizieren oder neu erstellen 0 06.02.07 13:41


Alle Zeitangaben in WEZ +1. Es ist jetzt 03:32 Uhr.


Powered by vBulletin® Version 3.8.4 (Deutsch)
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165