Code Monkey home page Code Monkey logo

Comments (7)

mitsukarenai avatar mitsukarenai commented on June 8, 2024

Oui il y a pas mal de situations où ça serait bien. Par exemple pour un flux par émissions sur Nolife Online, par thème sur Arte+7,...
Par contre c'est un changement de mécanique interne qui m'est inaccessible. Contributions bienvenues

from rss-bridge.

qwertygc avatar qwertygc commented on June 8, 2024

function select($name, $array, $select='', $keyvalue=false) { #$name : name=""(string) #$array : value posted in select 'value'=>'view' (Array) #$keyvalue : if true : 'value'=>'view' else 'value' (Boolean) $selected = ''; $form= '<select name="'.$name.'">'."n"; if($keyvalue) { foreach($array as $key => $option) { if($select === $key) { $selected = ' selected="selected"'; } $form .= "\t".'<option value="'.$key.'"'.$selected.'>'.$option.'</option>'."\n"; $selected=''; } } else { foreach($array as $option) { if($select === $option) { $selected = ' selected="selected"'; } $form .= "\t".'<option value="'.$option.'"'.$selected.'>'.$option.'</option>'."\n"; $selected=''; } } $form .= '</select>'.PHP_EOL; echo $form; }
Si ca peut dépanner.

from rss-bridge.

mitsukarenai avatar mitsukarenai commented on June 8, 2024

Je reviens là dessus: j'ai pas trop su comment intégrer ton code ^^ Pourrais-tu faire une démo dans un fork pour test ?

from rss-bridge.

qwertygc avatar qwertygc commented on June 8, 2024

à vrai dire, je ne sais pas utiliser ton code. le $name correspond au nom de l'array (le ), l'array le contenu (la clé étant l'idée, donc CONTENU DE L'ARRAY</option). $select est le choix par défaut et $keyvalue, c'est juste pour savoir si tu utilise une clé, faut mettre à true.

from rss-bridge.

mitsukarenai avatar mitsukarenai commented on June 8, 2024

Je reviens sur cet issue: avec le nouveau site pour Arte+7, je ressens bien le besoin pour une liste déroulante, afin de sélectionner la catégorie que l'on souhaite 😢

Au niveau des bridges, un exemple de syntaxe pourrait être:

* @use1(list["choix 1","option 2","autre solution"])

(en gros le mot-clé list signalant un array JSON dont chaque élément correspond à une option de liste)

Contributions et idées fortement bienvenues !

from rss-bridge.

teromene avatar teromene commented on June 8, 2024

Tu peux regarder ma PR #156, où je propose une implémentation. Cela reste encore à tester.

La syntaxe que j'ai utilisé est la suivante :
@use1(list|u="nomdeloption1=>valeurdeloption1; option 2 => valeur de l'option 2")

from rss-bridge.

mitsukarenai avatar mitsukarenai commented on June 8, 2024

Mergé

from rss-bridge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.