MODx Community Forums
The MODx Blog
Donations
Feedburner Feeds
Documentation
Bugs & Requests
The Wiki
download MODx
plugins, modules, snippets
online demo
Jul 05, 2009, 01:40 PM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search via SMF
or Google:
modx forums
all of modxcms.com
web
MODxCMS.com
Forums
Help
Login
Register
News
:Read what MODx Developers say:
MODx Dev. Blogs
MODx Community Forums
»
Add-ons, Extensions & Elements
»
General Repository Items Support
»
Support/Comments for CssSwitcher
Pages: [
1
]
2
3
4
Go Down
« Previous topic
Next topic »
Print
Author
Topic: Support/Comments for CssSwitcher (Read 19391 times)
0 Members and 2 Guests are viewing this topic.
Guillaume
Moderators
Posts: 711
The future is built today.
Support/Comments for CssSwitcher
«
on:
Mar 23, 2006, 04:19 PM »
Hello !
Here a small snippet for users to switch between different style sheets, from the frontend.
Version: 0.4.1
Last released : 2006-05-15
First released : 2006-03-24
Features (new since last released in bold):
Display a dropdown list with css you want
Generate dropwdown list or html list from a folder if you want
Sort css file for the list
Ignore files from a list
Write the link to the stylesheet in the header for "screen"
Write the link to the stylesheet in the header for "print"
Possibility to specify one sheet for "print" or a group of sheets with a prefix (1)
Can use a different directory to store sheets for "print"
Style sheets for "print" are automatically ignore to generate the list of css
User preference is saved with a cookie
bug fix
(1) If a sheet exists with the same name of the sheet selected for the screen, this sheet will used.
Else, if the sheet defined by &cssprint exists, it will be used.
Otherwise, the sheet selected for the screen will be used.
Demonstration for dropdown menu :
http://www.buromatique.fr/
The file of the latest release is snippet.CssSwitcher.0.4.1.txt
Mod note: Downloads removed 26Jul06, as this is now in the repository. Here are the historical downloads:
* snippet.CssSwitcher.txt (6.97 KB - downloaded 228 times.)
* snippet.CssSwitcher.0.3.0.txt (9.97 KB - downloaded 174 times.)
* snippet.CssSwitcher.0.4.0.txt (13.06 KB - downloaded 111 times.)
* snippet.CssSwitcher.0.4.1.txt (13.3 KB - downloaded 103 times.)
«
Last Edit: Jul 26, 2006, 11:10 AM by PaulGregory
»
Logged
Sorry for my english. I'm french... My dictionary is near me, but it's only a dictionary !
kylej
Coding Team
Posts: 758
Re: [Snippet] CssSwitcher
«
Reply #1 on:
Mar 23, 2006, 07:50 PM »
Guillaume,
This looks great! I like how you have the cookie to remember the settings. One modification that might be nice would be to allow the use of style sheets stored as documents. Maybe if you could specify a document folder and it would use the css documents below that. Then you could have dynamic style sheets with the ability for the user to change the look.
Great work though, I will have to try this out.
Kyle
Logged
::
Download Modx
::
Add-on Repository
::
Documentation
::
Bug Tracker
::
Donate!
::
My Site - www.muddydogpaws.com
::
::
Wayfinder
::
AjaxSearch
::
FileDownload
::
DittoCal
::
TvTagCloud
::
Guillaume
Moderators
Posts: 711
The future is built today.
Re: [Snippet] CssSwitcher
«
Reply #2 on:
Mar 23, 2006, 07:54 PM »
I have found a bug : it is impossible to use more than 2 style sheet.
Please download the latest realsed to fix it,
from my first post
.
Logged
Sorry for my english. I'm french... My dictionary is near me, but it's only a dictionary !
Guillaume
Moderators
Posts: 711
The future is built today.
Re: [Snippet] CssSwitcher
«
Reply #3 on:
Mar 26, 2006, 09:24 AM »
New version is avalaibled : 0.2.0. See
my first post
.
Logged
Sorry for my english. I'm french... My dictionary is near me, but it's only a dictionary !
StainlessSteelRat
Jr. Member
Posts: 30
The love of my life, Leila Autumn
Re: [Snippet] CssSwitcher
«
Reply #4 on:
Mar 27, 2006, 12:46 PM »
Sorry if this seems like a dumb question, but where do I call this snippet? Within the HEAD section of my template? In a chunk within the BODY? I've tried it both places and it didn't seem to work for me. Thanks!
-Robert
Logged
Guillaume
Moderators
Posts: 711
The future is built today.
Re: [Snippet] CssSwitcher
«
Reply #5 on:
Mar 27, 2006, 02:47 PM »
Hi
Quote from: StainlessSteelRat on Mar 27, 2006, 12:46 PM
Sorry if this seems like a dumb question, but where do I call this snippet? Within the HEAD section of my template? In a chunk within the BODY? I've tried it both places and it didn't seem to work for me. Thanks!
You can call the snippet in the head and in the body.
In the head, &display must be '0' to create a link to the style sheet :
Code:
<head>....[!CssSwitcher? &display=`0` !]...</head>
In the body, $display must be '1' to display a dropdown list:
Code:
<body>...[!CssSwitcher? &display=`1` !]...</body>
If you have another problem, do not hesitate to ask because this snippet is young.
«
Last Edit: Mar 27, 2006, 02:55 PM by Guillaume
»
Logged
Sorry for my english. I'm french... My dictionary is near me, but it's only a dictionary !
StainlessSteelRat
Jr. Member
Posts: 30
The love of my life, Leila Autumn
Re: [Snippet] CssSwitcher
«
Reply #6 on:
Mar 28, 2006, 01:40 PM »
That did the trick! Thanks for the help.
Logged
Guillaume
Moderators
Posts: 711
The future is built today.
Re: [Snippet] CssSwitcher
«
Reply #7 on:
Mar 30, 2006, 03:57 PM »
New version is avalaibled : 0.3.0. See
my first post
.
Logged
Sorry for my english. I'm french... My dictionary is near me, but it's only a dictionary !
Colin
Full Member
Posts: 188
I love MODx!
Re: [Snippet] CssSwitcher
«
Reply #8 on:
Mar 30, 2006, 08:56 PM »
Very handy for accessibility!
Logged
Guillaume
Moderators
Posts: 711
The future is built today.
Re: [Snippet] CssSwitcher
«
Reply #9 on:
Apr 27, 2006, 01:34 PM »
New released availabled : 0.4.0. See
my first post
.
Logged
Sorry for my english. I'm french... My dictionary is near me, but it's only a dictionary !
Rachael
Jr. Member
Posts: 28
Re: [Snippet] CssSwitcher
«
Reply #10 on:
May 14, 2006, 07:19 AM »
In version 0.4.0 the configuration of $cssprintpre is wrong. This stops parsefolder from working as it filters out all files.
It is
Code:
$cssprintprefixe = 'print_';
but should be
Code:
$cssprintpre = 'print_';
Logged
Guillaume
Moderators
Posts: 711
The future is built today.
Re: [Snippet] CssSwitcher
«
Reply #11 on:
May 15, 2006, 06:15 AM »
Thanks for your message. In fact there is a bug but not where you indicate it.
This line
Code:
$cssprintpre = isset($cssprintpre) ? $cssprintpre : '';
should be
Code:
$cssprintpre = isset($cssprintpre) ? $cssprintpre : $cssprintprefixe;
This is fix with the
version 0.4.1
Logged
Sorry for my english. I'm french... My dictionary is near me, but it's only a dictionary !
bugsmi0
Sr. Member
Posts: 356
Re: [Snippet] CssSwitcher
«
Reply #12 on:
Jul 20, 2006, 06:09 PM »
where or how to set up the list of different css ?
i have the switch appearing in the page but it only shows default, how to display more ?
Logged
SMF Bookmark Mod - check it out
http://mods.simplemachines.org/index.php?mod=350
Guillaume
Moderators
Posts: 711
The future is built today.
Re: [Snippet] CssSwitcher
«
Reply #13 on:
Jul 20, 2006, 06:17 PM »
You must specify the folder wich contains yours css and the list will be generated automatically.
Else, you can specify them manually with a chunk : you add one option on the select box by css.
Logged
Sorry for my english. I'm french... My dictionary is near me, but it's only a dictionary !
bugsmi0
Sr. Member
Posts: 356
Re: [Snippet] CssSwitcher
«
Reply #14 on:
Jul 20, 2006, 06:25 PM »
i see and where would we specify the css folder ?
Logged
SMF Bookmark Mod - check it out
http://mods.simplemachines.org/index.php?mod=350
Pages: [
1
]
2
3
4
Go Up
Print
« Previous topic
Next topic »
Jump to:
Please select a destination:
-----------------------------
Announcements
-----------------------------
=> Important News
=> Security Notices
-----------------------------
Commercial Support
-----------------------------
=> [CS] About Commercial Support
-----------------------------
Development & Coding
-----------------------------
=> Commercial Inquiries & Bounties
=> Core Code
===> MODx Next
===> xPDO
=> Module, Plugin & Snippet Creation and Modification
=> In Development
=> Templates
-----------------------------
Add-ons, Extensions & Elements
-----------------------------
=> Module, Plugin & Snippet Usage
=> General Repository Items Support
=> Navigation & Tagging/Taxonomy
===> Wayfinder & DropMenu
=> Creating & Repurposing Content
===> Ditto
===> Jot
===> Front-end Document Management
=> Users, Authentication & Personalization
===> WebloginPE
===> WebLogin, WebSignup and WebChangePwd
=> Rich Text Editors & File Browser
===> TinyMCE
===> FCKeditor
===> MCPuck File Browser
=> Forms, Form Processing & Anti-Spam
===> eForm
=> Search
===> AjaxSearch
=> E-business
=> Polls, Calendars, Address Book and Community
=> Third-party integrations
=> Images, Videos & Podcasts
===> MaxiGallery
=> Manager, Parser & the Core
===> Backup & Versioning
===> Doc Finder
===> ManagerManager
===> PHx
=> Templates
-----------------------------
Support
-----------------------------
=> Release Support
===> 0.9.6.3
===> 0.9.6.2
===> 0.9.6.1
===> 0.9.6
===> 0.9.5 and earlier
=> General Support
===> MODx 101
===> E-Commerce, E-Marketing, Analytics & SEO
===> Hosting Experiences
===> IIS / Windows Hosting Issues
=> Documentation, Tips & Tricks
===> Documentation Suggestions & Corrections
-----------------------------
General Discussions
-----------------------------
=> General MODx Discussions
=> Webworker Lounge
=> Wishlist
=> You and Your Sites
=> modxcms.com Discussions and Suggestions
=> Off-topic
-----------------------------
International Support & Translations
-----------------------------
=> Internationalization
=> Bulgarian
===> Поддръжка
=====> Често задавани въпроси
=====> Инсталация
=====> Модули, Плъгини, Снипети и код
=====> Дизайн и Шаблони
===> Документация, Ръководства и Превод
=====> Документация
=====> Ръководства
=====> Превод
===> Общество
=====> Съобщения
=====> Представете се
=====> Представете сайта си
=====> Дискусии извън MODx
=> Chinese
=> Czech
===> Oznámení
=====> Důleitá oznámení/novinky
=====> Bezpečnost
===> Komunita
=====> Oznámení
=====> Představte se, prosím
=====> Ukázky práce
=====> Různé aneb cokoli co se jinam nehodí
===> Podpora
=====> FAQ (často kladené otázky)
=====> Instalace
=====> Moduly, pluginy, "snippets & code" (ablony zdrojových kódů)
=====> Design & ablony
===> Dokumentace, tutoriály (návody) a překlady
=====> Dokumentace
=====> Tutoriály (návody)
=====> Překlady (lokalizace)
=> Dutch
===> Ondersteuning
=====> Veel gestelde vragen
=====> Modules, Plugins, Snippets & Code
=====> Design & Templates
===> Documentatie, Tutorials en Vertalingen
=====> Documentatie
=====> Tutorials
=====> Vertalingen
===> Community
=====> Aankondigingen
=====> Stel jezelf voor
=====> Site Showcase
=====> De stamkroeg
=> Filipino
===> Suporta
=====> Kadalasang tanong
=====> Instalasyon
=====> Moduler, Maidadagdag, Karagdagang mga Code
=====> Desenyo at Templates
===> Dokumentasyon, Mga Turo, Mga Salin
=====> Dokumentasyon
=====> Mga Turo
=====> Mga Salin
===> Kumunidad
=====> Anunsyo
=====> Ipakilala ang sarili
=====> Ang Galing ng pinoy
=====> Tsismisan atbp
=> Finnish
===> Tuki
=====> UKK
=====> Asennus
=====> Moduulit, liitännäiset, koodinpätkät
=====> Ulkoasu/Sivustopohjat
===> Dokumentaatio, oppaat ja käännökset
=====> Dokumentaatio
=====> Käännökset
=====> Oppaat
===> Yhteisö
=====> Tiedotteet
=====> Esittele itsesi
=====> MODx sivustosi
=====> Kahvihuone
=> French
===> Support
=====> FAQ
=====> Installation
=====> Module, plugin, snippets
=====> Design/Templates
===> Documentation, Tutoriels et Traductions
=====> Documentation
=====> Traduction
=====> Tutoriels
===> Communauté
=====> Annonces
=====> Présentez vous
=====> Vos sites
=====> Le Bistrot Français
=> German
===> Support (de)
=====> FAQ (de)
=====> Installation (de)
=====> Module, Plugins, Snippets & Code (de)
=====> Design & Templates (de)
===> Dokumentation, Tutorials und Übersetzung
=====> Dokumentation
=====> Tutorials (de)
=====> Übersetzung
===> Community (de)
=====> Ankündigungen
=====> Stellt Euch vor
=====> Beispielseiten
=====> Off Topic / Verschiedenes
=> Hebrew
===> הכרזה
=====> חדשות חשובות
=====> אבטחה
===> תמיכה
=====> התקנה
=====> תיעוד, מדריכים ותרגומים
=====> עיצוב ותבניות
=====> שאלות נפוצות
===> תיעוד, מדריכים ותרגומים
=====> תיעוד
=====> מדריכים
=====> תרגומים
===> קהילה
=====> הודעות
=====> הצג את עצמך
=====> אתרים לדוגמא
=====> כללי
=> Irish
=> Italian
===> Supporto
=====> FAQ
=====> Installazione
=====> Moduli, Plugin, Snippet e altro codice
=====> Web Design e Template
===> Documentazione, Tutorial e Traduzione
=====> Documentazione
=====> Tutorial
=====> Traduzione
===> Comunitŕ
=====> Annunci
=====> Presentazioni
=====> Siti in vetrina
=====> Chiacchiere in libertŕ
=> Japanese
===> サポート
=====> 良くある質問
=====> インストール
=====> モジュール・プラグイン・スニペット・本体
=====> デザインやテンプレート
===> マニュアル・テュートリアル・翻訳
=====> マニュアル
=====> 事例集、テュートリアル
=====> 日本語化
===> コミュニティ
=====> お知らせ
=====> MODxサイト展示場
=====> 自己紹介
=====> 雑談
=====> 国産リソース
=> Persian - فارسي
===> پشتيباني
=====> راهنما
=====> نصب
=====> ماژول , پلاگین ها , کد ها و جزییات
=====> طراحی و قالب ها
===> مستند سازی , آموزش ها و ترجمه ها
=====> مستند سازی
=====> آموزش ها
=====> ترجمه ها
===> انجمن ها
=====> اخبار
=====> معرفی کردن خود
=====> نمایش دادن سایت ها
=====> بحث های عمومی و سایر موضوعات
=> Polish
===> Wsparcie
=====> FAQ
=====> Instalacja
=====> Moduły, pluginy, snipety i kod
=====> Wygląd i szablony
===> Dokumentacja, tutoriale i tłumaczenie
=====> Dokumentacja
=====> Tutoriale
=====> Tłumaczenie
===> Społeczność
=====> Ogłoszenia
=====> Przedstaw się
=====> Twój serwis WWW
=====> Hyde Park
=> Portuguese
===> Suporte
=====> FAQ - Dúvidas Frequentes
=====> Instalaçăo
=====> Módulos, Plugins, Snippets e Código
=====> Design e Templates
===> Documentaçăo, Guias e Traduçőes
=====> Documentaçăo
=====> Guias
=====> Traduçőes
===> Comunidade
=====> Anúncios
=====> Apresente-se!
=====> Bar da esquina (fora de tópico)
=====> Portfólio de Sites
=> Russian
===> Поддержка
=====> ЧАВО (FAQ)
=====> Установка
=====> Модули, плагины, сниппеты и код
=====> Дизайны и шаблоны
===> Документация, Уроки, Перевод
=====> Документация
=====> Уроки
=====> Перевод
===> Сообщество
=====> Объявления
=====> Представьтесь публике
=====> Галерея сайтов
=====> Диван
=> Scandanavian
===> Support
=====> Frĺgor och svar
=====> Installation
=====> Moduler, plugins, snippets och kod
=====> Design & sidmallar
===> Dokumentation, guider och översättningar
=====> Dokumentation
=====> Guider
=====> Översättningar
===> Webbgemenskap
=====> Meddelanden
=====> Presentera dig själv
=====> Visa upp dina webbsidor
=====> Ordet fritt
=> Slovak
=> Spanish
===> Soporte
=====> FAQ
=====> Instalación
=====> Modulos, Plugins, Snippets & Código
=====> Diseńo y plantillas
===> Documentación, Tutoriales y Traducciones
=====> Documentatción
=====> Tutoriales
=====> Traducciones
===> Comunidad
=====> Anuncios
=====> Presentaciones personales
=====> Muestra de sitios
=====> El Café
=> Swedish
=> TÜRKÇE (Turkish)
===> Destek
=====> SSS
=====> Kurulum
=====> Modüller, Pluginler, Snippetlar & Kodlar
=====> Dizayn & Temalar
===> Belgeleme, Eğitmenler ve Çeviri
=====> Belgeleme
=====> Eğitmenler
=====> Çeviri
===> Topluluk
=====> Duyurular
=====> Kendinizi Tanıtın
=====> Site Vitrini
=====> Konu Dışı